diff --git a/.gitignore b/.gitignore index 0ff213c4047..900b5ad8f30 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ hardware/arduino/bootloaders/caterina_LUFA/Caterina.lss hardware/arduino/bootloaders/caterina_LUFA/Caterina.elf hardware/arduino/bootloaders/caterina_LUFA/Caterina.eep hardware/arduino/bootloaders/caterina_LUFA/.dep/ +build/arduino-cli*.tar.gz build/*.zip build/*.tar.bz2 build/windows/work/ diff --git a/app/.classpath b/app/.classpath index bb2bf7417c6..34dbed6dc6a 100644 --- a/app/.classpath +++ b/app/.classpath @@ -54,5 +54,7 @@ + + diff --git a/app/build.xml b/app/build.xml index fa3223642ff..76c4ec5b371 100644 --- a/app/build.xml +++ b/app/build.xml @@ -5,6 +5,9 @@ + + + diff --git a/app/lib/grpc-core-1.20.0.jar b/app/lib/grpc-core-1.20.0.jar new file mode 100644 index 00000000000..a44ec185bbb Binary files /dev/null and b/app/lib/grpc-core-1.20.0.jar differ diff --git a/app/lib/grpc/protobuf-java-3.11.4.jar b/app/lib/grpc/protobuf-java-3.11.4.jar new file mode 100644 index 00000000000..7224d23dfd2 Binary files /dev/null and b/app/lib/grpc/protobuf-java-3.11.4.jar differ diff --git a/app/src/cc/arduino/contributions/ContributionsSelfCheck.java b/app/src/cc/arduino/contributions/ContributionsSelfCheck.java index 96fd987b099..0c146d4f6d5 100644 --- a/app/src/cc/arduino/contributions/ContributionsSelfCheck.java +++ b/app/src/cc/arduino/contributions/ContributionsSelfCheck.java @@ -30,7 +30,7 @@ package cc.arduino.contributions; import cc.arduino.UpdatableBoardsLibsFakeURLsHandler; -import cc.arduino.contributions.libraries.LibraryInstaller; +import cc.arduino.cli.ArduinoCoreInstance; import cc.arduino.contributions.libraries.filters.UpdatableLibraryPredicate; import cc.arduino.contributions.packages.ContributionInstaller; import cc.arduino.contributions.packages.filters.UpdatablePlatformPredicate; @@ -53,7 +53,7 @@ public class ContributionsSelfCheck extends TimerTask implements NotificationPop private final Base base; private final HyperlinkListener hyperlinkListener; private final ContributionInstaller contributionInstaller; - private final LibraryInstaller libraryInstaller; + private final ArduinoCoreInstance core; private final ProgressListener progressListener; private final String boardsManagerURL = "http://boardsmanager/DropdownUpdatableCoresItem"; private final String libraryManagerURL = "http://librarymanager/DropdownUpdatableLibrariesItem"; @@ -61,11 +61,11 @@ public class ContributionsSelfCheck extends TimerTask implements NotificationPop private volatile boolean cancelled; private volatile NotificationPopup notificationPopup; - public ContributionsSelfCheck(Base base, HyperlinkListener hyperlinkListener, ContributionInstaller contributionInstaller, LibraryInstaller libraryInstaller) { + public ContributionsSelfCheck(Base base, HyperlinkListener hyperlinkListener, ContributionInstaller contributionInstaller, ArduinoCoreInstance core) { this.base = base; this.hyperlinkListener = hyperlinkListener; this.contributionInstaller = contributionInstaller; - this.libraryInstaller = libraryInstaller; + this.core = core; this.progressListener = new NoopProgressListener(); this.cancelled = false; } @@ -176,13 +176,13 @@ public void onOptionalButton2Callback() { goToManager(libraryManagerURL); } - static boolean checkForUpdatablePlatforms() { + boolean checkForUpdatablePlatforms() { return BaseNoGui.indexer.getPackages().stream() .flatMap(pack -> pack.getPlatforms().stream()) .anyMatch(new UpdatablePlatformPredicate()); } - static boolean checkForUpdatableLibraries() { + boolean checkForUpdatableLibraries() { return BaseNoGui.librariesIndexer.getIndex().getLibraries().stream() .anyMatch(new UpdatableLibraryPredicate()); } @@ -201,7 +201,7 @@ private void updateLibrariesIndex() { return; } try { - libraryInstaller.updateIndex(progressListener); + core.updateLibrariesIndex(progressListener); } catch (Exception e) { // ignore } diff --git a/app/src/cc/arduino/contributions/libraries/LibraryOfSameTypeComparator.java b/app/src/cc/arduino/contributions/libraries/LibraryOfSameTypeComparator.java index 74bd3767518..12a619f788c 100644 --- a/app/src/cc/arduino/contributions/libraries/LibraryOfSameTypeComparator.java +++ b/app/src/cc/arduino/contributions/libraries/LibraryOfSameTypeComparator.java @@ -46,8 +46,10 @@ public int compare(UserLibrary o1, UserLibrary o2) { if (o2.getTypes().isEmpty()) { return -1; } - if (!o1.getTypes().get(0).equals(o2.getTypes().get(0))) { - return o1.getTypes().get(0).compareTo(o2.getTypes().get(0)); + String t1 = o1.getTypes().iterator().next(); + String t2 = o2.getTypes().iterator().next(); + if (!t1.equals(t2)) { + return t1.compareTo(t2); } return o1.getName().compareTo(o2.getName()); } diff --git a/app/src/cc/arduino/contributions/libraries/filters/UpdatableLibraryPredicate.java b/app/src/cc/arduino/contributions/libraries/filters/UpdatableLibraryPredicate.java index e96f1759423..c568c9482e7 100644 --- a/app/src/cc/arduino/contributions/libraries/filters/UpdatableLibraryPredicate.java +++ b/app/src/cc/arduino/contributions/libraries/filters/UpdatableLibraryPredicate.java @@ -29,11 +29,10 @@ package cc.arduino.contributions.libraries.filters; -import java.util.List; import java.util.function.Predicate; -import cc.arduino.contributions.VersionComparator; import cc.arduino.contributions.libraries.ContributedLibrary; +import cc.arduino.contributions.libraries.ContributedLibraryRelease; import cc.arduino.contributions.libraries.LibrariesIndexer; import processing.app.BaseNoGui; @@ -51,12 +50,10 @@ public UpdatableLibraryPredicate(LibrariesIndexer indexer) { @Override public boolean test(ContributedLibrary lib) { - if (!lib.isLibraryInstalled()) { + if (!lib.getInstalled().isPresent()) { return false; } - String libraryName = lib.getName(); - List libraries = librariesIndexer.getIndex().find(libraryName); - ContributedLibrary latest = libraries.stream().reduce(VersionComparator::max).get(); + ContributedLibraryRelease latest = lib.getLatest().get(); // it must be present return !latest.isLibraryInstalled(); } } diff --git a/app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryReleasesComparator.java b/app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryComparatorWithTypePriority.java similarity index 83% rename from app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryReleasesComparator.java rename to app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryComparatorWithTypePriority.java index 11436b2ccfb..fa42401d2f2 100644 --- a/app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryReleasesComparator.java +++ b/app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryComparatorWithTypePriority.java @@ -29,25 +29,25 @@ package cc.arduino.contributions.libraries.ui; +import cc.arduino.contributions.libraries.ContributedLibraryRelease; import cc.arduino.contributions.libraries.ContributedLibrary; -import cc.arduino.contributions.libraries.ContributedLibraryReleases; import java.util.Arrays; import java.util.Comparator; import java.util.List; -public class ContributedLibraryReleasesComparator implements Comparator { +public class ContributedLibraryComparatorWithTypePriority implements Comparator { private final String firstType; - public ContributedLibraryReleasesComparator(String firstType) { + public ContributedLibraryComparatorWithTypePriority(String firstType) { this.firstType = firstType; } @Override - public int compare(ContributedLibraryReleases o1, ContributedLibraryReleases o2) { - ContributedLibrary lib1 = o1.getLatest(); - ContributedLibrary lib2 = o2.getLatest(); + public int compare(ContributedLibrary o1, ContributedLibrary o2) { + ContributedLibraryRelease lib1 = o1.getLatest().get(); + ContributedLibraryRelease lib2 = o2.getLatest().get(); List types1 = lib1.getTypes(); List types2 = lib2.getTypes(); @@ -66,7 +66,7 @@ public int compare(ContributedLibraryReleases o1, ContributedLibraryReleases o2) return compareName(lib1, lib2); } - private int compareName(ContributedLibrary lib1, ContributedLibrary lib2) { + private int compareName(ContributedLibraryRelease lib1, ContributedLibraryRelease lib2) { return lib1.getName().compareToIgnoreCase(lib2.getName()); } diff --git a/app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryTableCellEditor.java b/app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryTableCellEditor.java index 7c2ecff383f..e91ec8930af 100644 --- a/app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryTableCellEditor.java +++ b/app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryTableCellEditor.java @@ -33,6 +33,8 @@ import java.awt.Color; import java.awt.Component; +import java.util.ArrayList; +import java.util.Collection; import java.util.Collections; import java.util.LinkedList; import java.util.List; @@ -44,38 +46,38 @@ import cc.arduino.contributions.DownloadableContributionVersionComparator; import cc.arduino.contributions.VersionComparator; import cc.arduino.contributions.libraries.ContributedLibrary; -import cc.arduino.contributions.libraries.ContributedLibraryReleases; +import cc.arduino.contributions.libraries.ContributedLibraryRelease; import cc.arduino.contributions.ui.InstallerTableCell; import cc.arduino.utils.ReverseComparator; @SuppressWarnings("serial") public class ContributedLibraryTableCellEditor extends InstallerTableCell { - private ContributedLibraryReleases editorValue; + private ContributedLibrary editorLibrary; private ContributedLibraryTableCellJPanel editorCell; @Override public Object getCellEditorValue() { - return editorValue; + return editorLibrary; } @Override public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { - editorValue = (ContributedLibraryReleases) value; + editorLibrary = (ContributedLibrary) value; editorCell = new ContributedLibraryTableCellJPanel(table, value, true); editorCell.installButton - .addActionListener(e -> onInstall(editorValue.getSelected(), - editorValue.getInstalled())); + .addActionListener(e -> onInstall(editorLibrary.getSelected().get(), + editorLibrary.getInstalled())); editorCell.downgradeButton.addActionListener(e -> { JComboBox chooser = editorCell.downgradeChooser; - ContributedLibrary lib = (ContributedLibrary) chooser.getSelectedItem(); - onInstall(lib, editorValue.getInstalled()); + ContributedLibraryRelease lib = (ContributedLibraryRelease) chooser.getSelectedItem(); + onInstall(lib, editorLibrary.getInstalled()); }); editorCell.versionToInstallChooser.addActionListener(e -> { - editorValue.select((ContributedLibrary) editorCell.versionToInstallChooser.getSelectedItem()); + editorLibrary.select((ContributedLibraryRelease) editorCell.versionToInstallChooser.getSelectedItem()); if (editorCell.versionToInstallChooser.getSelectedIndex() != 0) { InstallerTableCell.dropdownSelected(true); } @@ -83,12 +85,12 @@ public Component getTableCellEditorComponent(JTable table, Object value, setEnabled(true); - final Optional mayInstalled = editorValue.getInstalled(); + final Optional mayInstalled = editorLibrary.getInstalled(); - List releases = editorValue.getReleases(); - List notInstalled = new LinkedList<>(releases); + Collection releases = editorLibrary.getReleases(); + List notInstalled = new ArrayList<>(releases); if (mayInstalled.isPresent()) { - notInstalled.remove(editorValue.getInstalled().get()); + notInstalled.remove(mayInstalled.get()); } Collections.sort(notInstalled, new ReverseComparator<>( @@ -97,8 +99,8 @@ public Component getTableCellEditorComponent(JTable table, Object value, editorCell.downgradeChooser.removeAllItems(); editorCell.downgradeChooser.addItem(tr("Select version")); - final List notInstalledPrevious = new LinkedList<>(); - final List notInstalledNewer = new LinkedList<>(); + final List notInstalledPrevious = new LinkedList<>(); + final List notInstalledNewer = new LinkedList<>(); notInstalled.stream().forEach(input -> { if (!mayInstalled.isPresent() @@ -139,12 +141,12 @@ public void setStatus(String status) { editorCell.statusLabel.setText(status); } - protected void onRemove(ContributedLibrary selected) { + protected void onRemove(ContributedLibraryRelease selected) { // Empty } - protected void onInstall(ContributedLibrary selected, - Optional mayInstalled) { + protected void onInstall(ContributedLibraryRelease selected, + Optional mayInstalled) { // Empty } diff --git a/app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryTableCellJPanel.java b/app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryTableCellJPanel.java index 4f8c15f5642..0aa447c7f9b 100644 --- a/app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryTableCellJPanel.java +++ b/app/src/cc/arduino/contributions/libraries/ui/ContributedLibraryTableCellJPanel.java @@ -15,8 +15,8 @@ import javax.swing.text.html.StyleSheet; import cc.arduino.contributions.DownloadableContributionVersionComparator; +import cc.arduino.contributions.libraries.ContributedLibraryRelease; import cc.arduino.contributions.libraries.ContributedLibrary; -import cc.arduino.contributions.libraries.ContributedLibraryReleases; import cc.arduino.contributions.ui.InstallerTableCell; import processing.app.Base; import processing.app.PreferencesData; @@ -119,15 +119,15 @@ public ContributedLibraryTableCellJPanel(JTable parentTable, Object value, add(Box.createVerticalStrut(15)); - ContributedLibraryReleases releases = (ContributedLibraryReleases) value; + ContributedLibrary releases = (ContributedLibrary) value; // FIXME: happens on macosx, don't know why if (releases == null) return; - ContributedLibrary selected = releases.getSelected(); + ContributedLibraryRelease selected = releases.getSelected().get(); titledBorder.setTitle(selected.getName()); - Optional mayInstalled = releases.getInstalled(); + Optional mayInstalled = releases.getInstalled(); boolean installable, upgradable; if (!mayInstalled.isPresent()) { diff --git a/app/src/cc/arduino/contributions/libraries/ui/DropdownAllLibraries.java b/app/src/cc/arduino/contributions/libraries/ui/DropdownAllLibraries.java index ce50aca1432..c68fc8fd639 100644 --- a/app/src/cc/arduino/contributions/libraries/ui/DropdownAllLibraries.java +++ b/app/src/cc/arduino/contributions/libraries/ui/DropdownAllLibraries.java @@ -29,21 +29,21 @@ package cc.arduino.contributions.libraries.ui; -import cc.arduino.contributions.libraries.ContributedLibraryReleases; +import cc.arduino.contributions.libraries.ContributedLibrary; import cc.arduino.contributions.ui.DropdownItem; import java.util.function.Predicate; import static processing.app.I18n.tr; -public class DropdownAllLibraries implements DropdownItem { +public class DropdownAllLibraries implements DropdownItem { public String toString() { return tr("All"); } @Override - public Predicate getFilterPredicate() { + public Predicate getFilterPredicate() { return x -> true; } diff --git a/app/src/cc/arduino/contributions/libraries/ui/DropdownInstalledLibraryItem.java b/app/src/cc/arduino/contributions/libraries/ui/DropdownInstalledLibraryItem.java index e5b42e3b37a..fc9ea338afa 100644 --- a/app/src/cc/arduino/contributions/libraries/ui/DropdownInstalledLibraryItem.java +++ b/app/src/cc/arduino/contributions/libraries/ui/DropdownInstalledLibraryItem.java @@ -33,20 +33,20 @@ import java.util.function.Predicate; -import cc.arduino.contributions.libraries.ContributedLibraryReleases; +import cc.arduino.contributions.libraries.ContributedLibrary; import cc.arduino.contributions.ui.DropdownItem; -public class DropdownInstalledLibraryItem implements DropdownItem { +public class DropdownInstalledLibraryItem implements DropdownItem { public String toString() { return tr("Installed"); } @Override - public Predicate getFilterPredicate() { - return new Predicate() { + public Predicate getFilterPredicate() { + return new Predicate() { @Override - public boolean test(ContributedLibraryReleases t) { + public boolean test(ContributedLibrary t) { return t.getInstalled().isPresent(); } }; diff --git a/app/src/cc/arduino/contributions/libraries/ui/DropdownLibraryOfCategoryItem.java b/app/src/cc/arduino/contributions/libraries/ui/DropdownLibraryOfCategoryItem.java index 0d07b3ccf03..ba607b429a5 100644 --- a/app/src/cc/arduino/contributions/libraries/ui/DropdownLibraryOfCategoryItem.java +++ b/app/src/cc/arduino/contributions/libraries/ui/DropdownLibraryOfCategoryItem.java @@ -29,15 +29,15 @@ package cc.arduino.contributions.libraries.ui; +import cc.arduino.contributions.libraries.ContributedLibraryRelease; import cc.arduino.contributions.libraries.ContributedLibrary; -import cc.arduino.contributions.libraries.ContributedLibraryReleases; import cc.arduino.contributions.ui.DropdownItem; import java.util.function.Predicate; import static processing.app.I18n.tr; -public class DropdownLibraryOfCategoryItem implements DropdownItem { +public class DropdownLibraryOfCategoryItem implements DropdownItem { private final String category; @@ -50,11 +50,11 @@ public String toString() { } @Override - public Predicate getFilterPredicate() { - return new Predicate() { + public Predicate getFilterPredicate() { + return new Predicate() { @Override - public boolean test(ContributedLibraryReleases rel) { - ContributedLibrary lib = rel.getLatest(); + public boolean test(ContributedLibrary rel) { + ContributedLibraryRelease lib = rel.getLatest().get(); return category.equals(lib.getCategory()); } }; diff --git a/app/src/cc/arduino/contributions/libraries/ui/DropdownLibraryOfTypeItem.java b/app/src/cc/arduino/contributions/libraries/ui/DropdownLibraryOfTypeItem.java index 28f44a01894..d99ef71a9e9 100644 --- a/app/src/cc/arduino/contributions/libraries/ui/DropdownLibraryOfTypeItem.java +++ b/app/src/cc/arduino/contributions/libraries/ui/DropdownLibraryOfTypeItem.java @@ -29,7 +29,7 @@ package cc.arduino.contributions.libraries.ui; -import cc.arduino.contributions.libraries.ContributedLibraryReleases; +import cc.arduino.contributions.libraries.ContributedLibrary; import cc.arduino.contributions.ui.DropdownItem; import java.util.List; @@ -37,7 +37,7 @@ import static processing.app.I18n.tr; -public class DropdownLibraryOfTypeItem implements DropdownItem { +public class DropdownLibraryOfTypeItem implements DropdownItem { private final String type; @@ -50,11 +50,11 @@ public String toString() { } @Override - public Predicate getFilterPredicate() { - return new Predicate() { + public Predicate getFilterPredicate() { + return new Predicate() { @Override - public boolean test(ContributedLibraryReleases lib) { - List types = lib.getLatest().getTypes(); + public boolean test(ContributedLibrary lib) { + List types = lib.getLatest().get().getTypes(); return types != null && types.contains(type); } }; diff --git a/app/src/cc/arduino/contributions/libraries/ui/DropdownUpdatableLibrariesItem.java b/app/src/cc/arduino/contributions/libraries/ui/DropdownUpdatableLibrariesItem.java index 2c75498f822..c2ef73bd462 100644 --- a/app/src/cc/arduino/contributions/libraries/ui/DropdownUpdatableLibrariesItem.java +++ b/app/src/cc/arduino/contributions/libraries/ui/DropdownUpdatableLibrariesItem.java @@ -29,29 +29,19 @@ package cc.arduino.contributions.libraries.ui; -import cc.arduino.contributions.libraries.ContributedLibrary; -import cc.arduino.contributions.libraries.ContributedLibraryReleases; -import cc.arduino.contributions.ui.DropdownItem; +import static processing.app.I18n.tr; -import java.util.Optional; import java.util.function.Predicate; -import static processing.app.I18n.tr; +import cc.arduino.contributions.libraries.ContributedLibrary; +import cc.arduino.contributions.libraries.filters.UpdatableLibraryPredicate; +import cc.arduino.contributions.ui.DropdownItem; -public class DropdownUpdatableLibrariesItem implements DropdownItem { +public class DropdownUpdatableLibrariesItem implements DropdownItem { @Override - public Predicate getFilterPredicate() { - return new Predicate() { - @Override - public boolean test(ContributedLibraryReleases lib) { - Optional mayInstalled = lib.getInstalled(); - if (!mayInstalled.isPresent()) { - return false; - } - return !lib.getLatest().equals(mayInstalled.get()); - } - }; + public Predicate getFilterPredicate() { + return new UpdatableLibraryPredicate(); } @Override diff --git a/app/src/cc/arduino/contributions/libraries/ui/LibrariesIndexTableModel.java b/app/src/cc/arduino/contributions/libraries/ui/LibrariesIndexTableModel.java index ceed4562f8d..096ce6c309a 100644 --- a/app/src/cc/arduino/contributions/libraries/ui/LibrariesIndexTableModel.java +++ b/app/src/cc/arduino/contributions/libraries/ui/LibrariesIndexTableModel.java @@ -29,32 +29,33 @@ package cc.arduino.contributions.libraries.ui; +import cc.arduino.contributions.libraries.ContributedLibraryRelease; import cc.arduino.contributions.libraries.ContributedLibrary; -import cc.arduino.contributions.libraries.ContributedLibraryReleases; import cc.arduino.contributions.packages.ContributedPlatform; import cc.arduino.contributions.ui.FilteredAbstractTableModel; import processing.app.BaseNoGui; import java.util.ArrayList; +import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.function.Predicate; @SuppressWarnings("serial") public class LibrariesIndexTableModel - extends FilteredAbstractTableModel { + extends FilteredAbstractTableModel { - private final List contributions = new ArrayList<>(); + private final List contributions = new ArrayList<>(); private final String[] columnNames = { "Description" }; private final Class[] columnTypes = { ContributedPlatform.class }; - Predicate selectedCategoryFilter = null; + Predicate selectedCategoryFilter = null; String selectedFilters[] = null; public void updateIndexFilter(String filters[], - Predicate additionalFilter) { + Predicate additionalFilter) { selectedCategoryFilter = additionalFilter; selectedFilters = filters; update(); @@ -117,7 +118,7 @@ public Object getValueAt(int row, int col) { if (row >= contributions.size()) { return null; } - ContributedLibraryReleases contribution = contributions.get(row); + ContributedLibrary contribution = contributions.get(row); return contribution;// .getSelected(); } @@ -126,12 +127,12 @@ public boolean isCellEditable(int row, int col) { return true; } - public ContributedLibraryReleases getReleases(int row) { + public ContributedLibrary getReleases(int row) { return contributions.get(row); } - public ContributedLibrary getSelectedRelease(int row) { - return contributions.get(row).getSelected(); + public ContributedLibraryRelease getSelectedRelease(int row) { + return contributions.get(row).getSelected().get(); } public void update() { @@ -139,12 +140,12 @@ public void update() { fireTableDataChanged(); } - private boolean filterCondition(ContributedLibraryReleases lib) { + private boolean filterCondition(ContributedLibrary lib) { if (selectedCategoryFilter != null && !selectedCategoryFilter.test(lib)) { return false; } - ContributedLibrary latest = lib.getLatest(); + ContributedLibraryRelease latest = lib.getLatest().get(); String compoundTargetSearchText = latest.getName() + " " + latest.getParagraph() + " " + latest.getSentence(); @@ -158,55 +159,12 @@ private boolean filterCondition(ContributedLibraryReleases lib) { return true; } - public void updateLibrary(ContributedLibrary lib) { - // Find the row interested in the change - int row = -1; - for (ContributedLibraryReleases releases : contributions) { - if (releases.shouldContain(lib)) - row = contributions.indexOf(releases); - } - - updateContributions(); - - // If the library is found in the list send update event - // or insert event on the specific row... - for (ContributedLibraryReleases releases : contributions) { - if (releases.shouldContain(lib)) { - if (row == -1) { - row = contributions.indexOf(releases); - fireTableRowsInserted(row, row); - } else { - fireTableRowsUpdated(row, row); - } - return; - } - } - // ...otherwise send a row deleted event - fireTableRowsDeleted(row, row); - } - - private List rebuildContributionsFromIndex() { - List res = new ArrayList<>(); - BaseNoGui.librariesIndexer.getIndex().getLibraries(). // - forEach(lib -> { - for (ContributedLibraryReleases contribution : res) { - if (!contribution.shouldContain(lib)) - continue; - contribution.add(lib); - return; - } - - res.add(new ContributedLibraryReleases(lib)); - }); - return res; - } - private void updateContributions() { - List all = rebuildContributionsFromIndex(); + Collection all = BaseNoGui.librariesIndexer.getIndex().getLibraries(); contributions.clear(); all.stream().filter(this::filterCondition).forEach(contributions::add); Collections.sort(contributions, - new ContributedLibraryReleasesComparator("Arduino")); + new ContributedLibraryComparatorWithTypePriority("Arduino")); } } diff --git a/app/src/cc/arduino/contributions/libraries/ui/LibraryManagerUI.java b/app/src/cc/arduino/contributions/libraries/ui/LibraryManagerUI.java index 69ab10006c9..955037e225a 100644 --- a/app/src/cc/arduino/contributions/libraries/ui/LibraryManagerUI.java +++ b/app/src/cc/arduino/contributions/libraries/ui/LibraryManagerUI.java @@ -48,9 +48,9 @@ import javax.swing.JOptionPane; import javax.swing.table.TableCellRenderer; +import cc.arduino.contributions.libraries.ContributedLibraryRelease; +import cc.arduino.cli.ArduinoCoreInstance; import cc.arduino.contributions.libraries.ContributedLibrary; -import cc.arduino.contributions.libraries.ContributedLibraryReleases; -import cc.arduino.contributions.libraries.LibraryInstaller; import cc.arduino.contributions.libraries.LibraryTypeComparator; import cc.arduino.contributions.libraries.ui.MultiLibraryInstallDialog.Result; import cc.arduino.contributions.ui.DropdownItem; @@ -62,10 +62,10 @@ import processing.app.BaseNoGui; @SuppressWarnings("serial") -public class LibraryManagerUI extends InstallerJDialog { +public class LibraryManagerUI extends InstallerJDialog { + private final ArduinoCoreInstance core; private final JComboBox typeChooser; - private final LibraryInstaller installer; @Override protected FilteredAbstractTableModel createContribModel() { @@ -85,7 +85,7 @@ protected TableCellRenderer createCellRenderer() { protected InstallerTableCell createCellEditor() { return new ContributedLibraryTableCellEditor() { @Override - protected void onInstall(ContributedLibrary selectedLibrary, Optional mayInstalledLibrary) { + protected void onInstall(ContributedLibraryRelease selectedLibrary, Optional mayInstalledLibrary) { if (mayInstalledLibrary.isPresent() && selectedLibrary.isIDEBuiltIn()) { onRemovePressed(mayInstalledLibrary.get()); } else { @@ -94,15 +94,15 @@ protected void onInstall(ContributedLibrary selectedLibrary, Optional selected = (DropdownItem) typeChooser.getSelectedItem(); + DropdownItem selected = (DropdownItem) typeChooser.getSelectedItem(); previousRowAtPoint = -1; if (selected != null && extraFilter != selected.getFilterPredicate()) { extraFilter = selected.getFilterPredicate(); @@ -200,7 +200,7 @@ protected void onUpdatePressed() { installerThread = new Thread(() -> { try { setProgressVisible(true, ""); - installer.updateIndex(this::setProgress); + core.updateLibrariesIndex(this::setProgress); onIndexesUpdated(); if (contribTable.getCellEditor() != null) { contribTable.getCellEditor().stopCellEditing(); @@ -217,8 +217,8 @@ protected void onUpdatePressed() { installerThread.start(); } - public void onInstallPressed(final ContributedLibrary lib) { - List deps = BaseNoGui.librariesIndexer.getIndex().resolveDependeciesOf(lib); + public void onInstallPressed(final ContributedLibraryRelease lib) { + List deps = core.libraryResolveDependecies(lib); boolean depsInstalled = deps.stream().allMatch(l -> l.getInstalledLibrary().isPresent() || l.getName().equals(lib.getName())); Result installDeps; if (!depsInstalled) { @@ -237,9 +237,11 @@ public void onInstallPressed(final ContributedLibrary lib) { try { setProgressVisible(true, tr("Installing...")); if (installDeps == Result.ALL) { - installer.install(deps, this::setProgress); + deps.forEach(dep -> { + core.libraryInstall(dep, this::setProgress); + }); } else { - installer.install(lib, this::setProgress); + core.libraryInstall(lib, this::setProgress); } onIndexesUpdated(); if (contribTable.getCellEditor() != null) { @@ -257,8 +259,8 @@ public void onInstallPressed(final ContributedLibrary lib) { installerThread.start(); } - public void onRemovePressed(final ContributedLibrary lib) { - boolean managedByIndex = BaseNoGui.librariesIndexer.getIndex().getLibraries().contains(lib); + public void onRemovePressed(final ContributedLibraryRelease lib) { + boolean managedByIndex = BaseNoGui.librariesIndexer.getIndex().getLibraries().contains(lib.getLibrary()); if (!managedByIndex) { int chosenOption = JOptionPane.showConfirmDialog(this, tr("This library is not listed on Library Manager. You won't be able to reinstall it from here.\nAre you sure you want to delete it?"), tr("Please confirm library deletion"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); @@ -271,7 +273,7 @@ public void onRemovePressed(final ContributedLibrary lib) { installerThread = new Thread(() -> { try { setProgressVisible(true, tr("Removing...")); - installer.remove(lib, this::setProgress); + core.libraryRemove(lib, this::setProgress); onIndexesUpdated(); if (contribTable.getCellEditor() != null) { contribTable.getCellEditor().stopCellEditing(); diff --git a/app/src/cc/arduino/contributions/libraries/ui/MultiLibraryInstallDialog.java b/app/src/cc/arduino/contributions/libraries/ui/MultiLibraryInstallDialog.java index 75f7703f430..4c6e8a4df4e 100644 --- a/app/src/cc/arduino/contributions/libraries/ui/MultiLibraryInstallDialog.java +++ b/app/src/cc/arduino/contributions/libraries/ui/MultiLibraryInstallDialog.java @@ -51,8 +51,7 @@ import javax.swing.text.html.HTMLDocument; import javax.swing.text.html.StyleSheet; -import cc.arduino.contributions.libraries.ContributedLibrary; -import cc.arduino.contributions.libraries.UnavailableContributedLibrary; +import cc.arduino.contributions.libraries.ContributedLibraryRelease; import processing.app.Base; import processing.app.Theme; @@ -64,8 +63,8 @@ enum Result { private Result result = Result.CANCEL; - public MultiLibraryInstallDialog(Window parent, ContributedLibrary lib, - List dependencies) { + public MultiLibraryInstallDialog(Window parent, ContributedLibraryRelease lib, + List dependencies) { super(parent, format(tr("Dependencies for library {0}:{1}"), lib.getName(), lib.getParsedVersion()), ModalityType.APPLICATION_MODAL); @@ -115,13 +114,11 @@ public MultiLibraryInstallDialog(Window parent, ContributedLibrary lib, String desc = format(tr("The library {0} needs some other library
dependencies currently not installed:"), libName); desc += "

"; - for (ContributedLibrary l : dependencies) { + for (ContributedLibraryRelease l : dependencies) { if (l.getName().equals(lib.getName())) continue; if (l.getInstalledLibrary().isPresent()) continue; - if (l instanceof UnavailableContributedLibrary) - continue; desc += format("- {0}
", l.getName()); } desc += "
"; diff --git a/app/src/cc/arduino/view/preferences/Preferences.java b/app/src/cc/arduino/view/preferences/Preferences.java index 005d2f83e54..13283d0490a 100644 --- a/app/src/cc/arduino/view/preferences/Preferences.java +++ b/app/src/cc/arduino/view/preferences/Preferences.java @@ -32,6 +32,7 @@ import cc.arduino.Constants; import cc.arduino.i18n.Language; import cc.arduino.i18n.Languages; +import io.grpc.StatusException; import processing.app.Base; import processing.app.BaseNoGui; import processing.app.Editor; @@ -653,6 +654,11 @@ private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRS } savePreferencesData(); + try { + BaseNoGui.getArduinoCoreService().updateSettingFromPreferences(); + } catch (StatusException e) { + e.printStackTrace(); + } base.getEditors().forEach(processing.app.Editor::applyPreferences); cancelButtonActionPerformed(evt); }//GEN-LAST:event_okButtonActionPerformed diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java index 1e4819bba34..8b3860d069c 100644 --- a/app/src/processing/app/Base.java +++ b/app/src/processing/app/Base.java @@ -26,10 +26,11 @@ import cc.arduino.Constants; import cc.arduino.UpdatableBoardsLibsFakeURLsHandler; import cc.arduino.UploaderUtils; +import cc.arduino.cli.commands.Lib.LibraryLocation; import cc.arduino.contributions.*; import cc.arduino.contributions.libraries.ContributedLibrary; +import cc.arduino.contributions.libraries.ContributedLibraryRelease; import cc.arduino.contributions.libraries.LibrariesIndexer; -import cc.arduino.contributions.libraries.LibraryInstaller; import cc.arduino.contributions.libraries.LibraryOfSameTypeComparator; import cc.arduino.contributions.libraries.ui.LibraryManagerUI; import cc.arduino.contributions.packages.ContributedPlatform; @@ -56,7 +57,6 @@ import processing.app.macosx.ThinkDifferent; import processing.app.packages.LibraryList; import processing.app.packages.UserLibrary; -import processing.app.packages.UserLibraryFolder.Location; import processing.app.syntax.PdeKeywords; import processing.app.syntax.SketchTextAreaDefaultInputMap; import processing.app.tools.MenuScroller; @@ -94,7 +94,6 @@ public class Base { public static Map FIND_DIALOG_STATE = new HashMap<>(); private final ContributionInstaller contributionInstaller; - private final LibraryInstaller libraryInstaller; private ContributionsSelfCheck contributionsSelfCheck; // set to true after the first time the menu is built. @@ -240,6 +239,8 @@ public Base(String[] args) throws Exception { } } + BaseNoGui.initArduinoCoreService(); + SplashScreenHelper splash; if (parser.isGuiMode()) { // Setup all notification widgets @@ -285,9 +286,7 @@ public Base(String[] args) throws Exception { rebuildBoardsMenu(); rebuildProgrammerMenu(); } else { - TargetBoard lastSelectedBoard = BaseNoGui.getTargetBoard(); - if (lastSelectedBoard != null) - BaseNoGui.selectBoard(lastSelectedBoard); + BaseNoGui.getTargetBoard().ifPresent(board -> BaseNoGui.selectBoard(board)); } // Setup board-dependent variables. @@ -298,7 +297,6 @@ public Base(String[] args) throws Exception { final GPGDetachedSignatureVerifier gpgDetachedSignatureVerifier = new GPGDetachedSignatureVerifier(); contributionInstaller = new ContributionInstaller(BaseNoGui.getPlatform(), gpgDetachedSignatureVerifier); - libraryInstaller = new LibraryInstaller(BaseNoGui.getPlatform(), gpgDetachedSignatureVerifier); parser.parseArgumentsPhase2(); @@ -358,29 +356,27 @@ public Base(String[] args) throws Exception { BaseNoGui.onBoardOrPortChange(); ProgressListener progressListener = new ConsoleProgressListener(); - libraryInstaller.updateIndex(progressListener); + BaseNoGui.getArduinoCoreService().updateLibrariesIndex(progressListener); - LibrariesIndexer indexer = new LibrariesIndexer(BaseNoGui.getSettingsFolder()); - indexer.parseIndex(); - indexer.setLibrariesFolders(BaseNoGui.getLibrariesFolders()); + LibrariesIndexer indexer = new LibrariesIndexer(BaseNoGui.getArduinoCoreService()); + indexer.regenerateIndex(); indexer.rescanLibraries(); - for (String library : parser.getLibraryToInstall().split(",")) { - String[] libraryToInstallParts = library.split(":"); + for (String libraryArg : parser.getLibraryToInstall().split(",")) { + String[] libraryToInstallParts = libraryArg.split(":"); - ContributedLibrary selected = null; + ContributedLibraryRelease selected = null; if (libraryToInstallParts.length == 2) { Optional version = VersionHelper.valueOf(libraryToInstallParts[1]); if (!version.isPresent()) { System.out.println(format(tr("Invalid version {0}"), libraryToInstallParts[1])); System.exit(1); } - selected = indexer.getIndex().find(libraryToInstallParts[0], version.get().toString()); + selected = indexer.getIndex().find(libraryToInstallParts[0], version.get().toString()).orElse(null); } else if (libraryToInstallParts.length == 1) { - List librariesByName = indexer.getIndex().find(libraryToInstallParts[0]); - Collections.sort(librariesByName, new DownloadableContributionVersionComparator()); - if (!librariesByName.isEmpty()) { - selected = librariesByName.get(librariesByName.size() - 1); + ContributedLibrary library = indexer.getIndex().find(libraryToInstallParts[0]).orElse(null); + if (library != null) { + selected = library.getLatest().orElse(null); } } if (selected == null) { @@ -388,14 +384,14 @@ public Base(String[] args) throws Exception { System.exit(1); } - Optional mayInstalled = indexer.getIndex().getInstalled(libraryToInstallParts[0]); + Optional mayInstalled = indexer.getIndex().getInstalled(libraryToInstallParts[0]); if (mayInstalled.isPresent() && selected.isIDEBuiltIn()) { System.out.println(tr(I18n .format("Library {0} is available as built-in in the IDE.\nRemoving the other version {1} installed in the sketchbook...", - library, mayInstalled.get().getParsedVersion()))); - libraryInstaller.remove(mayInstalled.get(), progressListener); + libraryArg, mayInstalled.get().getParsedVersion()))); + BaseNoGui.getArduinoCoreService().libraryRemove(mayInstalled.get(), progressListener); } else { - libraryInstaller.install(selected, progressListener); + BaseNoGui.getArduinoCoreService().libraryInstall(selected, progressListener); } } @@ -507,7 +503,7 @@ public Base(String[] args) throws Exception { if (PreferencesData.getBoolean("update.check")) { new UpdateCheck(this); - contributionsSelfCheck = new ContributionsSelfCheck(this, new UpdatableBoardsLibsFakeURLsHandler(this), contributionInstaller, libraryInstaller); + contributionsSelfCheck = new ContributionsSelfCheck(this, new UpdatableBoardsLibsFakeURLsHandler(this), contributionInstaller, BaseNoGui.getArduinoCoreService()); new Timer(false).schedule(contributionsSelfCheck, Constants.BOARDS_LIBS_UPDATABLE_CHECK_START_PERIOD); } @@ -1132,13 +1128,11 @@ public void actionPerformed(ActionEvent e) { importMenu.addSeparator(); // Split between user supplied libraries and IDE libraries - TargetPlatform targetPlatform = BaseNoGui.getTargetPlatform(); - - if (targetPlatform != null) { + if (BaseNoGui.getTargetPlatform().isPresent()) { LibraryList libs = getSortedLibraries(); String lastLibType = null; for (UserLibrary lib : libs) { - String libType = lib.getTypes().get(0); + String libType = lib.getTypes().iterator().next(); if (!libType.equals(lastLibType)) { if (lastLibType != null) { importMenu.addSeparator(); @@ -1189,17 +1183,20 @@ public void rebuildExamplesMenu(JMenu menu) { String boardId = null; String referencedPlatformName = null; String myArch = null; - TargetPlatform targetPlatform = BaseNoGui.getTargetPlatform(); - if (targetPlatform != null) { - myArch = targetPlatform.getId(); - boardId = BaseNoGui.getTargetBoard().getName(); + Optional targetPlatform = BaseNoGui.getTargetPlatform(); + if (targetPlatform.isPresent()) { + myArch = targetPlatform.get().getId(); + Optional board = BaseNoGui.getTargetBoard(); + if (board.isPresent()) { + boardId = board.get().getName(); + } String core = BaseNoGui.getBoardPreferences().get("build.core", "arduino"); if (core.contains(":")) { String refcore = core.split(":")[0]; - TargetPlatform referencedPlatform = BaseNoGui.getTargetPlatform(refcore, myArch); - if (referencedPlatform != null) { - referencedPlatformName = referencedPlatform.getPreferences().get("name"); - } + Optional referencedPlatform = BaseNoGui.getTargetPlatform(refcore, myArch); + if (referencedPlatform.isPresent()) { + referencedPlatformName = referencedPlatform.get().getPreferences().get("name"); + }; } } @@ -1218,9 +1215,9 @@ public void rebuildExamplesMenu(JMenu menu) { LibraryList otherLibs = new LibraryList(); for (UserLibrary lib : allLibraries) { // Get the library's location - used for sorting into categories - Location location = lib.getLocation(); + LibraryLocation location = lib.getLocation(); // Is this library compatible? - List arch = lib.getArchitectures(); + Collection arch = lib.getArchitectures(); boolean compatible; if (myArch == null || arch == null || arch.contains("*")) { compatible = true; @@ -1228,7 +1225,7 @@ public void rebuildExamplesMenu(JMenu menu) { compatible = arch.contains(myArch); } // IDE Libaries (including retired) - if (location == Location.IDE_BUILTIN) { + if (location.equals(LibraryLocation.ide_builtin)) { if (compatible) { // only compatible IDE libs are shown if (lib.getTypes().contains("Retired")) { @@ -1238,15 +1235,15 @@ public void rebuildExamplesMenu(JMenu menu) { } } // Platform Libraries - } else if (location == Location.CORE) { + } else if (location.equals(LibraryLocation.platform_builtin)) { // all platform libs are assumed to be compatible platformLibs.add(lib); // Referenced Platform Libraries - } else if (location == Location.REFERENCED_CORE) { + } else if (location.equals(LibraryLocation.referenced_platform_builtin)) { // all referenced platform libs are assumed to be compatible referencedPlatformLibs.add(lib); // Sketchbook Libraries (including incompatible) - } else if (location == Location.SKETCHBOOK) { + } else if (location.equals(LibraryLocation.user)) { if (compatible) { // libraries promoted from sketchbook (behave as builtin) if (!lib.getTypes().isEmpty() && lib.getTypes().contains("Arduino") @@ -1346,9 +1343,9 @@ public void onBoardOrPortChange() { BaseNoGui.onBoardOrPortChange(); // reload keywords when package/platform changes - TargetPlatform tp = BaseNoGui.getTargetPlatform(); - if (tp != null) { - String platformFolder = tp.getFolder().getAbsolutePath(); + Optional tp = BaseNoGui.getTargetPlatform(); + if (tp.isPresent()) { + String platformFolder = tp.get().getFolder().getAbsolutePath(); if (priorPlatformFolder == null || !priorPlatformFolder.equals(platformFolder) || newLibraryImported) { pdeKeywords = new PdeKeywords(); pdeKeywords.reload(); @@ -1371,7 +1368,7 @@ public void openLibraryManager(final String filterText, String dropdownItem) { contributionsSelfCheck.cancel(); } @SuppressWarnings("serial") - LibraryManagerUI managerUI = new LibraryManagerUI(activeEditor, libraryInstaller) { + LibraryManagerUI managerUI = new LibraryManagerUI(activeEditor, BaseNoGui.getArduinoCoreService()) { @Override protected void onIndexesUpdated() throws Exception { BaseNoGui.initPackages(); @@ -1701,9 +1698,11 @@ public void rebuildProgrammerMenu() { programmerMenus = new LinkedList<>(); ButtonGroup group = new ButtonGroup(); - TargetBoard board = BaseNoGui.getTargetBoard(); + Optional mayBoard = BaseNoGui.getTargetBoard(); + if (!mayBoard.isPresent()) return; + TargetBoard board = mayBoard.get(); TargetPlatform boardPlatform = board.getContainerPlatform(); - TargetPlatform corePlatform = null; + Optional corePlatform = Optional.empty(); String core = board.getPreferences().get("build.core"); if (core != null && core.contains(":")) { @@ -1712,8 +1711,9 @@ public void rebuildProgrammerMenu() { } addProgrammersForPlatform(boardPlatform, programmerMenus, group); - if (corePlatform != null) - addProgrammersForPlatform(corePlatform, programmerMenus, group); + if (corePlatform.isPresent()) { + addProgrammersForPlatform(corePlatform.get(), programmerMenus, group); + } if (programmerMenus.isEmpty()) { JMenuItem item = new JMenuItem(tr("No programmers available for this board")); @@ -1993,6 +1993,7 @@ public void addEditorFontResizeMouseWheelListener(Component comp) { */ public void addEditorFontResizeKeyListener(Component comp) { comp.addKeyListener(new KeyAdapter() { + @SuppressWarnings("incomplete-switch") @Override public void keyPressed(KeyEvent e) { if (e.getModifiersEx() == KeyEvent.CTRL_DOWN_MASK @@ -2458,7 +2459,7 @@ public void handleAddLibrary() { } // copy folder - File destinationFolder = new File(BaseNoGui.getSketchbookLibrariesFolder().folder, sourceFile.getName()); + File destinationFolder = new File(BaseNoGui.getSketchbookLibrariesFolder(), sourceFile.getName()); if (!destinationFolder.mkdir()) { activeEditor.statusError(format(tr("A library named {0} already exists"), sourceFile.getName())); return; diff --git a/app/src/processing/app/CommandHistory.java b/app/src/processing/app/CommandHistory.java index cae3c2fc498..189b4d54599 100644 --- a/app/src/processing/app/CommandHistory.java +++ b/app/src/processing/app/CommandHistory.java @@ -9,7 +9,7 @@ */ public class CommandHistory { - private final LinkedList commandHistory = new LinkedList(); + private final LinkedList commandHistory = new LinkedList<>(); private final int maxHistorySize; private ListIterator iterator = null; private boolean iteratorAsc; diff --git a/app/src/processing/app/Editor.java b/app/src/processing/app/Editor.java index 2ec29c498cb..6de81f9b27a 100644 --- a/app/src/processing/app/Editor.java +++ b/app/src/processing/app/Editor.java @@ -57,6 +57,7 @@ import java.util.LinkedList; import java.util.List; import java.util.Map; +import java.util.Optional; import java.util.function.Predicate; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; @@ -80,8 +81,6 @@ import javax.swing.event.MenuEvent; import javax.swing.event.MenuListener; import javax.swing.text.BadLocationException; -import javax.swing.text.Document; -import javax.swing.text.Element; import org.fife.ui.rsyntaxtextarea.folding.FoldManager; @@ -237,7 +236,7 @@ public boolean test(SketchController controller) { private UploadHandler uploadUsingProgrammerHandler; private Runnable timeoutUploadHandler; - private Map internalToolCache = new HashMap(); + private Map internalToolCache = new HashMap<>(); public Editor(Base ibase, File file, int[] storedLocation, int[] defaultLocation, Platform platform) throws Exception { super("Arduino"); @@ -1840,7 +1839,7 @@ public void updateTitle() { SketchFile current = getCurrentTab().getSketchFile(); String customFormat = PreferencesData.get("editor.custom_title_format"); if (customFormat != null && !customFormat.trim().isEmpty()) { - Map titleMap = new HashMap(); + Map titleMap = new HashMap<>(); titleMap.put("file", current.getFileName()); String path = sketch.getFolder().getAbsolutePath(); titleMap.put("folder", path); @@ -2587,9 +2586,9 @@ private void statusEmpty() { // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . protected void onBoardOrPortChange() { - TargetBoard board = BaseNoGui.getTargetBoard(); - if (board != null) - lineStatus.setBoardName(board.getName()); + Optional board = BaseNoGui.getTargetBoard(); + if (board.isPresent()) + lineStatus.setBoardName(board.get().getName()); else lineStatus.setBoardName("-"); lineStatus.setPort(PreferencesData.get("serial.port")); diff --git a/app/src/processing/app/EditorToolbar.java b/app/src/processing/app/EditorToolbar.java index d37d0cc96a7..2bf4163f581 100644 --- a/app/src/processing/app/EditorToolbar.java +++ b/app/src/processing/app/EditorToolbar.java @@ -461,9 +461,9 @@ private void handleSelectionPressed(int sel) { private void handleSelectionPressed(int sel, boolean isShiftDown, int x, int y) { switch (sel) { case RUN: - if (!editor.avoidMultipleOperations) { + if (!Editor.avoidMultipleOperations) { editor.handleRun(false, editor.presentHandler, editor.runHandler); - editor.avoidMultipleOperations = true; + Editor.avoidMultipleOperations = true; } break; @@ -494,7 +494,7 @@ private void handleSelectionPressed(int sel, boolean isShiftDown, int x, int y) case EXPORT: // launch a timeout timer which can reenable to upload button functionality an - if (!editor.avoidMultipleOperations) { + if (!Editor.avoidMultipleOperations) { editor.handleExport(isShiftDown); } break; diff --git a/app/src/processing/app/SerialMonitor.java b/app/src/processing/app/SerialMonitor.java index b2656ca653d..24e3ae8efad 100644 --- a/app/src/processing/app/SerialMonitor.java +++ b/app/src/processing/app/SerialMonitor.java @@ -72,6 +72,7 @@ public SerialMonitor(BoardPort port) { // Add key listener to UP, DOWN, ESC keys for command history traversal. textField.addKeyListener(new KeyAdapter() { + @SuppressWarnings("incomplete-switch") @Override public void keyPressed(KeyEvent e) { switch (e.getKeyCode()) { diff --git a/app/src/processing/app/SerialPlotter.java b/app/src/processing/app/SerialPlotter.java index 035005ac362..25127a98955 100644 --- a/app/src/processing/app/SerialPlotter.java +++ b/app/src/processing/app/SerialPlotter.java @@ -319,7 +319,7 @@ public void windowGainedFocus(WindowEvent e) { noLineEndingAlert.setMinimumSize(minimumSize); - lineEndings = new JComboBox(new String[]{tr("No line ending"), tr("Newline"), tr("Carriage return"), tr("Both NL & CR")}); + lineEndings = new JComboBox<>(new String[]{tr("No line ending"), tr("Newline"), tr("Carriage return"), tr("Both NL & CR")}); lineEndings.addActionListener((ActionEvent event) -> { PreferencesData.setInteger("serial.line_ending", lineEndings.getSelectedIndex()); noLineEndingAlert.setForeground(pane.getBackground()); diff --git a/app/src/processing/app/SketchController.java b/app/src/processing/app/SketchController.java index ce9e468cc68..cea98c53fcb 100644 --- a/app/src/processing/app/SketchController.java +++ b/app/src/processing/app/SketchController.java @@ -43,6 +43,7 @@ import java.nio.file.Paths; import java.util.ArrayList; import java.util.Arrays; +import java.util.Collection; import java.util.LinkedList; import java.util.List; import java.util.Optional; @@ -599,7 +600,7 @@ public void importLibrary(UserLibrary lib) throws IOException { // make sure the user didn't hide the sketch folder ensureExistence(); - List list = lib.getIncludes(); + Collection list = lib.getIncludes(); if (list == null) { File srcFolder = lib.getSrcFolder(); String[] headers = Base.headerListFromIncludePath(srcFolder); @@ -670,7 +671,11 @@ public String build(boolean verbose, boolean save) throws RunnerException, Prefe } private File saveSketchInTempFolder() throws IOException { - File tempFolder = FileUtils.createTempFolder("arduino_modified_sketch_"); + File temp = FileUtils.createTempFolder("arduino_modified_sketch_"); + File tempFolder = new File(temp, getSketch().getName()); + if (!tempFolder.mkdir()) { + throw new IOException("Can't create directory to store temp sketch."); + } FileUtils.copy(sketch.getFolder(), tempFolder); for (SketchFile file : Stream.of(sketch.getFiles()).filter(SketchFile::isModified).collect(Collectors.toList())) { diff --git a/app/src/processing/app/UpdateCheck.java b/app/src/processing/app/UpdateCheck.java index cdca1b71783..d7ca8aa0c74 100644 --- a/app/src/processing/app/UpdateCheck.java +++ b/app/src/processing/app/UpdateCheck.java @@ -51,7 +51,7 @@ */ public class UpdateCheck implements Runnable { Base base; - String downloadURL = tr("https://www.arduino.cc/latest.txt"); + String downloadURL = "https://www.arduino.cc/latest.txt"; static final long ONE_DAY = 24 * 60 * 60 * 1000; diff --git a/app/src/processing/app/syntax/PdeKeywords.java b/app/src/processing/app/syntax/PdeKeywords.java index 838800b3d5d..472a153540e 100644 --- a/app/src/processing/app/syntax/PdeKeywords.java +++ b/app/src/processing/app/syntax/PdeKeywords.java @@ -38,6 +38,7 @@ import java.io.InputStreamReader; import java.util.HashMap; import java.util.Map; +import java.util.Optional; import java.util.regex.Pattern; @@ -84,9 +85,9 @@ public PdeKeywords() { public void reload() { try { parseKeywordsTxt(new File(BaseNoGui.getContentFile("lib"), "keywords.txt")); - TargetPlatform tp = BaseNoGui.getTargetPlatform(); - if (tp != null) { - File platformKeywords = new File(tp.getFolder(), "keywords.txt"); + Optional tp = BaseNoGui.getTargetPlatform(); + if (tp.isPresent()) { + File platformKeywords = new File(tp.get().getFolder(), "keywords.txt"); if (platformKeywords.exists()) parseKeywordsTxt(platformKeywords); } for (UserLibrary lib : BaseNoGui.librariesIndexer.getInstalledLibraries()) { diff --git a/app/test/cc/arduino/contributions/UpdatableLibraryTest.java b/app/test/cc/arduino/contributions/UpdatableLibraryTest.java deleted file mode 100644 index 0dab3531cd1..00000000000 --- a/app/test/cc/arduino/contributions/UpdatableLibraryTest.java +++ /dev/null @@ -1,82 +0,0 @@ -package cc.arduino.contributions; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - -import java.io.File; -import java.util.ArrayList; -import java.util.List; - -import org.junit.Test; - -import cc.arduino.contributions.libraries.ContributedLibrary; -import cc.arduino.contributions.libraries.LibrariesIndexer; -import processing.app.BaseNoGui; -import processing.app.packages.UserLibraryFolder; -import processing.app.packages.UserLibraryFolder.Location; - -public class UpdatableLibraryTest { - - File testdata = new File( - UpdatableLibraryTest.class.getResource("/").getFile(), - "../testdata/libraries"); - File index_SD_only = new File(testdata, "index_SD_only"); - File SD111 = new File(testdata, "SD_1.1.1"); - File SD121 = new File(testdata, "SD_1.2.1"); - File index_Bridge_only = new File(testdata, "index_Bridge_only"); - File Bridge163 = new File(testdata, "Bridge_1.6.3"); - File Bridge170 = new File(testdata, "Bridge_1.7.0"); - - @Test - public void testUpdatableLibrary() throws Exception { - List folders = new ArrayList<>(); - folders.add(new UserLibraryFolder(SD111, Location.IDE_BUILTIN)); - - LibrariesIndexer indexer = new LibrariesIndexer(index_SD_only); - BaseNoGui.librariesIndexer = indexer; - indexer.parseIndex(); - indexer.setLibrariesFoldersAndRescan(folders); - - ContributedLibrary sdLib = indexer.getIndex().getInstalled("SD").get(); - assertTrue("SD lib is installed", sdLib.isLibraryInstalled()); - assertEquals("SD installed version", "1.1.1", sdLib.getParsedVersion()); - - assertTrue(ContributionsSelfCheck.checkForUpdatableLibraries()); - - folders.add(new UserLibraryFolder(SD121, Location.SKETCHBOOK)); - indexer.setLibrariesFoldersAndRescan(folders); - - sdLib = indexer.getIndex().getInstalled("SD").get(); - assertTrue("SD lib is installed", sdLib.isLibraryInstalled()); - assertEquals("SD installed version", "1.2.1", sdLib.getParsedVersion()); - - assertFalse(ContributionsSelfCheck.checkForUpdatableLibraries()); - } - - @Test - public void testUpdatableLibraryWithBundled() throws Exception { - List folders = new ArrayList<>(); - folders.add(new UserLibraryFolder(Bridge163, Location.IDE_BUILTIN)); - - LibrariesIndexer indexer = new LibrariesIndexer(index_Bridge_only); - BaseNoGui.librariesIndexer = indexer; - indexer.parseIndex(); - indexer.setLibrariesFoldersAndRescan(folders); - - ContributedLibrary l = indexer.getIndex().getInstalled("Bridge").get(); - assertTrue("Bridge lib is installed", l.isLibraryInstalled()); - assertEquals("Bridge installed version", "1.6.3", l.getParsedVersion()); - - assertTrue(ContributionsSelfCheck.checkForUpdatableLibraries()); - - folders.add(new UserLibraryFolder(Bridge170, Location.SKETCHBOOK)); - indexer.setLibrariesFoldersAndRescan(folders); - - l = indexer.getIndex().getInstalled("Bridge").get(); - assertTrue("Bridge lib is installed", l.isLibraryInstalled()); - assertEquals("Bridge installed version", "1.7.0", l.getParsedVersion()); - - assertFalse(ContributionsSelfCheck.checkForUpdatableLibraries()); - } -} diff --git a/app/test/cc/arduino/net/CustomProxySelectorTest.java b/app/test/cc/arduino/net/CustomProxySelectorTest.java index 411f1aa2366..65087e1144c 100644 --- a/app/test/cc/arduino/net/CustomProxySelectorTest.java +++ b/app/test/cc/arduino/net/CustomProxySelectorTest.java @@ -36,8 +36,11 @@ import java.net.*; import java.util.HashMap; import java.util.Map; +import java.util.Optional; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; public class CustomProxySelectorTest { @@ -58,6 +61,8 @@ public void testNoProxy() throws Exception { Proxy proxy = proxySelector.getProxyFor(uri); assertEquals(Proxy.NO_PROXY, proxy); + Optional proxyURI = proxySelector.getProxyURIFor(uri); + assertFalse(proxyURI.isPresent()); } @Test @@ -67,6 +72,8 @@ public void testSystemProxy() throws Exception { Proxy proxy = proxySelector.getProxyFor(uri); assertEquals(ProxySelector.getDefault().select(uri).get(0), proxy); + Optional proxyURI = proxySelector.getProxyURIFor(uri); + assertFalse(proxyURI.isPresent()); } @Test @@ -77,6 +84,9 @@ public void testProxyPACHTTP() throws Exception { Proxy proxy = proxySelector.getProxyFor(uri); assertEquals(new Proxy(Proxy.Type.HTTP, new InetSocketAddress("proxy.example.com", 8080)), proxy); + Optional proxyURI = proxySelector.getProxyURIFor(uri); + assertTrue(proxyURI.isPresent()); + assertEquals("http://proxy.example.com:8080/", proxyURI.get().toString()); } @Test @@ -93,6 +103,10 @@ public void testProxyPACHTTPWithLogin() throws Exception { PasswordAuthentication authentication = Authenticator.requestPasswordAuthentication(null, 8080, uri.toURL().getProtocol(), "ciao", ""); assertEquals(authentication.getUserName(), "auto"); assertEquals(String.valueOf(authentication.getPassword()), "autopassword"); + + Optional proxyURI = proxySelector.getProxyURIFor(uri); + assertTrue(proxyURI.isPresent()); + assertEquals("http://auto:autopassword@proxy.example.com:8080/", proxyURI.get().toString()); } @Test @@ -103,6 +117,10 @@ public void testProxyPACSOCKS() throws Exception { Proxy proxy = proxySelector.getProxyFor(uri); assertEquals(new Proxy(Proxy.Type.SOCKS, new InetSocketAddress("proxy.example.com", 8080)), proxy); + + Optional proxyURI = proxySelector.getProxyURIFor(uri); + assertTrue(proxyURI.isPresent()); + assertEquals("socks://proxy.example.com:8080/", proxyURI.get().toString()); } @Test @@ -113,6 +131,8 @@ public void testProxyPACDirect() throws Exception { Proxy proxy = proxySelector.getProxyFor(uri); assertEquals(Proxy.NO_PROXY, proxy); + Optional proxyURI = proxySelector.getProxyURIFor(uri); + assertFalse(proxyURI.isPresent()); } @Test @@ -123,6 +143,10 @@ public void testProxyPACComplex() throws Exception { Proxy proxy = proxySelector.getProxyFor(uri); assertEquals(new Proxy(Proxy.Type.HTTP, new InetSocketAddress("4.5.6.7", 8080)), proxy); + + Optional proxyURI = proxySelector.getProxyURIFor(uri); + assertTrue(proxyURI.isPresent()); + assertEquals("http://4.5.6.7:8080/", proxyURI.get().toString()); } @Test @@ -133,6 +157,8 @@ public void testProxyPACComplex2() throws Exception { Proxy proxy = proxySelector.getProxyFor(new URL("http://www.intranet.domain.com/ciao").toURI()); assertEquals(Proxy.NO_PROXY, proxy); + Optional proxyURI = proxySelector.getProxyURIFor(new URL("http://www.intranet.domain.com/ciao").toURI()); + assertFalse(proxyURI.isPresent()); } @Test @@ -146,6 +172,10 @@ public void testManualProxy() throws Exception { Proxy proxy = proxySelector.getProxyFor(uri); assertEquals(new Proxy(Proxy.Type.HTTP, new InetSocketAddress("localhost", 8080)), proxy); + + Optional proxyURI = proxySelector.getProxyURIFor(uri); + assertTrue(proxyURI.isPresent()); + assertEquals("http://localhost:8080/", proxyURI.get().toString()); } @Test @@ -165,5 +195,9 @@ public void testManualProxyWithLogin() throws Exception { PasswordAuthentication authentication = Authenticator.requestPasswordAuthentication(null, 8080, uri.toURL().getProtocol(), "ciao", ""); assertEquals(authentication.getUserName(), "username"); assertEquals(String.valueOf(authentication.getPassword()), "pwd"); + + Optional proxyURI = proxySelector.getProxyURIFor(uri); + assertTrue(proxyURI.isPresent()); + assertEquals("http://username:pwd@localhost:8080/", proxyURI.get().toString()); } } diff --git a/app/test/processing/app/DefaultTargetTest.java b/app/test/processing/app/DefaultTargetTest.java index 24767bee30d..3454708f5fd 100644 --- a/app/test/processing/app/DefaultTargetTest.java +++ b/app/test/processing/app/DefaultTargetTest.java @@ -35,7 +35,12 @@ import org.junit.Test; import processing.app.debug.TargetBoard; +import processing.app.debug.TargetPlatform; + import static org.junit.Assert.assertNotEquals; +import static org.junit.Assert.assertTrue; + +import java.util.Optional; public class DefaultTargetTest extends AbstractWithPreferencesTest { @@ -60,9 +65,11 @@ public void testDefaultTarget() throws Exception { createBase(); // skip test if no target platforms are available - Assume.assumeNotNull(BaseNoGui.getTargetPlatform()); + Optional targetPlatform = BaseNoGui.getTargetPlatform(); + Assume.assumeTrue(targetPlatform.isPresent()); - TargetBoard targetBoard = BaseNoGui.getTargetBoard(); - assertNotEquals("unreal_board", targetBoard.getId()); + Optional targetBoard = BaseNoGui.getTargetBoard(); + assertTrue(targetBoard.isPresent()); + assertNotEquals("unreal_board", targetBoard.get().getId()); } } diff --git a/app/test/processing/app/debug/UploaderFactoryTest.java b/app/test/processing/app/debug/UploaderFactoryTest.java index 90e8d0c867d..a2f850cde62 100644 --- a/app/test/processing/app/debug/UploaderFactoryTest.java +++ b/app/test/processing/app/debug/UploaderFactoryTest.java @@ -31,8 +31,6 @@ import static org.junit.Assert.assertTrue; -import java.util.HashMap; - import org.junit.Test; import cc.arduino.packages.BoardPort; @@ -42,47 +40,40 @@ import cc.arduino.packages.uploaders.SSHUploader; import cc.arduino.packages.uploaders.SerialUploader; import processing.app.AbstractWithPreferencesTest; -import processing.app.helpers.PreferencesMap; public class UploaderFactoryTest extends AbstractWithPreferencesTest { @Test public void shouldCreateAnInstanceOfSSHUploader() throws Exception { - TargetBoard board = new LegacyTargetBoard("yun", new PreferencesMap(new HashMap()), new TargetPlatformStub("id", new TargetPackageStub("id"))); - BoardPort boardPort = new BoardPort(); boardPort.setBoardName("yun"); boardPort.setAddress("192.168.0.1"); boardPort.setProtocol("network"); boardPort.getPrefs().put("ssh_upload", "yes"); - Uploader uploader = new UploaderFactory().newUploader(board, boardPort, false); + Uploader uploader = new UploaderFactory().newUploader(boardPort, false); assertTrue(uploader instanceof SSHUploader); } @Test public void shouldCreateAnInstanceOfGenericNetworkUploader() throws Exception { - TargetBoard board = new LegacyTargetBoard("yun", new PreferencesMap(new HashMap()), new TargetPlatformStub("id", new TargetPackageStub("id"))); - BoardPort boardPort = new BoardPort(); boardPort.setBoardName("yun"); boardPort.setAddress("192.168.0.1"); boardPort.setProtocol("network"); boardPort.getPrefs().put("ssh_upload", "no"); - Uploader uploader = new UploaderFactory().newUploader(board, boardPort, false); + Uploader uploader = new UploaderFactory().newUploader(boardPort, false); assertTrue(uploader instanceof GenericNetworkUploader); } @Test public void shouldCreateAnInstanceOfBasicUploaderWhenPortIsSerial() throws Exception { - TargetBoard board = new LegacyTargetBoard("uno", new PreferencesMap(new HashMap()), new TargetPlatformStub("id", new TargetPackageStub("id"))); - BoardPort boardPort = new BoardPort(); boardPort.setBoardName("Arduino Leonardo"); boardPort.setAddress("/dev/ttyACM0"); boardPort.setProtocol("serial"); - Uploader uploader = new UploaderFactory().newUploader(board, boardPort, false); + Uploader uploader = new UploaderFactory().newUploader(boardPort, false); assertTrue(uploader instanceof SerialUploader); } diff --git a/arduino-core/.classpath b/arduino-core/.classpath index fd2e5d190dc..4239c936bc2 100644 --- a/arduino-core/.classpath +++ b/arduino-core/.classpath @@ -26,5 +26,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/arduino-core/build.xml b/arduino-core/build.xml index cef9fe40441..1bbb0125ea4 100644 --- a/arduino-core/build.xml +++ b/arduino-core/build.xml @@ -5,6 +5,9 @@ + + + diff --git a/arduino-core/lib/grpc/animal-sniffer-annotations-1.17.jar b/arduino-core/lib/grpc/animal-sniffer-annotations-1.17.jar new file mode 100644 index 00000000000..6ec7a603e73 Binary files /dev/null and b/arduino-core/lib/grpc/animal-sniffer-annotations-1.17.jar differ diff --git a/arduino-core/lib/grpc/annotations-4.1.1.4.jar b/arduino-core/lib/grpc/annotations-4.1.1.4.jar new file mode 100644 index 00000000000..8cbf103fae1 Binary files /dev/null and b/arduino-core/lib/grpc/annotations-4.1.1.4.jar differ diff --git a/arduino-core/lib/grpc/checker-compat-qual-2.5.2.jar b/arduino-core/lib/grpc/checker-compat-qual-2.5.2.jar new file mode 100644 index 00000000000..633d2c2f9b7 Binary files /dev/null and b/arduino-core/lib/grpc/checker-compat-qual-2.5.2.jar differ diff --git a/arduino-core/lib/grpc/error_prone_annotations-2.3.2.jar b/arduino-core/lib/grpc/error_prone_annotations-2.3.2.jar new file mode 100644 index 00000000000..bc2584db8b9 Binary files /dev/null and b/arduino-core/lib/grpc/error_prone_annotations-2.3.2.jar differ diff --git a/arduino-core/lib/grpc/google-auth-library-credentials-0.13.0.jar b/arduino-core/lib/grpc/google-auth-library-credentials-0.13.0.jar new file mode 100644 index 00000000000..e26aac54dc6 Binary files /dev/null and b/arduino-core/lib/grpc/google-auth-library-credentials-0.13.0.jar differ diff --git a/arduino-core/lib/grpc/grpc-all-1.20.0.jar b/arduino-core/lib/grpc/grpc-all-1.20.0.jar new file mode 100644 index 00000000000..36225f4ec6e Binary files /dev/null and b/arduino-core/lib/grpc/grpc-all-1.20.0.jar differ diff --git a/arduino-core/lib/grpc/grpc-auth-1.20.0.jar b/arduino-core/lib/grpc/grpc-auth-1.20.0.jar new file mode 100644 index 00000000000..ef7ddadc073 Binary files /dev/null and b/arduino-core/lib/grpc/grpc-auth-1.20.0.jar differ diff --git a/arduino-core/lib/grpc/grpc-context-1.20.0.jar b/arduino-core/lib/grpc/grpc-context-1.20.0.jar new file mode 100644 index 00000000000..1709dbef9a3 Binary files /dev/null and b/arduino-core/lib/grpc/grpc-context-1.20.0.jar differ diff --git a/arduino-core/lib/grpc/grpc-core-1.20.0.jar b/arduino-core/lib/grpc/grpc-core-1.20.0.jar new file mode 100644 index 00000000000..a44ec185bbb Binary files /dev/null and b/arduino-core/lib/grpc/grpc-core-1.20.0.jar differ diff --git a/arduino-core/lib/grpc/grpc-netty-1.20.0.jar b/arduino-core/lib/grpc/grpc-netty-1.20.0.jar new file mode 100644 index 00000000000..42a96d13877 Binary files /dev/null and b/arduino-core/lib/grpc/grpc-netty-1.20.0.jar differ diff --git a/arduino-core/lib/grpc/grpc-okhttp-1.20.0.jar b/arduino-core/lib/grpc/grpc-okhttp-1.20.0.jar new file mode 100644 index 00000000000..5cc2f36ffeb Binary files /dev/null and b/arduino-core/lib/grpc/grpc-okhttp-1.20.0.jar differ diff --git a/arduino-core/lib/grpc/grpc-protobuf-1.20.0.jar b/arduino-core/lib/grpc/grpc-protobuf-1.20.0.jar new file mode 100644 index 00000000000..c0103c11c93 Binary files /dev/null and b/arduino-core/lib/grpc/grpc-protobuf-1.20.0.jar differ diff --git a/arduino-core/lib/grpc/grpc-protobuf-lite-1.20.0.jar b/arduino-core/lib/grpc/grpc-protobuf-lite-1.20.0.jar new file mode 100644 index 00000000000..f96144fc47f Binary files /dev/null and b/arduino-core/lib/grpc/grpc-protobuf-lite-1.20.0.jar differ diff --git a/arduino-core/lib/grpc/grpc-protobuf-nano-1.20.0.jar b/arduino-core/lib/grpc/grpc-protobuf-nano-1.20.0.jar new file mode 100644 index 00000000000..c81d4b719d4 Binary files /dev/null and b/arduino-core/lib/grpc/grpc-protobuf-nano-1.20.0.jar differ diff --git a/arduino-core/lib/grpc/grpc-stub-1.20.0.jar b/arduino-core/lib/grpc/grpc-stub-1.20.0.jar new file mode 100644 index 00000000000..958602f4b01 Binary files /dev/null and b/arduino-core/lib/grpc/grpc-stub-1.20.0.jar differ diff --git a/arduino-core/lib/grpc/grpc-testing-1.20.0.jar b/arduino-core/lib/grpc/grpc-testing-1.20.0.jar new file mode 100644 index 00000000000..55de65483b4 Binary files /dev/null and b/arduino-core/lib/grpc/grpc-testing-1.20.0.jar differ diff --git a/arduino-core/lib/grpc/gson-2.7.jar b/arduino-core/lib/grpc/gson-2.7.jar new file mode 100644 index 00000000000..be5b59b764b Binary files /dev/null and b/arduino-core/lib/grpc/gson-2.7.jar differ diff --git a/arduino-core/lib/grpc/guava-26.0-android.jar b/arduino-core/lib/grpc/guava-26.0-android.jar new file mode 100644 index 00000000000..3db9b6c4155 Binary files /dev/null and b/arduino-core/lib/grpc/guava-26.0-android.jar differ diff --git a/arduino-core/lib/grpc/hamcrest-core-1.3.jar b/arduino-core/lib/grpc/hamcrest-core-1.3.jar new file mode 100644 index 00000000000..9d5fe16e3dd Binary files /dev/null and b/arduino-core/lib/grpc/hamcrest-core-1.3.jar differ diff --git a/arduino-core/lib/grpc/j2objc-annotations-1.1.jar b/arduino-core/lib/grpc/j2objc-annotations-1.1.jar new file mode 100644 index 00000000000..4b6f1274796 Binary files /dev/null and b/arduino-core/lib/grpc/j2objc-annotations-1.1.jar differ diff --git a/arduino-core/lib/grpc/jsr305-3.0.2.jar b/arduino-core/lib/grpc/jsr305-3.0.2.jar new file mode 100644 index 00000000000..59222d9ca5e Binary files /dev/null and b/arduino-core/lib/grpc/jsr305-3.0.2.jar differ diff --git a/arduino-core/lib/grpc/junit-4.12.jar b/arduino-core/lib/grpc/junit-4.12.jar new file mode 100644 index 00000000000..3a7fc266c3e Binary files /dev/null and b/arduino-core/lib/grpc/junit-4.12.jar differ diff --git a/arduino-core/lib/grpc/netty-buffer-4.1.34.Final.jar b/arduino-core/lib/grpc/netty-buffer-4.1.34.Final.jar new file mode 100644 index 00000000000..4270aa8310e Binary files /dev/null and b/arduino-core/lib/grpc/netty-buffer-4.1.34.Final.jar differ diff --git a/arduino-core/lib/grpc/netty-codec-4.1.34.Final.jar b/arduino-core/lib/grpc/netty-codec-4.1.34.Final.jar new file mode 100644 index 00000000000..34b81356db4 Binary files /dev/null and b/arduino-core/lib/grpc/netty-codec-4.1.34.Final.jar differ diff --git a/arduino-core/lib/grpc/netty-codec-http-4.1.34.Final.jar b/arduino-core/lib/grpc/netty-codec-http-4.1.34.Final.jar new file mode 100644 index 00000000000..637e343e344 Binary files /dev/null and b/arduino-core/lib/grpc/netty-codec-http-4.1.34.Final.jar differ diff --git a/arduino-core/lib/grpc/netty-codec-http2-4.1.34.Final.jar b/arduino-core/lib/grpc/netty-codec-http2-4.1.34.Final.jar new file mode 100644 index 00000000000..613eabead88 Binary files /dev/null and b/arduino-core/lib/grpc/netty-codec-http2-4.1.34.Final.jar differ diff --git a/arduino-core/lib/grpc/netty-codec-socks-4.1.34.Final.jar b/arduino-core/lib/grpc/netty-codec-socks-4.1.34.Final.jar new file mode 100644 index 00000000000..3edcfc86c70 Binary files /dev/null and b/arduino-core/lib/grpc/netty-codec-socks-4.1.34.Final.jar differ diff --git a/arduino-core/lib/grpc/netty-common-4.1.34.Final.jar b/arduino-core/lib/grpc/netty-common-4.1.34.Final.jar new file mode 100644 index 00000000000..24e8a0e2b8c Binary files /dev/null and b/arduino-core/lib/grpc/netty-common-4.1.34.Final.jar differ diff --git a/arduino-core/lib/grpc/netty-handler-4.1.34.Final.jar b/arduino-core/lib/grpc/netty-handler-4.1.34.Final.jar new file mode 100644 index 00000000000..1e83adf8474 Binary files /dev/null and b/arduino-core/lib/grpc/netty-handler-4.1.34.Final.jar differ diff --git a/arduino-core/lib/grpc/netty-handler-proxy-4.1.34.Final.jar b/arduino-core/lib/grpc/netty-handler-proxy-4.1.34.Final.jar new file mode 100644 index 00000000000..13046e0ca2f Binary files /dev/null and b/arduino-core/lib/grpc/netty-handler-proxy-4.1.34.Final.jar differ diff --git a/arduino-core/lib/grpc/netty-resolver-4.1.34.Final.jar b/arduino-core/lib/grpc/netty-resolver-4.1.34.Final.jar new file mode 100644 index 00000000000..1248287d7f3 Binary files /dev/null and b/arduino-core/lib/grpc/netty-resolver-4.1.34.Final.jar differ diff --git a/arduino-core/lib/grpc/netty-transport-4.1.34.Final.jar b/arduino-core/lib/grpc/netty-transport-4.1.34.Final.jar new file mode 100644 index 00000000000..d327a4cf007 Binary files /dev/null and b/arduino-core/lib/grpc/netty-transport-4.1.34.Final.jar differ diff --git a/arduino-core/lib/grpc/okhttp-2.5.0.jar b/arduino-core/lib/grpc/okhttp-2.5.0.jar new file mode 100644 index 00000000000..915d6a9c1ff Binary files /dev/null and b/arduino-core/lib/grpc/okhttp-2.5.0.jar differ diff --git a/arduino-core/lib/grpc/okio-1.13.0.jar b/arduino-core/lib/grpc/okio-1.13.0.jar new file mode 100644 index 00000000000..02c302f82e2 Binary files /dev/null and b/arduino-core/lib/grpc/okio-1.13.0.jar differ diff --git a/arduino-core/lib/grpc/opencensus-api-0.19.2.jar b/arduino-core/lib/grpc/opencensus-api-0.19.2.jar new file mode 100644 index 00000000000..c9427f9c192 Binary files /dev/null and b/arduino-core/lib/grpc/opencensus-api-0.19.2.jar differ diff --git a/arduino-core/lib/grpc/opencensus-contrib-grpc-metrics-0.19.2.jar b/arduino-core/lib/grpc/opencensus-contrib-grpc-metrics-0.19.2.jar new file mode 100644 index 00000000000..dfb7080b65e Binary files /dev/null and b/arduino-core/lib/grpc/opencensus-contrib-grpc-metrics-0.19.2.jar differ diff --git a/arduino-core/lib/grpc/proto-google-common-protos-1.12.0.jar b/arduino-core/lib/grpc/proto-google-common-protos-1.12.0.jar new file mode 100644 index 00000000000..9dab1cd4391 Binary files /dev/null and b/arduino-core/lib/grpc/proto-google-common-protos-1.12.0.jar differ diff --git a/arduino-core/lib/grpc/protobuf-java-3.11.4.jar b/arduino-core/lib/grpc/protobuf-java-3.11.4.jar new file mode 100644 index 00000000000..7224d23dfd2 Binary files /dev/null and b/arduino-core/lib/grpc/protobuf-java-3.11.4.jar differ diff --git a/arduino-core/src/cc/arduino/Compiler.java b/arduino-core/src/cc/arduino/Compiler.java index c2c5b0ff624..268a481a825 100644 --- a/arduino-core/src/cc/arduino/Compiler.java +++ b/arduino-core/src/cc/arduino/Compiler.java @@ -29,35 +29,34 @@ package cc.arduino; -import cc.arduino.i18n.I18NAwareMessageConsumer; -import cc.arduino.packages.BoardPort; -import org.apache.commons.exec.CommandLine; -import org.apache.commons.exec.DefaultExecutor; -import org.apache.commons.exec.PumpStreamHandler; -import org.apache.commons.lang3.StringUtils; -import processing.app.*; -import processing.app.debug.*; -import processing.app.helpers.PreferencesMap; -import processing.app.helpers.PreferencesMapException; -import processing.app.helpers.ProcessUtils; -import processing.app.helpers.StringReplacer; -import processing.app.legacy.PApplet; -import processing.app.tools.DoubleQuotedArgumentsOnWindowsCommandLine; +import static processing.app.I18n.tr; -import java.io.*; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.nio.file.StandardCopyOption; +import java.io.File; +import java.io.IOException; import java.util.ArrayList; -import java.util.Collections; import java.util.List; -import java.util.Map; +import java.util.Optional; import java.util.regex.Pattern; import java.util.stream.Collectors; -import java.util.stream.Stream; -import static processing.app.I18n.tr; +import org.apache.commons.lang3.StringUtils; + +import cc.arduino.cli.ArduinoCoreInstance; +import cc.arduino.cli.commands.Compile.CompileReq; +import cc.arduino.cli.commands.Compile.CompileResult; +import cc.arduino.i18n.I18NAwareMessageConsumer; +import cc.arduino.packages.BoardPort; +import processing.app.BaseNoGui; +import processing.app.I18n; +import processing.app.PreferencesData; +import processing.app.Sketch; +import processing.app.SketchFile; +import processing.app.debug.MessageConsumer; +import processing.app.debug.RunnerException; +import processing.app.debug.TargetBoard; +import processing.app.debug.TargetPlatform; +import processing.app.helpers.PreferencesMapException; +import processing.app.legacy.PApplet; public class Compiler implements MessageConsumer { @@ -122,16 +121,9 @@ public class Compiler implements MessageConsumer { tr("Sketchbook path not defined"); tr("The --upload option supports only one file at a time"); tr("Verifying and uploading..."); - } - - enum BuilderAction { - COMPILE("-compile"), DUMP_PREFS("-dump-prefs"); - - final String value; - - BuilderAction(String value) { - this.value = value; - } + tr("Warning: This core does not support exporting sketches. Please consider upgrading it or contacting its author"); + tr("{0} returned {1}"); + tr("Error compiling."); } private static final Pattern ERROR_FORMAT = Pattern.compile("(.+\\.\\w+):(\\d+)(:\\d+)*:\\s*((fatal)?\\s*error:\\s*)(.*)\\s*", Pattern.MULTILINE | Pattern.DOTALL); @@ -142,6 +134,7 @@ enum BuilderAction { private File buildCache; private final boolean verbose; private RunnerException exception; + private ArduinoCoreInstance core; public Compiler(Sketch data) { this(data.getPrimaryFile().getFile(), data); @@ -150,6 +143,7 @@ public Compiler(Sketch data) { public Compiler(File pathToSketch, Sketch sketch) { this.pathToSketch = pathToSketch; this.sketch = sketch; + this.core = BaseNoGui.getArduinoCoreService(); this.verbose = PreferencesData.getBoolean("build.verbose"); } @@ -163,156 +157,63 @@ public String build(List progListeners, boolean export this.buildPath = sketch.getBuildPath().getAbsolutePath(); this.buildCache = BaseNoGui.getCachePath(); - TargetBoard board = BaseNoGui.getTargetBoard(); - if (board == null) { + Optional mayBoard = BaseNoGui.getTargetBoard(); + if (!mayBoard.isPresent()) { throw new RunnerException("Board is not selected"); } + TargetBoard board = mayBoard.get(); - TargetPlatform platform = board.getContainerPlatform(); - TargetPackage aPackage = platform.getContainerPackage(); - String vidpid = VIDPID(); - - PreferencesMap prefs = loadPreferences(board, platform, aPackage, vidpid); - - MessageConsumerOutputStream out = new MessageConsumerOutputStream(new ProgressAwareMessageConsumer(new I18NAwareMessageConsumer(System.out, System.err), progListeners), "\n"); - MessageConsumerOutputStream err = new MessageConsumerOutputStream(new I18NAwareMessageConsumer(System.err, Compiler.this), "\n"); - - callArduinoBuilder(board, platform, aPackage, vidpid, BuilderAction.COMPILE, out, err); - - out.flush(); - err.flush(); - - if (exportHex) { - runActions("hooks.savehex.presavehex", prefs); - - saveHex(prefs); - - runActions("hooks.savehex.postsavehex", prefs); - } - - return sketch.getPrimaryFile().getFileName(); - } + CompileReq.Builder req = CompileReq.newBuilder(); - private String VIDPID() { - BoardPort boardPort = BaseNoGui.getDiscoveryManager().find(PreferencesData.get("serial.port")); - if (boardPort == null) { - return ""; - } - - String vid = boardPort.getPrefs().get("vid"); - String pid = boardPort.getPrefs().get("pid"); - if (StringUtils.isEmpty(vid) || StringUtils.isEmpty(pid)) { - return ""; - } - - return vid.toUpperCase() + "_" + pid.toUpperCase(); - } - - private PreferencesMap loadPreferences(TargetBoard board, TargetPlatform platform, TargetPackage aPackage, String vidpid) throws RunnerException, IOException { - ByteArrayOutputStream stdout = new ByteArrayOutputStream(); - ByteArrayOutputStream stderr = new ByteArrayOutputStream(); - MessageConsumerOutputStream err = new MessageConsumerOutputStream(new I18NAwareMessageConsumer(new PrintStream(stderr), Compiler.this), "\n"); - try { - callArduinoBuilder(board, platform, aPackage, vidpid, BuilderAction.DUMP_PREFS, stdout, err); - } catch (RunnerException e) { - System.err.println(new String(stderr.toByteArray())); - throw e; - } - PreferencesMap prefs = new PreferencesMap(); - prefs.load(new ByteArrayInputStream(stdout.toByteArray())); - return prefs; - } - - private void addPathFlagIfPathExists(List cmd, String flag, File folder) { - if (folder.exists()) { - cmd.add(flag); - cmd.add(folder.getAbsolutePath()); + TargetPlatform platform = board.getContainerPlatform(); + String vendor = platform.getContainerPackage().getId(); + String fqbn = vendor+":"+ platform.getId()+":"+board.getId(); + String options = boardOptions(board); + if (!options.isEmpty()) { + fqbn += ":" + options; } - } - - private void callArduinoBuilder(TargetBoard board, TargetPlatform platform, TargetPackage aPackage, String vidpid, BuilderAction action, OutputStream outStream, OutputStream errStream) throws RunnerException { - List cmd = new ArrayList<>(); - cmd.add(BaseNoGui.getContentFile("arduino-builder").getAbsolutePath()); - cmd.add(action.value); - cmd.add("-logger=machine"); - - File installedPackagesFolder = new File(BaseNoGui.getSettingsFolder(), "packages"); - - addPathFlagIfPathExists(cmd, "-hardware", BaseNoGui.getHardwareFolder()); - addPathFlagIfPathExists(cmd, "-hardware", installedPackagesFolder); - addPathFlagIfPathExists(cmd, "-hardware", BaseNoGui.getSketchbookHardwareFolder()); - - addPathFlagIfPathExists(cmd, "-tools", BaseNoGui.getContentFile("tools-builder")); - addPathFlagIfPathExists(cmd, "-tools", Paths.get(BaseNoGui.getHardwarePath(), "tools", "avr").toFile()); - addPathFlagIfPathExists(cmd, "-tools", installedPackagesFolder); + req.setFqbn(fqbn); - addPathFlagIfPathExists(cmd, "-built-in-libraries", BaseNoGui.getContentFile("libraries")); - addPathFlagIfPathExists(cmd, "-libraries", BaseNoGui.getSketchbookLibrariesFolder().folder); - - String fqbn = Stream.of(aPackage.getId(), platform.getId(), board.getId(), boardOptions(board)).filter(s -> !s.isEmpty()).collect(Collectors.joining(":")); - cmd.add("-fqbn=" + fqbn); - - if (!"".equals(vidpid)) { - cmd.add("-vid-pid=" + vidpid); + String vidpid = VIDPID(); + if (!vidpid.isEmpty()) { + req.setVidPid(vidpid); } - cmd.add("-ide-version=" + BaseNoGui.REVISION); - cmd.add("-build-path"); - cmd.add(buildPath); - cmd.add("-warnings=" + PreferencesData.get("compiler.warning_level")); + req.setBuildPath(buildPath); - if (PreferencesData.getBoolean("compiler.cache_core") == true && buildCache != null) { - cmd.add("-build-cache"); - cmd.add(buildCache.getAbsolutePath()); + if (PreferencesData.getBoolean("compiler.cache_core") && buildCache != null) { + req.setBuildCachePath(buildCache.getAbsolutePath()); } PreferencesData.getMap() .subTree("runtime.build_properties_custom") - .entrySet() - .stream() - .forEach(kv -> cmd.add("-prefs=" + kv.getKey() + "=" + kv.getValue())); + .forEach((k, v) -> req.addBuildProperties(k + "=" + v)); - cmd.add("-prefs=build.warn_data_percentage=" + PreferencesData.get("build.warn_data_percentage")); + req.addBuildProperties("build.warn_data_percentage=" + + PreferencesData.get("build.warn_data_percentage")); - for (Map.Entry entry : BaseNoGui.getBoardPreferences().entrySet()) { - if (entry.getKey().startsWith("runtime.tools")) { - cmd.add("-prefs=" + entry.getKey() + "=" + entry.getValue()); - } - } - - //commandLine.addArgument("-debug-level=10", false); + req.setWarnings(PreferencesData.get("compiler.warning_level")); - if (verbose) { - cmd.add("-verbose"); - } + req.setSketchPath(pathToSketch.getAbsolutePath()); - cmd.add(pathToSketch.getAbsolutePath()); + req.setDryRun(!exportHex); if (verbose) { - System.out.println(StringUtils.join(cmd, ' ')); + req.setVerbose(true); + System.out.println("Build options"); + System.out.println("-------------"); + System.out.println(req); } - int result; + CompileResult result; try { - Process proc = ProcessUtils.exec(cmd.toArray(new String[0])); - MessageSiphon in = new MessageSiphon(proc.getInputStream(), (msg) -> { - try { - outStream.write(msg.getBytes()); - } catch (Exception e) { - exception = new RunnerException(e); - } - }); - MessageSiphon err = new MessageSiphon(proc.getErrorStream(), (msg) -> { - try { - errStream.write(msg.getBytes()); - } catch (Exception e) { - exception = new RunnerException(e); - } - }); + MessageConsumerOutputStream out = new MessageConsumerOutputStream(new I18NAwareMessageConsumer(System.out, System.err), "\n"); + MessageConsumerOutputStream err = new MessageConsumerOutputStream(new I18NAwareMessageConsumer(System.err, this), "\n"); + + result = core.compile(req.build(), out, err, progListeners); - in.join(); - err.join(); - result = proc.waitFor(); + out.flush(); + err.flush(); } catch (Exception e) { throw new RunnerException(e); } @@ -320,165 +221,28 @@ private void callArduinoBuilder(TargetBoard board, TargetPlatform platform, Targ if (exception != null) throw exception; - if (result > 1) { - System.err.println(I18n.format(tr("{0} returned {1}"), cmd.get(0), result)); - } - - if (result != 0) { + if (result == CompileResult.compile_error) { RunnerException re = new RunnerException(I18n.format(tr("Error compiling for board {0}."), board.getName())); re.hideStackTrace(); throw re; } - } - - private void saveHex(PreferencesMap prefs) throws RunnerException { - List compiledSketches = new ArrayList<>(prefs.subTree("recipe.output.tmp_file", 1).values()); - List copyOfCompiledSketches = new ArrayList<>(prefs.subTree("recipe.output.save_file", 1).values()); - - if (isExportCompiledSketchSupported(compiledSketches, copyOfCompiledSketches, prefs)) { - System.err.println(tr("Warning: This core does not support exporting sketches. Please consider upgrading it or contacting its author")); - return; - } - - PreferencesMap dict = new PreferencesMap(prefs); - dict.put("ide_version", "" + BaseNoGui.REVISION); - PreferencesMap withBootloaderDict = new PreferencesMap(dict); - dict.put("build.project_name", dict.get("build.project_name") + ".with_bootloader"); - - if (!compiledSketches.isEmpty()) { - for (int i = 0; i < compiledSketches.size(); i++) { - saveHex(compiledSketches.get(i), copyOfCompiledSketches.get(i), dict); - saveHex(compiledSketches.get(i), copyOfCompiledSketches.get(i), withBootloaderDict); - } - } else { - try { - saveHex(prefs.getOrExcept("recipe.output.tmp_file"), prefs.getOrExcept("recipe.output.save_file"), dict); - saveHex(prefs.getOrExcept("recipe.output.tmp_file"), prefs.getOrExcept("recipe.output.save_file"), withBootloaderDict); - } catch (PreferencesMapException e) { - throw new RunnerException(e); - } - } - } - - private void saveHex(String compiledSketch, String copyOfCompiledSketch, PreferencesMap prefs) throws RunnerException { - try { - compiledSketch = StringReplacer.replaceFromMapping(compiledSketch, prefs); - copyOfCompiledSketch = StringReplacer.replaceFromMapping(copyOfCompiledSketch, prefs); - copyOfCompiledSketch = copyOfCompiledSketch.replaceAll(":", "_"); - - Path compiledSketchPath; - Path compiledSketchPathInSubfolder = Paths.get(prefs.get("build.path"), "sketch", compiledSketch); - Path compiledSketchPathInBuildPath = Paths.get(prefs.get("build.path"), compiledSketch); - if (Files.exists(compiledSketchPathInSubfolder)) { - compiledSketchPath = compiledSketchPathInSubfolder; - } else if (Files.exists(compiledSketchPathInBuildPath)) { - compiledSketchPath = compiledSketchPathInBuildPath; - } else { - return; - } - - Path copyOfCompiledSketchFilePath = Paths.get(this.sketch.getFolder().getAbsolutePath(), copyOfCompiledSketch); - - Files.copy(compiledSketchPath, copyOfCompiledSketchFilePath, StandardCopyOption.REPLACE_EXISTING); - } catch (IOException e) { - throw new RunnerException(e); - } - } - - private boolean isExportCompiledSketchSupported(List compiledSketches, List copyOfCompiledSketches, PreferencesMap prefs) { - return (compiledSketches.isEmpty() || copyOfCompiledSketches.isEmpty() || copyOfCompiledSketches.size() < compiledSketches.size()) && (!prefs.containsKey("recipe.output.tmp_file") || !prefs.containsKey("recipe.output.save_file")); - } - - private void runActions(String recipeClass, PreferencesMap prefs) throws RunnerException, PreferencesMapException { - List patterns = prefs.keySet().stream().filter(key -> key.startsWith("recipe." + recipeClass) && key.endsWith(".pattern")).collect(Collectors.toList()); - Collections.sort(patterns); - for (String recipe : patterns) { - runRecipe(recipe, prefs); - } - } - - private void runRecipe(String recipe, PreferencesMap prefs) throws RunnerException, PreferencesMapException { - PreferencesMap dict = new PreferencesMap(prefs); - dict.put("ide_version", "" + BaseNoGui.REVISION); - dict.put("sketch_path", sketch.getFolder().getAbsolutePath()); - String[] cmdArray; - String cmd = prefs.getOrExcept(recipe); - try { - cmdArray = StringReplacer.formatAndSplit(cmd, dict); - } catch (Exception e) { - throw new RunnerException(e); - } - exec(cmdArray); + return sketch.getPrimaryFile().getFileName(); } - private void exec(String[] command) throws RunnerException { - // eliminate any empty array entries - List stringList = new ArrayList<>(); - for (String string : command) { - string = string.trim(); - if (string.length() != 0) - stringList.add(string); - } - command = stringList.toArray(new String[stringList.size()]); - if (command.length == 0) - return; - - if (verbose) { - for (String c : command) - System.out.print(c + " "); - System.out.println(); - } - - DefaultExecutor executor = new DefaultExecutor(); - executor.setStreamHandler(new PumpStreamHandler() { - - @Override - protected Thread createPump(InputStream is, OutputStream os, boolean closeWhenExhausted) { - final Thread result = new Thread(new MyStreamPumper(is, Compiler.this)); - result.setName("MyStreamPumper Thread"); - result.setDaemon(true); - return result; - - } - }); - - CommandLine commandLine = new DoubleQuotedArgumentsOnWindowsCommandLine(command[0]); - for (int i = 1; i < command.length; i++) { - commandLine.addArgument(command[i], false); - } - - int result; - executor.setExitValues(null); - try { - result = executor.execute(commandLine); - } catch (IOException e) { - RunnerException re = new RunnerException(e.getMessage()); - re.hideStackTrace(); - throw re; + private String VIDPID() { + BoardPort boardPort = BaseNoGui.getDiscoveryManager().find(PreferencesData.get("serial.port")); + if (boardPort == null) { + return ""; } - executor.setExitValues(new int[0]); - - // an error was queued up by message(), barf this back to compile(), - // which will barf it back to Editor. if you're having trouble - // discerning the imagery, consider how cows regurgitate their food - // to digest it, and the fact that they have five stomaches. - // - //System.out.println("throwing up " + exception); - if (exception != null) - throw exception; - if (result > 1) { - // a failure in the tool (e.g. unable to locate a sub-executable) - System.err - .println(I18n.format(tr("{0} returned {1}"), command[0], result)); + String vid = boardPort.getPrefs().get("vid"); + String pid = boardPort.getPrefs().get("pid"); + if (StringUtils.isEmpty(vid) || StringUtils.isEmpty(pid)) { + return ""; } - if (result != 0) { - RunnerException re = new RunnerException(tr("Error compiling.")); - re.hideStackTrace(); - throw re; - } + return vid.toUpperCase() + "_" + pid.toUpperCase(); } private String boardOptions(TargetBoard board) { diff --git a/arduino-core/src/cc/arduino/UploaderUtils.java b/arduino-core/src/cc/arduino/UploaderUtils.java index 875f41d7676..827059cbf49 100644 --- a/arduino-core/src/cc/arduino/UploaderUtils.java +++ b/arduino-core/src/cc/arduino/UploaderUtils.java @@ -35,7 +35,6 @@ import processing.app.BaseNoGui; import processing.app.PreferencesData; import processing.app.Sketch; -import processing.app.debug.TargetBoard; import java.util.LinkedList; import java.util.List; @@ -51,8 +50,7 @@ public Uploader getUploaderByPreferences(boolean noUploadPort) { boardPort = BaseNoGui.getDiscoveryManager().find(port); } - TargetBoard board = BaseNoGui.getTargetBoard(); - return new UploaderFactory().newUploader(board, boardPort, noUploadPort); + return new UploaderFactory().newUploader(boardPort, noUploadPort); } public boolean upload(Sketch data, Uploader uploader, String suggestedClassName, boolean usingProgrammer, boolean noUploadPort, List warningsAccumulator) throws Exception { diff --git a/arduino-core/src/cc/arduino/cli/ArduinoCore.java b/arduino-core/src/cc/arduino/cli/ArduinoCore.java new file mode 100644 index 00000000000..accb9a6c07c --- /dev/null +++ b/arduino-core/src/cc/arduino/cli/ArduinoCore.java @@ -0,0 +1,115 @@ +/* + * This file is part of Arduino. + * + * Copyright 2019 Arduino LLC (http://www.arduino.cc/) + * + * Arduino is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + * As a special exception, you may use this file as part of a free software + * library without restriction. Specifically, if other files instantiate + * templates or use macros or inline functions from this file, or you compile + * this file and link it with other files to produce an executable, this + * file does not by itself cause the resulting executable to be covered by + * the GNU General Public License. This exception does not however + * invalidate any other reasons why the executable file might be covered by + * the GNU General Public License. + */ + +package cc.arduino.cli; + +import java.io.IOException; +import java.util.Iterator; + +import cc.arduino.cli.commands.ArduinoCoreGrpc; +import cc.arduino.cli.commands.ArduinoCoreGrpc.ArduinoCoreBlockingStub; +import cc.arduino.cli.commands.Commands.InitReq; +import cc.arduino.cli.commands.Commands.InitResp; +import cc.arduino.cli.commands.Common.Instance; +import cc.arduino.cli.settings.SettingsGrpc; +import cc.arduino.cli.settings.SettingsGrpc.SettingsBlockingStub; +import io.grpc.ManagedChannel; +import io.grpc.ManagedChannelBuilder; +import io.grpc.StatusException; +import processing.app.BaseNoGui; +import processing.app.debug.MessageSiphon; +import processing.app.helpers.ProcessUtils; + +public class ArduinoCore { + + private Process cliProcess; + private ArduinoCoreBlockingStub coreBlocking; + private SettingsBlockingStub settingsBlocking; + // private ArduinoCoreStub async; + + public ArduinoCore() throws IOException { + String cliPath = BaseNoGui.getContentFile("arduino-cli").getAbsolutePath(); + cliProcess = ProcessUtils.exec(new String[] { cliPath, "daemon" }); + new MessageSiphon(cliProcess.getInputStream(), (msg) -> { + System.out.println("CLI> " + msg); + }); + new MessageSiphon(cliProcess.getErrorStream(), (msg) -> { + System.err.println("CLI> " + msg); + }); + + // TODO: Do a better job managing the arduino-cli process + try { + Thread.sleep(1000); + } catch (InterruptedException e) { + } + if (!cliProcess.isAlive()) { + int res; + try { + res = cliProcess.waitFor(); + throw new IOException( + "Arduino server terminated with return code " + res); + } catch (InterruptedException e) { + } + throw new IOException("Arduino server terminated"); + } + + ManagedChannel channel = ManagedChannelBuilder // + .forAddress("127.0.0.1", 50051) // + .usePlaintext() // + .maxInboundMessageSize(Integer.MAX_VALUE) // + .build(); + coreBlocking = ArduinoCoreGrpc.newBlockingStub(channel); + settingsBlocking = SettingsGrpc.newBlockingStub(channel); + // async = ArduinoCoreGrpc.newStub(channel); + } + + public ArduinoCoreInstance init() throws StatusException { + Iterator resp = coreBlocking.init(InitReq.getDefaultInstance()); + Instance instance = null; + while (resp.hasNext()) { + InitResp r = resp.next(); + if (r.hasTaskProgress()) { + System.out.println(r.getTaskProgress()); + } + if (r.hasDownloadProgress()) { + System.out.println(r.getDownloadProgress()); + } + if (r.getInstance() != null) { + if (!r.getLibrariesIndexError().isEmpty()) { + System.err.println(r.getLibrariesIndexError()); + } + r.getPlatformsIndexErrorsList().forEach(System.err::println); + instance = r.getInstance(); + } + } + ArduinoCoreInstance core = new ArduinoCoreInstance(instance, coreBlocking, settingsBlocking); + core.updateSettingFromPreferences(); + return core; + } +} diff --git a/arduino-core/src/cc/arduino/cli/ArduinoCoreInstance.java b/arduino-core/src/cc/arduino/cli/ArduinoCoreInstance.java new file mode 100644 index 00000000000..70913711516 --- /dev/null +++ b/arduino-core/src/cc/arduino/cli/ArduinoCoreInstance.java @@ -0,0 +1,283 @@ +/* + * This file is part of Arduino. + * + * Copyright 2019 Arduino LLC (http://www.arduino.cc/) + * + * Arduino is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + * As a special exception, you may use this file as part of a free software + * library without restriction. Specifically, if other files instantiate + * templates or use macros or inline functions from this file, or you compile + * this file and link it with other files to produce an executable, this + * file does not by itself cause the resulting executable to be covered by + * the GNU General Public License. This exception does not however + * invalidate any other reasons why the executable file might be covered by + * the GNU General Public License. + */ + +package cc.arduino.cli; + +import static processing.app.I18n.tr; + +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.net.URI; +import java.net.URL; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Optional; + +import com.google.protobuf.ByteString; + +import cc.arduino.CompilerProgressListener; +import cc.arduino.cli.commands.ArduinoCoreGrpc.ArduinoCoreBlockingStub; +import cc.arduino.cli.commands.Board.BoardDetailsReq; +import cc.arduino.cli.commands.Board.BoardDetailsResp; +import cc.arduino.cli.commands.Commands.DestroyReq; +import cc.arduino.cli.commands.Commands.RescanReq; +import cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq; +import cc.arduino.cli.commands.Commands.UpdateLibrariesIndexResp; +import cc.arduino.cli.commands.Common.DownloadProgress; +import cc.arduino.cli.commands.Common.Instance; +import cc.arduino.cli.commands.Common.TaskProgress; +import cc.arduino.cli.commands.Compile.CompileReq; +import cc.arduino.cli.commands.Compile.CompileResp; +import cc.arduino.cli.commands.Compile.CompileResult; +import cc.arduino.cli.commands.Lib.InstalledLibrary; +import cc.arduino.cli.commands.Lib.LibraryInstallReq; +import cc.arduino.cli.commands.Lib.LibraryInstallResp; +import cc.arduino.cli.commands.Lib.LibraryListReq; +import cc.arduino.cli.commands.Lib.LibraryListResp; +import cc.arduino.cli.commands.Lib.LibrarySearchReq; +import cc.arduino.cli.commands.Lib.LibrarySearchResp; +import cc.arduino.cli.commands.Lib.LibraryUninstallReq; +import cc.arduino.cli.commands.Lib.LibraryUninstallResp; +import cc.arduino.cli.commands.Lib.SearchedLibrary; +import cc.arduino.cli.settings.SettingsOuterClass; +import cc.arduino.cli.settings.SettingsGrpc.SettingsBlockingStub; +import cc.arduino.contributions.ProgressListener; +import cc.arduino.contributions.libraries.ContributedLibraryRelease; +import cc.arduino.net.CustomProxySelector; +import io.grpc.StatusException; +import io.grpc.StatusRuntimeException; +import processing.app.BaseNoGui; +import processing.app.PreferencesData; + +public class ArduinoCoreInstance { + + private Instance instance; + private ArduinoCoreBlockingStub stub; + private SettingsBlockingStub settings; + + public ArduinoCoreInstance(Instance instance, + ArduinoCoreBlockingStub core, + SettingsBlockingStub settings) { + this.instance = instance; + this.stub = core; + this.settings = settings; + } + + public void updateSettingFromPreferences() throws StatusException { + setDataDir(BaseNoGui.getSettingsFolder()); + setSketchbookDir(BaseNoGui.getSketchbookFolder()); + try { + Optional proxy = new CustomProxySelector(PreferencesData.getMap()) + .getProxyURIFor(new URL("https://arduino.cc/").toURI()); + setProxyUrl(proxy.isPresent() ? proxy.get().toString() : ""); + } catch (Exception e) { + e.printStackTrace(); + } + rescan(); + } + + public void setDataDir(File dataDir) { + settings + .setValue(SettingsOuterClass.Value.newBuilder().setKey("directories") // + .setJsonData("{ \"data\": \"" + dataDir.getAbsolutePath() + "\" }") // + .build()); + File downloadsDir = new File(dataDir, "staging"); + settings + .setValue(SettingsOuterClass.Value.newBuilder().setKey("directories") // + .setJsonData("{ \"downloads\": \"" + downloadsDir.getAbsolutePath() + + "\" }") // + .build()); + } + + public void setSketchbookDir(File dataDir) { + System.out.println("SKETCHBOOK: "+dataDir.getAbsolutePath()); + settings + .setValue(SettingsOuterClass.Value.newBuilder().setKey("directories") // + .setJsonData("{ \"user\": \"" + dataDir.getAbsolutePath() + "\" }") // + .build()); + } + + public void setProxyUrl(String url) { + settings.setValue(SettingsOuterClass.Value.newBuilder() // + .setKey("network") // + .setJsonData("{ \"proxy\": \"" + url + "\" }") // + .build()); + } + + public void boardDetails(String fqbn) throws StatusException { + try { + BoardDetailsReq req = BoardDetailsReq.newBuilder() // + .setFqbn(fqbn) // + .setInstance(instance) // + .build(); + BoardDetailsResp resp = stub.boardDetails(req); + System.out.println(resp.getName()); + } catch (StatusRuntimeException e) { + throw e.getStatus().asException(); + } + } + + public CompileResult compile(CompileReq req, OutputStream out, OutputStream err, + List progressListeners) throws StatusException { + req = CompileReq.newBuilder(req) // + .setInstance(instance) // + .build(); + try { + Iterator stream = stub.compile(req); + CompileResult result = CompileResult.compile_error; + while (stream.hasNext()) { + CompileResp resp = stream.next(); + try { + ByteString outdata = resp.getOutStream(); + if (outdata != null) + out.write(outdata.toByteArray()); + ByteString errdata = resp.getErrStream(); + if (errdata != null) + err.write(errdata.toByteArray()); + TaskProgress taskProgress = resp.getTaskProgress(); + if (taskProgress != null) { + float progress = taskProgress.getPercentCompleted(); + if (progress > 0) { + progressListeners.forEach(l -> l.progress((int) progress)); + } + } + } catch (IOException e) { + e.printStackTrace(); + } + result = resp.getResult(); + } + return result; + } catch (StatusRuntimeException e) { + throw e.getStatus().asException(); + } + } + + public void rescan() throws StatusException { + try { + stub.rescan(RescanReq.newBuilder() // + .setInstance(instance) // + .build()); + } catch (StatusRuntimeException e) { + throw e.getStatus().asException(); + } + } + + public void destroy() throws StatusException { + try { + stub.destroy(DestroyReq.newBuilder() // + .setInstance(instance).build()); + } catch (StatusRuntimeException e) { + throw e.getStatus().asException(); + } + } + + public void updateLibrariesIndex(ProgressListener progressListener) + throws StatusException { + try { + Iterator stream = stub + .updateLibrariesIndex(UpdateLibrariesIndexReq.newBuilder() + .setInstance(instance).build()); + ProgressWrapper p = new ProgressWrapper(progressListener); + while (stream.hasNext()) { + UpdateLibrariesIndexResp resp = stream.next(); + DownloadProgress progress = resp.getDownloadProgress().toBuilder() + .setFile(tr("Downloading libraries index...")).build(); + p.update(progress); + } + } catch (StatusRuntimeException e) { + throw e.getStatus().asException(); + } + } + + // Lib functions + + public List searchLibrary(String query) + throws StatusException { + try { + LibrarySearchResp resp = stub.librarySearch(LibrarySearchReq.newBuilder() // + .setInstance(instance) // + .setQuery(query) // + .build()); + return resp.getLibrariesList(); + } catch (StatusRuntimeException e) { + throw e.getStatus().asException(); + } + } + + public List libraryList(boolean listAll) + throws StatusException { + try { + LibraryListResp resp = stub.libraryList(LibraryListReq.newBuilder() // + .setInstance(instance) // + .setAll(listAll) // + .build()); + return resp.getInstalledLibraryList(); + } catch (StatusRuntimeException e) { + throw e.getStatus().asException(); + } + } + + public List libraryResolveDependecies(ContributedLibraryRelease lib) { + return new ArrayList<>(); + } + + public void libraryInstall(ContributedLibraryRelease lib, + ProgressListener progressListener) { + Iterator stream = stub + .libraryInstall(LibraryInstallReq.newBuilder() // + .setInstance(instance) // + .setName(lib.getName()) // + .setVersion(lib.getVersion()) // + .build()); + ProgressWrapper p = new ProgressWrapper(progressListener); + while (stream.hasNext()) { + LibraryInstallResp resp = stream.next(); + DownloadProgress progress = resp.getProgress(); + p.update(progress); + } + } + + public void libraryRemove(ContributedLibraryRelease lib, + ProgressListener progressListener) { + Iterator stream = stub + .libraryUninstall(LibraryUninstallReq.newBuilder() // + .setInstance(instance) // + .setName(lib.getName()) // + .setVersion(lib.getVersion()) // + .build()); + ProgressWrapper p = new ProgressWrapper(progressListener); + while (stream.hasNext()) { + LibraryUninstallResp resp = stream.next(); + TaskProgress progress = resp.getTaskProgress(); + p.update(progress); + } + } +} diff --git a/arduino-core/src/cc/arduino/cli/ProgressWrapper.java b/arduino-core/src/cc/arduino/cli/ProgressWrapper.java new file mode 100644 index 00000000000..71cbed6c72f --- /dev/null +++ b/arduino-core/src/cc/arduino/cli/ProgressWrapper.java @@ -0,0 +1,99 @@ +/* + * This file is part of Arduino. + * + * Copyright 2019 Arduino LLC (http://www.arduino.cc/) + * + * Arduino is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + * As a special exception, you may use this file as part of a free software + * library without restriction. Specifically, if other files instantiate + * templates or use macros or inline functions from this file, or you compile + * this file and link it with other files to produce an executable, this + * file does not by itself cause the resulting executable to be covered by + * the GNU General Public License. This exception does not however + * invalidate any other reasons why the executable file might be covered by + * the GNU General Public License. + */ + +package cc.arduino.cli; + +import static processing.app.I18n.format; +import static processing.app.I18n.tr; + +import cc.arduino.cli.commands.Common.DownloadProgress; +import cc.arduino.cli.commands.Common.TaskProgress; +import cc.arduino.contributions.ProgressListener; +import cc.arduino.utils.MultiStepProgress; +import cc.arduino.utils.Progress; + +class ProgressWrapper { + final ProgressListener progressListener; + String file = ""; + String url = ""; + private long downloaded, totalSize; + Progress progress = new MultiStepProgress(1); + + public ProgressWrapper(ProgressListener progressListener) { + this.progressListener = progressListener; + } + + public void update(DownloadProgress d) { + if (d == null) { + return; + } + if (!d.getFile().isEmpty()) { + file = d.getFile(); + } + if (!d.getUrl().isEmpty()) { + url = d.getUrl(); + } + if (d.getTotalSize() > 0) { + totalSize = d.getTotalSize(); + } + if (d.getDownloaded() > 0) { + downloaded = d.getDownloaded(); + } + + String msg = format(tr("Downloaded {0}kb of {1}kb."), downloaded, totalSize); + if (d.getCompleted()) { + file = ""; + url = ""; + totalSize = 0; + downloaded = 0; + } else { + progress.setStatus("Downloading " + file + url + " (" + downloaded + + " of " + totalSize + ")"); + progress.setProgress(((float) downloaded / totalSize) * 100); + } + progressListener.onProgress(progress); + } + + String taskName; + + public void update(TaskProgress t) { + if (t == null) { + return; + } + + String name = t.getName(); + if (!name.isEmpty()) { + taskName = name; + } + + progress.setProgress(t.getCompleted() ? 100 : 0); + progress.setStatus(taskName + " " + t.getMessage()); + progressListener.onProgress(progress); + } +} \ No newline at end of file diff --git a/arduino-core/src/cc/arduino/cli/commands/ArduinoCoreGrpc.java b/arduino-core/src/cc/arduino/cli/commands/ArduinoCoreGrpc.java new file mode 100644 index 00000000000..ddb48c61489 --- /dev/null +++ b/arduino-core/src/cc/arduino/cli/commands/ArduinoCoreGrpc.java @@ -0,0 +1,2423 @@ +package cc.arduino.cli.commands; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall; +import static io.grpc.stub.ClientCalls.asyncClientStreamingCall; +import static io.grpc.stub.ClientCalls.asyncServerStreamingCall; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingServerStreamingCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; +import static io.grpc.stub.ServerCalls.asyncClientStreamingCall; +import static io.grpc.stub.ServerCalls.asyncServerStreamingCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + *
+ * The main Arduino Platform Service
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.20.0)", + comments = "Source: commands/commands.proto") +public final class ArduinoCoreGrpc { + + private ArduinoCoreGrpc() {} + + public static final String SERVICE_NAME = "cc.arduino.cli.commands.ArduinoCore"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getInitMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "Init", + requestType = cc.arduino.cli.commands.Commands.InitReq.class, + responseType = cc.arduino.cli.commands.Commands.InitResp.class, + methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getInitMethod() { + io.grpc.MethodDescriptor getInitMethod; + if ((getInitMethod = ArduinoCoreGrpc.getInitMethod) == null) { + synchronized (ArduinoCoreGrpc.class) { + if ((getInitMethod = ArduinoCoreGrpc.getInitMethod) == null) { + ArduinoCoreGrpc.getInitMethod = getInitMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName(generateFullMethodName( + "cc.arduino.cli.commands.ArduinoCore", "Init")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Commands.InitReq.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Commands.InitResp.getDefaultInstance())) + .setSchemaDescriptor(new ArduinoCoreMethodDescriptorSupplier("Init")) + .build(); + } + } + } + return getInitMethod; + } + + private static volatile io.grpc.MethodDescriptor getDestroyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "Destroy", + requestType = cc.arduino.cli.commands.Commands.DestroyReq.class, + responseType = cc.arduino.cli.commands.Commands.DestroyResp.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDestroyMethod() { + io.grpc.MethodDescriptor getDestroyMethod; + if ((getDestroyMethod = ArduinoCoreGrpc.getDestroyMethod) == null) { + synchronized (ArduinoCoreGrpc.class) { + if ((getDestroyMethod = ArduinoCoreGrpc.getDestroyMethod) == null) { + ArduinoCoreGrpc.getDestroyMethod = getDestroyMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "cc.arduino.cli.commands.ArduinoCore", "Destroy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Commands.DestroyReq.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Commands.DestroyResp.getDefaultInstance())) + .setSchemaDescriptor(new ArduinoCoreMethodDescriptorSupplier("Destroy")) + .build(); + } + } + } + return getDestroyMethod; + } + + private static volatile io.grpc.MethodDescriptor getRescanMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "Rescan", + requestType = cc.arduino.cli.commands.Commands.RescanReq.class, + responseType = cc.arduino.cli.commands.Commands.RescanResp.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getRescanMethod() { + io.grpc.MethodDescriptor getRescanMethod; + if ((getRescanMethod = ArduinoCoreGrpc.getRescanMethod) == null) { + synchronized (ArduinoCoreGrpc.class) { + if ((getRescanMethod = ArduinoCoreGrpc.getRescanMethod) == null) { + ArduinoCoreGrpc.getRescanMethod = getRescanMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "cc.arduino.cli.commands.ArduinoCore", "Rescan")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Commands.RescanReq.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Commands.RescanResp.getDefaultInstance())) + .setSchemaDescriptor(new ArduinoCoreMethodDescriptorSupplier("Rescan")) + .build(); + } + } + } + return getRescanMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateIndexMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateIndex", + requestType = cc.arduino.cli.commands.Commands.UpdateIndexReq.class, + responseType = cc.arduino.cli.commands.Commands.UpdateIndexResp.class, + methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getUpdateIndexMethod() { + io.grpc.MethodDescriptor getUpdateIndexMethod; + if ((getUpdateIndexMethod = ArduinoCoreGrpc.getUpdateIndexMethod) == null) { + synchronized (ArduinoCoreGrpc.class) { + if ((getUpdateIndexMethod = ArduinoCoreGrpc.getUpdateIndexMethod) == null) { + ArduinoCoreGrpc.getUpdateIndexMethod = getUpdateIndexMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName(generateFullMethodName( + "cc.arduino.cli.commands.ArduinoCore", "UpdateIndex")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Commands.UpdateIndexReq.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Commands.UpdateIndexResp.getDefaultInstance())) + .setSchemaDescriptor(new ArduinoCoreMethodDescriptorSupplier("UpdateIndex")) + .build(); + } + } + } + return getUpdateIndexMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateLibrariesIndexMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateLibrariesIndex", + requestType = cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq.class, + responseType = cc.arduino.cli.commands.Commands.UpdateLibrariesIndexResp.class, + methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getUpdateLibrariesIndexMethod() { + io.grpc.MethodDescriptor getUpdateLibrariesIndexMethod; + if ((getUpdateLibrariesIndexMethod = ArduinoCoreGrpc.getUpdateLibrariesIndexMethod) == null) { + synchronized (ArduinoCoreGrpc.class) { + if ((getUpdateLibrariesIndexMethod = ArduinoCoreGrpc.getUpdateLibrariesIndexMethod) == null) { + ArduinoCoreGrpc.getUpdateLibrariesIndexMethod = getUpdateLibrariesIndexMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName(generateFullMethodName( + "cc.arduino.cli.commands.ArduinoCore", "UpdateLibrariesIndex")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Commands.UpdateLibrariesIndexResp.getDefaultInstance())) + .setSchemaDescriptor(new ArduinoCoreMethodDescriptorSupplier("UpdateLibrariesIndex")) + .build(); + } + } + } + return getUpdateLibrariesIndexMethod; + } + + private static volatile io.grpc.MethodDescriptor getVersionMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "Version", + requestType = cc.arduino.cli.commands.Commands.VersionReq.class, + responseType = cc.arduino.cli.commands.Commands.VersionResp.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getVersionMethod() { + io.grpc.MethodDescriptor getVersionMethod; + if ((getVersionMethod = ArduinoCoreGrpc.getVersionMethod) == null) { + synchronized (ArduinoCoreGrpc.class) { + if ((getVersionMethod = ArduinoCoreGrpc.getVersionMethod) == null) { + ArduinoCoreGrpc.getVersionMethod = getVersionMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "cc.arduino.cli.commands.ArduinoCore", "Version")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Commands.VersionReq.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Commands.VersionResp.getDefaultInstance())) + .setSchemaDescriptor(new ArduinoCoreMethodDescriptorSupplier("Version")) + .build(); + } + } + } + return getVersionMethod; + } + + private static volatile io.grpc.MethodDescriptor getBoardDetailsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BoardDetails", + requestType = cc.arduino.cli.commands.Board.BoardDetailsReq.class, + responseType = cc.arduino.cli.commands.Board.BoardDetailsResp.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getBoardDetailsMethod() { + io.grpc.MethodDescriptor getBoardDetailsMethod; + if ((getBoardDetailsMethod = ArduinoCoreGrpc.getBoardDetailsMethod) == null) { + synchronized (ArduinoCoreGrpc.class) { + if ((getBoardDetailsMethod = ArduinoCoreGrpc.getBoardDetailsMethod) == null) { + ArduinoCoreGrpc.getBoardDetailsMethod = getBoardDetailsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "cc.arduino.cli.commands.ArduinoCore", "BoardDetails")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Board.BoardDetailsReq.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Board.BoardDetailsResp.getDefaultInstance())) + .setSchemaDescriptor(new ArduinoCoreMethodDescriptorSupplier("BoardDetails")) + .build(); + } + } + } + return getBoardDetailsMethod; + } + + private static volatile io.grpc.MethodDescriptor getBoardAttachMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BoardAttach", + requestType = cc.arduino.cli.commands.Board.BoardAttachReq.class, + responseType = cc.arduino.cli.commands.Board.BoardAttachResp.class, + methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getBoardAttachMethod() { + io.grpc.MethodDescriptor getBoardAttachMethod; + if ((getBoardAttachMethod = ArduinoCoreGrpc.getBoardAttachMethod) == null) { + synchronized (ArduinoCoreGrpc.class) { + if ((getBoardAttachMethod = ArduinoCoreGrpc.getBoardAttachMethod) == null) { + ArduinoCoreGrpc.getBoardAttachMethod = getBoardAttachMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName(generateFullMethodName( + "cc.arduino.cli.commands.ArduinoCore", "BoardAttach")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Board.BoardAttachReq.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Board.BoardAttachResp.getDefaultInstance())) + .setSchemaDescriptor(new ArduinoCoreMethodDescriptorSupplier("BoardAttach")) + .build(); + } + } + } + return getBoardAttachMethod; + } + + private static volatile io.grpc.MethodDescriptor getBoardListMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BoardList", + requestType = cc.arduino.cli.commands.Board.BoardListReq.class, + responseType = cc.arduino.cli.commands.Board.BoardListResp.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getBoardListMethod() { + io.grpc.MethodDescriptor getBoardListMethod; + if ((getBoardListMethod = ArduinoCoreGrpc.getBoardListMethod) == null) { + synchronized (ArduinoCoreGrpc.class) { + if ((getBoardListMethod = ArduinoCoreGrpc.getBoardListMethod) == null) { + ArduinoCoreGrpc.getBoardListMethod = getBoardListMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "cc.arduino.cli.commands.ArduinoCore", "BoardList")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Board.BoardListReq.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Board.BoardListResp.getDefaultInstance())) + .setSchemaDescriptor(new ArduinoCoreMethodDescriptorSupplier("BoardList")) + .build(); + } + } + } + return getBoardListMethod; + } + + private static volatile io.grpc.MethodDescriptor getBoardListAllMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BoardListAll", + requestType = cc.arduino.cli.commands.Board.BoardListAllReq.class, + responseType = cc.arduino.cli.commands.Board.BoardListAllResp.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getBoardListAllMethod() { + io.grpc.MethodDescriptor getBoardListAllMethod; + if ((getBoardListAllMethod = ArduinoCoreGrpc.getBoardListAllMethod) == null) { + synchronized (ArduinoCoreGrpc.class) { + if ((getBoardListAllMethod = ArduinoCoreGrpc.getBoardListAllMethod) == null) { + ArduinoCoreGrpc.getBoardListAllMethod = getBoardListAllMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "cc.arduino.cli.commands.ArduinoCore", "BoardListAll")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Board.BoardListAllReq.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Board.BoardListAllResp.getDefaultInstance())) + .setSchemaDescriptor(new ArduinoCoreMethodDescriptorSupplier("BoardListAll")) + .build(); + } + } + } + return getBoardListAllMethod; + } + + private static volatile io.grpc.MethodDescriptor getCompileMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "Compile", + requestType = cc.arduino.cli.commands.Compile.CompileReq.class, + responseType = cc.arduino.cli.commands.Compile.CompileResp.class, + methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getCompileMethod() { + io.grpc.MethodDescriptor getCompileMethod; + if ((getCompileMethod = ArduinoCoreGrpc.getCompileMethod) == null) { + synchronized (ArduinoCoreGrpc.class) { + if ((getCompileMethod = ArduinoCoreGrpc.getCompileMethod) == null) { + ArduinoCoreGrpc.getCompileMethod = getCompileMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName(generateFullMethodName( + "cc.arduino.cli.commands.ArduinoCore", "Compile")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Compile.CompileReq.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Compile.CompileResp.getDefaultInstance())) + .setSchemaDescriptor(new ArduinoCoreMethodDescriptorSupplier("Compile")) + .build(); + } + } + } + return getCompileMethod; + } + + private static volatile io.grpc.MethodDescriptor getPlatformInstallMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "PlatformInstall", + requestType = cc.arduino.cli.commands.Core.PlatformInstallReq.class, + responseType = cc.arduino.cli.commands.Core.PlatformInstallResp.class, + methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getPlatformInstallMethod() { + io.grpc.MethodDescriptor getPlatformInstallMethod; + if ((getPlatformInstallMethod = ArduinoCoreGrpc.getPlatformInstallMethod) == null) { + synchronized (ArduinoCoreGrpc.class) { + if ((getPlatformInstallMethod = ArduinoCoreGrpc.getPlatformInstallMethod) == null) { + ArduinoCoreGrpc.getPlatformInstallMethod = getPlatformInstallMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName(generateFullMethodName( + "cc.arduino.cli.commands.ArduinoCore", "PlatformInstall")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Core.PlatformInstallReq.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Core.PlatformInstallResp.getDefaultInstance())) + .setSchemaDescriptor(new ArduinoCoreMethodDescriptorSupplier("PlatformInstall")) + .build(); + } + } + } + return getPlatformInstallMethod; + } + + private static volatile io.grpc.MethodDescriptor getPlatformDownloadMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "PlatformDownload", + requestType = cc.arduino.cli.commands.Core.PlatformDownloadReq.class, + responseType = cc.arduino.cli.commands.Core.PlatformDownloadResp.class, + methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getPlatformDownloadMethod() { + io.grpc.MethodDescriptor getPlatformDownloadMethod; + if ((getPlatformDownloadMethod = ArduinoCoreGrpc.getPlatformDownloadMethod) == null) { + synchronized (ArduinoCoreGrpc.class) { + if ((getPlatformDownloadMethod = ArduinoCoreGrpc.getPlatformDownloadMethod) == null) { + ArduinoCoreGrpc.getPlatformDownloadMethod = getPlatformDownloadMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName(generateFullMethodName( + "cc.arduino.cli.commands.ArduinoCore", "PlatformDownload")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Core.PlatformDownloadReq.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Core.PlatformDownloadResp.getDefaultInstance())) + .setSchemaDescriptor(new ArduinoCoreMethodDescriptorSupplier("PlatformDownload")) + .build(); + } + } + } + return getPlatformDownloadMethod; + } + + private static volatile io.grpc.MethodDescriptor getPlatformUninstallMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "PlatformUninstall", + requestType = cc.arduino.cli.commands.Core.PlatformUninstallReq.class, + responseType = cc.arduino.cli.commands.Core.PlatformUninstallResp.class, + methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getPlatformUninstallMethod() { + io.grpc.MethodDescriptor getPlatformUninstallMethod; + if ((getPlatformUninstallMethod = ArduinoCoreGrpc.getPlatformUninstallMethod) == null) { + synchronized (ArduinoCoreGrpc.class) { + if ((getPlatformUninstallMethod = ArduinoCoreGrpc.getPlatformUninstallMethod) == null) { + ArduinoCoreGrpc.getPlatformUninstallMethod = getPlatformUninstallMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName(generateFullMethodName( + "cc.arduino.cli.commands.ArduinoCore", "PlatformUninstall")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Core.PlatformUninstallReq.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Core.PlatformUninstallResp.getDefaultInstance())) + .setSchemaDescriptor(new ArduinoCoreMethodDescriptorSupplier("PlatformUninstall")) + .build(); + } + } + } + return getPlatformUninstallMethod; + } + + private static volatile io.grpc.MethodDescriptor getPlatformUpgradeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "PlatformUpgrade", + requestType = cc.arduino.cli.commands.Core.PlatformUpgradeReq.class, + responseType = cc.arduino.cli.commands.Core.PlatformUpgradeResp.class, + methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getPlatformUpgradeMethod() { + io.grpc.MethodDescriptor getPlatformUpgradeMethod; + if ((getPlatformUpgradeMethod = ArduinoCoreGrpc.getPlatformUpgradeMethod) == null) { + synchronized (ArduinoCoreGrpc.class) { + if ((getPlatformUpgradeMethod = ArduinoCoreGrpc.getPlatformUpgradeMethod) == null) { + ArduinoCoreGrpc.getPlatformUpgradeMethod = getPlatformUpgradeMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName(generateFullMethodName( + "cc.arduino.cli.commands.ArduinoCore", "PlatformUpgrade")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Core.PlatformUpgradeReq.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Core.PlatformUpgradeResp.getDefaultInstance())) + .setSchemaDescriptor(new ArduinoCoreMethodDescriptorSupplier("PlatformUpgrade")) + .build(); + } + } + } + return getPlatformUpgradeMethod; + } + + private static volatile io.grpc.MethodDescriptor getUploadMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "Upload", + requestType = cc.arduino.cli.commands.Upload.UploadReq.class, + responseType = cc.arduino.cli.commands.Upload.UploadResp.class, + methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getUploadMethod() { + io.grpc.MethodDescriptor getUploadMethod; + if ((getUploadMethod = ArduinoCoreGrpc.getUploadMethod) == null) { + synchronized (ArduinoCoreGrpc.class) { + if ((getUploadMethod = ArduinoCoreGrpc.getUploadMethod) == null) { + ArduinoCoreGrpc.getUploadMethod = getUploadMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName(generateFullMethodName( + "cc.arduino.cli.commands.ArduinoCore", "Upload")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Upload.UploadReq.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Upload.UploadResp.getDefaultInstance())) + .setSchemaDescriptor(new ArduinoCoreMethodDescriptorSupplier("Upload")) + .build(); + } + } + } + return getUploadMethod; + } + + private static volatile io.grpc.MethodDescriptor getListProgrammersAvailableForUploadMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListProgrammersAvailableForUpload", + requestType = cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq.class, + responseType = cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadResp.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListProgrammersAvailableForUploadMethod() { + io.grpc.MethodDescriptor getListProgrammersAvailableForUploadMethod; + if ((getListProgrammersAvailableForUploadMethod = ArduinoCoreGrpc.getListProgrammersAvailableForUploadMethod) == null) { + synchronized (ArduinoCoreGrpc.class) { + if ((getListProgrammersAvailableForUploadMethod = ArduinoCoreGrpc.getListProgrammersAvailableForUploadMethod) == null) { + ArduinoCoreGrpc.getListProgrammersAvailableForUploadMethod = getListProgrammersAvailableForUploadMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "cc.arduino.cli.commands.ArduinoCore", "ListProgrammersAvailableForUpload")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadResp.getDefaultInstance())) + .setSchemaDescriptor(new ArduinoCoreMethodDescriptorSupplier("ListProgrammersAvailableForUpload")) + .build(); + } + } + } + return getListProgrammersAvailableForUploadMethod; + } + + private static volatile io.grpc.MethodDescriptor getBurnBootloaderMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "BurnBootloader", + requestType = cc.arduino.cli.commands.Upload.BurnBootloaderReq.class, + responseType = cc.arduino.cli.commands.Upload.BurnBootloaderResp.class, + methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getBurnBootloaderMethod() { + io.grpc.MethodDescriptor getBurnBootloaderMethod; + if ((getBurnBootloaderMethod = ArduinoCoreGrpc.getBurnBootloaderMethod) == null) { + synchronized (ArduinoCoreGrpc.class) { + if ((getBurnBootloaderMethod = ArduinoCoreGrpc.getBurnBootloaderMethod) == null) { + ArduinoCoreGrpc.getBurnBootloaderMethod = getBurnBootloaderMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName(generateFullMethodName( + "cc.arduino.cli.commands.ArduinoCore", "BurnBootloader")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Upload.BurnBootloaderReq.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Upload.BurnBootloaderResp.getDefaultInstance())) + .setSchemaDescriptor(new ArduinoCoreMethodDescriptorSupplier("BurnBootloader")) + .build(); + } + } + } + return getBurnBootloaderMethod; + } + + private static volatile io.grpc.MethodDescriptor getPlatformSearchMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "PlatformSearch", + requestType = cc.arduino.cli.commands.Core.PlatformSearchReq.class, + responseType = cc.arduino.cli.commands.Core.PlatformSearchResp.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getPlatformSearchMethod() { + io.grpc.MethodDescriptor getPlatformSearchMethod; + if ((getPlatformSearchMethod = ArduinoCoreGrpc.getPlatformSearchMethod) == null) { + synchronized (ArduinoCoreGrpc.class) { + if ((getPlatformSearchMethod = ArduinoCoreGrpc.getPlatformSearchMethod) == null) { + ArduinoCoreGrpc.getPlatformSearchMethod = getPlatformSearchMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "cc.arduino.cli.commands.ArduinoCore", "PlatformSearch")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Core.PlatformSearchReq.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Core.PlatformSearchResp.getDefaultInstance())) + .setSchemaDescriptor(new ArduinoCoreMethodDescriptorSupplier("PlatformSearch")) + .build(); + } + } + } + return getPlatformSearchMethod; + } + + private static volatile io.grpc.MethodDescriptor getPlatformListMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "PlatformList", + requestType = cc.arduino.cli.commands.Core.PlatformListReq.class, + responseType = cc.arduino.cli.commands.Core.PlatformListResp.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getPlatformListMethod() { + io.grpc.MethodDescriptor getPlatformListMethod; + if ((getPlatformListMethod = ArduinoCoreGrpc.getPlatformListMethod) == null) { + synchronized (ArduinoCoreGrpc.class) { + if ((getPlatformListMethod = ArduinoCoreGrpc.getPlatformListMethod) == null) { + ArduinoCoreGrpc.getPlatformListMethod = getPlatformListMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "cc.arduino.cli.commands.ArduinoCore", "PlatformList")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Core.PlatformListReq.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Core.PlatformListResp.getDefaultInstance())) + .setSchemaDescriptor(new ArduinoCoreMethodDescriptorSupplier("PlatformList")) + .build(); + } + } + } + return getPlatformListMethod; + } + + private static volatile io.grpc.MethodDescriptor getLibraryDownloadMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "LibraryDownload", + requestType = cc.arduino.cli.commands.Lib.LibraryDownloadReq.class, + responseType = cc.arduino.cli.commands.Lib.LibraryDownloadResp.class, + methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getLibraryDownloadMethod() { + io.grpc.MethodDescriptor getLibraryDownloadMethod; + if ((getLibraryDownloadMethod = ArduinoCoreGrpc.getLibraryDownloadMethod) == null) { + synchronized (ArduinoCoreGrpc.class) { + if ((getLibraryDownloadMethod = ArduinoCoreGrpc.getLibraryDownloadMethod) == null) { + ArduinoCoreGrpc.getLibraryDownloadMethod = getLibraryDownloadMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName(generateFullMethodName( + "cc.arduino.cli.commands.ArduinoCore", "LibraryDownload")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Lib.LibraryDownloadReq.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Lib.LibraryDownloadResp.getDefaultInstance())) + .setSchemaDescriptor(new ArduinoCoreMethodDescriptorSupplier("LibraryDownload")) + .build(); + } + } + } + return getLibraryDownloadMethod; + } + + private static volatile io.grpc.MethodDescriptor getLibraryInstallMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "LibraryInstall", + requestType = cc.arduino.cli.commands.Lib.LibraryInstallReq.class, + responseType = cc.arduino.cli.commands.Lib.LibraryInstallResp.class, + methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getLibraryInstallMethod() { + io.grpc.MethodDescriptor getLibraryInstallMethod; + if ((getLibraryInstallMethod = ArduinoCoreGrpc.getLibraryInstallMethod) == null) { + synchronized (ArduinoCoreGrpc.class) { + if ((getLibraryInstallMethod = ArduinoCoreGrpc.getLibraryInstallMethod) == null) { + ArduinoCoreGrpc.getLibraryInstallMethod = getLibraryInstallMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName(generateFullMethodName( + "cc.arduino.cli.commands.ArduinoCore", "LibraryInstall")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Lib.LibraryInstallReq.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Lib.LibraryInstallResp.getDefaultInstance())) + .setSchemaDescriptor(new ArduinoCoreMethodDescriptorSupplier("LibraryInstall")) + .build(); + } + } + } + return getLibraryInstallMethod; + } + + private static volatile io.grpc.MethodDescriptor getLibraryUninstallMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "LibraryUninstall", + requestType = cc.arduino.cli.commands.Lib.LibraryUninstallReq.class, + responseType = cc.arduino.cli.commands.Lib.LibraryUninstallResp.class, + methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getLibraryUninstallMethod() { + io.grpc.MethodDescriptor getLibraryUninstallMethod; + if ((getLibraryUninstallMethod = ArduinoCoreGrpc.getLibraryUninstallMethod) == null) { + synchronized (ArduinoCoreGrpc.class) { + if ((getLibraryUninstallMethod = ArduinoCoreGrpc.getLibraryUninstallMethod) == null) { + ArduinoCoreGrpc.getLibraryUninstallMethod = getLibraryUninstallMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName(generateFullMethodName( + "cc.arduino.cli.commands.ArduinoCore", "LibraryUninstall")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Lib.LibraryUninstallReq.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Lib.LibraryUninstallResp.getDefaultInstance())) + .setSchemaDescriptor(new ArduinoCoreMethodDescriptorSupplier("LibraryUninstall")) + .build(); + } + } + } + return getLibraryUninstallMethod; + } + + private static volatile io.grpc.MethodDescriptor getLibraryUpgradeAllMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "LibraryUpgradeAll", + requestType = cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq.class, + responseType = cc.arduino.cli.commands.Lib.LibraryUpgradeAllResp.class, + methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + public static io.grpc.MethodDescriptor getLibraryUpgradeAllMethod() { + io.grpc.MethodDescriptor getLibraryUpgradeAllMethod; + if ((getLibraryUpgradeAllMethod = ArduinoCoreGrpc.getLibraryUpgradeAllMethod) == null) { + synchronized (ArduinoCoreGrpc.class) { + if ((getLibraryUpgradeAllMethod = ArduinoCoreGrpc.getLibraryUpgradeAllMethod) == null) { + ArduinoCoreGrpc.getLibraryUpgradeAllMethod = getLibraryUpgradeAllMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING) + .setFullMethodName(generateFullMethodName( + "cc.arduino.cli.commands.ArduinoCore", "LibraryUpgradeAll")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Lib.LibraryUpgradeAllResp.getDefaultInstance())) + .setSchemaDescriptor(new ArduinoCoreMethodDescriptorSupplier("LibraryUpgradeAll")) + .build(); + } + } + } + return getLibraryUpgradeAllMethod; + } + + private static volatile io.grpc.MethodDescriptor getLibraryResolveDependenciesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "LibraryResolveDependencies", + requestType = cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq.class, + responseType = cc.arduino.cli.commands.Lib.LibraryResolveDependenciesResp.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getLibraryResolveDependenciesMethod() { + io.grpc.MethodDescriptor getLibraryResolveDependenciesMethod; + if ((getLibraryResolveDependenciesMethod = ArduinoCoreGrpc.getLibraryResolveDependenciesMethod) == null) { + synchronized (ArduinoCoreGrpc.class) { + if ((getLibraryResolveDependenciesMethod = ArduinoCoreGrpc.getLibraryResolveDependenciesMethod) == null) { + ArduinoCoreGrpc.getLibraryResolveDependenciesMethod = getLibraryResolveDependenciesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "cc.arduino.cli.commands.ArduinoCore", "LibraryResolveDependencies")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Lib.LibraryResolveDependenciesResp.getDefaultInstance())) + .setSchemaDescriptor(new ArduinoCoreMethodDescriptorSupplier("LibraryResolveDependencies")) + .build(); + } + } + } + return getLibraryResolveDependenciesMethod; + } + + private static volatile io.grpc.MethodDescriptor getLibrarySearchMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "LibrarySearch", + requestType = cc.arduino.cli.commands.Lib.LibrarySearchReq.class, + responseType = cc.arduino.cli.commands.Lib.LibrarySearchResp.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getLibrarySearchMethod() { + io.grpc.MethodDescriptor getLibrarySearchMethod; + if ((getLibrarySearchMethod = ArduinoCoreGrpc.getLibrarySearchMethod) == null) { + synchronized (ArduinoCoreGrpc.class) { + if ((getLibrarySearchMethod = ArduinoCoreGrpc.getLibrarySearchMethod) == null) { + ArduinoCoreGrpc.getLibrarySearchMethod = getLibrarySearchMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "cc.arduino.cli.commands.ArduinoCore", "LibrarySearch")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Lib.LibrarySearchReq.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Lib.LibrarySearchResp.getDefaultInstance())) + .setSchemaDescriptor(new ArduinoCoreMethodDescriptorSupplier("LibrarySearch")) + .build(); + } + } + } + return getLibrarySearchMethod; + } + + private static volatile io.grpc.MethodDescriptor getLibraryListMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "LibraryList", + requestType = cc.arduino.cli.commands.Lib.LibraryListReq.class, + responseType = cc.arduino.cli.commands.Lib.LibraryListResp.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getLibraryListMethod() { + io.grpc.MethodDescriptor getLibraryListMethod; + if ((getLibraryListMethod = ArduinoCoreGrpc.getLibraryListMethod) == null) { + synchronized (ArduinoCoreGrpc.class) { + if ((getLibraryListMethod = ArduinoCoreGrpc.getLibraryListMethod) == null) { + ArduinoCoreGrpc.getLibraryListMethod = getLibraryListMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "cc.arduino.cli.commands.ArduinoCore", "LibraryList")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Lib.LibraryListReq.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.commands.Lib.LibraryListResp.getDefaultInstance())) + .setSchemaDescriptor(new ArduinoCoreMethodDescriptorSupplier("LibraryList")) + .build(); + } + } + } + return getLibraryListMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static ArduinoCoreStub newStub(io.grpc.Channel channel) { + return new ArduinoCoreStub(channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static ArduinoCoreBlockingStub newBlockingStub( + io.grpc.Channel channel) { + return new ArduinoCoreBlockingStub(channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static ArduinoCoreFutureStub newFutureStub( + io.grpc.Channel channel) { + return new ArduinoCoreFutureStub(channel); + } + + /** + *
+   * The main Arduino Platform Service
+   * 
+ */ + public static abstract class ArduinoCoreImplBase implements io.grpc.BindableService { + + /** + *
+     * Start a new instance of the Arduino Core Service
+     * 
+ */ + public void init(cc.arduino.cli.commands.Commands.InitReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getInitMethod(), responseObserver); + } + + /** + *
+     * Destroy an instance of the Arduino Core Service
+     * 
+ */ + public void destroy(cc.arduino.cli.commands.Commands.DestroyReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getDestroyMethod(), responseObserver); + } + + /** + *
+     * Rescan instance of the Arduino Core Service
+     * 
+ */ + public void rescan(cc.arduino.cli.commands.Commands.RescanReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getRescanMethod(), responseObserver); + } + + /** + *
+     * Update package index of the Arduino Core Service
+     * 
+ */ + public void updateIndex(cc.arduino.cli.commands.Commands.UpdateIndexReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getUpdateIndexMethod(), responseObserver); + } + + /** + *
+     * Update libraries index
+     * 
+ */ + public void updateLibrariesIndex(cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getUpdateLibrariesIndexMethod(), responseObserver); + } + + /** + *
+     * Get the version of Arduino CLI in use.
+     * 
+ */ + public void version(cc.arduino.cli.commands.Commands.VersionReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getVersionMethod(), responseObserver); + } + + /** + *
+     * Requests details about a board
+     * 
+ */ + public void boardDetails(cc.arduino.cli.commands.Board.BoardDetailsReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getBoardDetailsMethod(), responseObserver); + } + + /** + *
+     * Attach a board to a sketch. When the `fqbn` field of a request is not 
+     * provided, the FQBN of the attached board will be used.
+     * 
+ */ + public void boardAttach(cc.arduino.cli.commands.Board.BoardAttachReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getBoardAttachMethod(), responseObserver); + } + + /** + *
+     * List the boards currently connected to the computer.
+     * 
+ */ + public void boardList(cc.arduino.cli.commands.Board.BoardListReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getBoardListMethod(), responseObserver); + } + + /** + *
+     * List all the boards provided by installed platforms.
+     * 
+ */ + public void boardListAll(cc.arduino.cli.commands.Board.BoardListAllReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getBoardListAllMethod(), responseObserver); + } + + /** + *
+     * Compile an Arduino sketch.
+     * 
+ */ + public void compile(cc.arduino.cli.commands.Compile.CompileReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getCompileMethod(), responseObserver); + } + + /** + *
+     * Download and install a platform and its tool dependencies.
+     * 
+ */ + public void platformInstall(cc.arduino.cli.commands.Core.PlatformInstallReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getPlatformInstallMethod(), responseObserver); + } + + /** + *
+     * Download a platform and its tool dependencies to the `staging/packages`
+     * subdirectory of the data directory.
+     * 
+ */ + public void platformDownload(cc.arduino.cli.commands.Core.PlatformDownloadReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getPlatformDownloadMethod(), responseObserver); + } + + /** + *
+     * Uninstall a platform as well as its tool dependencies that are not used by
+     * other installed platforms.
+     * 
+ */ + public void platformUninstall(cc.arduino.cli.commands.Core.PlatformUninstallReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getPlatformUninstallMethod(), responseObserver); + } + + /** + *
+     * Upgrade an installed platform to the latest version.
+     * 
+ */ + public void platformUpgrade(cc.arduino.cli.commands.Core.PlatformUpgradeReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getPlatformUpgradeMethod(), responseObserver); + } + + /** + *
+     * Upload a compiled sketch to an Arduino board.
+     * 
+ */ + public void upload(cc.arduino.cli.commands.Upload.UploadReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getUploadMethod(), responseObserver); + } + + /** + */ + public void listProgrammersAvailableForUpload(cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getListProgrammersAvailableForUploadMethod(), responseObserver); + } + + /** + *
+     * Burn bootloader to a board.
+     * 
+ */ + public void burnBootloader(cc.arduino.cli.commands.Upload.BurnBootloaderReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getBurnBootloaderMethod(), responseObserver); + } + + /** + *
+     * Search for a platform in the platforms indexes.
+     * 
+ */ + public void platformSearch(cc.arduino.cli.commands.Core.PlatformSearchReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getPlatformSearchMethod(), responseObserver); + } + + /** + *
+     * List all installed platforms.
+     * 
+ */ + public void platformList(cc.arduino.cli.commands.Core.PlatformListReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getPlatformListMethod(), responseObserver); + } + + /** + *
+     * Download the archive file of an Arduino library in the libraries index to
+     * the staging directory.
+     * 
+ */ + public void libraryDownload(cc.arduino.cli.commands.Lib.LibraryDownloadReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getLibraryDownloadMethod(), responseObserver); + } + + /** + *
+     * Download and install an Arduino library from the libraries index.
+     * 
+ */ + public void libraryInstall(cc.arduino.cli.commands.Lib.LibraryInstallReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getLibraryInstallMethod(), responseObserver); + } + + /** + *
+     * Uninstall an Arduino library.
+     * 
+ */ + public void libraryUninstall(cc.arduino.cli.commands.Lib.LibraryUninstallReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getLibraryUninstallMethod(), responseObserver); + } + + /** + *
+     * Upgrade all installed Arduino libraries to the newest version available.
+     * 
+ */ + public void libraryUpgradeAll(cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getLibraryUpgradeAllMethod(), responseObserver); + } + + /** + *
+     * List the recursive dependencies of a library, as defined by the `depends`
+     * field of the library.properties files.
+     * 
+ */ + public void libraryResolveDependencies(cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getLibraryResolveDependenciesMethod(), responseObserver); + } + + /** + *
+     * Search the Arduino libraries index for libraries.
+     * 
+ */ + public void librarySearch(cc.arduino.cli.commands.Lib.LibrarySearchReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getLibrarySearchMethod(), responseObserver); + } + + /** + *
+     * List the installed libraries.
+     * 
+ */ + public void libraryList(cc.arduino.cli.commands.Lib.LibraryListReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getLibraryListMethod(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getInitMethod(), + asyncServerStreamingCall( + new MethodHandlers< + cc.arduino.cli.commands.Commands.InitReq, + cc.arduino.cli.commands.Commands.InitResp>( + this, METHODID_INIT))) + .addMethod( + getDestroyMethod(), + asyncUnaryCall( + new MethodHandlers< + cc.arduino.cli.commands.Commands.DestroyReq, + cc.arduino.cli.commands.Commands.DestroyResp>( + this, METHODID_DESTROY))) + .addMethod( + getRescanMethod(), + asyncUnaryCall( + new MethodHandlers< + cc.arduino.cli.commands.Commands.RescanReq, + cc.arduino.cli.commands.Commands.RescanResp>( + this, METHODID_RESCAN))) + .addMethod( + getUpdateIndexMethod(), + asyncServerStreamingCall( + new MethodHandlers< + cc.arduino.cli.commands.Commands.UpdateIndexReq, + cc.arduino.cli.commands.Commands.UpdateIndexResp>( + this, METHODID_UPDATE_INDEX))) + .addMethod( + getUpdateLibrariesIndexMethod(), + asyncServerStreamingCall( + new MethodHandlers< + cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq, + cc.arduino.cli.commands.Commands.UpdateLibrariesIndexResp>( + this, METHODID_UPDATE_LIBRARIES_INDEX))) + .addMethod( + getVersionMethod(), + asyncUnaryCall( + new MethodHandlers< + cc.arduino.cli.commands.Commands.VersionReq, + cc.arduino.cli.commands.Commands.VersionResp>( + this, METHODID_VERSION))) + .addMethod( + getBoardDetailsMethod(), + asyncUnaryCall( + new MethodHandlers< + cc.arduino.cli.commands.Board.BoardDetailsReq, + cc.arduino.cli.commands.Board.BoardDetailsResp>( + this, METHODID_BOARD_DETAILS))) + .addMethod( + getBoardAttachMethod(), + asyncServerStreamingCall( + new MethodHandlers< + cc.arduino.cli.commands.Board.BoardAttachReq, + cc.arduino.cli.commands.Board.BoardAttachResp>( + this, METHODID_BOARD_ATTACH))) + .addMethod( + getBoardListMethod(), + asyncUnaryCall( + new MethodHandlers< + cc.arduino.cli.commands.Board.BoardListReq, + cc.arduino.cli.commands.Board.BoardListResp>( + this, METHODID_BOARD_LIST))) + .addMethod( + getBoardListAllMethod(), + asyncUnaryCall( + new MethodHandlers< + cc.arduino.cli.commands.Board.BoardListAllReq, + cc.arduino.cli.commands.Board.BoardListAllResp>( + this, METHODID_BOARD_LIST_ALL))) + .addMethod( + getCompileMethod(), + asyncServerStreamingCall( + new MethodHandlers< + cc.arduino.cli.commands.Compile.CompileReq, + cc.arduino.cli.commands.Compile.CompileResp>( + this, METHODID_COMPILE))) + .addMethod( + getPlatformInstallMethod(), + asyncServerStreamingCall( + new MethodHandlers< + cc.arduino.cli.commands.Core.PlatformInstallReq, + cc.arduino.cli.commands.Core.PlatformInstallResp>( + this, METHODID_PLATFORM_INSTALL))) + .addMethod( + getPlatformDownloadMethod(), + asyncServerStreamingCall( + new MethodHandlers< + cc.arduino.cli.commands.Core.PlatformDownloadReq, + cc.arduino.cli.commands.Core.PlatformDownloadResp>( + this, METHODID_PLATFORM_DOWNLOAD))) + .addMethod( + getPlatformUninstallMethod(), + asyncServerStreamingCall( + new MethodHandlers< + cc.arduino.cli.commands.Core.PlatformUninstallReq, + cc.arduino.cli.commands.Core.PlatformUninstallResp>( + this, METHODID_PLATFORM_UNINSTALL))) + .addMethod( + getPlatformUpgradeMethod(), + asyncServerStreamingCall( + new MethodHandlers< + cc.arduino.cli.commands.Core.PlatformUpgradeReq, + cc.arduino.cli.commands.Core.PlatformUpgradeResp>( + this, METHODID_PLATFORM_UPGRADE))) + .addMethod( + getUploadMethod(), + asyncServerStreamingCall( + new MethodHandlers< + cc.arduino.cli.commands.Upload.UploadReq, + cc.arduino.cli.commands.Upload.UploadResp>( + this, METHODID_UPLOAD))) + .addMethod( + getListProgrammersAvailableForUploadMethod(), + asyncUnaryCall( + new MethodHandlers< + cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq, + cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadResp>( + this, METHODID_LIST_PROGRAMMERS_AVAILABLE_FOR_UPLOAD))) + .addMethod( + getBurnBootloaderMethod(), + asyncServerStreamingCall( + new MethodHandlers< + cc.arduino.cli.commands.Upload.BurnBootloaderReq, + cc.arduino.cli.commands.Upload.BurnBootloaderResp>( + this, METHODID_BURN_BOOTLOADER))) + .addMethod( + getPlatformSearchMethod(), + asyncUnaryCall( + new MethodHandlers< + cc.arduino.cli.commands.Core.PlatformSearchReq, + cc.arduino.cli.commands.Core.PlatformSearchResp>( + this, METHODID_PLATFORM_SEARCH))) + .addMethod( + getPlatformListMethod(), + asyncUnaryCall( + new MethodHandlers< + cc.arduino.cli.commands.Core.PlatformListReq, + cc.arduino.cli.commands.Core.PlatformListResp>( + this, METHODID_PLATFORM_LIST))) + .addMethod( + getLibraryDownloadMethod(), + asyncServerStreamingCall( + new MethodHandlers< + cc.arduino.cli.commands.Lib.LibraryDownloadReq, + cc.arduino.cli.commands.Lib.LibraryDownloadResp>( + this, METHODID_LIBRARY_DOWNLOAD))) + .addMethod( + getLibraryInstallMethod(), + asyncServerStreamingCall( + new MethodHandlers< + cc.arduino.cli.commands.Lib.LibraryInstallReq, + cc.arduino.cli.commands.Lib.LibraryInstallResp>( + this, METHODID_LIBRARY_INSTALL))) + .addMethod( + getLibraryUninstallMethod(), + asyncServerStreamingCall( + new MethodHandlers< + cc.arduino.cli.commands.Lib.LibraryUninstallReq, + cc.arduino.cli.commands.Lib.LibraryUninstallResp>( + this, METHODID_LIBRARY_UNINSTALL))) + .addMethod( + getLibraryUpgradeAllMethod(), + asyncServerStreamingCall( + new MethodHandlers< + cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq, + cc.arduino.cli.commands.Lib.LibraryUpgradeAllResp>( + this, METHODID_LIBRARY_UPGRADE_ALL))) + .addMethod( + getLibraryResolveDependenciesMethod(), + asyncUnaryCall( + new MethodHandlers< + cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq, + cc.arduino.cli.commands.Lib.LibraryResolveDependenciesResp>( + this, METHODID_LIBRARY_RESOLVE_DEPENDENCIES))) + .addMethod( + getLibrarySearchMethod(), + asyncUnaryCall( + new MethodHandlers< + cc.arduino.cli.commands.Lib.LibrarySearchReq, + cc.arduino.cli.commands.Lib.LibrarySearchResp>( + this, METHODID_LIBRARY_SEARCH))) + .addMethod( + getLibraryListMethod(), + asyncUnaryCall( + new MethodHandlers< + cc.arduino.cli.commands.Lib.LibraryListReq, + cc.arduino.cli.commands.Lib.LibraryListResp>( + this, METHODID_LIBRARY_LIST))) + .build(); + } + } + + /** + *
+   * The main Arduino Platform Service
+   * 
+ */ + public static final class ArduinoCoreStub extends io.grpc.stub.AbstractStub { + private ArduinoCoreStub(io.grpc.Channel channel) { + super(channel); + } + + private ArduinoCoreStub(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ArduinoCoreStub build(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + return new ArduinoCoreStub(channel, callOptions); + } + + /** + *
+     * Start a new instance of the Arduino Core Service
+     * 
+ */ + public void init(cc.arduino.cli.commands.Commands.InitReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncServerStreamingCall( + getChannel().newCall(getInitMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Destroy an instance of the Arduino Core Service
+     * 
+ */ + public void destroy(cc.arduino.cli.commands.Commands.DestroyReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getDestroyMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Rescan instance of the Arduino Core Service
+     * 
+ */ + public void rescan(cc.arduino.cli.commands.Commands.RescanReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getRescanMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Update package index of the Arduino Core Service
+     * 
+ */ + public void updateIndex(cc.arduino.cli.commands.Commands.UpdateIndexReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncServerStreamingCall( + getChannel().newCall(getUpdateIndexMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Update libraries index
+     * 
+ */ + public void updateLibrariesIndex(cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncServerStreamingCall( + getChannel().newCall(getUpdateLibrariesIndexMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Get the version of Arduino CLI in use.
+     * 
+ */ + public void version(cc.arduino.cli.commands.Commands.VersionReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getVersionMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Requests details about a board
+     * 
+ */ + public void boardDetails(cc.arduino.cli.commands.Board.BoardDetailsReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getBoardDetailsMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Attach a board to a sketch. When the `fqbn` field of a request is not 
+     * provided, the FQBN of the attached board will be used.
+     * 
+ */ + public void boardAttach(cc.arduino.cli.commands.Board.BoardAttachReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncServerStreamingCall( + getChannel().newCall(getBoardAttachMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * List the boards currently connected to the computer.
+     * 
+ */ + public void boardList(cc.arduino.cli.commands.Board.BoardListReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getBoardListMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * List all the boards provided by installed platforms.
+     * 
+ */ + public void boardListAll(cc.arduino.cli.commands.Board.BoardListAllReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getBoardListAllMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Compile an Arduino sketch.
+     * 
+ */ + public void compile(cc.arduino.cli.commands.Compile.CompileReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncServerStreamingCall( + getChannel().newCall(getCompileMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Download and install a platform and its tool dependencies.
+     * 
+ */ + public void platformInstall(cc.arduino.cli.commands.Core.PlatformInstallReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncServerStreamingCall( + getChannel().newCall(getPlatformInstallMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Download a platform and its tool dependencies to the `staging/packages`
+     * subdirectory of the data directory.
+     * 
+ */ + public void platformDownload(cc.arduino.cli.commands.Core.PlatformDownloadReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncServerStreamingCall( + getChannel().newCall(getPlatformDownloadMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Uninstall a platform as well as its tool dependencies that are not used by
+     * other installed platforms.
+     * 
+ */ + public void platformUninstall(cc.arduino.cli.commands.Core.PlatformUninstallReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncServerStreamingCall( + getChannel().newCall(getPlatformUninstallMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Upgrade an installed platform to the latest version.
+     * 
+ */ + public void platformUpgrade(cc.arduino.cli.commands.Core.PlatformUpgradeReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncServerStreamingCall( + getChannel().newCall(getPlatformUpgradeMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Upload a compiled sketch to an Arduino board.
+     * 
+ */ + public void upload(cc.arduino.cli.commands.Upload.UploadReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncServerStreamingCall( + getChannel().newCall(getUploadMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void listProgrammersAvailableForUpload(cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListProgrammersAvailableForUploadMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Burn bootloader to a board.
+     * 
+ */ + public void burnBootloader(cc.arduino.cli.commands.Upload.BurnBootloaderReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncServerStreamingCall( + getChannel().newCall(getBurnBootloaderMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Search for a platform in the platforms indexes.
+     * 
+ */ + public void platformSearch(cc.arduino.cli.commands.Core.PlatformSearchReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getPlatformSearchMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * List all installed platforms.
+     * 
+ */ + public void platformList(cc.arduino.cli.commands.Core.PlatformListReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getPlatformListMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Download the archive file of an Arduino library in the libraries index to
+     * the staging directory.
+     * 
+ */ + public void libraryDownload(cc.arduino.cli.commands.Lib.LibraryDownloadReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncServerStreamingCall( + getChannel().newCall(getLibraryDownloadMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Download and install an Arduino library from the libraries index.
+     * 
+ */ + public void libraryInstall(cc.arduino.cli.commands.Lib.LibraryInstallReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncServerStreamingCall( + getChannel().newCall(getLibraryInstallMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Uninstall an Arduino library.
+     * 
+ */ + public void libraryUninstall(cc.arduino.cli.commands.Lib.LibraryUninstallReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncServerStreamingCall( + getChannel().newCall(getLibraryUninstallMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Upgrade all installed Arduino libraries to the newest version available.
+     * 
+ */ + public void libraryUpgradeAll(cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncServerStreamingCall( + getChannel().newCall(getLibraryUpgradeAllMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * List the recursive dependencies of a library, as defined by the `depends`
+     * field of the library.properties files.
+     * 
+ */ + public void libraryResolveDependencies(cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getLibraryResolveDependenciesMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Search the Arduino libraries index for libraries.
+     * 
+ */ + public void librarySearch(cc.arduino.cli.commands.Lib.LibrarySearchReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getLibrarySearchMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * List the installed libraries.
+     * 
+ */ + public void libraryList(cc.arduino.cli.commands.Lib.LibraryListReq request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getLibraryListMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + *
+   * The main Arduino Platform Service
+   * 
+ */ + public static final class ArduinoCoreBlockingStub extends io.grpc.stub.AbstractStub { + private ArduinoCoreBlockingStub(io.grpc.Channel channel) { + super(channel); + } + + private ArduinoCoreBlockingStub(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ArduinoCoreBlockingStub build(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + return new ArduinoCoreBlockingStub(channel, callOptions); + } + + /** + *
+     * Start a new instance of the Arduino Core Service
+     * 
+ */ + public java.util.Iterator init( + cc.arduino.cli.commands.Commands.InitReq request) { + return blockingServerStreamingCall( + getChannel(), getInitMethod(), getCallOptions(), request); + } + + /** + *
+     * Destroy an instance of the Arduino Core Service
+     * 
+ */ + public cc.arduino.cli.commands.Commands.DestroyResp destroy(cc.arduino.cli.commands.Commands.DestroyReq request) { + return blockingUnaryCall( + getChannel(), getDestroyMethod(), getCallOptions(), request); + } + + /** + *
+     * Rescan instance of the Arduino Core Service
+     * 
+ */ + public cc.arduino.cli.commands.Commands.RescanResp rescan(cc.arduino.cli.commands.Commands.RescanReq request) { + return blockingUnaryCall( + getChannel(), getRescanMethod(), getCallOptions(), request); + } + + /** + *
+     * Update package index of the Arduino Core Service
+     * 
+ */ + public java.util.Iterator updateIndex( + cc.arduino.cli.commands.Commands.UpdateIndexReq request) { + return blockingServerStreamingCall( + getChannel(), getUpdateIndexMethod(), getCallOptions(), request); + } + + /** + *
+     * Update libraries index
+     * 
+ */ + public java.util.Iterator updateLibrariesIndex( + cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq request) { + return blockingServerStreamingCall( + getChannel(), getUpdateLibrariesIndexMethod(), getCallOptions(), request); + } + + /** + *
+     * Get the version of Arduino CLI in use.
+     * 
+ */ + public cc.arduino.cli.commands.Commands.VersionResp version(cc.arduino.cli.commands.Commands.VersionReq request) { + return blockingUnaryCall( + getChannel(), getVersionMethod(), getCallOptions(), request); + } + + /** + *
+     * Requests details about a board
+     * 
+ */ + public cc.arduino.cli.commands.Board.BoardDetailsResp boardDetails(cc.arduino.cli.commands.Board.BoardDetailsReq request) { + return blockingUnaryCall( + getChannel(), getBoardDetailsMethod(), getCallOptions(), request); + } + + /** + *
+     * Attach a board to a sketch. When the `fqbn` field of a request is not 
+     * provided, the FQBN of the attached board will be used.
+     * 
+ */ + public java.util.Iterator boardAttach( + cc.arduino.cli.commands.Board.BoardAttachReq request) { + return blockingServerStreamingCall( + getChannel(), getBoardAttachMethod(), getCallOptions(), request); + } + + /** + *
+     * List the boards currently connected to the computer.
+     * 
+ */ + public cc.arduino.cli.commands.Board.BoardListResp boardList(cc.arduino.cli.commands.Board.BoardListReq request) { + return blockingUnaryCall( + getChannel(), getBoardListMethod(), getCallOptions(), request); + } + + /** + *
+     * List all the boards provided by installed platforms.
+     * 
+ */ + public cc.arduino.cli.commands.Board.BoardListAllResp boardListAll(cc.arduino.cli.commands.Board.BoardListAllReq request) { + return blockingUnaryCall( + getChannel(), getBoardListAllMethod(), getCallOptions(), request); + } + + /** + *
+     * Compile an Arduino sketch.
+     * 
+ */ + public java.util.Iterator compile( + cc.arduino.cli.commands.Compile.CompileReq request) { + return blockingServerStreamingCall( + getChannel(), getCompileMethod(), getCallOptions(), request); + } + + /** + *
+     * Download and install a platform and its tool dependencies.
+     * 
+ */ + public java.util.Iterator platformInstall( + cc.arduino.cli.commands.Core.PlatformInstallReq request) { + return blockingServerStreamingCall( + getChannel(), getPlatformInstallMethod(), getCallOptions(), request); + } + + /** + *
+     * Download a platform and its tool dependencies to the `staging/packages`
+     * subdirectory of the data directory.
+     * 
+ */ + public java.util.Iterator platformDownload( + cc.arduino.cli.commands.Core.PlatformDownloadReq request) { + return blockingServerStreamingCall( + getChannel(), getPlatformDownloadMethod(), getCallOptions(), request); + } + + /** + *
+     * Uninstall a platform as well as its tool dependencies that are not used by
+     * other installed platforms.
+     * 
+ */ + public java.util.Iterator platformUninstall( + cc.arduino.cli.commands.Core.PlatformUninstallReq request) { + return blockingServerStreamingCall( + getChannel(), getPlatformUninstallMethod(), getCallOptions(), request); + } + + /** + *
+     * Upgrade an installed platform to the latest version.
+     * 
+ */ + public java.util.Iterator platformUpgrade( + cc.arduino.cli.commands.Core.PlatformUpgradeReq request) { + return blockingServerStreamingCall( + getChannel(), getPlatformUpgradeMethod(), getCallOptions(), request); + } + + /** + *
+     * Upload a compiled sketch to an Arduino board.
+     * 
+ */ + public java.util.Iterator upload( + cc.arduino.cli.commands.Upload.UploadReq request) { + return blockingServerStreamingCall( + getChannel(), getUploadMethod(), getCallOptions(), request); + } + + /** + */ + public cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadResp listProgrammersAvailableForUpload(cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq request) { + return blockingUnaryCall( + getChannel(), getListProgrammersAvailableForUploadMethod(), getCallOptions(), request); + } + + /** + *
+     * Burn bootloader to a board.
+     * 
+ */ + public java.util.Iterator burnBootloader( + cc.arduino.cli.commands.Upload.BurnBootloaderReq request) { + return blockingServerStreamingCall( + getChannel(), getBurnBootloaderMethod(), getCallOptions(), request); + } + + /** + *
+     * Search for a platform in the platforms indexes.
+     * 
+ */ + public cc.arduino.cli.commands.Core.PlatformSearchResp platformSearch(cc.arduino.cli.commands.Core.PlatformSearchReq request) { + return blockingUnaryCall( + getChannel(), getPlatformSearchMethod(), getCallOptions(), request); + } + + /** + *
+     * List all installed platforms.
+     * 
+ */ + public cc.arduino.cli.commands.Core.PlatformListResp platformList(cc.arduino.cli.commands.Core.PlatformListReq request) { + return blockingUnaryCall( + getChannel(), getPlatformListMethod(), getCallOptions(), request); + } + + /** + *
+     * Download the archive file of an Arduino library in the libraries index to
+     * the staging directory.
+     * 
+ */ + public java.util.Iterator libraryDownload( + cc.arduino.cli.commands.Lib.LibraryDownloadReq request) { + return blockingServerStreamingCall( + getChannel(), getLibraryDownloadMethod(), getCallOptions(), request); + } + + /** + *
+     * Download and install an Arduino library from the libraries index.
+     * 
+ */ + public java.util.Iterator libraryInstall( + cc.arduino.cli.commands.Lib.LibraryInstallReq request) { + return blockingServerStreamingCall( + getChannel(), getLibraryInstallMethod(), getCallOptions(), request); + } + + /** + *
+     * Uninstall an Arduino library.
+     * 
+ */ + public java.util.Iterator libraryUninstall( + cc.arduino.cli.commands.Lib.LibraryUninstallReq request) { + return blockingServerStreamingCall( + getChannel(), getLibraryUninstallMethod(), getCallOptions(), request); + } + + /** + *
+     * Upgrade all installed Arduino libraries to the newest version available.
+     * 
+ */ + public java.util.Iterator libraryUpgradeAll( + cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq request) { + return blockingServerStreamingCall( + getChannel(), getLibraryUpgradeAllMethod(), getCallOptions(), request); + } + + /** + *
+     * List the recursive dependencies of a library, as defined by the `depends`
+     * field of the library.properties files.
+     * 
+ */ + public cc.arduino.cli.commands.Lib.LibraryResolveDependenciesResp libraryResolveDependencies(cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq request) { + return blockingUnaryCall( + getChannel(), getLibraryResolveDependenciesMethod(), getCallOptions(), request); + } + + /** + *
+     * Search the Arduino libraries index for libraries.
+     * 
+ */ + public cc.arduino.cli.commands.Lib.LibrarySearchResp librarySearch(cc.arduino.cli.commands.Lib.LibrarySearchReq request) { + return blockingUnaryCall( + getChannel(), getLibrarySearchMethod(), getCallOptions(), request); + } + + /** + *
+     * List the installed libraries.
+     * 
+ */ + public cc.arduino.cli.commands.Lib.LibraryListResp libraryList(cc.arduino.cli.commands.Lib.LibraryListReq request) { + return blockingUnaryCall( + getChannel(), getLibraryListMethod(), getCallOptions(), request); + } + } + + /** + *
+   * The main Arduino Platform Service
+   * 
+ */ + public static final class ArduinoCoreFutureStub extends io.grpc.stub.AbstractStub { + private ArduinoCoreFutureStub(io.grpc.Channel channel) { + super(channel); + } + + private ArduinoCoreFutureStub(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ArduinoCoreFutureStub build(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + return new ArduinoCoreFutureStub(channel, callOptions); + } + + /** + *
+     * Destroy an instance of the Arduino Core Service
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture destroy( + cc.arduino.cli.commands.Commands.DestroyReq request) { + return futureUnaryCall( + getChannel().newCall(getDestroyMethod(), getCallOptions()), request); + } + + /** + *
+     * Rescan instance of the Arduino Core Service
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture rescan( + cc.arduino.cli.commands.Commands.RescanReq request) { + return futureUnaryCall( + getChannel().newCall(getRescanMethod(), getCallOptions()), request); + } + + /** + *
+     * Get the version of Arduino CLI in use.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture version( + cc.arduino.cli.commands.Commands.VersionReq request) { + return futureUnaryCall( + getChannel().newCall(getVersionMethod(), getCallOptions()), request); + } + + /** + *
+     * Requests details about a board
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture boardDetails( + cc.arduino.cli.commands.Board.BoardDetailsReq request) { + return futureUnaryCall( + getChannel().newCall(getBoardDetailsMethod(), getCallOptions()), request); + } + + /** + *
+     * List the boards currently connected to the computer.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture boardList( + cc.arduino.cli.commands.Board.BoardListReq request) { + return futureUnaryCall( + getChannel().newCall(getBoardListMethod(), getCallOptions()), request); + } + + /** + *
+     * List all the boards provided by installed platforms.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture boardListAll( + cc.arduino.cli.commands.Board.BoardListAllReq request) { + return futureUnaryCall( + getChannel().newCall(getBoardListAllMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture listProgrammersAvailableForUpload( + cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq request) { + return futureUnaryCall( + getChannel().newCall(getListProgrammersAvailableForUploadMethod(), getCallOptions()), request); + } + + /** + *
+     * Search for a platform in the platforms indexes.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture platformSearch( + cc.arduino.cli.commands.Core.PlatformSearchReq request) { + return futureUnaryCall( + getChannel().newCall(getPlatformSearchMethod(), getCallOptions()), request); + } + + /** + *
+     * List all installed platforms.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture platformList( + cc.arduino.cli.commands.Core.PlatformListReq request) { + return futureUnaryCall( + getChannel().newCall(getPlatformListMethod(), getCallOptions()), request); + } + + /** + *
+     * List the recursive dependencies of a library, as defined by the `depends`
+     * field of the library.properties files.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture libraryResolveDependencies( + cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq request) { + return futureUnaryCall( + getChannel().newCall(getLibraryResolveDependenciesMethod(), getCallOptions()), request); + } + + /** + *
+     * Search the Arduino libraries index for libraries.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture librarySearch( + cc.arduino.cli.commands.Lib.LibrarySearchReq request) { + return futureUnaryCall( + getChannel().newCall(getLibrarySearchMethod(), getCallOptions()), request); + } + + /** + *
+     * List the installed libraries.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture libraryList( + cc.arduino.cli.commands.Lib.LibraryListReq request) { + return futureUnaryCall( + getChannel().newCall(getLibraryListMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_INIT = 0; + private static final int METHODID_DESTROY = 1; + private static final int METHODID_RESCAN = 2; + private static final int METHODID_UPDATE_INDEX = 3; + private static final int METHODID_UPDATE_LIBRARIES_INDEX = 4; + private static final int METHODID_VERSION = 5; + private static final int METHODID_BOARD_DETAILS = 6; + private static final int METHODID_BOARD_ATTACH = 7; + private static final int METHODID_BOARD_LIST = 8; + private static final int METHODID_BOARD_LIST_ALL = 9; + private static final int METHODID_COMPILE = 10; + private static final int METHODID_PLATFORM_INSTALL = 11; + private static final int METHODID_PLATFORM_DOWNLOAD = 12; + private static final int METHODID_PLATFORM_UNINSTALL = 13; + private static final int METHODID_PLATFORM_UPGRADE = 14; + private static final int METHODID_UPLOAD = 15; + private static final int METHODID_LIST_PROGRAMMERS_AVAILABLE_FOR_UPLOAD = 16; + private static final int METHODID_BURN_BOOTLOADER = 17; + private static final int METHODID_PLATFORM_SEARCH = 18; + private static final int METHODID_PLATFORM_LIST = 19; + private static final int METHODID_LIBRARY_DOWNLOAD = 20; + private static final int METHODID_LIBRARY_INSTALL = 21; + private static final int METHODID_LIBRARY_UNINSTALL = 22; + private static final int METHODID_LIBRARY_UPGRADE_ALL = 23; + private static final int METHODID_LIBRARY_RESOLVE_DEPENDENCIES = 24; + private static final int METHODID_LIBRARY_SEARCH = 25; + private static final int METHODID_LIBRARY_LIST = 26; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final ArduinoCoreImplBase serviceImpl; + private final int methodId; + + MethodHandlers(ArduinoCoreImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_INIT: + serviceImpl.init((cc.arduino.cli.commands.Commands.InitReq) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DESTROY: + serviceImpl.destroy((cc.arduino.cli.commands.Commands.DestroyReq) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_RESCAN: + serviceImpl.rescan((cc.arduino.cli.commands.Commands.RescanReq) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_INDEX: + serviceImpl.updateIndex((cc.arduino.cli.commands.Commands.UpdateIndexReq) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_LIBRARIES_INDEX: + serviceImpl.updateLibrariesIndex((cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_VERSION: + serviceImpl.version((cc.arduino.cli.commands.Commands.VersionReq) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_BOARD_DETAILS: + serviceImpl.boardDetails((cc.arduino.cli.commands.Board.BoardDetailsReq) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_BOARD_ATTACH: + serviceImpl.boardAttach((cc.arduino.cli.commands.Board.BoardAttachReq) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_BOARD_LIST: + serviceImpl.boardList((cc.arduino.cli.commands.Board.BoardListReq) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_BOARD_LIST_ALL: + serviceImpl.boardListAll((cc.arduino.cli.commands.Board.BoardListAllReq) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_COMPILE: + serviceImpl.compile((cc.arduino.cli.commands.Compile.CompileReq) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_PLATFORM_INSTALL: + serviceImpl.platformInstall((cc.arduino.cli.commands.Core.PlatformInstallReq) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_PLATFORM_DOWNLOAD: + serviceImpl.platformDownload((cc.arduino.cli.commands.Core.PlatformDownloadReq) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_PLATFORM_UNINSTALL: + serviceImpl.platformUninstall((cc.arduino.cli.commands.Core.PlatformUninstallReq) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_PLATFORM_UPGRADE: + serviceImpl.platformUpgrade((cc.arduino.cli.commands.Core.PlatformUpgradeReq) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPLOAD: + serviceImpl.upload((cc.arduino.cli.commands.Upload.UploadReq) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_PROGRAMMERS_AVAILABLE_FOR_UPLOAD: + serviceImpl.listProgrammersAvailableForUpload((cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_BURN_BOOTLOADER: + serviceImpl.burnBootloader((cc.arduino.cli.commands.Upload.BurnBootloaderReq) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_PLATFORM_SEARCH: + serviceImpl.platformSearch((cc.arduino.cli.commands.Core.PlatformSearchReq) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_PLATFORM_LIST: + serviceImpl.platformList((cc.arduino.cli.commands.Core.PlatformListReq) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIBRARY_DOWNLOAD: + serviceImpl.libraryDownload((cc.arduino.cli.commands.Lib.LibraryDownloadReq) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIBRARY_INSTALL: + serviceImpl.libraryInstall((cc.arduino.cli.commands.Lib.LibraryInstallReq) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIBRARY_UNINSTALL: + serviceImpl.libraryUninstall((cc.arduino.cli.commands.Lib.LibraryUninstallReq) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIBRARY_UPGRADE_ALL: + serviceImpl.libraryUpgradeAll((cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIBRARY_RESOLVE_DEPENDENCIES: + serviceImpl.libraryResolveDependencies((cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIBRARY_SEARCH: + serviceImpl.librarySearch((cc.arduino.cli.commands.Lib.LibrarySearchReq) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIBRARY_LIST: + serviceImpl.libraryList((cc.arduino.cli.commands.Lib.LibraryListReq) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private static abstract class ArduinoCoreBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + ArduinoCoreBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return cc.arduino.cli.commands.Commands.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("ArduinoCore"); + } + } + + private static final class ArduinoCoreFileDescriptorSupplier + extends ArduinoCoreBaseDescriptorSupplier { + ArduinoCoreFileDescriptorSupplier() {} + } + + private static final class ArduinoCoreMethodDescriptorSupplier + extends ArduinoCoreBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + ArduinoCoreMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (ArduinoCoreGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new ArduinoCoreFileDescriptorSupplier()) + .addMethod(getInitMethod()) + .addMethod(getDestroyMethod()) + .addMethod(getRescanMethod()) + .addMethod(getUpdateIndexMethod()) + .addMethod(getUpdateLibrariesIndexMethod()) + .addMethod(getVersionMethod()) + .addMethod(getBoardDetailsMethod()) + .addMethod(getBoardAttachMethod()) + .addMethod(getBoardListMethod()) + .addMethod(getBoardListAllMethod()) + .addMethod(getCompileMethod()) + .addMethod(getPlatformInstallMethod()) + .addMethod(getPlatformDownloadMethod()) + .addMethod(getPlatformUninstallMethod()) + .addMethod(getPlatformUpgradeMethod()) + .addMethod(getUploadMethod()) + .addMethod(getListProgrammersAvailableForUploadMethod()) + .addMethod(getBurnBootloaderMethod()) + .addMethod(getPlatformSearchMethod()) + .addMethod(getPlatformListMethod()) + .addMethod(getLibraryDownloadMethod()) + .addMethod(getLibraryInstallMethod()) + .addMethod(getLibraryUninstallMethod()) + .addMethod(getLibraryUpgradeAllMethod()) + .addMethod(getLibraryResolveDependenciesMethod()) + .addMethod(getLibrarySearchMethod()) + .addMethod(getLibraryListMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/arduino-core/src/cc/arduino/cli/commands/Board.java b/arduino-core/src/cc/arduino/cli/commands/Board.java new file mode 100644 index 00000000000..01e3ab05c44 --- /dev/null +++ b/arduino-core/src/cc/arduino/cli/commands/Board.java @@ -0,0 +1,22481 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: commands/board.proto + +package cc.arduino.cli.commands; + +public final class Board { + private Board() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface BoardDetailsReqOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.BoardDetailsReq) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + boolean hasInstance(); + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + cc.arduino.cli.commands.Common.Instance getInstance(); + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder(); + + /** + *
+     * The fully qualified board name of the board you want information about
+     * (e.g., `arduino:avr:uno`).
+     * 
+ * + * string fqbn = 2; + * @return The fqbn. + */ + java.lang.String getFqbn(); + /** + *
+     * The fully qualified board name of the board you want information about
+     * (e.g., `arduino:avr:uno`).
+     * 
+ * + * string fqbn = 2; + * @return The bytes for fqbn. + */ + com.google.protobuf.ByteString + getFqbnBytes(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.BoardDetailsReq} + */ + public static final class BoardDetailsReq extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.BoardDetailsReq) + BoardDetailsReqOrBuilder { + private static final long serialVersionUID = 0L; + // Use BoardDetailsReq.newBuilder() to construct. + private BoardDetailsReq(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BoardDetailsReq() { + fqbn_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BoardDetailsReq(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BoardDetailsReq( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cc.arduino.cli.commands.Common.Instance.Builder subBuilder = null; + if (instance_ != null) { + subBuilder = instance_.toBuilder(); + } + instance_ = input.readMessage(cc.arduino.cli.commands.Common.Instance.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instance_); + instance_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + fqbn_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardDetailsReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardDetailsReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Board.BoardDetailsReq.class, cc.arduino.cli.commands.Board.BoardDetailsReq.Builder.class); + } + + public static final int INSTANCE_FIELD_NUMBER = 1; + private cc.arduino.cli.commands.Common.Instance instance_; + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instance_ != null; + } + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + return getInstance(); + } + + public static final int FQBN_FIELD_NUMBER = 2; + private volatile java.lang.Object fqbn_; + /** + *
+     * The fully qualified board name of the board you want information about
+     * (e.g., `arduino:avr:uno`).
+     * 
+ * + * string fqbn = 2; + * @return The fqbn. + */ + public java.lang.String getFqbn() { + java.lang.Object ref = fqbn_; + 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(); + fqbn_ = s; + return s; + } + } + /** + *
+     * The fully qualified board name of the board you want information about
+     * (e.g., `arduino:avr:uno`).
+     * 
+ * + * string fqbn = 2; + * @return The bytes for fqbn. + */ + public com.google.protobuf.ByteString + getFqbnBytes() { + java.lang.Object ref = fqbn_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fqbn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (instance_ != null) { + output.writeMessage(1, getInstance()); + } + if (!getFqbnBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, fqbn_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (instance_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInstance()); + } + if (!getFqbnBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, fqbn_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Board.BoardDetailsReq)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Board.BoardDetailsReq other = (cc.arduino.cli.commands.Board.BoardDetailsReq) obj; + + if (hasInstance() != other.hasInstance()) return false; + if (hasInstance()) { + if (!getInstance() + .equals(other.getInstance())) return false; + } + if (!getFqbn() + .equals(other.getFqbn())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInstance()) { + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + } + hash = (37 * hash) + FQBN_FIELD_NUMBER; + hash = (53 * hash) + getFqbn().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Board.BoardDetailsReq parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.BoardDetailsReq parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardDetailsReq parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.BoardDetailsReq parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardDetailsReq parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.BoardDetailsReq parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardDetailsReq parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.BoardDetailsReq parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardDetailsReq parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.BoardDetailsReq parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardDetailsReq parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.BoardDetailsReq parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Board.BoardDetailsReq 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.BoardDetailsReq} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.BoardDetailsReq) + cc.arduino.cli.commands.Board.BoardDetailsReqOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardDetailsReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardDetailsReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Board.BoardDetailsReq.class, cc.arduino.cli.commands.Board.BoardDetailsReq.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Board.BoardDetailsReq.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (instanceBuilder_ == null) { + instance_ = null; + } else { + instance_ = null; + instanceBuilder_ = null; + } + fqbn_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardDetailsReq_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.BoardDetailsReq getDefaultInstanceForType() { + return cc.arduino.cli.commands.Board.BoardDetailsReq.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.BoardDetailsReq build() { + cc.arduino.cli.commands.Board.BoardDetailsReq result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.BoardDetailsReq buildPartial() { + cc.arduino.cli.commands.Board.BoardDetailsReq result = new cc.arduino.cli.commands.Board.BoardDetailsReq(this); + if (instanceBuilder_ == null) { + result.instance_ = instance_; + } else { + result.instance_ = instanceBuilder_.build(); + } + result.fqbn_ = fqbn_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Board.BoardDetailsReq) { + return mergeFrom((cc.arduino.cli.commands.Board.BoardDetailsReq)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Board.BoardDetailsReq other) { + if (other == cc.arduino.cli.commands.Board.BoardDetailsReq.getDefaultInstance()) return this; + if (other.hasInstance()) { + mergeInstance(other.getInstance()); + } + if (!other.getFqbn().isEmpty()) { + fqbn_ = other.fqbn_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Board.BoardDetailsReq parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Board.BoardDetailsReq) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private cc.arduino.cli.commands.Common.Instance instance_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> instanceBuilder_; + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instanceBuilder_ != null || instance_ != null; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + if (instanceBuilder_ == null) { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } else { + return instanceBuilder_.getMessage(); + } + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + onChanged(); + } else { + instanceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance( + cc.arduino.cli.commands.Common.Instance.Builder builderForValue) { + if (instanceBuilder_ == null) { + instance_ = builderForValue.build(); + onChanged(); + } else { + instanceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder mergeInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (instance_ != null) { + instance_ = + cc.arduino.cli.commands.Common.Instance.newBuilder(instance_).mergeFrom(value).buildPartial(); + } else { + instance_ = value; + } + onChanged(); + } else { + instanceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder clearInstance() { + if (instanceBuilder_ == null) { + instance_ = null; + onChanged(); + } else { + instance_ = null; + instanceBuilder_ = null; + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.Instance.Builder getInstanceBuilder() { + + onChanged(); + return getInstanceFieldBuilder().getBuilder(); + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + if (instanceBuilder_ != null) { + return instanceBuilder_.getMessageOrBuilder(); + } else { + return instance_ == null ? + cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> + getInstanceFieldBuilder() { + if (instanceBuilder_ == null) { + instanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder>( + getInstance(), + getParentForChildren(), + isClean()); + instance_ = null; + } + return instanceBuilder_; + } + + private java.lang.Object fqbn_ = ""; + /** + *
+       * The fully qualified board name of the board you want information about
+       * (e.g., `arduino:avr:uno`).
+       * 
+ * + * string fqbn = 2; + * @return The fqbn. + */ + public java.lang.String getFqbn() { + java.lang.Object ref = fqbn_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fqbn_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The fully qualified board name of the board you want information about
+       * (e.g., `arduino:avr:uno`).
+       * 
+ * + * string fqbn = 2; + * @return The bytes for fqbn. + */ + public com.google.protobuf.ByteString + getFqbnBytes() { + java.lang.Object ref = fqbn_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fqbn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The fully qualified board name of the board you want information about
+       * (e.g., `arduino:avr:uno`).
+       * 
+ * + * string fqbn = 2; + * @param value The fqbn to set. + * @return This builder for chaining. + */ + public Builder setFqbn( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + fqbn_ = value; + onChanged(); + return this; + } + /** + *
+       * The fully qualified board name of the board you want information about
+       * (e.g., `arduino:avr:uno`).
+       * 
+ * + * string fqbn = 2; + * @return This builder for chaining. + */ + public Builder clearFqbn() { + + fqbn_ = getDefaultInstance().getFqbn(); + onChanged(); + return this; + } + /** + *
+       * The fully qualified board name of the board you want information about
+       * (e.g., `arduino:avr:uno`).
+       * 
+ * + * string fqbn = 2; + * @param value The bytes for fqbn to set. + * @return This builder for chaining. + */ + public Builder setFqbnBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + fqbn_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.BoardDetailsReq) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.BoardDetailsReq) + private static final cc.arduino.cli.commands.Board.BoardDetailsReq DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Board.BoardDetailsReq(); + } + + public static cc.arduino.cli.commands.Board.BoardDetailsReq getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BoardDetailsReq parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BoardDetailsReq(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.BoardDetailsReq getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface BoardDetailsRespOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.BoardDetailsResp) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The fully qualified board name of the board.
+     * 
+ * + * string fqbn = 1; + * @return The fqbn. + */ + java.lang.String getFqbn(); + /** + *
+     * The fully qualified board name of the board.
+     * 
+ * + * string fqbn = 1; + * @return The bytes for fqbn. + */ + com.google.protobuf.ByteString + getFqbnBytes(); + + /** + *
+     * Name used to identify the board to humans (e.g., Arduino/Genuino Uno).
+     * 
+ * + * string name = 2; + * @return The name. + */ + java.lang.String getName(); + /** + *
+     * Name used to identify the board to humans (e.g., Arduino/Genuino Uno).
+     * 
+ * + * string name = 2; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+     * Installed version of the board's platform.
+     * 
+ * + * string version = 3; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+     * Installed version of the board's platform.
+     * 
+ * + * string version = 3; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); + + /** + *
+     * The board ID component of the FQBN (e.g., `uno`).
+     * 
+ * + * string propertiesId = 4; + * @return The propertiesId. + */ + java.lang.String getPropertiesId(); + /** + *
+     * The board ID component of the FQBN (e.g., `uno`).
+     * 
+ * + * string propertiesId = 4; + * @return The bytes for propertiesId. + */ + com.google.protobuf.ByteString + getPropertiesIdBytes(); + + /** + *
+     * Board alias that can be used as a more user friendly alternative to the
+     * FQBN.
+     * 
+ * + * string alias = 5; + * @return The alias. + */ + java.lang.String getAlias(); + /** + *
+     * Board alias that can be used as a more user friendly alternative to the
+     * FQBN.
+     * 
+ * + * string alias = 5; + * @return The bytes for alias. + */ + com.google.protobuf.ByteString + getAliasBytes(); + + /** + *
+     * Whether this is an official or 3rd party board.
+     * 
+ * + * bool official = 6; + * @return The official. + */ + boolean getOfficial(); + + /** + *
+     * URL of the board's pinout documentation.
+     * 
+ * + * string pinout = 7; + * @return The pinout. + */ + java.lang.String getPinout(); + /** + *
+     * URL of the board's pinout documentation.
+     * 
+ * + * string pinout = 7; + * @return The bytes for pinout. + */ + com.google.protobuf.ByteString + getPinoutBytes(); + + /** + *
+     * Data about the package that contains the board's platform.
+     * 
+ * + * .cc.arduino.cli.commands.Package package = 8; + * @return Whether the package field is set. + */ + boolean hasPackage(); + /** + *
+     * Data about the package that contains the board's platform.
+     * 
+ * + * .cc.arduino.cli.commands.Package package = 8; + * @return The package. + */ + cc.arduino.cli.commands.Board.Package getPackage(); + /** + *
+     * Data about the package that contains the board's platform.
+     * 
+ * + * .cc.arduino.cli.commands.Package package = 8; + */ + cc.arduino.cli.commands.Board.PackageOrBuilder getPackageOrBuilder(); + + /** + *
+     * Data about the board's platform.
+     * 
+ * + * .cc.arduino.cli.commands.BoardPlatform platform = 9; + * @return Whether the platform field is set. + */ + boolean hasPlatform(); + /** + *
+     * Data about the board's platform.
+     * 
+ * + * .cc.arduino.cli.commands.BoardPlatform platform = 9; + * @return The platform. + */ + cc.arduino.cli.commands.Board.BoardPlatform getPlatform(); + /** + *
+     * Data about the board's platform.
+     * 
+ * + * .cc.arduino.cli.commands.BoardPlatform platform = 9; + */ + cc.arduino.cli.commands.Board.BoardPlatformOrBuilder getPlatformOrBuilder(); + + /** + *
+     * Tool dependencies of the board.
+     * 
+ * + * repeated .cc.arduino.cli.commands.ToolsDependencies toolsDependencies = 10; + */ + java.util.List + getToolsDependenciesList(); + /** + *
+     * Tool dependencies of the board.
+     * 
+ * + * repeated .cc.arduino.cli.commands.ToolsDependencies toolsDependencies = 10; + */ + cc.arduino.cli.commands.Board.ToolsDependencies getToolsDependencies(int index); + /** + *
+     * Tool dependencies of the board.
+     * 
+ * + * repeated .cc.arduino.cli.commands.ToolsDependencies toolsDependencies = 10; + */ + int getToolsDependenciesCount(); + /** + *
+     * Tool dependencies of the board.
+     * 
+ * + * repeated .cc.arduino.cli.commands.ToolsDependencies toolsDependencies = 10; + */ + java.util.List + getToolsDependenciesOrBuilderList(); + /** + *
+     * Tool dependencies of the board.
+     * 
+ * + * repeated .cc.arduino.cli.commands.ToolsDependencies toolsDependencies = 10; + */ + cc.arduino.cli.commands.Board.ToolsDependenciesOrBuilder getToolsDependenciesOrBuilder( + int index); + + /** + *
+     * The board's custom configuration options.
+     * 
+ * + * repeated .cc.arduino.cli.commands.ConfigOption config_options = 11; + */ + java.util.List + getConfigOptionsList(); + /** + *
+     * The board's custom configuration options.
+     * 
+ * + * repeated .cc.arduino.cli.commands.ConfigOption config_options = 11; + */ + cc.arduino.cli.commands.Board.ConfigOption getConfigOptions(int index); + /** + *
+     * The board's custom configuration options.
+     * 
+ * + * repeated .cc.arduino.cli.commands.ConfigOption config_options = 11; + */ + int getConfigOptionsCount(); + /** + *
+     * The board's custom configuration options.
+     * 
+ * + * repeated .cc.arduino.cli.commands.ConfigOption config_options = 11; + */ + java.util.List + getConfigOptionsOrBuilderList(); + /** + *
+     * The board's custom configuration options.
+     * 
+ * + * repeated .cc.arduino.cli.commands.ConfigOption config_options = 11; + */ + cc.arduino.cli.commands.Board.ConfigOptionOrBuilder getConfigOptionsOrBuilder( + int index); + + /** + *
+     * Identifying information for the board (e.g., USB VID/PID).
+     * 
+ * + * repeated .cc.arduino.cli.commands.IdentificationPref identification_pref = 12; + */ + java.util.List + getIdentificationPrefList(); + /** + *
+     * Identifying information for the board (e.g., USB VID/PID).
+     * 
+ * + * repeated .cc.arduino.cli.commands.IdentificationPref identification_pref = 12; + */ + cc.arduino.cli.commands.Board.IdentificationPref getIdentificationPref(int index); + /** + *
+     * Identifying information for the board (e.g., USB VID/PID).
+     * 
+ * + * repeated .cc.arduino.cli.commands.IdentificationPref identification_pref = 12; + */ + int getIdentificationPrefCount(); + /** + *
+     * Identifying information for the board (e.g., USB VID/PID).
+     * 
+ * + * repeated .cc.arduino.cli.commands.IdentificationPref identification_pref = 12; + */ + java.util.List + getIdentificationPrefOrBuilderList(); + /** + *
+     * Identifying information for the board (e.g., USB VID/PID).
+     * 
+ * + * repeated .cc.arduino.cli.commands.IdentificationPref identification_pref = 12; + */ + cc.arduino.cli.commands.Board.IdentificationPrefOrBuilder getIdentificationPrefOrBuilder( + int index); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.BoardDetailsResp} + */ + public static final class BoardDetailsResp extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.BoardDetailsResp) + BoardDetailsRespOrBuilder { + private static final long serialVersionUID = 0L; + // Use BoardDetailsResp.newBuilder() to construct. + private BoardDetailsResp(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BoardDetailsResp() { + fqbn_ = ""; + name_ = ""; + version_ = ""; + propertiesId_ = ""; + alias_ = ""; + pinout_ = ""; + toolsDependencies_ = java.util.Collections.emptyList(); + configOptions_ = java.util.Collections.emptyList(); + identificationPref_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BoardDetailsResp(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BoardDetailsResp( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + fqbn_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + version_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + propertiesId_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + alias_ = s; + break; + } + case 48: { + + official_ = input.readBool(); + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + + pinout_ = s; + break; + } + case 66: { + cc.arduino.cli.commands.Board.Package.Builder subBuilder = null; + if (package_ != null) { + subBuilder = package_.toBuilder(); + } + package_ = input.readMessage(cc.arduino.cli.commands.Board.Package.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(package_); + package_ = subBuilder.buildPartial(); + } + + break; + } + case 74: { + cc.arduino.cli.commands.Board.BoardPlatform.Builder subBuilder = null; + if (platform_ != null) { + subBuilder = platform_.toBuilder(); + } + platform_ = input.readMessage(cc.arduino.cli.commands.Board.BoardPlatform.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(platform_); + platform_ = subBuilder.buildPartial(); + } + + break; + } + case 82: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + toolsDependencies_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + toolsDependencies_.add( + input.readMessage(cc.arduino.cli.commands.Board.ToolsDependencies.parser(), extensionRegistry)); + break; + } + case 90: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + configOptions_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + configOptions_.add( + input.readMessage(cc.arduino.cli.commands.Board.ConfigOption.parser(), extensionRegistry)); + break; + } + case 98: { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + identificationPref_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + identificationPref_.add( + input.readMessage(cc.arduino.cli.commands.Board.IdentificationPref.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + toolsDependencies_ = java.util.Collections.unmodifiableList(toolsDependencies_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + configOptions_ = java.util.Collections.unmodifiableList(configOptions_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + identificationPref_ = java.util.Collections.unmodifiableList(identificationPref_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardDetailsResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardDetailsResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Board.BoardDetailsResp.class, cc.arduino.cli.commands.Board.BoardDetailsResp.Builder.class); + } + + public static final int FQBN_FIELD_NUMBER = 1; + private volatile java.lang.Object fqbn_; + /** + *
+     * The fully qualified board name of the board.
+     * 
+ * + * string fqbn = 1; + * @return The fqbn. + */ + public java.lang.String getFqbn() { + java.lang.Object ref = fqbn_; + 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(); + fqbn_ = s; + return s; + } + } + /** + *
+     * The fully qualified board name of the board.
+     * 
+ * + * string fqbn = 1; + * @return The bytes for fqbn. + */ + public com.google.protobuf.ByteString + getFqbnBytes() { + java.lang.Object ref = fqbn_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fqbn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object name_; + /** + *
+     * Name used to identify the board to humans (e.g., Arduino/Genuino Uno).
+     * 
+ * + * string name = 2; + * @return The name. + */ + 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; + } + } + /** + *
+     * Name used to identify the board to humans (e.g., Arduino/Genuino Uno).
+     * 
+ * + * string name = 2; + * @return The bytes for name. + */ + 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 VERSION_FIELD_NUMBER = 3; + private volatile java.lang.Object version_; + /** + *
+     * Installed version of the board's platform.
+     * 
+ * + * string version = 3; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + 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(); + version_ = s; + return s; + } + } + /** + *
+     * Installed version of the board's platform.
+     * 
+ * + * string version = 3; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROPERTIESID_FIELD_NUMBER = 4; + private volatile java.lang.Object propertiesId_; + /** + *
+     * The board ID component of the FQBN (e.g., `uno`).
+     * 
+ * + * string propertiesId = 4; + * @return The propertiesId. + */ + public java.lang.String getPropertiesId() { + java.lang.Object ref = propertiesId_; + 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(); + propertiesId_ = s; + return s; + } + } + /** + *
+     * The board ID component of the FQBN (e.g., `uno`).
+     * 
+ * + * string propertiesId = 4; + * @return The bytes for propertiesId. + */ + public com.google.protobuf.ByteString + getPropertiesIdBytes() { + java.lang.Object ref = propertiesId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + propertiesId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ALIAS_FIELD_NUMBER = 5; + private volatile java.lang.Object alias_; + /** + *
+     * Board alias that can be used as a more user friendly alternative to the
+     * FQBN.
+     * 
+ * + * string alias = 5; + * @return The alias. + */ + public java.lang.String getAlias() { + java.lang.Object ref = alias_; + 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(); + alias_ = s; + return s; + } + } + /** + *
+     * Board alias that can be used as a more user friendly alternative to the
+     * FQBN.
+     * 
+ * + * string alias = 5; + * @return The bytes for alias. + */ + public com.google.protobuf.ByteString + getAliasBytes() { + java.lang.Object ref = alias_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + alias_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OFFICIAL_FIELD_NUMBER = 6; + private boolean official_; + /** + *
+     * Whether this is an official or 3rd party board.
+     * 
+ * + * bool official = 6; + * @return The official. + */ + public boolean getOfficial() { + return official_; + } + + public static final int PINOUT_FIELD_NUMBER = 7; + private volatile java.lang.Object pinout_; + /** + *
+     * URL of the board's pinout documentation.
+     * 
+ * + * string pinout = 7; + * @return The pinout. + */ + public java.lang.String getPinout() { + java.lang.Object ref = pinout_; + 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(); + pinout_ = s; + return s; + } + } + /** + *
+     * URL of the board's pinout documentation.
+     * 
+ * + * string pinout = 7; + * @return The bytes for pinout. + */ + public com.google.protobuf.ByteString + getPinoutBytes() { + java.lang.Object ref = pinout_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pinout_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PACKAGE_FIELD_NUMBER = 8; + private cc.arduino.cli.commands.Board.Package package_; + /** + *
+     * Data about the package that contains the board's platform.
+     * 
+ * + * .cc.arduino.cli.commands.Package package = 8; + * @return Whether the package field is set. + */ + public boolean hasPackage() { + return package_ != null; + } + /** + *
+     * Data about the package that contains the board's platform.
+     * 
+ * + * .cc.arduino.cli.commands.Package package = 8; + * @return The package. + */ + public cc.arduino.cli.commands.Board.Package getPackage() { + return package_ == null ? cc.arduino.cli.commands.Board.Package.getDefaultInstance() : package_; + } + /** + *
+     * Data about the package that contains the board's platform.
+     * 
+ * + * .cc.arduino.cli.commands.Package package = 8; + */ + public cc.arduino.cli.commands.Board.PackageOrBuilder getPackageOrBuilder() { + return getPackage(); + } + + public static final int PLATFORM_FIELD_NUMBER = 9; + private cc.arduino.cli.commands.Board.BoardPlatform platform_; + /** + *
+     * Data about the board's platform.
+     * 
+ * + * .cc.arduino.cli.commands.BoardPlatform platform = 9; + * @return Whether the platform field is set. + */ + public boolean hasPlatform() { + return platform_ != null; + } + /** + *
+     * Data about the board's platform.
+     * 
+ * + * .cc.arduino.cli.commands.BoardPlatform platform = 9; + * @return The platform. + */ + public cc.arduino.cli.commands.Board.BoardPlatform getPlatform() { + return platform_ == null ? cc.arduino.cli.commands.Board.BoardPlatform.getDefaultInstance() : platform_; + } + /** + *
+     * Data about the board's platform.
+     * 
+ * + * .cc.arduino.cli.commands.BoardPlatform platform = 9; + */ + public cc.arduino.cli.commands.Board.BoardPlatformOrBuilder getPlatformOrBuilder() { + return getPlatform(); + } + + public static final int TOOLSDEPENDENCIES_FIELD_NUMBER = 10; + private java.util.List toolsDependencies_; + /** + *
+     * Tool dependencies of the board.
+     * 
+ * + * repeated .cc.arduino.cli.commands.ToolsDependencies toolsDependencies = 10; + */ + public java.util.List getToolsDependenciesList() { + return toolsDependencies_; + } + /** + *
+     * Tool dependencies of the board.
+     * 
+ * + * repeated .cc.arduino.cli.commands.ToolsDependencies toolsDependencies = 10; + */ + public java.util.List + getToolsDependenciesOrBuilderList() { + return toolsDependencies_; + } + /** + *
+     * Tool dependencies of the board.
+     * 
+ * + * repeated .cc.arduino.cli.commands.ToolsDependencies toolsDependencies = 10; + */ + public int getToolsDependenciesCount() { + return toolsDependencies_.size(); + } + /** + *
+     * Tool dependencies of the board.
+     * 
+ * + * repeated .cc.arduino.cli.commands.ToolsDependencies toolsDependencies = 10; + */ + public cc.arduino.cli.commands.Board.ToolsDependencies getToolsDependencies(int index) { + return toolsDependencies_.get(index); + } + /** + *
+     * Tool dependencies of the board.
+     * 
+ * + * repeated .cc.arduino.cli.commands.ToolsDependencies toolsDependencies = 10; + */ + public cc.arduino.cli.commands.Board.ToolsDependenciesOrBuilder getToolsDependenciesOrBuilder( + int index) { + return toolsDependencies_.get(index); + } + + public static final int CONFIG_OPTIONS_FIELD_NUMBER = 11; + private java.util.List configOptions_; + /** + *
+     * The board's custom configuration options.
+     * 
+ * + * repeated .cc.arduino.cli.commands.ConfigOption config_options = 11; + */ + public java.util.List getConfigOptionsList() { + return configOptions_; + } + /** + *
+     * The board's custom configuration options.
+     * 
+ * + * repeated .cc.arduino.cli.commands.ConfigOption config_options = 11; + */ + public java.util.List + getConfigOptionsOrBuilderList() { + return configOptions_; + } + /** + *
+     * The board's custom configuration options.
+     * 
+ * + * repeated .cc.arduino.cli.commands.ConfigOption config_options = 11; + */ + public int getConfigOptionsCount() { + return configOptions_.size(); + } + /** + *
+     * The board's custom configuration options.
+     * 
+ * + * repeated .cc.arduino.cli.commands.ConfigOption config_options = 11; + */ + public cc.arduino.cli.commands.Board.ConfigOption getConfigOptions(int index) { + return configOptions_.get(index); + } + /** + *
+     * The board's custom configuration options.
+     * 
+ * + * repeated .cc.arduino.cli.commands.ConfigOption config_options = 11; + */ + public cc.arduino.cli.commands.Board.ConfigOptionOrBuilder getConfigOptionsOrBuilder( + int index) { + return configOptions_.get(index); + } + + public static final int IDENTIFICATION_PREF_FIELD_NUMBER = 12; + private java.util.List identificationPref_; + /** + *
+     * Identifying information for the board (e.g., USB VID/PID).
+     * 
+ * + * repeated .cc.arduino.cli.commands.IdentificationPref identification_pref = 12; + */ + public java.util.List getIdentificationPrefList() { + return identificationPref_; + } + /** + *
+     * Identifying information for the board (e.g., USB VID/PID).
+     * 
+ * + * repeated .cc.arduino.cli.commands.IdentificationPref identification_pref = 12; + */ + public java.util.List + getIdentificationPrefOrBuilderList() { + return identificationPref_; + } + /** + *
+     * Identifying information for the board (e.g., USB VID/PID).
+     * 
+ * + * repeated .cc.arduino.cli.commands.IdentificationPref identification_pref = 12; + */ + public int getIdentificationPrefCount() { + return identificationPref_.size(); + } + /** + *
+     * Identifying information for the board (e.g., USB VID/PID).
+     * 
+ * + * repeated .cc.arduino.cli.commands.IdentificationPref identification_pref = 12; + */ + public cc.arduino.cli.commands.Board.IdentificationPref getIdentificationPref(int index) { + return identificationPref_.get(index); + } + /** + *
+     * Identifying information for the board (e.g., USB VID/PID).
+     * 
+ * + * repeated .cc.arduino.cli.commands.IdentificationPref identification_pref = 12; + */ + public cc.arduino.cli.commands.Board.IdentificationPrefOrBuilder getIdentificationPrefOrBuilder( + int index) { + return identificationPref_.get(index); + } + + 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 (!getFqbnBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fqbn_); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + if (!getVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, version_); + } + if (!getPropertiesIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, propertiesId_); + } + if (!getAliasBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, alias_); + } + if (official_ != false) { + output.writeBool(6, official_); + } + if (!getPinoutBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, pinout_); + } + if (package_ != null) { + output.writeMessage(8, getPackage()); + } + if (platform_ != null) { + output.writeMessage(9, getPlatform()); + } + for (int i = 0; i < toolsDependencies_.size(); i++) { + output.writeMessage(10, toolsDependencies_.get(i)); + } + for (int i = 0; i < configOptions_.size(); i++) { + output.writeMessage(11, configOptions_.get(i)); + } + for (int i = 0; i < identificationPref_.size(); i++) { + output.writeMessage(12, identificationPref_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getFqbnBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, fqbn_); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + if (!getVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, version_); + } + if (!getPropertiesIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, propertiesId_); + } + if (!getAliasBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, alias_); + } + if (official_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(6, official_); + } + if (!getPinoutBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, pinout_); + } + if (package_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getPackage()); + } + if (platform_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, getPlatform()); + } + for (int i = 0; i < toolsDependencies_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, toolsDependencies_.get(i)); + } + for (int i = 0; i < configOptions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, configOptions_.get(i)); + } + for (int i = 0; i < identificationPref_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, identificationPref_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Board.BoardDetailsResp)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Board.BoardDetailsResp other = (cc.arduino.cli.commands.Board.BoardDetailsResp) obj; + + if (!getFqbn() + .equals(other.getFqbn())) return false; + if (!getName() + .equals(other.getName())) return false; + if (!getVersion() + .equals(other.getVersion())) return false; + if (!getPropertiesId() + .equals(other.getPropertiesId())) return false; + if (!getAlias() + .equals(other.getAlias())) return false; + if (getOfficial() + != other.getOfficial()) return false; + if (!getPinout() + .equals(other.getPinout())) return false; + if (hasPackage() != other.hasPackage()) return false; + if (hasPackage()) { + if (!getPackage() + .equals(other.getPackage())) return false; + } + if (hasPlatform() != other.hasPlatform()) return false; + if (hasPlatform()) { + if (!getPlatform() + .equals(other.getPlatform())) return false; + } + if (!getToolsDependenciesList() + .equals(other.getToolsDependenciesList())) return false; + if (!getConfigOptionsList() + .equals(other.getConfigOptionsList())) return false; + if (!getIdentificationPrefList() + .equals(other.getIdentificationPrefList())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + FQBN_FIELD_NUMBER; + hash = (53 * hash) + getFqbn().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (37 * hash) + PROPERTIESID_FIELD_NUMBER; + hash = (53 * hash) + getPropertiesId().hashCode(); + hash = (37 * hash) + ALIAS_FIELD_NUMBER; + hash = (53 * hash) + getAlias().hashCode(); + hash = (37 * hash) + OFFICIAL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getOfficial()); + hash = (37 * hash) + PINOUT_FIELD_NUMBER; + hash = (53 * hash) + getPinout().hashCode(); + if (hasPackage()) { + hash = (37 * hash) + PACKAGE_FIELD_NUMBER; + hash = (53 * hash) + getPackage().hashCode(); + } + if (hasPlatform()) { + hash = (37 * hash) + PLATFORM_FIELD_NUMBER; + hash = (53 * hash) + getPlatform().hashCode(); + } + if (getToolsDependenciesCount() > 0) { + hash = (37 * hash) + TOOLSDEPENDENCIES_FIELD_NUMBER; + hash = (53 * hash) + getToolsDependenciesList().hashCode(); + } + if (getConfigOptionsCount() > 0) { + hash = (37 * hash) + CONFIG_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getConfigOptionsList().hashCode(); + } + if (getIdentificationPrefCount() > 0) { + hash = (37 * hash) + IDENTIFICATION_PREF_FIELD_NUMBER; + hash = (53 * hash) + getIdentificationPrefList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Board.BoardDetailsResp parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.BoardDetailsResp parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardDetailsResp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.BoardDetailsResp parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardDetailsResp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.BoardDetailsResp parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardDetailsResp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.BoardDetailsResp parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardDetailsResp parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.BoardDetailsResp parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardDetailsResp parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.BoardDetailsResp parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Board.BoardDetailsResp 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.BoardDetailsResp} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.BoardDetailsResp) + cc.arduino.cli.commands.Board.BoardDetailsRespOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardDetailsResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardDetailsResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Board.BoardDetailsResp.class, cc.arduino.cli.commands.Board.BoardDetailsResp.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Board.BoardDetailsResp.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getToolsDependenciesFieldBuilder(); + getConfigOptionsFieldBuilder(); + getIdentificationPrefFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + fqbn_ = ""; + + name_ = ""; + + version_ = ""; + + propertiesId_ = ""; + + alias_ = ""; + + official_ = false; + + pinout_ = ""; + + if (packageBuilder_ == null) { + package_ = null; + } else { + package_ = null; + packageBuilder_ = null; + } + if (platformBuilder_ == null) { + platform_ = null; + } else { + platform_ = null; + platformBuilder_ = null; + } + if (toolsDependenciesBuilder_ == null) { + toolsDependencies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + toolsDependenciesBuilder_.clear(); + } + if (configOptionsBuilder_ == null) { + configOptions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + configOptionsBuilder_.clear(); + } + if (identificationPrefBuilder_ == null) { + identificationPref_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + identificationPrefBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardDetailsResp_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.BoardDetailsResp getDefaultInstanceForType() { + return cc.arduino.cli.commands.Board.BoardDetailsResp.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.BoardDetailsResp build() { + cc.arduino.cli.commands.Board.BoardDetailsResp result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.BoardDetailsResp buildPartial() { + cc.arduino.cli.commands.Board.BoardDetailsResp result = new cc.arduino.cli.commands.Board.BoardDetailsResp(this); + int from_bitField0_ = bitField0_; + result.fqbn_ = fqbn_; + result.name_ = name_; + result.version_ = version_; + result.propertiesId_ = propertiesId_; + result.alias_ = alias_; + result.official_ = official_; + result.pinout_ = pinout_; + if (packageBuilder_ == null) { + result.package_ = package_; + } else { + result.package_ = packageBuilder_.build(); + } + if (platformBuilder_ == null) { + result.platform_ = platform_; + } else { + result.platform_ = platformBuilder_.build(); + } + if (toolsDependenciesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + toolsDependencies_ = java.util.Collections.unmodifiableList(toolsDependencies_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.toolsDependencies_ = toolsDependencies_; + } else { + result.toolsDependencies_ = toolsDependenciesBuilder_.build(); + } + if (configOptionsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + configOptions_ = java.util.Collections.unmodifiableList(configOptions_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.configOptions_ = configOptions_; + } else { + result.configOptions_ = configOptionsBuilder_.build(); + } + if (identificationPrefBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + identificationPref_ = java.util.Collections.unmodifiableList(identificationPref_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.identificationPref_ = identificationPref_; + } else { + result.identificationPref_ = identificationPrefBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Board.BoardDetailsResp) { + return mergeFrom((cc.arduino.cli.commands.Board.BoardDetailsResp)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Board.BoardDetailsResp other) { + if (other == cc.arduino.cli.commands.Board.BoardDetailsResp.getDefaultInstance()) return this; + if (!other.getFqbn().isEmpty()) { + fqbn_ = other.fqbn_; + onChanged(); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + if (!other.getPropertiesId().isEmpty()) { + propertiesId_ = other.propertiesId_; + onChanged(); + } + if (!other.getAlias().isEmpty()) { + alias_ = other.alias_; + onChanged(); + } + if (other.getOfficial() != false) { + setOfficial(other.getOfficial()); + } + if (!other.getPinout().isEmpty()) { + pinout_ = other.pinout_; + onChanged(); + } + if (other.hasPackage()) { + mergePackage(other.getPackage()); + } + if (other.hasPlatform()) { + mergePlatform(other.getPlatform()); + } + if (toolsDependenciesBuilder_ == null) { + if (!other.toolsDependencies_.isEmpty()) { + if (toolsDependencies_.isEmpty()) { + toolsDependencies_ = other.toolsDependencies_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureToolsDependenciesIsMutable(); + toolsDependencies_.addAll(other.toolsDependencies_); + } + onChanged(); + } + } else { + if (!other.toolsDependencies_.isEmpty()) { + if (toolsDependenciesBuilder_.isEmpty()) { + toolsDependenciesBuilder_.dispose(); + toolsDependenciesBuilder_ = null; + toolsDependencies_ = other.toolsDependencies_; + bitField0_ = (bitField0_ & ~0x00000001); + toolsDependenciesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getToolsDependenciesFieldBuilder() : null; + } else { + toolsDependenciesBuilder_.addAllMessages(other.toolsDependencies_); + } + } + } + if (configOptionsBuilder_ == null) { + if (!other.configOptions_.isEmpty()) { + if (configOptions_.isEmpty()) { + configOptions_ = other.configOptions_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureConfigOptionsIsMutable(); + configOptions_.addAll(other.configOptions_); + } + onChanged(); + } + } else { + if (!other.configOptions_.isEmpty()) { + if (configOptionsBuilder_.isEmpty()) { + configOptionsBuilder_.dispose(); + configOptionsBuilder_ = null; + configOptions_ = other.configOptions_; + bitField0_ = (bitField0_ & ~0x00000002); + configOptionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getConfigOptionsFieldBuilder() : null; + } else { + configOptionsBuilder_.addAllMessages(other.configOptions_); + } + } + } + if (identificationPrefBuilder_ == null) { + if (!other.identificationPref_.isEmpty()) { + if (identificationPref_.isEmpty()) { + identificationPref_ = other.identificationPref_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureIdentificationPrefIsMutable(); + identificationPref_.addAll(other.identificationPref_); + } + onChanged(); + } + } else { + if (!other.identificationPref_.isEmpty()) { + if (identificationPrefBuilder_.isEmpty()) { + identificationPrefBuilder_.dispose(); + identificationPrefBuilder_ = null; + identificationPref_ = other.identificationPref_; + bitField0_ = (bitField0_ & ~0x00000004); + identificationPrefBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getIdentificationPrefFieldBuilder() : null; + } else { + identificationPrefBuilder_.addAllMessages(other.identificationPref_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Board.BoardDetailsResp parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Board.BoardDetailsResp) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object fqbn_ = ""; + /** + *
+       * The fully qualified board name of the board.
+       * 
+ * + * string fqbn = 1; + * @return The fqbn. + */ + public java.lang.String getFqbn() { + java.lang.Object ref = fqbn_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fqbn_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The fully qualified board name of the board.
+       * 
+ * + * string fqbn = 1; + * @return The bytes for fqbn. + */ + public com.google.protobuf.ByteString + getFqbnBytes() { + java.lang.Object ref = fqbn_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fqbn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The fully qualified board name of the board.
+       * 
+ * + * string fqbn = 1; + * @param value The fqbn to set. + * @return This builder for chaining. + */ + public Builder setFqbn( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + fqbn_ = value; + onChanged(); + return this; + } + /** + *
+       * The fully qualified board name of the board.
+       * 
+ * + * string fqbn = 1; + * @return This builder for chaining. + */ + public Builder clearFqbn() { + + fqbn_ = getDefaultInstance().getFqbn(); + onChanged(); + return this; + } + /** + *
+       * The fully qualified board name of the board.
+       * 
+ * + * string fqbn = 1; + * @param value The bytes for fqbn to set. + * @return This builder for chaining. + */ + public Builder setFqbnBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + fqbn_ = value; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+       * Name used to identify the board to humans (e.g., Arduino/Genuino Uno).
+       * 
+ * + * string name = 2; + * @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; + } + } + /** + *
+       * Name used to identify the board to humans (e.g., Arduino/Genuino Uno).
+       * 
+ * + * string name = 2; + * @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; + } + } + /** + *
+       * Name used to identify the board to humans (e.g., Arduino/Genuino Uno).
+       * 
+ * + * string name = 2; + * @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; + onChanged(); + return this; + } + /** + *
+       * Name used to identify the board to humans (e.g., Arduino/Genuino Uno).
+       * 
+ * + * string name = 2; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+       * Name used to identify the board to humans (e.g., Arduino/Genuino Uno).
+       * 
+ * + * string name = 2; + * @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; + onChanged(); + return this; + } + + private java.lang.Object version_ = ""; + /** + *
+       * Installed version of the board's platform.
+       * 
+ * + * string version = 3; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Installed version of the board's platform.
+       * 
+ * + * string version = 3; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Installed version of the board's platform.
+       * 
+ * + * string version = 3; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + *
+       * Installed version of the board's platform.
+       * 
+ * + * string version = 3; + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + *
+       * Installed version of the board's platform.
+       * 
+ * + * string version = 3; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = value; + onChanged(); + return this; + } + + private java.lang.Object propertiesId_ = ""; + /** + *
+       * The board ID component of the FQBN (e.g., `uno`).
+       * 
+ * + * string propertiesId = 4; + * @return The propertiesId. + */ + public java.lang.String getPropertiesId() { + java.lang.Object ref = propertiesId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + propertiesId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The board ID component of the FQBN (e.g., `uno`).
+       * 
+ * + * string propertiesId = 4; + * @return The bytes for propertiesId. + */ + public com.google.protobuf.ByteString + getPropertiesIdBytes() { + java.lang.Object ref = propertiesId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + propertiesId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The board ID component of the FQBN (e.g., `uno`).
+       * 
+ * + * string propertiesId = 4; + * @param value The propertiesId to set. + * @return This builder for chaining. + */ + public Builder setPropertiesId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + propertiesId_ = value; + onChanged(); + return this; + } + /** + *
+       * The board ID component of the FQBN (e.g., `uno`).
+       * 
+ * + * string propertiesId = 4; + * @return This builder for chaining. + */ + public Builder clearPropertiesId() { + + propertiesId_ = getDefaultInstance().getPropertiesId(); + onChanged(); + return this; + } + /** + *
+       * The board ID component of the FQBN (e.g., `uno`).
+       * 
+ * + * string propertiesId = 4; + * @param value The bytes for propertiesId to set. + * @return This builder for chaining. + */ + public Builder setPropertiesIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + propertiesId_ = value; + onChanged(); + return this; + } + + private java.lang.Object alias_ = ""; + /** + *
+       * Board alias that can be used as a more user friendly alternative to the
+       * FQBN.
+       * 
+ * + * string alias = 5; + * @return The alias. + */ + public java.lang.String getAlias() { + java.lang.Object ref = alias_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + alias_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Board alias that can be used as a more user friendly alternative to the
+       * FQBN.
+       * 
+ * + * string alias = 5; + * @return The bytes for alias. + */ + public com.google.protobuf.ByteString + getAliasBytes() { + java.lang.Object ref = alias_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + alias_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Board alias that can be used as a more user friendly alternative to the
+       * FQBN.
+       * 
+ * + * string alias = 5; + * @param value The alias to set. + * @return This builder for chaining. + */ + public Builder setAlias( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + alias_ = value; + onChanged(); + return this; + } + /** + *
+       * Board alias that can be used as a more user friendly alternative to the
+       * FQBN.
+       * 
+ * + * string alias = 5; + * @return This builder for chaining. + */ + public Builder clearAlias() { + + alias_ = getDefaultInstance().getAlias(); + onChanged(); + return this; + } + /** + *
+       * Board alias that can be used as a more user friendly alternative to the
+       * FQBN.
+       * 
+ * + * string alias = 5; + * @param value The bytes for alias to set. + * @return This builder for chaining. + */ + public Builder setAliasBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + alias_ = value; + onChanged(); + return this; + } + + private boolean official_ ; + /** + *
+       * Whether this is an official or 3rd party board.
+       * 
+ * + * bool official = 6; + * @return The official. + */ + public boolean getOfficial() { + return official_; + } + /** + *
+       * Whether this is an official or 3rd party board.
+       * 
+ * + * bool official = 6; + * @param value The official to set. + * @return This builder for chaining. + */ + public Builder setOfficial(boolean value) { + + official_ = value; + onChanged(); + return this; + } + /** + *
+       * Whether this is an official or 3rd party board.
+       * 
+ * + * bool official = 6; + * @return This builder for chaining. + */ + public Builder clearOfficial() { + + official_ = false; + onChanged(); + return this; + } + + private java.lang.Object pinout_ = ""; + /** + *
+       * URL of the board's pinout documentation.
+       * 
+ * + * string pinout = 7; + * @return The pinout. + */ + public java.lang.String getPinout() { + java.lang.Object ref = pinout_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pinout_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * URL of the board's pinout documentation.
+       * 
+ * + * string pinout = 7; + * @return The bytes for pinout. + */ + public com.google.protobuf.ByteString + getPinoutBytes() { + java.lang.Object ref = pinout_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pinout_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * URL of the board's pinout documentation.
+       * 
+ * + * string pinout = 7; + * @param value The pinout to set. + * @return This builder for chaining. + */ + public Builder setPinout( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pinout_ = value; + onChanged(); + return this; + } + /** + *
+       * URL of the board's pinout documentation.
+       * 
+ * + * string pinout = 7; + * @return This builder for chaining. + */ + public Builder clearPinout() { + + pinout_ = getDefaultInstance().getPinout(); + onChanged(); + return this; + } + /** + *
+       * URL of the board's pinout documentation.
+       * 
+ * + * string pinout = 7; + * @param value The bytes for pinout to set. + * @return This builder for chaining. + */ + public Builder setPinoutBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pinout_ = value; + onChanged(); + return this; + } + + private cc.arduino.cli.commands.Board.Package package_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Board.Package, cc.arduino.cli.commands.Board.Package.Builder, cc.arduino.cli.commands.Board.PackageOrBuilder> packageBuilder_; + /** + *
+       * Data about the package that contains the board's platform.
+       * 
+ * + * .cc.arduino.cli.commands.Package package = 8; + * @return Whether the package field is set. + */ + public boolean hasPackage() { + return packageBuilder_ != null || package_ != null; + } + /** + *
+       * Data about the package that contains the board's platform.
+       * 
+ * + * .cc.arduino.cli.commands.Package package = 8; + * @return The package. + */ + public cc.arduino.cli.commands.Board.Package getPackage() { + if (packageBuilder_ == null) { + return package_ == null ? cc.arduino.cli.commands.Board.Package.getDefaultInstance() : package_; + } else { + return packageBuilder_.getMessage(); + } + } + /** + *
+       * Data about the package that contains the board's platform.
+       * 
+ * + * .cc.arduino.cli.commands.Package package = 8; + */ + public Builder setPackage(cc.arduino.cli.commands.Board.Package value) { + if (packageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + package_ = value; + onChanged(); + } else { + packageBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Data about the package that contains the board's platform.
+       * 
+ * + * .cc.arduino.cli.commands.Package package = 8; + */ + public Builder setPackage( + cc.arduino.cli.commands.Board.Package.Builder builderForValue) { + if (packageBuilder_ == null) { + package_ = builderForValue.build(); + onChanged(); + } else { + packageBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Data about the package that contains the board's platform.
+       * 
+ * + * .cc.arduino.cli.commands.Package package = 8; + */ + public Builder mergePackage(cc.arduino.cli.commands.Board.Package value) { + if (packageBuilder_ == null) { + if (package_ != null) { + package_ = + cc.arduino.cli.commands.Board.Package.newBuilder(package_).mergeFrom(value).buildPartial(); + } else { + package_ = value; + } + onChanged(); + } else { + packageBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Data about the package that contains the board's platform.
+       * 
+ * + * .cc.arduino.cli.commands.Package package = 8; + */ + public Builder clearPackage() { + if (packageBuilder_ == null) { + package_ = null; + onChanged(); + } else { + package_ = null; + packageBuilder_ = null; + } + + return this; + } + /** + *
+       * Data about the package that contains the board's platform.
+       * 
+ * + * .cc.arduino.cli.commands.Package package = 8; + */ + public cc.arduino.cli.commands.Board.Package.Builder getPackageBuilder() { + + onChanged(); + return getPackageFieldBuilder().getBuilder(); + } + /** + *
+       * Data about the package that contains the board's platform.
+       * 
+ * + * .cc.arduino.cli.commands.Package package = 8; + */ + public cc.arduino.cli.commands.Board.PackageOrBuilder getPackageOrBuilder() { + if (packageBuilder_ != null) { + return packageBuilder_.getMessageOrBuilder(); + } else { + return package_ == null ? + cc.arduino.cli.commands.Board.Package.getDefaultInstance() : package_; + } + } + /** + *
+       * Data about the package that contains the board's platform.
+       * 
+ * + * .cc.arduino.cli.commands.Package package = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Board.Package, cc.arduino.cli.commands.Board.Package.Builder, cc.arduino.cli.commands.Board.PackageOrBuilder> + getPackageFieldBuilder() { + if (packageBuilder_ == null) { + packageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Board.Package, cc.arduino.cli.commands.Board.Package.Builder, cc.arduino.cli.commands.Board.PackageOrBuilder>( + getPackage(), + getParentForChildren(), + isClean()); + package_ = null; + } + return packageBuilder_; + } + + private cc.arduino.cli.commands.Board.BoardPlatform platform_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Board.BoardPlatform, cc.arduino.cli.commands.Board.BoardPlatform.Builder, cc.arduino.cli.commands.Board.BoardPlatformOrBuilder> platformBuilder_; + /** + *
+       * Data about the board's platform.
+       * 
+ * + * .cc.arduino.cli.commands.BoardPlatform platform = 9; + * @return Whether the platform field is set. + */ + public boolean hasPlatform() { + return platformBuilder_ != null || platform_ != null; + } + /** + *
+       * Data about the board's platform.
+       * 
+ * + * .cc.arduino.cli.commands.BoardPlatform platform = 9; + * @return The platform. + */ + public cc.arduino.cli.commands.Board.BoardPlatform getPlatform() { + if (platformBuilder_ == null) { + return platform_ == null ? cc.arduino.cli.commands.Board.BoardPlatform.getDefaultInstance() : platform_; + } else { + return platformBuilder_.getMessage(); + } + } + /** + *
+       * Data about the board's platform.
+       * 
+ * + * .cc.arduino.cli.commands.BoardPlatform platform = 9; + */ + public Builder setPlatform(cc.arduino.cli.commands.Board.BoardPlatform value) { + if (platformBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + platform_ = value; + onChanged(); + } else { + platformBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Data about the board's platform.
+       * 
+ * + * .cc.arduino.cli.commands.BoardPlatform platform = 9; + */ + public Builder setPlatform( + cc.arduino.cli.commands.Board.BoardPlatform.Builder builderForValue) { + if (platformBuilder_ == null) { + platform_ = builderForValue.build(); + onChanged(); + } else { + platformBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Data about the board's platform.
+       * 
+ * + * .cc.arduino.cli.commands.BoardPlatform platform = 9; + */ + public Builder mergePlatform(cc.arduino.cli.commands.Board.BoardPlatform value) { + if (platformBuilder_ == null) { + if (platform_ != null) { + platform_ = + cc.arduino.cli.commands.Board.BoardPlatform.newBuilder(platform_).mergeFrom(value).buildPartial(); + } else { + platform_ = value; + } + onChanged(); + } else { + platformBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Data about the board's platform.
+       * 
+ * + * .cc.arduino.cli.commands.BoardPlatform platform = 9; + */ + public Builder clearPlatform() { + if (platformBuilder_ == null) { + platform_ = null; + onChanged(); + } else { + platform_ = null; + platformBuilder_ = null; + } + + return this; + } + /** + *
+       * Data about the board's platform.
+       * 
+ * + * .cc.arduino.cli.commands.BoardPlatform platform = 9; + */ + public cc.arduino.cli.commands.Board.BoardPlatform.Builder getPlatformBuilder() { + + onChanged(); + return getPlatformFieldBuilder().getBuilder(); + } + /** + *
+       * Data about the board's platform.
+       * 
+ * + * .cc.arduino.cli.commands.BoardPlatform platform = 9; + */ + public cc.arduino.cli.commands.Board.BoardPlatformOrBuilder getPlatformOrBuilder() { + if (platformBuilder_ != null) { + return platformBuilder_.getMessageOrBuilder(); + } else { + return platform_ == null ? + cc.arduino.cli.commands.Board.BoardPlatform.getDefaultInstance() : platform_; + } + } + /** + *
+       * Data about the board's platform.
+       * 
+ * + * .cc.arduino.cli.commands.BoardPlatform platform = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Board.BoardPlatform, cc.arduino.cli.commands.Board.BoardPlatform.Builder, cc.arduino.cli.commands.Board.BoardPlatformOrBuilder> + getPlatformFieldBuilder() { + if (platformBuilder_ == null) { + platformBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Board.BoardPlatform, cc.arduino.cli.commands.Board.BoardPlatform.Builder, cc.arduino.cli.commands.Board.BoardPlatformOrBuilder>( + getPlatform(), + getParentForChildren(), + isClean()); + platform_ = null; + } + return platformBuilder_; + } + + private java.util.List toolsDependencies_ = + java.util.Collections.emptyList(); + private void ensureToolsDependenciesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + toolsDependencies_ = new java.util.ArrayList(toolsDependencies_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Board.ToolsDependencies, cc.arduino.cli.commands.Board.ToolsDependencies.Builder, cc.arduino.cli.commands.Board.ToolsDependenciesOrBuilder> toolsDependenciesBuilder_; + + /** + *
+       * Tool dependencies of the board.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ToolsDependencies toolsDependencies = 10; + */ + public java.util.List getToolsDependenciesList() { + if (toolsDependenciesBuilder_ == null) { + return java.util.Collections.unmodifiableList(toolsDependencies_); + } else { + return toolsDependenciesBuilder_.getMessageList(); + } + } + /** + *
+       * Tool dependencies of the board.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ToolsDependencies toolsDependencies = 10; + */ + public int getToolsDependenciesCount() { + if (toolsDependenciesBuilder_ == null) { + return toolsDependencies_.size(); + } else { + return toolsDependenciesBuilder_.getCount(); + } + } + /** + *
+       * Tool dependencies of the board.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ToolsDependencies toolsDependencies = 10; + */ + public cc.arduino.cli.commands.Board.ToolsDependencies getToolsDependencies(int index) { + if (toolsDependenciesBuilder_ == null) { + return toolsDependencies_.get(index); + } else { + return toolsDependenciesBuilder_.getMessage(index); + } + } + /** + *
+       * Tool dependencies of the board.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ToolsDependencies toolsDependencies = 10; + */ + public Builder setToolsDependencies( + int index, cc.arduino.cli.commands.Board.ToolsDependencies value) { + if (toolsDependenciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureToolsDependenciesIsMutable(); + toolsDependencies_.set(index, value); + onChanged(); + } else { + toolsDependenciesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Tool dependencies of the board.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ToolsDependencies toolsDependencies = 10; + */ + public Builder setToolsDependencies( + int index, cc.arduino.cli.commands.Board.ToolsDependencies.Builder builderForValue) { + if (toolsDependenciesBuilder_ == null) { + ensureToolsDependenciesIsMutable(); + toolsDependencies_.set(index, builderForValue.build()); + onChanged(); + } else { + toolsDependenciesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Tool dependencies of the board.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ToolsDependencies toolsDependencies = 10; + */ + public Builder addToolsDependencies(cc.arduino.cli.commands.Board.ToolsDependencies value) { + if (toolsDependenciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureToolsDependenciesIsMutable(); + toolsDependencies_.add(value); + onChanged(); + } else { + toolsDependenciesBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Tool dependencies of the board.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ToolsDependencies toolsDependencies = 10; + */ + public Builder addToolsDependencies( + int index, cc.arduino.cli.commands.Board.ToolsDependencies value) { + if (toolsDependenciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureToolsDependenciesIsMutable(); + toolsDependencies_.add(index, value); + onChanged(); + } else { + toolsDependenciesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Tool dependencies of the board.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ToolsDependencies toolsDependencies = 10; + */ + public Builder addToolsDependencies( + cc.arduino.cli.commands.Board.ToolsDependencies.Builder builderForValue) { + if (toolsDependenciesBuilder_ == null) { + ensureToolsDependenciesIsMutable(); + toolsDependencies_.add(builderForValue.build()); + onChanged(); + } else { + toolsDependenciesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Tool dependencies of the board.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ToolsDependencies toolsDependencies = 10; + */ + public Builder addToolsDependencies( + int index, cc.arduino.cli.commands.Board.ToolsDependencies.Builder builderForValue) { + if (toolsDependenciesBuilder_ == null) { + ensureToolsDependenciesIsMutable(); + toolsDependencies_.add(index, builderForValue.build()); + onChanged(); + } else { + toolsDependenciesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Tool dependencies of the board.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ToolsDependencies toolsDependencies = 10; + */ + public Builder addAllToolsDependencies( + java.lang.Iterable values) { + if (toolsDependenciesBuilder_ == null) { + ensureToolsDependenciesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, toolsDependencies_); + onChanged(); + } else { + toolsDependenciesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Tool dependencies of the board.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ToolsDependencies toolsDependencies = 10; + */ + public Builder clearToolsDependencies() { + if (toolsDependenciesBuilder_ == null) { + toolsDependencies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + toolsDependenciesBuilder_.clear(); + } + return this; + } + /** + *
+       * Tool dependencies of the board.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ToolsDependencies toolsDependencies = 10; + */ + public Builder removeToolsDependencies(int index) { + if (toolsDependenciesBuilder_ == null) { + ensureToolsDependenciesIsMutable(); + toolsDependencies_.remove(index); + onChanged(); + } else { + toolsDependenciesBuilder_.remove(index); + } + return this; + } + /** + *
+       * Tool dependencies of the board.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ToolsDependencies toolsDependencies = 10; + */ + public cc.arduino.cli.commands.Board.ToolsDependencies.Builder getToolsDependenciesBuilder( + int index) { + return getToolsDependenciesFieldBuilder().getBuilder(index); + } + /** + *
+       * Tool dependencies of the board.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ToolsDependencies toolsDependencies = 10; + */ + public cc.arduino.cli.commands.Board.ToolsDependenciesOrBuilder getToolsDependenciesOrBuilder( + int index) { + if (toolsDependenciesBuilder_ == null) { + return toolsDependencies_.get(index); } else { + return toolsDependenciesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Tool dependencies of the board.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ToolsDependencies toolsDependencies = 10; + */ + public java.util.List + getToolsDependenciesOrBuilderList() { + if (toolsDependenciesBuilder_ != null) { + return toolsDependenciesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(toolsDependencies_); + } + } + /** + *
+       * Tool dependencies of the board.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ToolsDependencies toolsDependencies = 10; + */ + public cc.arduino.cli.commands.Board.ToolsDependencies.Builder addToolsDependenciesBuilder() { + return getToolsDependenciesFieldBuilder().addBuilder( + cc.arduino.cli.commands.Board.ToolsDependencies.getDefaultInstance()); + } + /** + *
+       * Tool dependencies of the board.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ToolsDependencies toolsDependencies = 10; + */ + public cc.arduino.cli.commands.Board.ToolsDependencies.Builder addToolsDependenciesBuilder( + int index) { + return getToolsDependenciesFieldBuilder().addBuilder( + index, cc.arduino.cli.commands.Board.ToolsDependencies.getDefaultInstance()); + } + /** + *
+       * Tool dependencies of the board.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ToolsDependencies toolsDependencies = 10; + */ + public java.util.List + getToolsDependenciesBuilderList() { + return getToolsDependenciesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Board.ToolsDependencies, cc.arduino.cli.commands.Board.ToolsDependencies.Builder, cc.arduino.cli.commands.Board.ToolsDependenciesOrBuilder> + getToolsDependenciesFieldBuilder() { + if (toolsDependenciesBuilder_ == null) { + toolsDependenciesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Board.ToolsDependencies, cc.arduino.cli.commands.Board.ToolsDependencies.Builder, cc.arduino.cli.commands.Board.ToolsDependenciesOrBuilder>( + toolsDependencies_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + toolsDependencies_ = null; + } + return toolsDependenciesBuilder_; + } + + private java.util.List configOptions_ = + java.util.Collections.emptyList(); + private void ensureConfigOptionsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + configOptions_ = new java.util.ArrayList(configOptions_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Board.ConfigOption, cc.arduino.cli.commands.Board.ConfigOption.Builder, cc.arduino.cli.commands.Board.ConfigOptionOrBuilder> configOptionsBuilder_; + + /** + *
+       * The board's custom configuration options.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ConfigOption config_options = 11; + */ + public java.util.List getConfigOptionsList() { + if (configOptionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(configOptions_); + } else { + return configOptionsBuilder_.getMessageList(); + } + } + /** + *
+       * The board's custom configuration options.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ConfigOption config_options = 11; + */ + public int getConfigOptionsCount() { + if (configOptionsBuilder_ == null) { + return configOptions_.size(); + } else { + return configOptionsBuilder_.getCount(); + } + } + /** + *
+       * The board's custom configuration options.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ConfigOption config_options = 11; + */ + public cc.arduino.cli.commands.Board.ConfigOption getConfigOptions(int index) { + if (configOptionsBuilder_ == null) { + return configOptions_.get(index); + } else { + return configOptionsBuilder_.getMessage(index); + } + } + /** + *
+       * The board's custom configuration options.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ConfigOption config_options = 11; + */ + public Builder setConfigOptions( + int index, cc.arduino.cli.commands.Board.ConfigOption value) { + if (configOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfigOptionsIsMutable(); + configOptions_.set(index, value); + onChanged(); + } else { + configOptionsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * The board's custom configuration options.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ConfigOption config_options = 11; + */ + public Builder setConfigOptions( + int index, cc.arduino.cli.commands.Board.ConfigOption.Builder builderForValue) { + if (configOptionsBuilder_ == null) { + ensureConfigOptionsIsMutable(); + configOptions_.set(index, builderForValue.build()); + onChanged(); + } else { + configOptionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * The board's custom configuration options.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ConfigOption config_options = 11; + */ + public Builder addConfigOptions(cc.arduino.cli.commands.Board.ConfigOption value) { + if (configOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfigOptionsIsMutable(); + configOptions_.add(value); + onChanged(); + } else { + configOptionsBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * The board's custom configuration options.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ConfigOption config_options = 11; + */ + public Builder addConfigOptions( + int index, cc.arduino.cli.commands.Board.ConfigOption value) { + if (configOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfigOptionsIsMutable(); + configOptions_.add(index, value); + onChanged(); + } else { + configOptionsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * The board's custom configuration options.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ConfigOption config_options = 11; + */ + public Builder addConfigOptions( + cc.arduino.cli.commands.Board.ConfigOption.Builder builderForValue) { + if (configOptionsBuilder_ == null) { + ensureConfigOptionsIsMutable(); + configOptions_.add(builderForValue.build()); + onChanged(); + } else { + configOptionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * The board's custom configuration options.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ConfigOption config_options = 11; + */ + public Builder addConfigOptions( + int index, cc.arduino.cli.commands.Board.ConfigOption.Builder builderForValue) { + if (configOptionsBuilder_ == null) { + ensureConfigOptionsIsMutable(); + configOptions_.add(index, builderForValue.build()); + onChanged(); + } else { + configOptionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * The board's custom configuration options.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ConfigOption config_options = 11; + */ + public Builder addAllConfigOptions( + java.lang.Iterable values) { + if (configOptionsBuilder_ == null) { + ensureConfigOptionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, configOptions_); + onChanged(); + } else { + configOptionsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * The board's custom configuration options.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ConfigOption config_options = 11; + */ + public Builder clearConfigOptions() { + if (configOptionsBuilder_ == null) { + configOptions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + configOptionsBuilder_.clear(); + } + return this; + } + /** + *
+       * The board's custom configuration options.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ConfigOption config_options = 11; + */ + public Builder removeConfigOptions(int index) { + if (configOptionsBuilder_ == null) { + ensureConfigOptionsIsMutable(); + configOptions_.remove(index); + onChanged(); + } else { + configOptionsBuilder_.remove(index); + } + return this; + } + /** + *
+       * The board's custom configuration options.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ConfigOption config_options = 11; + */ + public cc.arduino.cli.commands.Board.ConfigOption.Builder getConfigOptionsBuilder( + int index) { + return getConfigOptionsFieldBuilder().getBuilder(index); + } + /** + *
+       * The board's custom configuration options.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ConfigOption config_options = 11; + */ + public cc.arduino.cli.commands.Board.ConfigOptionOrBuilder getConfigOptionsOrBuilder( + int index) { + if (configOptionsBuilder_ == null) { + return configOptions_.get(index); } else { + return configOptionsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * The board's custom configuration options.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ConfigOption config_options = 11; + */ + public java.util.List + getConfigOptionsOrBuilderList() { + if (configOptionsBuilder_ != null) { + return configOptionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(configOptions_); + } + } + /** + *
+       * The board's custom configuration options.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ConfigOption config_options = 11; + */ + public cc.arduino.cli.commands.Board.ConfigOption.Builder addConfigOptionsBuilder() { + return getConfigOptionsFieldBuilder().addBuilder( + cc.arduino.cli.commands.Board.ConfigOption.getDefaultInstance()); + } + /** + *
+       * The board's custom configuration options.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ConfigOption config_options = 11; + */ + public cc.arduino.cli.commands.Board.ConfigOption.Builder addConfigOptionsBuilder( + int index) { + return getConfigOptionsFieldBuilder().addBuilder( + index, cc.arduino.cli.commands.Board.ConfigOption.getDefaultInstance()); + } + /** + *
+       * The board's custom configuration options.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ConfigOption config_options = 11; + */ + public java.util.List + getConfigOptionsBuilderList() { + return getConfigOptionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Board.ConfigOption, cc.arduino.cli.commands.Board.ConfigOption.Builder, cc.arduino.cli.commands.Board.ConfigOptionOrBuilder> + getConfigOptionsFieldBuilder() { + if (configOptionsBuilder_ == null) { + configOptionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Board.ConfigOption, cc.arduino.cli.commands.Board.ConfigOption.Builder, cc.arduino.cli.commands.Board.ConfigOptionOrBuilder>( + configOptions_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + configOptions_ = null; + } + return configOptionsBuilder_; + } + + private java.util.List identificationPref_ = + java.util.Collections.emptyList(); + private void ensureIdentificationPrefIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + identificationPref_ = new java.util.ArrayList(identificationPref_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Board.IdentificationPref, cc.arduino.cli.commands.Board.IdentificationPref.Builder, cc.arduino.cli.commands.Board.IdentificationPrefOrBuilder> identificationPrefBuilder_; + + /** + *
+       * Identifying information for the board (e.g., USB VID/PID).
+       * 
+ * + * repeated .cc.arduino.cli.commands.IdentificationPref identification_pref = 12; + */ + public java.util.List getIdentificationPrefList() { + if (identificationPrefBuilder_ == null) { + return java.util.Collections.unmodifiableList(identificationPref_); + } else { + return identificationPrefBuilder_.getMessageList(); + } + } + /** + *
+       * Identifying information for the board (e.g., USB VID/PID).
+       * 
+ * + * repeated .cc.arduino.cli.commands.IdentificationPref identification_pref = 12; + */ + public int getIdentificationPrefCount() { + if (identificationPrefBuilder_ == null) { + return identificationPref_.size(); + } else { + return identificationPrefBuilder_.getCount(); + } + } + /** + *
+       * Identifying information for the board (e.g., USB VID/PID).
+       * 
+ * + * repeated .cc.arduino.cli.commands.IdentificationPref identification_pref = 12; + */ + public cc.arduino.cli.commands.Board.IdentificationPref getIdentificationPref(int index) { + if (identificationPrefBuilder_ == null) { + return identificationPref_.get(index); + } else { + return identificationPrefBuilder_.getMessage(index); + } + } + /** + *
+       * Identifying information for the board (e.g., USB VID/PID).
+       * 
+ * + * repeated .cc.arduino.cli.commands.IdentificationPref identification_pref = 12; + */ + public Builder setIdentificationPref( + int index, cc.arduino.cli.commands.Board.IdentificationPref value) { + if (identificationPrefBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIdentificationPrefIsMutable(); + identificationPref_.set(index, value); + onChanged(); + } else { + identificationPrefBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Identifying information for the board (e.g., USB VID/PID).
+       * 
+ * + * repeated .cc.arduino.cli.commands.IdentificationPref identification_pref = 12; + */ + public Builder setIdentificationPref( + int index, cc.arduino.cli.commands.Board.IdentificationPref.Builder builderForValue) { + if (identificationPrefBuilder_ == null) { + ensureIdentificationPrefIsMutable(); + identificationPref_.set(index, builderForValue.build()); + onChanged(); + } else { + identificationPrefBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Identifying information for the board (e.g., USB VID/PID).
+       * 
+ * + * repeated .cc.arduino.cli.commands.IdentificationPref identification_pref = 12; + */ + public Builder addIdentificationPref(cc.arduino.cli.commands.Board.IdentificationPref value) { + if (identificationPrefBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIdentificationPrefIsMutable(); + identificationPref_.add(value); + onChanged(); + } else { + identificationPrefBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Identifying information for the board (e.g., USB VID/PID).
+       * 
+ * + * repeated .cc.arduino.cli.commands.IdentificationPref identification_pref = 12; + */ + public Builder addIdentificationPref( + int index, cc.arduino.cli.commands.Board.IdentificationPref value) { + if (identificationPrefBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIdentificationPrefIsMutable(); + identificationPref_.add(index, value); + onChanged(); + } else { + identificationPrefBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Identifying information for the board (e.g., USB VID/PID).
+       * 
+ * + * repeated .cc.arduino.cli.commands.IdentificationPref identification_pref = 12; + */ + public Builder addIdentificationPref( + cc.arduino.cli.commands.Board.IdentificationPref.Builder builderForValue) { + if (identificationPrefBuilder_ == null) { + ensureIdentificationPrefIsMutable(); + identificationPref_.add(builderForValue.build()); + onChanged(); + } else { + identificationPrefBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Identifying information for the board (e.g., USB VID/PID).
+       * 
+ * + * repeated .cc.arduino.cli.commands.IdentificationPref identification_pref = 12; + */ + public Builder addIdentificationPref( + int index, cc.arduino.cli.commands.Board.IdentificationPref.Builder builderForValue) { + if (identificationPrefBuilder_ == null) { + ensureIdentificationPrefIsMutable(); + identificationPref_.add(index, builderForValue.build()); + onChanged(); + } else { + identificationPrefBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Identifying information for the board (e.g., USB VID/PID).
+       * 
+ * + * repeated .cc.arduino.cli.commands.IdentificationPref identification_pref = 12; + */ + public Builder addAllIdentificationPref( + java.lang.Iterable values) { + if (identificationPrefBuilder_ == null) { + ensureIdentificationPrefIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, identificationPref_); + onChanged(); + } else { + identificationPrefBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Identifying information for the board (e.g., USB VID/PID).
+       * 
+ * + * repeated .cc.arduino.cli.commands.IdentificationPref identification_pref = 12; + */ + public Builder clearIdentificationPref() { + if (identificationPrefBuilder_ == null) { + identificationPref_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + identificationPrefBuilder_.clear(); + } + return this; + } + /** + *
+       * Identifying information for the board (e.g., USB VID/PID).
+       * 
+ * + * repeated .cc.arduino.cli.commands.IdentificationPref identification_pref = 12; + */ + public Builder removeIdentificationPref(int index) { + if (identificationPrefBuilder_ == null) { + ensureIdentificationPrefIsMutable(); + identificationPref_.remove(index); + onChanged(); + } else { + identificationPrefBuilder_.remove(index); + } + return this; + } + /** + *
+       * Identifying information for the board (e.g., USB VID/PID).
+       * 
+ * + * repeated .cc.arduino.cli.commands.IdentificationPref identification_pref = 12; + */ + public cc.arduino.cli.commands.Board.IdentificationPref.Builder getIdentificationPrefBuilder( + int index) { + return getIdentificationPrefFieldBuilder().getBuilder(index); + } + /** + *
+       * Identifying information for the board (e.g., USB VID/PID).
+       * 
+ * + * repeated .cc.arduino.cli.commands.IdentificationPref identification_pref = 12; + */ + public cc.arduino.cli.commands.Board.IdentificationPrefOrBuilder getIdentificationPrefOrBuilder( + int index) { + if (identificationPrefBuilder_ == null) { + return identificationPref_.get(index); } else { + return identificationPrefBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Identifying information for the board (e.g., USB VID/PID).
+       * 
+ * + * repeated .cc.arduino.cli.commands.IdentificationPref identification_pref = 12; + */ + public java.util.List + getIdentificationPrefOrBuilderList() { + if (identificationPrefBuilder_ != null) { + return identificationPrefBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(identificationPref_); + } + } + /** + *
+       * Identifying information for the board (e.g., USB VID/PID).
+       * 
+ * + * repeated .cc.arduino.cli.commands.IdentificationPref identification_pref = 12; + */ + public cc.arduino.cli.commands.Board.IdentificationPref.Builder addIdentificationPrefBuilder() { + return getIdentificationPrefFieldBuilder().addBuilder( + cc.arduino.cli.commands.Board.IdentificationPref.getDefaultInstance()); + } + /** + *
+       * Identifying information for the board (e.g., USB VID/PID).
+       * 
+ * + * repeated .cc.arduino.cli.commands.IdentificationPref identification_pref = 12; + */ + public cc.arduino.cli.commands.Board.IdentificationPref.Builder addIdentificationPrefBuilder( + int index) { + return getIdentificationPrefFieldBuilder().addBuilder( + index, cc.arduino.cli.commands.Board.IdentificationPref.getDefaultInstance()); + } + /** + *
+       * Identifying information for the board (e.g., USB VID/PID).
+       * 
+ * + * repeated .cc.arduino.cli.commands.IdentificationPref identification_pref = 12; + */ + public java.util.List + getIdentificationPrefBuilderList() { + return getIdentificationPrefFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Board.IdentificationPref, cc.arduino.cli.commands.Board.IdentificationPref.Builder, cc.arduino.cli.commands.Board.IdentificationPrefOrBuilder> + getIdentificationPrefFieldBuilder() { + if (identificationPrefBuilder_ == null) { + identificationPrefBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Board.IdentificationPref, cc.arduino.cli.commands.Board.IdentificationPref.Builder, cc.arduino.cli.commands.Board.IdentificationPrefOrBuilder>( + identificationPref_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + identificationPref_ = null; + } + return identificationPrefBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.BoardDetailsResp) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.BoardDetailsResp) + private static final cc.arduino.cli.commands.Board.BoardDetailsResp DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Board.BoardDetailsResp(); + } + + public static cc.arduino.cli.commands.Board.BoardDetailsResp getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BoardDetailsResp parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BoardDetailsResp(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.BoardDetailsResp getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface IdentificationPrefOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.IdentificationPref) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Identifying information for USB-connected boards.
+     * 
+ * + * .cc.arduino.cli.commands.USBID usbID = 1; + * @return Whether the usbID field is set. + */ + boolean hasUsbID(); + /** + *
+     * Identifying information for USB-connected boards.
+     * 
+ * + * .cc.arduino.cli.commands.USBID usbID = 1; + * @return The usbID. + */ + cc.arduino.cli.commands.Board.USBID getUsbID(); + /** + *
+     * Identifying information for USB-connected boards.
+     * 
+ * + * .cc.arduino.cli.commands.USBID usbID = 1; + */ + cc.arduino.cli.commands.Board.USBIDOrBuilder getUsbIDOrBuilder(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.IdentificationPref} + */ + public static final class IdentificationPref extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.IdentificationPref) + IdentificationPrefOrBuilder { + private static final long serialVersionUID = 0L; + // Use IdentificationPref.newBuilder() to construct. + private IdentificationPref(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private IdentificationPref() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new IdentificationPref(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private IdentificationPref( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cc.arduino.cli.commands.Board.USBID.Builder subBuilder = null; + if (usbID_ != null) { + subBuilder = usbID_.toBuilder(); + } + usbID_ = input.readMessage(cc.arduino.cli.commands.Board.USBID.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(usbID_); + usbID_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_IdentificationPref_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_IdentificationPref_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Board.IdentificationPref.class, cc.arduino.cli.commands.Board.IdentificationPref.Builder.class); + } + + public static final int USBID_FIELD_NUMBER = 1; + private cc.arduino.cli.commands.Board.USBID usbID_; + /** + *
+     * Identifying information for USB-connected boards.
+     * 
+ * + * .cc.arduino.cli.commands.USBID usbID = 1; + * @return Whether the usbID field is set. + */ + public boolean hasUsbID() { + return usbID_ != null; + } + /** + *
+     * Identifying information for USB-connected boards.
+     * 
+ * + * .cc.arduino.cli.commands.USBID usbID = 1; + * @return The usbID. + */ + public cc.arduino.cli.commands.Board.USBID getUsbID() { + return usbID_ == null ? cc.arduino.cli.commands.Board.USBID.getDefaultInstance() : usbID_; + } + /** + *
+     * Identifying information for USB-connected boards.
+     * 
+ * + * .cc.arduino.cli.commands.USBID usbID = 1; + */ + public cc.arduino.cli.commands.Board.USBIDOrBuilder getUsbIDOrBuilder() { + return getUsbID(); + } + + 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 (usbID_ != null) { + output.writeMessage(1, getUsbID()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (usbID_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getUsbID()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Board.IdentificationPref)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Board.IdentificationPref other = (cc.arduino.cli.commands.Board.IdentificationPref) obj; + + if (hasUsbID() != other.hasUsbID()) return false; + if (hasUsbID()) { + if (!getUsbID() + .equals(other.getUsbID())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasUsbID()) { + hash = (37 * hash) + USBID_FIELD_NUMBER; + hash = (53 * hash) + getUsbID().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Board.IdentificationPref parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.IdentificationPref parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.IdentificationPref parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.IdentificationPref parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.IdentificationPref parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.IdentificationPref parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.IdentificationPref parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.IdentificationPref parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.IdentificationPref parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.IdentificationPref parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.IdentificationPref parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.IdentificationPref parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Board.IdentificationPref 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.IdentificationPref} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.IdentificationPref) + cc.arduino.cli.commands.Board.IdentificationPrefOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_IdentificationPref_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_IdentificationPref_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Board.IdentificationPref.class, cc.arduino.cli.commands.Board.IdentificationPref.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Board.IdentificationPref.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (usbIDBuilder_ == null) { + usbID_ = null; + } else { + usbID_ = null; + usbIDBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_IdentificationPref_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.IdentificationPref getDefaultInstanceForType() { + return cc.arduino.cli.commands.Board.IdentificationPref.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.IdentificationPref build() { + cc.arduino.cli.commands.Board.IdentificationPref result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.IdentificationPref buildPartial() { + cc.arduino.cli.commands.Board.IdentificationPref result = new cc.arduino.cli.commands.Board.IdentificationPref(this); + if (usbIDBuilder_ == null) { + result.usbID_ = usbID_; + } else { + result.usbID_ = usbIDBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Board.IdentificationPref) { + return mergeFrom((cc.arduino.cli.commands.Board.IdentificationPref)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Board.IdentificationPref other) { + if (other == cc.arduino.cli.commands.Board.IdentificationPref.getDefaultInstance()) return this; + if (other.hasUsbID()) { + mergeUsbID(other.getUsbID()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Board.IdentificationPref parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Board.IdentificationPref) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private cc.arduino.cli.commands.Board.USBID usbID_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Board.USBID, cc.arduino.cli.commands.Board.USBID.Builder, cc.arduino.cli.commands.Board.USBIDOrBuilder> usbIDBuilder_; + /** + *
+       * Identifying information for USB-connected boards.
+       * 
+ * + * .cc.arduino.cli.commands.USBID usbID = 1; + * @return Whether the usbID field is set. + */ + public boolean hasUsbID() { + return usbIDBuilder_ != null || usbID_ != null; + } + /** + *
+       * Identifying information for USB-connected boards.
+       * 
+ * + * .cc.arduino.cli.commands.USBID usbID = 1; + * @return The usbID. + */ + public cc.arduino.cli.commands.Board.USBID getUsbID() { + if (usbIDBuilder_ == null) { + return usbID_ == null ? cc.arduino.cli.commands.Board.USBID.getDefaultInstance() : usbID_; + } else { + return usbIDBuilder_.getMessage(); + } + } + /** + *
+       * Identifying information for USB-connected boards.
+       * 
+ * + * .cc.arduino.cli.commands.USBID usbID = 1; + */ + public Builder setUsbID(cc.arduino.cli.commands.Board.USBID value) { + if (usbIDBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + usbID_ = value; + onChanged(); + } else { + usbIDBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Identifying information for USB-connected boards.
+       * 
+ * + * .cc.arduino.cli.commands.USBID usbID = 1; + */ + public Builder setUsbID( + cc.arduino.cli.commands.Board.USBID.Builder builderForValue) { + if (usbIDBuilder_ == null) { + usbID_ = builderForValue.build(); + onChanged(); + } else { + usbIDBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Identifying information for USB-connected boards.
+       * 
+ * + * .cc.arduino.cli.commands.USBID usbID = 1; + */ + public Builder mergeUsbID(cc.arduino.cli.commands.Board.USBID value) { + if (usbIDBuilder_ == null) { + if (usbID_ != null) { + usbID_ = + cc.arduino.cli.commands.Board.USBID.newBuilder(usbID_).mergeFrom(value).buildPartial(); + } else { + usbID_ = value; + } + onChanged(); + } else { + usbIDBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Identifying information for USB-connected boards.
+       * 
+ * + * .cc.arduino.cli.commands.USBID usbID = 1; + */ + public Builder clearUsbID() { + if (usbIDBuilder_ == null) { + usbID_ = null; + onChanged(); + } else { + usbID_ = null; + usbIDBuilder_ = null; + } + + return this; + } + /** + *
+       * Identifying information for USB-connected boards.
+       * 
+ * + * .cc.arduino.cli.commands.USBID usbID = 1; + */ + public cc.arduino.cli.commands.Board.USBID.Builder getUsbIDBuilder() { + + onChanged(); + return getUsbIDFieldBuilder().getBuilder(); + } + /** + *
+       * Identifying information for USB-connected boards.
+       * 
+ * + * .cc.arduino.cli.commands.USBID usbID = 1; + */ + public cc.arduino.cli.commands.Board.USBIDOrBuilder getUsbIDOrBuilder() { + if (usbIDBuilder_ != null) { + return usbIDBuilder_.getMessageOrBuilder(); + } else { + return usbID_ == null ? + cc.arduino.cli.commands.Board.USBID.getDefaultInstance() : usbID_; + } + } + /** + *
+       * Identifying information for USB-connected boards.
+       * 
+ * + * .cc.arduino.cli.commands.USBID usbID = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Board.USBID, cc.arduino.cli.commands.Board.USBID.Builder, cc.arduino.cli.commands.Board.USBIDOrBuilder> + getUsbIDFieldBuilder() { + if (usbIDBuilder_ == null) { + usbIDBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Board.USBID, cc.arduino.cli.commands.Board.USBID.Builder, cc.arduino.cli.commands.Board.USBIDOrBuilder>( + getUsbID(), + getParentForChildren(), + isClean()); + usbID_ = null; + } + return usbIDBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.IdentificationPref) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.IdentificationPref) + private static final cc.arduino.cli.commands.Board.IdentificationPref DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Board.IdentificationPref(); + } + + public static cc.arduino.cli.commands.Board.IdentificationPref getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IdentificationPref parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new IdentificationPref(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.IdentificationPref getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface USBIDOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.USBID) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * USB vendor ID.
+     * 
+ * + * string VID = 1; + * @return The vID. + */ + java.lang.String getVID(); + /** + *
+     * USB vendor ID.
+     * 
+ * + * string VID = 1; + * @return The bytes for vID. + */ + com.google.protobuf.ByteString + getVIDBytes(); + + /** + *
+     * USB product ID.
+     * 
+ * + * string PID = 2; + * @return The pID. + */ + java.lang.String getPID(); + /** + *
+     * USB product ID.
+     * 
+ * + * string PID = 2; + * @return The bytes for pID. + */ + com.google.protobuf.ByteString + getPIDBytes(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.USBID} + */ + public static final class USBID extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.USBID) + USBIDOrBuilder { + private static final long serialVersionUID = 0L; + // Use USBID.newBuilder() to construct. + private USBID(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private USBID() { + vID_ = ""; + pID_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new USBID(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private USBID( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + vID_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + pID_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_USBID_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_USBID_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Board.USBID.class, cc.arduino.cli.commands.Board.USBID.Builder.class); + } + + public static final int VID_FIELD_NUMBER = 1; + private volatile java.lang.Object vID_; + /** + *
+     * USB vendor ID.
+     * 
+ * + * string VID = 1; + * @return The vID. + */ + public java.lang.String getVID() { + java.lang.Object ref = vID_; + 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(); + vID_ = s; + return s; + } + } + /** + *
+     * USB vendor ID.
+     * 
+ * + * string VID = 1; + * @return The bytes for vID. + */ + public com.google.protobuf.ByteString + getVIDBytes() { + java.lang.Object ref = vID_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + vID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PID_FIELD_NUMBER = 2; + private volatile java.lang.Object pID_; + /** + *
+     * USB product ID.
+     * 
+ * + * string PID = 2; + * @return The pID. + */ + public java.lang.String getPID() { + java.lang.Object ref = pID_; + 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(); + pID_ = s; + return s; + } + } + /** + *
+     * USB product ID.
+     * 
+ * + * string PID = 2; + * @return The bytes for pID. + */ + public com.google.protobuf.ByteString + getPIDBytes() { + java.lang.Object ref = pID_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (!getVIDBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, vID_); + } + if (!getPIDBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pID_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getVIDBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, vID_); + } + if (!getPIDBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pID_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Board.USBID)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Board.USBID other = (cc.arduino.cli.commands.Board.USBID) obj; + + if (!getVID() + .equals(other.getVID())) return false; + if (!getPID() + .equals(other.getPID())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + VID_FIELD_NUMBER; + hash = (53 * hash) + getVID().hashCode(); + hash = (37 * hash) + PID_FIELD_NUMBER; + hash = (53 * hash) + getPID().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Board.USBID parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.USBID parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.USBID parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.USBID parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.USBID parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.USBID parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.USBID parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.USBID parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.USBID parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.USBID parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.USBID parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.USBID parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Board.USBID 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.USBID} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.USBID) + cc.arduino.cli.commands.Board.USBIDOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_USBID_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_USBID_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Board.USBID.class, cc.arduino.cli.commands.Board.USBID.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Board.USBID.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + vID_ = ""; + + pID_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_USBID_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.USBID getDefaultInstanceForType() { + return cc.arduino.cli.commands.Board.USBID.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.USBID build() { + cc.arduino.cli.commands.Board.USBID result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.USBID buildPartial() { + cc.arduino.cli.commands.Board.USBID result = new cc.arduino.cli.commands.Board.USBID(this); + result.vID_ = vID_; + result.pID_ = pID_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Board.USBID) { + return mergeFrom((cc.arduino.cli.commands.Board.USBID)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Board.USBID other) { + if (other == cc.arduino.cli.commands.Board.USBID.getDefaultInstance()) return this; + if (!other.getVID().isEmpty()) { + vID_ = other.vID_; + onChanged(); + } + if (!other.getPID().isEmpty()) { + pID_ = other.pID_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Board.USBID parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Board.USBID) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object vID_ = ""; + /** + *
+       * USB vendor ID.
+       * 
+ * + * string VID = 1; + * @return The vID. + */ + public java.lang.String getVID() { + java.lang.Object ref = vID_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vID_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * USB vendor ID.
+       * 
+ * + * string VID = 1; + * @return The bytes for vID. + */ + public com.google.protobuf.ByteString + getVIDBytes() { + java.lang.Object ref = vID_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + vID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * USB vendor ID.
+       * 
+ * + * string VID = 1; + * @param value The vID to set. + * @return This builder for chaining. + */ + public Builder setVID( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + vID_ = value; + onChanged(); + return this; + } + /** + *
+       * USB vendor ID.
+       * 
+ * + * string VID = 1; + * @return This builder for chaining. + */ + public Builder clearVID() { + + vID_ = getDefaultInstance().getVID(); + onChanged(); + return this; + } + /** + *
+       * USB vendor ID.
+       * 
+ * + * string VID = 1; + * @param value The bytes for vID to set. + * @return This builder for chaining. + */ + public Builder setVIDBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + vID_ = value; + onChanged(); + return this; + } + + private java.lang.Object pID_ = ""; + /** + *
+       * USB product ID.
+       * 
+ * + * string PID = 2; + * @return The pID. + */ + public java.lang.String getPID() { + java.lang.Object ref = pID_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pID_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * USB product ID.
+       * 
+ * + * string PID = 2; + * @return The bytes for pID. + */ + public com.google.protobuf.ByteString + getPIDBytes() { + java.lang.Object ref = pID_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + pID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * USB product ID.
+       * 
+ * + * string PID = 2; + * @param value The pID to set. + * @return This builder for chaining. + */ + public Builder setPID( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pID_ = value; + onChanged(); + return this; + } + /** + *
+       * USB product ID.
+       * 
+ * + * string PID = 2; + * @return This builder for chaining. + */ + public Builder clearPID() { + + pID_ = getDefaultInstance().getPID(); + onChanged(); + return this; + } + /** + *
+       * USB product ID.
+       * 
+ * + * string PID = 2; + * @param value The bytes for pID to set. + * @return This builder for chaining. + */ + public Builder setPIDBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pID_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.USBID) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.USBID) + private static final cc.arduino.cli.commands.Board.USBID DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Board.USBID(); + } + + public static cc.arduino.cli.commands.Board.USBID getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public USBID parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new USBID(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.USBID getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PackageOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.Package) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Maintainer of the package.
+     * 
+ * + * string maintainer = 1; + * @return The maintainer. + */ + java.lang.String getMaintainer(); + /** + *
+     * Maintainer of the package.
+     * 
+ * + * string maintainer = 1; + * @return The bytes for maintainer. + */ + com.google.protobuf.ByteString + getMaintainerBytes(); + + /** + *
+     * The URL of the platforms index file
+     * (e.g., https://downloads.arduino.cc/packages/package_index.json).
+     * 
+ * + * string url = 2; + * @return The url. + */ + java.lang.String getUrl(); + /** + *
+     * The URL of the platforms index file
+     * (e.g., https://downloads.arduino.cc/packages/package_index.json).
+     * 
+ * + * string url = 2; + * @return The bytes for url. + */ + com.google.protobuf.ByteString + getUrlBytes(); + + /** + *
+     * A URL provided by the package author, intended to point to their website.
+     * 
+ * + * string websiteURL = 3; + * @return The websiteURL. + */ + java.lang.String getWebsiteURL(); + /** + *
+     * A URL provided by the package author, intended to point to their website.
+     * 
+ * + * string websiteURL = 3; + * @return The bytes for websiteURL. + */ + com.google.protobuf.ByteString + getWebsiteURLBytes(); + + /** + *
+     * Email address of the package maintainer.
+     * 
+ * + * string email = 4; + * @return The email. + */ + java.lang.String getEmail(); + /** + *
+     * Email address of the package maintainer.
+     * 
+ * + * string email = 4; + * @return The bytes for email. + */ + com.google.protobuf.ByteString + getEmailBytes(); + + /** + *
+     * Package vendor name.
+     * 
+ * + * string name = 5; + * @return The name. + */ + java.lang.String getName(); + /** + *
+     * Package vendor name.
+     * 
+ * + * string name = 5; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+     * Resources for getting help about using the package.
+     * 
+ * + * .cc.arduino.cli.commands.Help help = 6; + * @return Whether the help field is set. + */ + boolean hasHelp(); + /** + *
+     * Resources for getting help about using the package.
+     * 
+ * + * .cc.arduino.cli.commands.Help help = 6; + * @return The help. + */ + cc.arduino.cli.commands.Board.Help getHelp(); + /** + *
+     * Resources for getting help about using the package.
+     * 
+ * + * .cc.arduino.cli.commands.Help help = 6; + */ + cc.arduino.cli.commands.Board.HelpOrBuilder getHelpOrBuilder(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.Package} + */ + public static final class Package extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.Package) + PackageOrBuilder { + private static final long serialVersionUID = 0L; + // Use Package.newBuilder() to construct. + private Package(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Package() { + maintainer_ = ""; + url_ = ""; + websiteURL_ = ""; + email_ = ""; + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Package(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Package( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + maintainer_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + url_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + websiteURL_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + email_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 50: { + cc.arduino.cli.commands.Board.Help.Builder subBuilder = null; + if (help_ != null) { + subBuilder = help_.toBuilder(); + } + help_ = input.readMessage(cc.arduino.cli.commands.Board.Help.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(help_); + help_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_Package_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_Package_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Board.Package.class, cc.arduino.cli.commands.Board.Package.Builder.class); + } + + public static final int MAINTAINER_FIELD_NUMBER = 1; + private volatile java.lang.Object maintainer_; + /** + *
+     * Maintainer of the package.
+     * 
+ * + * string maintainer = 1; + * @return The maintainer. + */ + public java.lang.String getMaintainer() { + java.lang.Object ref = maintainer_; + 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(); + maintainer_ = s; + return s; + } + } + /** + *
+     * Maintainer of the package.
+     * 
+ * + * string maintainer = 1; + * @return The bytes for maintainer. + */ + public com.google.protobuf.ByteString + getMaintainerBytes() { + java.lang.Object ref = maintainer_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + maintainer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URL_FIELD_NUMBER = 2; + private volatile java.lang.Object url_; + /** + *
+     * The URL of the platforms index file
+     * (e.g., https://downloads.arduino.cc/packages/package_index.json).
+     * 
+ * + * string url = 2; + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + 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(); + url_ = s; + return s; + } + } + /** + *
+     * The URL of the platforms index file
+     * (e.g., https://downloads.arduino.cc/packages/package_index.json).
+     * 
+ * + * string url = 2; + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int WEBSITEURL_FIELD_NUMBER = 3; + private volatile java.lang.Object websiteURL_; + /** + *
+     * A URL provided by the package author, intended to point to their website.
+     * 
+ * + * string websiteURL = 3; + * @return The websiteURL. + */ + public java.lang.String getWebsiteURL() { + java.lang.Object ref = websiteURL_; + 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(); + websiteURL_ = s; + return s; + } + } + /** + *
+     * A URL provided by the package author, intended to point to their website.
+     * 
+ * + * string websiteURL = 3; + * @return The bytes for websiteURL. + */ + public com.google.protobuf.ByteString + getWebsiteURLBytes() { + java.lang.Object ref = websiteURL_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + websiteURL_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EMAIL_FIELD_NUMBER = 4; + private volatile java.lang.Object email_; + /** + *
+     * Email address of the package maintainer.
+     * 
+ * + * string email = 4; + * @return The email. + */ + public java.lang.String getEmail() { + java.lang.Object ref = email_; + 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(); + email_ = s; + return s; + } + } + /** + *
+     * Email address of the package maintainer.
+     * 
+ * + * string email = 4; + * @return The bytes for email. + */ + public com.google.protobuf.ByteString + getEmailBytes() { + java.lang.Object ref = email_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + email_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 5; + private volatile java.lang.Object name_; + /** + *
+     * Package vendor name.
+     * 
+ * + * string name = 5; + * @return The name. + */ + 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; + } + } + /** + *
+     * Package vendor name.
+     * 
+ * + * string name = 5; + * @return The bytes for name. + */ + 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 HELP_FIELD_NUMBER = 6; + private cc.arduino.cli.commands.Board.Help help_; + /** + *
+     * Resources for getting help about using the package.
+     * 
+ * + * .cc.arduino.cli.commands.Help help = 6; + * @return Whether the help field is set. + */ + public boolean hasHelp() { + return help_ != null; + } + /** + *
+     * Resources for getting help about using the package.
+     * 
+ * + * .cc.arduino.cli.commands.Help help = 6; + * @return The help. + */ + public cc.arduino.cli.commands.Board.Help getHelp() { + return help_ == null ? cc.arduino.cli.commands.Board.Help.getDefaultInstance() : help_; + } + /** + *
+     * Resources for getting help about using the package.
+     * 
+ * + * .cc.arduino.cli.commands.Help help = 6; + */ + public cc.arduino.cli.commands.Board.HelpOrBuilder getHelpOrBuilder() { + return getHelp(); + } + + 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 (!getMaintainerBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, maintainer_); + } + if (!getUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, url_); + } + if (!getWebsiteURLBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, websiteURL_); + } + if (!getEmailBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, email_); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, name_); + } + if (help_ != null) { + output.writeMessage(6, getHelp()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMaintainerBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, maintainer_); + } + if (!getUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, url_); + } + if (!getWebsiteURLBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, websiteURL_); + } + if (!getEmailBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, email_); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, name_); + } + if (help_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getHelp()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Board.Package)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Board.Package other = (cc.arduino.cli.commands.Board.Package) obj; + + if (!getMaintainer() + .equals(other.getMaintainer())) return false; + if (!getUrl() + .equals(other.getUrl())) return false; + if (!getWebsiteURL() + .equals(other.getWebsiteURL())) return false; + if (!getEmail() + .equals(other.getEmail())) return false; + if (!getName() + .equals(other.getName())) return false; + if (hasHelp() != other.hasHelp()) return false; + if (hasHelp()) { + if (!getHelp() + .equals(other.getHelp())) return false; + } + if (!unknownFields.equals(other.unknownFields)) 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) + MAINTAINER_FIELD_NUMBER; + hash = (53 * hash) + getMaintainer().hashCode(); + hash = (37 * hash) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + hash = (37 * hash) + WEBSITEURL_FIELD_NUMBER; + hash = (53 * hash) + getWebsiteURL().hashCode(); + hash = (37 * hash) + EMAIL_FIELD_NUMBER; + hash = (53 * hash) + getEmail().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasHelp()) { + hash = (37 * hash) + HELP_FIELD_NUMBER; + hash = (53 * hash) + getHelp().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Board.Package parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.Package parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.Package parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.Package parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.Package parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.Package parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.Package parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.Package parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.Package parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.Package parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.Package parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.Package parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Board.Package 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.Package} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.Package) + cc.arduino.cli.commands.Board.PackageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_Package_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_Package_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Board.Package.class, cc.arduino.cli.commands.Board.Package.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Board.Package.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + maintainer_ = ""; + + url_ = ""; + + websiteURL_ = ""; + + email_ = ""; + + name_ = ""; + + if (helpBuilder_ == null) { + help_ = null; + } else { + help_ = null; + helpBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_Package_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.Package getDefaultInstanceForType() { + return cc.arduino.cli.commands.Board.Package.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.Package build() { + cc.arduino.cli.commands.Board.Package result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.Package buildPartial() { + cc.arduino.cli.commands.Board.Package result = new cc.arduino.cli.commands.Board.Package(this); + result.maintainer_ = maintainer_; + result.url_ = url_; + result.websiteURL_ = websiteURL_; + result.email_ = email_; + result.name_ = name_; + if (helpBuilder_ == null) { + result.help_ = help_; + } else { + result.help_ = helpBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Board.Package) { + return mergeFrom((cc.arduino.cli.commands.Board.Package)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Board.Package other) { + if (other == cc.arduino.cli.commands.Board.Package.getDefaultInstance()) return this; + if (!other.getMaintainer().isEmpty()) { + maintainer_ = other.maintainer_; + onChanged(); + } + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + onChanged(); + } + if (!other.getWebsiteURL().isEmpty()) { + websiteURL_ = other.websiteURL_; + onChanged(); + } + if (!other.getEmail().isEmpty()) { + email_ = other.email_; + onChanged(); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasHelp()) { + mergeHelp(other.getHelp()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Board.Package parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Board.Package) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object maintainer_ = ""; + /** + *
+       * Maintainer of the package.
+       * 
+ * + * string maintainer = 1; + * @return The maintainer. + */ + public java.lang.String getMaintainer() { + java.lang.Object ref = maintainer_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + maintainer_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Maintainer of the package.
+       * 
+ * + * string maintainer = 1; + * @return The bytes for maintainer. + */ + public com.google.protobuf.ByteString + getMaintainerBytes() { + java.lang.Object ref = maintainer_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + maintainer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Maintainer of the package.
+       * 
+ * + * string maintainer = 1; + * @param value The maintainer to set. + * @return This builder for chaining. + */ + public Builder setMaintainer( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + maintainer_ = value; + onChanged(); + return this; + } + /** + *
+       * Maintainer of the package.
+       * 
+ * + * string maintainer = 1; + * @return This builder for chaining. + */ + public Builder clearMaintainer() { + + maintainer_ = getDefaultInstance().getMaintainer(); + onChanged(); + return this; + } + /** + *
+       * Maintainer of the package.
+       * 
+ * + * string maintainer = 1; + * @param value The bytes for maintainer to set. + * @return This builder for chaining. + */ + public Builder setMaintainerBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + maintainer_ = value; + onChanged(); + return this; + } + + private java.lang.Object url_ = ""; + /** + *
+       * The URL of the platforms index file
+       * (e.g., https://downloads.arduino.cc/packages/package_index.json).
+       * 
+ * + * string url = 2; + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The URL of the platforms index file
+       * (e.g., https://downloads.arduino.cc/packages/package_index.json).
+       * 
+ * + * string url = 2; + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The URL of the platforms index file
+       * (e.g., https://downloads.arduino.cc/packages/package_index.json).
+       * 
+ * + * string url = 2; + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + url_ = value; + onChanged(); + return this; + } + /** + *
+       * The URL of the platforms index file
+       * (e.g., https://downloads.arduino.cc/packages/package_index.json).
+       * 
+ * + * string url = 2; + * @return This builder for chaining. + */ + public Builder clearUrl() { + + url_ = getDefaultInstance().getUrl(); + onChanged(); + return this; + } + /** + *
+       * The URL of the platforms index file
+       * (e.g., https://downloads.arduino.cc/packages/package_index.json).
+       * 
+ * + * string url = 2; + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + url_ = value; + onChanged(); + return this; + } + + private java.lang.Object websiteURL_ = ""; + /** + *
+       * A URL provided by the package author, intended to point to their website.
+       * 
+ * + * string websiteURL = 3; + * @return The websiteURL. + */ + public java.lang.String getWebsiteURL() { + java.lang.Object ref = websiteURL_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + websiteURL_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * A URL provided by the package author, intended to point to their website.
+       * 
+ * + * string websiteURL = 3; + * @return The bytes for websiteURL. + */ + public com.google.protobuf.ByteString + getWebsiteURLBytes() { + java.lang.Object ref = websiteURL_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + websiteURL_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * A URL provided by the package author, intended to point to their website.
+       * 
+ * + * string websiteURL = 3; + * @param value The websiteURL to set. + * @return This builder for chaining. + */ + public Builder setWebsiteURL( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + websiteURL_ = value; + onChanged(); + return this; + } + /** + *
+       * A URL provided by the package author, intended to point to their website.
+       * 
+ * + * string websiteURL = 3; + * @return This builder for chaining. + */ + public Builder clearWebsiteURL() { + + websiteURL_ = getDefaultInstance().getWebsiteURL(); + onChanged(); + return this; + } + /** + *
+       * A URL provided by the package author, intended to point to their website.
+       * 
+ * + * string websiteURL = 3; + * @param value The bytes for websiteURL to set. + * @return This builder for chaining. + */ + public Builder setWebsiteURLBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + websiteURL_ = value; + onChanged(); + return this; + } + + private java.lang.Object email_ = ""; + /** + *
+       * Email address of the package maintainer.
+       * 
+ * + * string email = 4; + * @return The email. + */ + public java.lang.String getEmail() { + java.lang.Object ref = email_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + email_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Email address of the package maintainer.
+       * 
+ * + * string email = 4; + * @return The bytes for email. + */ + public com.google.protobuf.ByteString + getEmailBytes() { + java.lang.Object ref = email_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + email_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Email address of the package maintainer.
+       * 
+ * + * string email = 4; + * @param value The email to set. + * @return This builder for chaining. + */ + public Builder setEmail( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + email_ = value; + onChanged(); + return this; + } + /** + *
+       * Email address of the package maintainer.
+       * 
+ * + * string email = 4; + * @return This builder for chaining. + */ + public Builder clearEmail() { + + email_ = getDefaultInstance().getEmail(); + onChanged(); + return this; + } + /** + *
+       * Email address of the package maintainer.
+       * 
+ * + * string email = 4; + * @param value The bytes for email to set. + * @return This builder for chaining. + */ + public Builder setEmailBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + email_ = value; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+       * Package vendor name.
+       * 
+ * + * string name = 5; + * @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; + } + } + /** + *
+       * Package vendor name.
+       * 
+ * + * string name = 5; + * @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; + } + } + /** + *
+       * Package vendor name.
+       * 
+ * + * string name = 5; + * @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; + onChanged(); + return this; + } + /** + *
+       * Package vendor name.
+       * 
+ * + * string name = 5; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+       * Package vendor name.
+       * 
+ * + * string name = 5; + * @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; + onChanged(); + return this; + } + + private cc.arduino.cli.commands.Board.Help help_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Board.Help, cc.arduino.cli.commands.Board.Help.Builder, cc.arduino.cli.commands.Board.HelpOrBuilder> helpBuilder_; + /** + *
+       * Resources for getting help about using the package.
+       * 
+ * + * .cc.arduino.cli.commands.Help help = 6; + * @return Whether the help field is set. + */ + public boolean hasHelp() { + return helpBuilder_ != null || help_ != null; + } + /** + *
+       * Resources for getting help about using the package.
+       * 
+ * + * .cc.arduino.cli.commands.Help help = 6; + * @return The help. + */ + public cc.arduino.cli.commands.Board.Help getHelp() { + if (helpBuilder_ == null) { + return help_ == null ? cc.arduino.cli.commands.Board.Help.getDefaultInstance() : help_; + } else { + return helpBuilder_.getMessage(); + } + } + /** + *
+       * Resources for getting help about using the package.
+       * 
+ * + * .cc.arduino.cli.commands.Help help = 6; + */ + public Builder setHelp(cc.arduino.cli.commands.Board.Help value) { + if (helpBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + help_ = value; + onChanged(); + } else { + helpBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Resources for getting help about using the package.
+       * 
+ * + * .cc.arduino.cli.commands.Help help = 6; + */ + public Builder setHelp( + cc.arduino.cli.commands.Board.Help.Builder builderForValue) { + if (helpBuilder_ == null) { + help_ = builderForValue.build(); + onChanged(); + } else { + helpBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Resources for getting help about using the package.
+       * 
+ * + * .cc.arduino.cli.commands.Help help = 6; + */ + public Builder mergeHelp(cc.arduino.cli.commands.Board.Help value) { + if (helpBuilder_ == null) { + if (help_ != null) { + help_ = + cc.arduino.cli.commands.Board.Help.newBuilder(help_).mergeFrom(value).buildPartial(); + } else { + help_ = value; + } + onChanged(); + } else { + helpBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Resources for getting help about using the package.
+       * 
+ * + * .cc.arduino.cli.commands.Help help = 6; + */ + public Builder clearHelp() { + if (helpBuilder_ == null) { + help_ = null; + onChanged(); + } else { + help_ = null; + helpBuilder_ = null; + } + + return this; + } + /** + *
+       * Resources for getting help about using the package.
+       * 
+ * + * .cc.arduino.cli.commands.Help help = 6; + */ + public cc.arduino.cli.commands.Board.Help.Builder getHelpBuilder() { + + onChanged(); + return getHelpFieldBuilder().getBuilder(); + } + /** + *
+       * Resources for getting help about using the package.
+       * 
+ * + * .cc.arduino.cli.commands.Help help = 6; + */ + public cc.arduino.cli.commands.Board.HelpOrBuilder getHelpOrBuilder() { + if (helpBuilder_ != null) { + return helpBuilder_.getMessageOrBuilder(); + } else { + return help_ == null ? + cc.arduino.cli.commands.Board.Help.getDefaultInstance() : help_; + } + } + /** + *
+       * Resources for getting help about using the package.
+       * 
+ * + * .cc.arduino.cli.commands.Help help = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Board.Help, cc.arduino.cli.commands.Board.Help.Builder, cc.arduino.cli.commands.Board.HelpOrBuilder> + getHelpFieldBuilder() { + if (helpBuilder_ == null) { + helpBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Board.Help, cc.arduino.cli.commands.Board.Help.Builder, cc.arduino.cli.commands.Board.HelpOrBuilder>( + getHelp(), + getParentForChildren(), + isClean()); + help_ = null; + } + return helpBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.Package) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.Package) + private static final cc.arduino.cli.commands.Board.Package DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Board.Package(); + } + + public static cc.arduino.cli.commands.Board.Package getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Package parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Package(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.Package getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface HelpOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.Help) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * URL for getting online help.
+     * 
+ * + * string online = 1; + * @return The online. + */ + java.lang.String getOnline(); + /** + *
+     * URL for getting online help.
+     * 
+ * + * string online = 1; + * @return The bytes for online. + */ + com.google.protobuf.ByteString + getOnlineBytes(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.Help} + */ + public static final class Help extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.Help) + HelpOrBuilder { + private static final long serialVersionUID = 0L; + // Use Help.newBuilder() to construct. + private Help(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Help() { + online_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Help(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Help( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + online_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_Help_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_Help_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Board.Help.class, cc.arduino.cli.commands.Board.Help.Builder.class); + } + + public static final int ONLINE_FIELD_NUMBER = 1; + private volatile java.lang.Object online_; + /** + *
+     * URL for getting online help.
+     * 
+ * + * string online = 1; + * @return The online. + */ + public java.lang.String getOnline() { + java.lang.Object ref = online_; + 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(); + online_ = s; + return s; + } + } + /** + *
+     * URL for getting online help.
+     * 
+ * + * string online = 1; + * @return The bytes for online. + */ + public com.google.protobuf.ByteString + getOnlineBytes() { + java.lang.Object ref = online_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + online_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (!getOnlineBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, online_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getOnlineBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, online_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Board.Help)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Board.Help other = (cc.arduino.cli.commands.Board.Help) obj; + + if (!getOnline() + .equals(other.getOnline())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + ONLINE_FIELD_NUMBER; + hash = (53 * hash) + getOnline().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Board.Help parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.Help parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.Help parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.Help parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.Help parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.Help parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.Help parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.Help parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.Help parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.Help parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.Help parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.Help parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Board.Help 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.Help} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.Help) + cc.arduino.cli.commands.Board.HelpOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_Help_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_Help_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Board.Help.class, cc.arduino.cli.commands.Board.Help.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Board.Help.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + online_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_Help_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.Help getDefaultInstanceForType() { + return cc.arduino.cli.commands.Board.Help.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.Help build() { + cc.arduino.cli.commands.Board.Help result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.Help buildPartial() { + cc.arduino.cli.commands.Board.Help result = new cc.arduino.cli.commands.Board.Help(this); + result.online_ = online_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Board.Help) { + return mergeFrom((cc.arduino.cli.commands.Board.Help)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Board.Help other) { + if (other == cc.arduino.cli.commands.Board.Help.getDefaultInstance()) return this; + if (!other.getOnline().isEmpty()) { + online_ = other.online_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Board.Help parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Board.Help) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object online_ = ""; + /** + *
+       * URL for getting online help.
+       * 
+ * + * string online = 1; + * @return The online. + */ + public java.lang.String getOnline() { + java.lang.Object ref = online_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + online_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * URL for getting online help.
+       * 
+ * + * string online = 1; + * @return The bytes for online. + */ + public com.google.protobuf.ByteString + getOnlineBytes() { + java.lang.Object ref = online_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + online_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * URL for getting online help.
+       * 
+ * + * string online = 1; + * @param value The online to set. + * @return This builder for chaining. + */ + public Builder setOnline( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + online_ = value; + onChanged(); + return this; + } + /** + *
+       * URL for getting online help.
+       * 
+ * + * string online = 1; + * @return This builder for chaining. + */ + public Builder clearOnline() { + + online_ = getDefaultInstance().getOnline(); + onChanged(); + return this; + } + /** + *
+       * URL for getting online help.
+       * 
+ * + * string online = 1; + * @param value The bytes for online to set. + * @return This builder for chaining. + */ + public Builder setOnlineBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + online_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.Help) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.Help) + private static final cc.arduino.cli.commands.Board.Help DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Board.Help(); + } + + public static cc.arduino.cli.commands.Board.Help getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Help parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Help(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.Help getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface BoardPlatformOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.BoardPlatform) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Architecture of the platform (e.g., `avr`).
+     * 
+ * + * string architecture = 1; + * @return The architecture. + */ + java.lang.String getArchitecture(); + /** + *
+     * Architecture of the platform (e.g., `avr`).
+     * 
+ * + * string architecture = 1; + * @return The bytes for architecture. + */ + com.google.protobuf.ByteString + getArchitectureBytes(); + + /** + *
+     * Category of the platform. Set to `Contributed` for 3rd party platforms.
+     * 
+ * + * string category = 2; + * @return The category. + */ + java.lang.String getCategory(); + /** + *
+     * Category of the platform. Set to `Contributed` for 3rd party platforms.
+     * 
+ * + * string category = 2; + * @return The bytes for category. + */ + com.google.protobuf.ByteString + getCategoryBytes(); + + /** + *
+     * Download URL of the platform archive file.
+     * 
+ * + * string url = 3; + * @return The url. + */ + java.lang.String getUrl(); + /** + *
+     * Download URL of the platform archive file.
+     * 
+ * + * string url = 3; + * @return The bytes for url. + */ + com.google.protobuf.ByteString + getUrlBytes(); + + /** + *
+     * File name of the platform archive.
+     * 
+ * + * string archiveFileName = 4; + * @return The archiveFileName. + */ + java.lang.String getArchiveFileName(); + /** + *
+     * File name of the platform archive.
+     * 
+ * + * string archiveFileName = 4; + * @return The bytes for archiveFileName. + */ + com.google.protobuf.ByteString + getArchiveFileNameBytes(); + + /** + *
+     * Checksum of the platform archive.
+     * 
+ * + * string checksum = 5; + * @return The checksum. + */ + java.lang.String getChecksum(); + /** + *
+     * Checksum of the platform archive.
+     * 
+ * + * string checksum = 5; + * @return The bytes for checksum. + */ + com.google.protobuf.ByteString + getChecksumBytes(); + + /** + *
+     * File size of the platform archive.
+     * 
+ * + * int64 size = 6; + * @return The size. + */ + long getSize(); + + /** + *
+     * Name used to identify the platform to humans.
+     * 
+ * + * string name = 7; + * @return The name. + */ + java.lang.String getName(); + /** + *
+     * Name used to identify the platform to humans.
+     * 
+ * + * string name = 7; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.BoardPlatform} + */ + public static final class BoardPlatform extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.BoardPlatform) + BoardPlatformOrBuilder { + private static final long serialVersionUID = 0L; + // Use BoardPlatform.newBuilder() to construct. + private BoardPlatform(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BoardPlatform() { + architecture_ = ""; + category_ = ""; + url_ = ""; + archiveFileName_ = ""; + checksum_ = ""; + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BoardPlatform(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BoardPlatform( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + architecture_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + category_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + url_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + archiveFileName_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + checksum_ = s; + break; + } + case 48: { + + size_ = input.readInt64(); + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardPlatform_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardPlatform_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Board.BoardPlatform.class, cc.arduino.cli.commands.Board.BoardPlatform.Builder.class); + } + + public static final int ARCHITECTURE_FIELD_NUMBER = 1; + private volatile java.lang.Object architecture_; + /** + *
+     * Architecture of the platform (e.g., `avr`).
+     * 
+ * + * string architecture = 1; + * @return The architecture. + */ + public java.lang.String getArchitecture() { + java.lang.Object ref = architecture_; + 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(); + architecture_ = s; + return s; + } + } + /** + *
+     * Architecture of the platform (e.g., `avr`).
+     * 
+ * + * string architecture = 1; + * @return The bytes for architecture. + */ + public com.google.protobuf.ByteString + getArchitectureBytes() { + java.lang.Object ref = architecture_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + architecture_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CATEGORY_FIELD_NUMBER = 2; + private volatile java.lang.Object category_; + /** + *
+     * Category of the platform. Set to `Contributed` for 3rd party platforms.
+     * 
+ * + * string category = 2; + * @return The category. + */ + public java.lang.String getCategory() { + java.lang.Object ref = category_; + 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(); + category_ = s; + return s; + } + } + /** + *
+     * Category of the platform. Set to `Contributed` for 3rd party platforms.
+     * 
+ * + * string category = 2; + * @return The bytes for category. + */ + public com.google.protobuf.ByteString + getCategoryBytes() { + java.lang.Object ref = category_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + category_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URL_FIELD_NUMBER = 3; + private volatile java.lang.Object url_; + /** + *
+     * Download URL of the platform archive file.
+     * 
+ * + * string url = 3; + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + 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(); + url_ = s; + return s; + } + } + /** + *
+     * Download URL of the platform archive file.
+     * 
+ * + * string url = 3; + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ARCHIVEFILENAME_FIELD_NUMBER = 4; + private volatile java.lang.Object archiveFileName_; + /** + *
+     * File name of the platform archive.
+     * 
+ * + * string archiveFileName = 4; + * @return The archiveFileName. + */ + public java.lang.String getArchiveFileName() { + java.lang.Object ref = archiveFileName_; + 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(); + archiveFileName_ = s; + return s; + } + } + /** + *
+     * File name of the platform archive.
+     * 
+ * + * string archiveFileName = 4; + * @return The bytes for archiveFileName. + */ + public com.google.protobuf.ByteString + getArchiveFileNameBytes() { + java.lang.Object ref = archiveFileName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + archiveFileName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CHECKSUM_FIELD_NUMBER = 5; + private volatile java.lang.Object checksum_; + /** + *
+     * Checksum of the platform archive.
+     * 
+ * + * string checksum = 5; + * @return The checksum. + */ + public java.lang.String getChecksum() { + java.lang.Object ref = checksum_; + 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(); + checksum_ = s; + return s; + } + } + /** + *
+     * Checksum of the platform archive.
+     * 
+ * + * string checksum = 5; + * @return The bytes for checksum. + */ + public com.google.protobuf.ByteString + getChecksumBytes() { + java.lang.Object ref = checksum_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + checksum_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SIZE_FIELD_NUMBER = 6; + private long size_; + /** + *
+     * File size of the platform archive.
+     * 
+ * + * int64 size = 6; + * @return The size. + */ + public long getSize() { + return size_; + } + + public static final int NAME_FIELD_NUMBER = 7; + private volatile java.lang.Object name_; + /** + *
+     * Name used to identify the platform to humans.
+     * 
+ * + * string name = 7; + * @return The name. + */ + 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; + } + } + /** + *
+     * Name used to identify the platform to humans.
+     * 
+ * + * string name = 7; + * @return The bytes for name. + */ + 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; + } + } + + 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 (!getArchitectureBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, architecture_); + } + if (!getCategoryBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, category_); + } + if (!getUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, url_); + } + if (!getArchiveFileNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, archiveFileName_); + } + if (!getChecksumBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, checksum_); + } + if (size_ != 0L) { + output.writeInt64(6, size_); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getArchitectureBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, architecture_); + } + if (!getCategoryBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, category_); + } + if (!getUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, url_); + } + if (!getArchiveFileNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, archiveFileName_); + } + if (!getChecksumBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, checksum_); + } + if (size_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(6, size_); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Board.BoardPlatform)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Board.BoardPlatform other = (cc.arduino.cli.commands.Board.BoardPlatform) obj; + + if (!getArchitecture() + .equals(other.getArchitecture())) return false; + if (!getCategory() + .equals(other.getCategory())) return false; + if (!getUrl() + .equals(other.getUrl())) return false; + if (!getArchiveFileName() + .equals(other.getArchiveFileName())) return false; + if (!getChecksum() + .equals(other.getChecksum())) return false; + if (getSize() + != other.getSize()) return false; + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + ARCHITECTURE_FIELD_NUMBER; + hash = (53 * hash) + getArchitecture().hashCode(); + hash = (37 * hash) + CATEGORY_FIELD_NUMBER; + hash = (53 * hash) + getCategory().hashCode(); + hash = (37 * hash) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + hash = (37 * hash) + ARCHIVEFILENAME_FIELD_NUMBER; + hash = (53 * hash) + getArchiveFileName().hashCode(); + hash = (37 * hash) + CHECKSUM_FIELD_NUMBER; + hash = (53 * hash) + getChecksum().hashCode(); + hash = (37 * hash) + SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSize()); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Board.BoardPlatform parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.BoardPlatform parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardPlatform parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.BoardPlatform parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardPlatform parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.BoardPlatform parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardPlatform parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.BoardPlatform parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardPlatform parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.BoardPlatform parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardPlatform parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.BoardPlatform parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Board.BoardPlatform 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.BoardPlatform} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.BoardPlatform) + cc.arduino.cli.commands.Board.BoardPlatformOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardPlatform_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardPlatform_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Board.BoardPlatform.class, cc.arduino.cli.commands.Board.BoardPlatform.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Board.BoardPlatform.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + architecture_ = ""; + + category_ = ""; + + url_ = ""; + + archiveFileName_ = ""; + + checksum_ = ""; + + size_ = 0L; + + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardPlatform_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.BoardPlatform getDefaultInstanceForType() { + return cc.arduino.cli.commands.Board.BoardPlatform.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.BoardPlatform build() { + cc.arduino.cli.commands.Board.BoardPlatform result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.BoardPlatform buildPartial() { + cc.arduino.cli.commands.Board.BoardPlatform result = new cc.arduino.cli.commands.Board.BoardPlatform(this); + result.architecture_ = architecture_; + result.category_ = category_; + result.url_ = url_; + result.archiveFileName_ = archiveFileName_; + result.checksum_ = checksum_; + result.size_ = size_; + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Board.BoardPlatform) { + return mergeFrom((cc.arduino.cli.commands.Board.BoardPlatform)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Board.BoardPlatform other) { + if (other == cc.arduino.cli.commands.Board.BoardPlatform.getDefaultInstance()) return this; + if (!other.getArchitecture().isEmpty()) { + architecture_ = other.architecture_; + onChanged(); + } + if (!other.getCategory().isEmpty()) { + category_ = other.category_; + onChanged(); + } + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + onChanged(); + } + if (!other.getArchiveFileName().isEmpty()) { + archiveFileName_ = other.archiveFileName_; + onChanged(); + } + if (!other.getChecksum().isEmpty()) { + checksum_ = other.checksum_; + onChanged(); + } + if (other.getSize() != 0L) { + setSize(other.getSize()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Board.BoardPlatform parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Board.BoardPlatform) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object architecture_ = ""; + /** + *
+       * Architecture of the platform (e.g., `avr`).
+       * 
+ * + * string architecture = 1; + * @return The architecture. + */ + public java.lang.String getArchitecture() { + java.lang.Object ref = architecture_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + architecture_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Architecture of the platform (e.g., `avr`).
+       * 
+ * + * string architecture = 1; + * @return The bytes for architecture. + */ + public com.google.protobuf.ByteString + getArchitectureBytes() { + java.lang.Object ref = architecture_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + architecture_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Architecture of the platform (e.g., `avr`).
+       * 
+ * + * string architecture = 1; + * @param value The architecture to set. + * @return This builder for chaining. + */ + public Builder setArchitecture( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + architecture_ = value; + onChanged(); + return this; + } + /** + *
+       * Architecture of the platform (e.g., `avr`).
+       * 
+ * + * string architecture = 1; + * @return This builder for chaining. + */ + public Builder clearArchitecture() { + + architecture_ = getDefaultInstance().getArchitecture(); + onChanged(); + return this; + } + /** + *
+       * Architecture of the platform (e.g., `avr`).
+       * 
+ * + * string architecture = 1; + * @param value The bytes for architecture to set. + * @return This builder for chaining. + */ + public Builder setArchitectureBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + architecture_ = value; + onChanged(); + return this; + } + + private java.lang.Object category_ = ""; + /** + *
+       * Category of the platform. Set to `Contributed` for 3rd party platforms.
+       * 
+ * + * string category = 2; + * @return The category. + */ + public java.lang.String getCategory() { + java.lang.Object ref = category_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + category_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Category of the platform. Set to `Contributed` for 3rd party platforms.
+       * 
+ * + * string category = 2; + * @return The bytes for category. + */ + public com.google.protobuf.ByteString + getCategoryBytes() { + java.lang.Object ref = category_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + category_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Category of the platform. Set to `Contributed` for 3rd party platforms.
+       * 
+ * + * string category = 2; + * @param value The category to set. + * @return This builder for chaining. + */ + public Builder setCategory( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + category_ = value; + onChanged(); + return this; + } + /** + *
+       * Category of the platform. Set to `Contributed` for 3rd party platforms.
+       * 
+ * + * string category = 2; + * @return This builder for chaining. + */ + public Builder clearCategory() { + + category_ = getDefaultInstance().getCategory(); + onChanged(); + return this; + } + /** + *
+       * Category of the platform. Set to `Contributed` for 3rd party platforms.
+       * 
+ * + * string category = 2; + * @param value The bytes for category to set. + * @return This builder for chaining. + */ + public Builder setCategoryBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + category_ = value; + onChanged(); + return this; + } + + private java.lang.Object url_ = ""; + /** + *
+       * Download URL of the platform archive file.
+       * 
+ * + * string url = 3; + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Download URL of the platform archive file.
+       * 
+ * + * string url = 3; + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Download URL of the platform archive file.
+       * 
+ * + * string url = 3; + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + url_ = value; + onChanged(); + return this; + } + /** + *
+       * Download URL of the platform archive file.
+       * 
+ * + * string url = 3; + * @return This builder for chaining. + */ + public Builder clearUrl() { + + url_ = getDefaultInstance().getUrl(); + onChanged(); + return this; + } + /** + *
+       * Download URL of the platform archive file.
+       * 
+ * + * string url = 3; + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + url_ = value; + onChanged(); + return this; + } + + private java.lang.Object archiveFileName_ = ""; + /** + *
+       * File name of the platform archive.
+       * 
+ * + * string archiveFileName = 4; + * @return The archiveFileName. + */ + public java.lang.String getArchiveFileName() { + java.lang.Object ref = archiveFileName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + archiveFileName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * File name of the platform archive.
+       * 
+ * + * string archiveFileName = 4; + * @return The bytes for archiveFileName. + */ + public com.google.protobuf.ByteString + getArchiveFileNameBytes() { + java.lang.Object ref = archiveFileName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + archiveFileName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * File name of the platform archive.
+       * 
+ * + * string archiveFileName = 4; + * @param value The archiveFileName to set. + * @return This builder for chaining. + */ + public Builder setArchiveFileName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + archiveFileName_ = value; + onChanged(); + return this; + } + /** + *
+       * File name of the platform archive.
+       * 
+ * + * string archiveFileName = 4; + * @return This builder for chaining. + */ + public Builder clearArchiveFileName() { + + archiveFileName_ = getDefaultInstance().getArchiveFileName(); + onChanged(); + return this; + } + /** + *
+       * File name of the platform archive.
+       * 
+ * + * string archiveFileName = 4; + * @param value The bytes for archiveFileName to set. + * @return This builder for chaining. + */ + public Builder setArchiveFileNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + archiveFileName_ = value; + onChanged(); + return this; + } + + private java.lang.Object checksum_ = ""; + /** + *
+       * Checksum of the platform archive.
+       * 
+ * + * string checksum = 5; + * @return The checksum. + */ + public java.lang.String getChecksum() { + java.lang.Object ref = checksum_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + checksum_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Checksum of the platform archive.
+       * 
+ * + * string checksum = 5; + * @return The bytes for checksum. + */ + public com.google.protobuf.ByteString + getChecksumBytes() { + java.lang.Object ref = checksum_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + checksum_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Checksum of the platform archive.
+       * 
+ * + * string checksum = 5; + * @param value The checksum to set. + * @return This builder for chaining. + */ + public Builder setChecksum( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + checksum_ = value; + onChanged(); + return this; + } + /** + *
+       * Checksum of the platform archive.
+       * 
+ * + * string checksum = 5; + * @return This builder for chaining. + */ + public Builder clearChecksum() { + + checksum_ = getDefaultInstance().getChecksum(); + onChanged(); + return this; + } + /** + *
+       * Checksum of the platform archive.
+       * 
+ * + * string checksum = 5; + * @param value The bytes for checksum to set. + * @return This builder for chaining. + */ + public Builder setChecksumBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + checksum_ = value; + onChanged(); + return this; + } + + private long size_ ; + /** + *
+       * File size of the platform archive.
+       * 
+ * + * int64 size = 6; + * @return The size. + */ + public long getSize() { + return size_; + } + /** + *
+       * File size of the platform archive.
+       * 
+ * + * int64 size = 6; + * @param value The size to set. + * @return This builder for chaining. + */ + public Builder setSize(long value) { + + size_ = value; + onChanged(); + return this; + } + /** + *
+       * File size of the platform archive.
+       * 
+ * + * int64 size = 6; + * @return This builder for chaining. + */ + public Builder clearSize() { + + size_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+       * Name used to identify the platform to humans.
+       * 
+ * + * string name = 7; + * @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; + } + } + /** + *
+       * Name used to identify the platform to humans.
+       * 
+ * + * string name = 7; + * @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; + } + } + /** + *
+       * Name used to identify the platform to humans.
+       * 
+ * + * string name = 7; + * @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; + onChanged(); + return this; + } + /** + *
+       * Name used to identify the platform to humans.
+       * 
+ * + * string name = 7; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+       * Name used to identify the platform to humans.
+       * 
+ * + * string name = 7; + * @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; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.BoardPlatform) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.BoardPlatform) + private static final cc.arduino.cli.commands.Board.BoardPlatform DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Board.BoardPlatform(); + } + + public static cc.arduino.cli.commands.Board.BoardPlatform getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BoardPlatform parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BoardPlatform(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.BoardPlatform getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ToolsDependenciesOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.ToolsDependencies) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Vendor name of the package containing the tool definition.
+     * 
+ * + * string packager = 1; + * @return The packager. + */ + java.lang.String getPackager(); + /** + *
+     * Vendor name of the package containing the tool definition.
+     * 
+ * + * string packager = 1; + * @return The bytes for packager. + */ + com.google.protobuf.ByteString + getPackagerBytes(); + + /** + *
+     * Tool name.
+     * 
+ * + * string name = 2; + * @return The name. + */ + java.lang.String getName(); + /** + *
+     * Tool name.
+     * 
+ * + * string name = 2; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+     * Tool version.
+     * 
+ * + * string version = 3; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+     * Tool version.
+     * 
+ * + * string version = 3; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); + + /** + *
+     * Data for the operating system-specific builds of the tool.
+     * 
+ * + * repeated .cc.arduino.cli.commands.Systems systems = 4; + */ + java.util.List + getSystemsList(); + /** + *
+     * Data for the operating system-specific builds of the tool.
+     * 
+ * + * repeated .cc.arduino.cli.commands.Systems systems = 4; + */ + cc.arduino.cli.commands.Board.Systems getSystems(int index); + /** + *
+     * Data for the operating system-specific builds of the tool.
+     * 
+ * + * repeated .cc.arduino.cli.commands.Systems systems = 4; + */ + int getSystemsCount(); + /** + *
+     * Data for the operating system-specific builds of the tool.
+     * 
+ * + * repeated .cc.arduino.cli.commands.Systems systems = 4; + */ + java.util.List + getSystemsOrBuilderList(); + /** + *
+     * Data for the operating system-specific builds of the tool.
+     * 
+ * + * repeated .cc.arduino.cli.commands.Systems systems = 4; + */ + cc.arduino.cli.commands.Board.SystemsOrBuilder getSystemsOrBuilder( + int index); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.ToolsDependencies} + */ + public static final class ToolsDependencies extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.ToolsDependencies) + ToolsDependenciesOrBuilder { + private static final long serialVersionUID = 0L; + // Use ToolsDependencies.newBuilder() to construct. + private ToolsDependencies(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ToolsDependencies() { + packager_ = ""; + name_ = ""; + version_ = ""; + systems_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ToolsDependencies(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ToolsDependencies( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + packager_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + version_ = s; + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + systems_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + systems_.add( + input.readMessage(cc.arduino.cli.commands.Board.Systems.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + systems_ = java.util.Collections.unmodifiableList(systems_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_ToolsDependencies_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_ToolsDependencies_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Board.ToolsDependencies.class, cc.arduino.cli.commands.Board.ToolsDependencies.Builder.class); + } + + public static final int PACKAGER_FIELD_NUMBER = 1; + private volatile java.lang.Object packager_; + /** + *
+     * Vendor name of the package containing the tool definition.
+     * 
+ * + * string packager = 1; + * @return The packager. + */ + public java.lang.String getPackager() { + java.lang.Object ref = packager_; + 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(); + packager_ = s; + return s; + } + } + /** + *
+     * Vendor name of the package containing the tool definition.
+     * 
+ * + * string packager = 1; + * @return The bytes for packager. + */ + public com.google.protobuf.ByteString + getPackagerBytes() { + java.lang.Object ref = packager_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + packager_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object name_; + /** + *
+     * Tool name.
+     * 
+ * + * string name = 2; + * @return The name. + */ + 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; + } + } + /** + *
+     * Tool name.
+     * 
+ * + * string name = 2; + * @return The bytes for name. + */ + 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 VERSION_FIELD_NUMBER = 3; + private volatile java.lang.Object version_; + /** + *
+     * Tool version.
+     * 
+ * + * string version = 3; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + 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(); + version_ = s; + return s; + } + } + /** + *
+     * Tool version.
+     * 
+ * + * string version = 3; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SYSTEMS_FIELD_NUMBER = 4; + private java.util.List systems_; + /** + *
+     * Data for the operating system-specific builds of the tool.
+     * 
+ * + * repeated .cc.arduino.cli.commands.Systems systems = 4; + */ + public java.util.List getSystemsList() { + return systems_; + } + /** + *
+     * Data for the operating system-specific builds of the tool.
+     * 
+ * + * repeated .cc.arduino.cli.commands.Systems systems = 4; + */ + public java.util.List + getSystemsOrBuilderList() { + return systems_; + } + /** + *
+     * Data for the operating system-specific builds of the tool.
+     * 
+ * + * repeated .cc.arduino.cli.commands.Systems systems = 4; + */ + public int getSystemsCount() { + return systems_.size(); + } + /** + *
+     * Data for the operating system-specific builds of the tool.
+     * 
+ * + * repeated .cc.arduino.cli.commands.Systems systems = 4; + */ + public cc.arduino.cli.commands.Board.Systems getSystems(int index) { + return systems_.get(index); + } + /** + *
+     * Data for the operating system-specific builds of the tool.
+     * 
+ * + * repeated .cc.arduino.cli.commands.Systems systems = 4; + */ + public cc.arduino.cli.commands.Board.SystemsOrBuilder getSystemsOrBuilder( + int index) { + return systems_.get(index); + } + + 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 (!getPackagerBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, packager_); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + if (!getVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, version_); + } + for (int i = 0; i < systems_.size(); i++) { + output.writeMessage(4, systems_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getPackagerBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, packager_); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + if (!getVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, version_); + } + for (int i = 0; i < systems_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, systems_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Board.ToolsDependencies)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Board.ToolsDependencies other = (cc.arduino.cli.commands.Board.ToolsDependencies) obj; + + if (!getPackager() + .equals(other.getPackager())) return false; + if (!getName() + .equals(other.getName())) return false; + if (!getVersion() + .equals(other.getVersion())) return false; + if (!getSystemsList() + .equals(other.getSystemsList())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + PACKAGER_FIELD_NUMBER; + hash = (53 * hash) + getPackager().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + if (getSystemsCount() > 0) { + hash = (37 * hash) + SYSTEMS_FIELD_NUMBER; + hash = (53 * hash) + getSystemsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Board.ToolsDependencies parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.ToolsDependencies parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.ToolsDependencies parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.ToolsDependencies parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.ToolsDependencies parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.ToolsDependencies parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.ToolsDependencies parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.ToolsDependencies parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.ToolsDependencies parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.ToolsDependencies parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.ToolsDependencies parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.ToolsDependencies parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Board.ToolsDependencies 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.ToolsDependencies} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.ToolsDependencies) + cc.arduino.cli.commands.Board.ToolsDependenciesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_ToolsDependencies_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_ToolsDependencies_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Board.ToolsDependencies.class, cc.arduino.cli.commands.Board.ToolsDependencies.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Board.ToolsDependencies.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getSystemsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + packager_ = ""; + + name_ = ""; + + version_ = ""; + + if (systemsBuilder_ == null) { + systems_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + systemsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_ToolsDependencies_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.ToolsDependencies getDefaultInstanceForType() { + return cc.arduino.cli.commands.Board.ToolsDependencies.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.ToolsDependencies build() { + cc.arduino.cli.commands.Board.ToolsDependencies result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.ToolsDependencies buildPartial() { + cc.arduino.cli.commands.Board.ToolsDependencies result = new cc.arduino.cli.commands.Board.ToolsDependencies(this); + int from_bitField0_ = bitField0_; + result.packager_ = packager_; + result.name_ = name_; + result.version_ = version_; + if (systemsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + systems_ = java.util.Collections.unmodifiableList(systems_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.systems_ = systems_; + } else { + result.systems_ = systemsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Board.ToolsDependencies) { + return mergeFrom((cc.arduino.cli.commands.Board.ToolsDependencies)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Board.ToolsDependencies other) { + if (other == cc.arduino.cli.commands.Board.ToolsDependencies.getDefaultInstance()) return this; + if (!other.getPackager().isEmpty()) { + packager_ = other.packager_; + onChanged(); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + if (systemsBuilder_ == null) { + if (!other.systems_.isEmpty()) { + if (systems_.isEmpty()) { + systems_ = other.systems_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSystemsIsMutable(); + systems_.addAll(other.systems_); + } + onChanged(); + } + } else { + if (!other.systems_.isEmpty()) { + if (systemsBuilder_.isEmpty()) { + systemsBuilder_.dispose(); + systemsBuilder_ = null; + systems_ = other.systems_; + bitField0_ = (bitField0_ & ~0x00000001); + systemsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSystemsFieldBuilder() : null; + } else { + systemsBuilder_.addAllMessages(other.systems_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Board.ToolsDependencies parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Board.ToolsDependencies) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object packager_ = ""; + /** + *
+       * Vendor name of the package containing the tool definition.
+       * 
+ * + * string packager = 1; + * @return The packager. + */ + public java.lang.String getPackager() { + java.lang.Object ref = packager_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + packager_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Vendor name of the package containing the tool definition.
+       * 
+ * + * string packager = 1; + * @return The bytes for packager. + */ + public com.google.protobuf.ByteString + getPackagerBytes() { + java.lang.Object ref = packager_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + packager_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Vendor name of the package containing the tool definition.
+       * 
+ * + * string packager = 1; + * @param value The packager to set. + * @return This builder for chaining. + */ + public Builder setPackager( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + packager_ = value; + onChanged(); + return this; + } + /** + *
+       * Vendor name of the package containing the tool definition.
+       * 
+ * + * string packager = 1; + * @return This builder for chaining. + */ + public Builder clearPackager() { + + packager_ = getDefaultInstance().getPackager(); + onChanged(); + return this; + } + /** + *
+       * Vendor name of the package containing the tool definition.
+       * 
+ * + * string packager = 1; + * @param value The bytes for packager to set. + * @return This builder for chaining. + */ + public Builder setPackagerBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + packager_ = value; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+       * Tool name.
+       * 
+ * + * string name = 2; + * @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; + } + } + /** + *
+       * Tool name.
+       * 
+ * + * string name = 2; + * @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; + } + } + /** + *
+       * Tool name.
+       * 
+ * + * string name = 2; + * @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; + onChanged(); + return this; + } + /** + *
+       * Tool name.
+       * 
+ * + * string name = 2; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+       * Tool name.
+       * 
+ * + * string name = 2; + * @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; + onChanged(); + return this; + } + + private java.lang.Object version_ = ""; + /** + *
+       * Tool version.
+       * 
+ * + * string version = 3; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Tool version.
+       * 
+ * + * string version = 3; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Tool version.
+       * 
+ * + * string version = 3; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + *
+       * Tool version.
+       * 
+ * + * string version = 3; + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + *
+       * Tool version.
+       * 
+ * + * string version = 3; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = value; + onChanged(); + return this; + } + + private java.util.List systems_ = + java.util.Collections.emptyList(); + private void ensureSystemsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + systems_ = new java.util.ArrayList(systems_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Board.Systems, cc.arduino.cli.commands.Board.Systems.Builder, cc.arduino.cli.commands.Board.SystemsOrBuilder> systemsBuilder_; + + /** + *
+       * Data for the operating system-specific builds of the tool.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Systems systems = 4; + */ + public java.util.List getSystemsList() { + if (systemsBuilder_ == null) { + return java.util.Collections.unmodifiableList(systems_); + } else { + return systemsBuilder_.getMessageList(); + } + } + /** + *
+       * Data for the operating system-specific builds of the tool.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Systems systems = 4; + */ + public int getSystemsCount() { + if (systemsBuilder_ == null) { + return systems_.size(); + } else { + return systemsBuilder_.getCount(); + } + } + /** + *
+       * Data for the operating system-specific builds of the tool.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Systems systems = 4; + */ + public cc.arduino.cli.commands.Board.Systems getSystems(int index) { + if (systemsBuilder_ == null) { + return systems_.get(index); + } else { + return systemsBuilder_.getMessage(index); + } + } + /** + *
+       * Data for the operating system-specific builds of the tool.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Systems systems = 4; + */ + public Builder setSystems( + int index, cc.arduino.cli.commands.Board.Systems value) { + if (systemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSystemsIsMutable(); + systems_.set(index, value); + onChanged(); + } else { + systemsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Data for the operating system-specific builds of the tool.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Systems systems = 4; + */ + public Builder setSystems( + int index, cc.arduino.cli.commands.Board.Systems.Builder builderForValue) { + if (systemsBuilder_ == null) { + ensureSystemsIsMutable(); + systems_.set(index, builderForValue.build()); + onChanged(); + } else { + systemsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Data for the operating system-specific builds of the tool.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Systems systems = 4; + */ + public Builder addSystems(cc.arduino.cli.commands.Board.Systems value) { + if (systemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSystemsIsMutable(); + systems_.add(value); + onChanged(); + } else { + systemsBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Data for the operating system-specific builds of the tool.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Systems systems = 4; + */ + public Builder addSystems( + int index, cc.arduino.cli.commands.Board.Systems value) { + if (systemsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSystemsIsMutable(); + systems_.add(index, value); + onChanged(); + } else { + systemsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Data for the operating system-specific builds of the tool.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Systems systems = 4; + */ + public Builder addSystems( + cc.arduino.cli.commands.Board.Systems.Builder builderForValue) { + if (systemsBuilder_ == null) { + ensureSystemsIsMutable(); + systems_.add(builderForValue.build()); + onChanged(); + } else { + systemsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Data for the operating system-specific builds of the tool.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Systems systems = 4; + */ + public Builder addSystems( + int index, cc.arduino.cli.commands.Board.Systems.Builder builderForValue) { + if (systemsBuilder_ == null) { + ensureSystemsIsMutable(); + systems_.add(index, builderForValue.build()); + onChanged(); + } else { + systemsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Data for the operating system-specific builds of the tool.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Systems systems = 4; + */ + public Builder addAllSystems( + java.lang.Iterable values) { + if (systemsBuilder_ == null) { + ensureSystemsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, systems_); + onChanged(); + } else { + systemsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Data for the operating system-specific builds of the tool.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Systems systems = 4; + */ + public Builder clearSystems() { + if (systemsBuilder_ == null) { + systems_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + systemsBuilder_.clear(); + } + return this; + } + /** + *
+       * Data for the operating system-specific builds of the tool.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Systems systems = 4; + */ + public Builder removeSystems(int index) { + if (systemsBuilder_ == null) { + ensureSystemsIsMutable(); + systems_.remove(index); + onChanged(); + } else { + systemsBuilder_.remove(index); + } + return this; + } + /** + *
+       * Data for the operating system-specific builds of the tool.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Systems systems = 4; + */ + public cc.arduino.cli.commands.Board.Systems.Builder getSystemsBuilder( + int index) { + return getSystemsFieldBuilder().getBuilder(index); + } + /** + *
+       * Data for the operating system-specific builds of the tool.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Systems systems = 4; + */ + public cc.arduino.cli.commands.Board.SystemsOrBuilder getSystemsOrBuilder( + int index) { + if (systemsBuilder_ == null) { + return systems_.get(index); } else { + return systemsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Data for the operating system-specific builds of the tool.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Systems systems = 4; + */ + public java.util.List + getSystemsOrBuilderList() { + if (systemsBuilder_ != null) { + return systemsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(systems_); + } + } + /** + *
+       * Data for the operating system-specific builds of the tool.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Systems systems = 4; + */ + public cc.arduino.cli.commands.Board.Systems.Builder addSystemsBuilder() { + return getSystemsFieldBuilder().addBuilder( + cc.arduino.cli.commands.Board.Systems.getDefaultInstance()); + } + /** + *
+       * Data for the operating system-specific builds of the tool.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Systems systems = 4; + */ + public cc.arduino.cli.commands.Board.Systems.Builder addSystemsBuilder( + int index) { + return getSystemsFieldBuilder().addBuilder( + index, cc.arduino.cli.commands.Board.Systems.getDefaultInstance()); + } + /** + *
+       * Data for the operating system-specific builds of the tool.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Systems systems = 4; + */ + public java.util.List + getSystemsBuilderList() { + return getSystemsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Board.Systems, cc.arduino.cli.commands.Board.Systems.Builder, cc.arduino.cli.commands.Board.SystemsOrBuilder> + getSystemsFieldBuilder() { + if (systemsBuilder_ == null) { + systemsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Board.Systems, cc.arduino.cli.commands.Board.Systems.Builder, cc.arduino.cli.commands.Board.SystemsOrBuilder>( + systems_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + systems_ = null; + } + return systemsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.ToolsDependencies) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.ToolsDependencies) + private static final cc.arduino.cli.commands.Board.ToolsDependencies DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Board.ToolsDependencies(); + } + + public static cc.arduino.cli.commands.Board.ToolsDependencies getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ToolsDependencies parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ToolsDependencies(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.ToolsDependencies getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SystemsOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.Systems) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Checksum of the tool archive.
+     * 
+ * + * string checksum = 1; + * @return The checksum. + */ + java.lang.String getChecksum(); + /** + *
+     * Checksum of the tool archive.
+     * 
+ * + * string checksum = 1; + * @return The bytes for checksum. + */ + com.google.protobuf.ByteString + getChecksumBytes(); + + /** + *
+     * Operating system identifier.
+     * 
+ * + * string host = 2; + * @return The host. + */ + java.lang.String getHost(); + /** + *
+     * Operating system identifier.
+     * 
+ * + * string host = 2; + * @return The bytes for host. + */ + com.google.protobuf.ByteString + getHostBytes(); + + /** + *
+     * File name of the tool archive.
+     * 
+ * + * string archiveFileName = 3; + * @return The archiveFileName. + */ + java.lang.String getArchiveFileName(); + /** + *
+     * File name of the tool archive.
+     * 
+ * + * string archiveFileName = 3; + * @return The bytes for archiveFileName. + */ + com.google.protobuf.ByteString + getArchiveFileNameBytes(); + + /** + *
+     * Download URL of the tool archive.
+     * 
+ * + * string url = 4; + * @return The url. + */ + java.lang.String getUrl(); + /** + *
+     * Download URL of the tool archive.
+     * 
+ * + * string url = 4; + * @return The bytes for url. + */ + com.google.protobuf.ByteString + getUrlBytes(); + + /** + *
+     * File size of the tool archive.
+     * 
+ * + * int64 size = 5; + * @return The size. + */ + long getSize(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.Systems} + */ + public static final class Systems extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.Systems) + SystemsOrBuilder { + private static final long serialVersionUID = 0L; + // Use Systems.newBuilder() to construct. + private Systems(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Systems() { + checksum_ = ""; + host_ = ""; + archiveFileName_ = ""; + url_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Systems(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Systems( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + checksum_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + host_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + archiveFileName_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + url_ = s; + break; + } + case 40: { + + size_ = input.readInt64(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_Systems_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_Systems_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Board.Systems.class, cc.arduino.cli.commands.Board.Systems.Builder.class); + } + + public static final int CHECKSUM_FIELD_NUMBER = 1; + private volatile java.lang.Object checksum_; + /** + *
+     * Checksum of the tool archive.
+     * 
+ * + * string checksum = 1; + * @return The checksum. + */ + public java.lang.String getChecksum() { + java.lang.Object ref = checksum_; + 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(); + checksum_ = s; + return s; + } + } + /** + *
+     * Checksum of the tool archive.
+     * 
+ * + * string checksum = 1; + * @return The bytes for checksum. + */ + public com.google.protobuf.ByteString + getChecksumBytes() { + java.lang.Object ref = checksum_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + checksum_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HOST_FIELD_NUMBER = 2; + private volatile java.lang.Object host_; + /** + *
+     * Operating system identifier.
+     * 
+ * + * string host = 2; + * @return The host. + */ + public java.lang.String getHost() { + java.lang.Object ref = host_; + 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(); + host_ = s; + return s; + } + } + /** + *
+     * Operating system identifier.
+     * 
+ * + * string host = 2; + * @return The bytes for host. + */ + public com.google.protobuf.ByteString + getHostBytes() { + java.lang.Object ref = host_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + host_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ARCHIVEFILENAME_FIELD_NUMBER = 3; + private volatile java.lang.Object archiveFileName_; + /** + *
+     * File name of the tool archive.
+     * 
+ * + * string archiveFileName = 3; + * @return The archiveFileName. + */ + public java.lang.String getArchiveFileName() { + java.lang.Object ref = archiveFileName_; + 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(); + archiveFileName_ = s; + return s; + } + } + /** + *
+     * File name of the tool archive.
+     * 
+ * + * string archiveFileName = 3; + * @return The bytes for archiveFileName. + */ + public com.google.protobuf.ByteString + getArchiveFileNameBytes() { + java.lang.Object ref = archiveFileName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + archiveFileName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int URL_FIELD_NUMBER = 4; + private volatile java.lang.Object url_; + /** + *
+     * Download URL of the tool archive.
+     * 
+ * + * string url = 4; + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + 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(); + url_ = s; + return s; + } + } + /** + *
+     * Download URL of the tool archive.
+     * 
+ * + * string url = 4; + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SIZE_FIELD_NUMBER = 5; + private long size_; + /** + *
+     * File size of the tool archive.
+     * 
+ * + * int64 size = 5; + * @return The size. + */ + public long getSize() { + return size_; + } + + 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 (!getChecksumBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, checksum_); + } + if (!getHostBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, host_); + } + if (!getArchiveFileNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, archiveFileName_); + } + if (!getUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, url_); + } + if (size_ != 0L) { + output.writeInt64(5, size_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getChecksumBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, checksum_); + } + if (!getHostBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, host_); + } + if (!getArchiveFileNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, archiveFileName_); + } + if (!getUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, url_); + } + if (size_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(5, size_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Board.Systems)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Board.Systems other = (cc.arduino.cli.commands.Board.Systems) obj; + + if (!getChecksum() + .equals(other.getChecksum())) return false; + if (!getHost() + .equals(other.getHost())) return false; + if (!getArchiveFileName() + .equals(other.getArchiveFileName())) return false; + if (!getUrl() + .equals(other.getUrl())) return false; + if (getSize() + != other.getSize()) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + CHECKSUM_FIELD_NUMBER; + hash = (53 * hash) + getChecksum().hashCode(); + hash = (37 * hash) + HOST_FIELD_NUMBER; + hash = (53 * hash) + getHost().hashCode(); + hash = (37 * hash) + ARCHIVEFILENAME_FIELD_NUMBER; + hash = (53 * hash) + getArchiveFileName().hashCode(); + hash = (37 * hash) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + hash = (37 * hash) + SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSize()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Board.Systems parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.Systems parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.Systems parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.Systems parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.Systems parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.Systems parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.Systems parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.Systems parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.Systems parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.Systems parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.Systems parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.Systems parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Board.Systems 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.Systems} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.Systems) + cc.arduino.cli.commands.Board.SystemsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_Systems_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_Systems_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Board.Systems.class, cc.arduino.cli.commands.Board.Systems.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Board.Systems.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + checksum_ = ""; + + host_ = ""; + + archiveFileName_ = ""; + + url_ = ""; + + size_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_Systems_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.Systems getDefaultInstanceForType() { + return cc.arduino.cli.commands.Board.Systems.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.Systems build() { + cc.arduino.cli.commands.Board.Systems result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.Systems buildPartial() { + cc.arduino.cli.commands.Board.Systems result = new cc.arduino.cli.commands.Board.Systems(this); + result.checksum_ = checksum_; + result.host_ = host_; + result.archiveFileName_ = archiveFileName_; + result.url_ = url_; + result.size_ = size_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Board.Systems) { + return mergeFrom((cc.arduino.cli.commands.Board.Systems)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Board.Systems other) { + if (other == cc.arduino.cli.commands.Board.Systems.getDefaultInstance()) return this; + if (!other.getChecksum().isEmpty()) { + checksum_ = other.checksum_; + onChanged(); + } + if (!other.getHost().isEmpty()) { + host_ = other.host_; + onChanged(); + } + if (!other.getArchiveFileName().isEmpty()) { + archiveFileName_ = other.archiveFileName_; + onChanged(); + } + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + onChanged(); + } + if (other.getSize() != 0L) { + setSize(other.getSize()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Board.Systems parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Board.Systems) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object checksum_ = ""; + /** + *
+       * Checksum of the tool archive.
+       * 
+ * + * string checksum = 1; + * @return The checksum. + */ + public java.lang.String getChecksum() { + java.lang.Object ref = checksum_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + checksum_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Checksum of the tool archive.
+       * 
+ * + * string checksum = 1; + * @return The bytes for checksum. + */ + public com.google.protobuf.ByteString + getChecksumBytes() { + java.lang.Object ref = checksum_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + checksum_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Checksum of the tool archive.
+       * 
+ * + * string checksum = 1; + * @param value The checksum to set. + * @return This builder for chaining. + */ + public Builder setChecksum( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + checksum_ = value; + onChanged(); + return this; + } + /** + *
+       * Checksum of the tool archive.
+       * 
+ * + * string checksum = 1; + * @return This builder for chaining. + */ + public Builder clearChecksum() { + + checksum_ = getDefaultInstance().getChecksum(); + onChanged(); + return this; + } + /** + *
+       * Checksum of the tool archive.
+       * 
+ * + * string checksum = 1; + * @param value The bytes for checksum to set. + * @return This builder for chaining. + */ + public Builder setChecksumBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + checksum_ = value; + onChanged(); + return this; + } + + private java.lang.Object host_ = ""; + /** + *
+       * Operating system identifier.
+       * 
+ * + * string host = 2; + * @return The host. + */ + public java.lang.String getHost() { + java.lang.Object ref = host_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + host_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Operating system identifier.
+       * 
+ * + * string host = 2; + * @return The bytes for host. + */ + public com.google.protobuf.ByteString + getHostBytes() { + java.lang.Object ref = host_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + host_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Operating system identifier.
+       * 
+ * + * string host = 2; + * @param value The host to set. + * @return This builder for chaining. + */ + public Builder setHost( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + host_ = value; + onChanged(); + return this; + } + /** + *
+       * Operating system identifier.
+       * 
+ * + * string host = 2; + * @return This builder for chaining. + */ + public Builder clearHost() { + + host_ = getDefaultInstance().getHost(); + onChanged(); + return this; + } + /** + *
+       * Operating system identifier.
+       * 
+ * + * string host = 2; + * @param value The bytes for host to set. + * @return This builder for chaining. + */ + public Builder setHostBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + host_ = value; + onChanged(); + return this; + } + + private java.lang.Object archiveFileName_ = ""; + /** + *
+       * File name of the tool archive.
+       * 
+ * + * string archiveFileName = 3; + * @return The archiveFileName. + */ + public java.lang.String getArchiveFileName() { + java.lang.Object ref = archiveFileName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + archiveFileName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * File name of the tool archive.
+       * 
+ * + * string archiveFileName = 3; + * @return The bytes for archiveFileName. + */ + public com.google.protobuf.ByteString + getArchiveFileNameBytes() { + java.lang.Object ref = archiveFileName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + archiveFileName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * File name of the tool archive.
+       * 
+ * + * string archiveFileName = 3; + * @param value The archiveFileName to set. + * @return This builder for chaining. + */ + public Builder setArchiveFileName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + archiveFileName_ = value; + onChanged(); + return this; + } + /** + *
+       * File name of the tool archive.
+       * 
+ * + * string archiveFileName = 3; + * @return This builder for chaining. + */ + public Builder clearArchiveFileName() { + + archiveFileName_ = getDefaultInstance().getArchiveFileName(); + onChanged(); + return this; + } + /** + *
+       * File name of the tool archive.
+       * 
+ * + * string archiveFileName = 3; + * @param value The bytes for archiveFileName to set. + * @return This builder for chaining. + */ + public Builder setArchiveFileNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + archiveFileName_ = value; + onChanged(); + return this; + } + + private java.lang.Object url_ = ""; + /** + *
+       * Download URL of the tool archive.
+       * 
+ * + * string url = 4; + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Download URL of the tool archive.
+       * 
+ * + * string url = 4; + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Download URL of the tool archive.
+       * 
+ * + * string url = 4; + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + url_ = value; + onChanged(); + return this; + } + /** + *
+       * Download URL of the tool archive.
+       * 
+ * + * string url = 4; + * @return This builder for chaining. + */ + public Builder clearUrl() { + + url_ = getDefaultInstance().getUrl(); + onChanged(); + return this; + } + /** + *
+       * Download URL of the tool archive.
+       * 
+ * + * string url = 4; + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + url_ = value; + onChanged(); + return this; + } + + private long size_ ; + /** + *
+       * File size of the tool archive.
+       * 
+ * + * int64 size = 5; + * @return The size. + */ + public long getSize() { + return size_; + } + /** + *
+       * File size of the tool archive.
+       * 
+ * + * int64 size = 5; + * @param value The size to set. + * @return This builder for chaining. + */ + public Builder setSize(long value) { + + size_ = value; + onChanged(); + return this; + } + /** + *
+       * File size of the tool archive.
+       * 
+ * + * int64 size = 5; + * @return This builder for chaining. + */ + public Builder clearSize() { + + size_ = 0L; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.Systems) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.Systems) + private static final cc.arduino.cli.commands.Board.Systems DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Board.Systems(); + } + + public static cc.arduino.cli.commands.Board.Systems getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Systems parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Systems(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.Systems getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ConfigOptionOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.ConfigOption) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * ID of the configuration option. For identifying the option to machines.
+     * 
+ * + * string option = 1; + * @return The option. + */ + java.lang.String getOption(); + /** + *
+     * ID of the configuration option. For identifying the option to machines.
+     * 
+ * + * string option = 1; + * @return The bytes for option. + */ + com.google.protobuf.ByteString + getOptionBytes(); + + /** + *
+     * Name of the configuration option for identifying the option to humans.
+     * 
+ * + * string option_label = 2; + * @return The optionLabel. + */ + java.lang.String getOptionLabel(); + /** + *
+     * Name of the configuration option for identifying the option to humans.
+     * 
+ * + * string option_label = 2; + * @return The bytes for optionLabel. + */ + com.google.protobuf.ByteString + getOptionLabelBytes(); + + /** + *
+     * Possible values of the configuration option.
+     * 
+ * + * repeated .cc.arduino.cli.commands.ConfigValue values = 3; + */ + java.util.List + getValuesList(); + /** + *
+     * Possible values of the configuration option.
+     * 
+ * + * repeated .cc.arduino.cli.commands.ConfigValue values = 3; + */ + cc.arduino.cli.commands.Board.ConfigValue getValues(int index); + /** + *
+     * Possible values of the configuration option.
+     * 
+ * + * repeated .cc.arduino.cli.commands.ConfigValue values = 3; + */ + int getValuesCount(); + /** + *
+     * Possible values of the configuration option.
+     * 
+ * + * repeated .cc.arduino.cli.commands.ConfigValue values = 3; + */ + java.util.List + getValuesOrBuilderList(); + /** + *
+     * Possible values of the configuration option.
+     * 
+ * + * repeated .cc.arduino.cli.commands.ConfigValue values = 3; + */ + cc.arduino.cli.commands.Board.ConfigValueOrBuilder getValuesOrBuilder( + int index); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.ConfigOption} + */ + public static final class ConfigOption extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.ConfigOption) + ConfigOptionOrBuilder { + private static final long serialVersionUID = 0L; + // Use ConfigOption.newBuilder() to construct. + private ConfigOption(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ConfigOption() { + option_ = ""; + optionLabel_ = ""; + values_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ConfigOption(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ConfigOption( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + option_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + optionLabel_ = s; + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + values_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + values_.add( + input.readMessage(cc.arduino.cli.commands.Board.ConfigValue.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + values_ = java.util.Collections.unmodifiableList(values_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_ConfigOption_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_ConfigOption_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Board.ConfigOption.class, cc.arduino.cli.commands.Board.ConfigOption.Builder.class); + } + + public static final int OPTION_FIELD_NUMBER = 1; + private volatile java.lang.Object option_; + /** + *
+     * ID of the configuration option. For identifying the option to machines.
+     * 
+ * + * string option = 1; + * @return The option. + */ + public java.lang.String getOption() { + java.lang.Object ref = option_; + 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(); + option_ = s; + return s; + } + } + /** + *
+     * ID of the configuration option. For identifying the option to machines.
+     * 
+ * + * string option = 1; + * @return The bytes for option. + */ + public com.google.protobuf.ByteString + getOptionBytes() { + java.lang.Object ref = option_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + option_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OPTION_LABEL_FIELD_NUMBER = 2; + private volatile java.lang.Object optionLabel_; + /** + *
+     * Name of the configuration option for identifying the option to humans.
+     * 
+ * + * string option_label = 2; + * @return The optionLabel. + */ + public java.lang.String getOptionLabel() { + java.lang.Object ref = optionLabel_; + 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(); + optionLabel_ = s; + return s; + } + } + /** + *
+     * Name of the configuration option for identifying the option to humans.
+     * 
+ * + * string option_label = 2; + * @return The bytes for optionLabel. + */ + public com.google.protobuf.ByteString + getOptionLabelBytes() { + java.lang.Object ref = optionLabel_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + optionLabel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUES_FIELD_NUMBER = 3; + private java.util.List values_; + /** + *
+     * Possible values of the configuration option.
+     * 
+ * + * repeated .cc.arduino.cli.commands.ConfigValue values = 3; + */ + public java.util.List getValuesList() { + return values_; + } + /** + *
+     * Possible values of the configuration option.
+     * 
+ * + * repeated .cc.arduino.cli.commands.ConfigValue values = 3; + */ + public java.util.List + getValuesOrBuilderList() { + return values_; + } + /** + *
+     * Possible values of the configuration option.
+     * 
+ * + * repeated .cc.arduino.cli.commands.ConfigValue values = 3; + */ + public int getValuesCount() { + return values_.size(); + } + /** + *
+     * Possible values of the configuration option.
+     * 
+ * + * repeated .cc.arduino.cli.commands.ConfigValue values = 3; + */ + public cc.arduino.cli.commands.Board.ConfigValue getValues(int index) { + return values_.get(index); + } + /** + *
+     * Possible values of the configuration option.
+     * 
+ * + * repeated .cc.arduino.cli.commands.ConfigValue values = 3; + */ + public cc.arduino.cli.commands.Board.ConfigValueOrBuilder getValuesOrBuilder( + int index) { + return values_.get(index); + } + + 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 (!getOptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, option_); + } + if (!getOptionLabelBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, optionLabel_); + } + for (int i = 0; i < values_.size(); i++) { + output.writeMessage(3, values_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getOptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, option_); + } + if (!getOptionLabelBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, optionLabel_); + } + for (int i = 0; i < values_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, values_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Board.ConfigOption)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Board.ConfigOption other = (cc.arduino.cli.commands.Board.ConfigOption) obj; + + if (!getOption() + .equals(other.getOption())) return false; + if (!getOptionLabel() + .equals(other.getOptionLabel())) return false; + if (!getValuesList() + .equals(other.getValuesList())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + OPTION_FIELD_NUMBER; + hash = (53 * hash) + getOption().hashCode(); + hash = (37 * hash) + OPTION_LABEL_FIELD_NUMBER; + hash = (53 * hash) + getOptionLabel().hashCode(); + if (getValuesCount() > 0) { + hash = (37 * hash) + VALUES_FIELD_NUMBER; + hash = (53 * hash) + getValuesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Board.ConfigOption parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.ConfigOption parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.ConfigOption parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.ConfigOption parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.ConfigOption parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.ConfigOption parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.ConfigOption parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.ConfigOption parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.ConfigOption parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.ConfigOption parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.ConfigOption parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.ConfigOption parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Board.ConfigOption 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.ConfigOption} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.ConfigOption) + cc.arduino.cli.commands.Board.ConfigOptionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_ConfigOption_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_ConfigOption_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Board.ConfigOption.class, cc.arduino.cli.commands.Board.ConfigOption.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Board.ConfigOption.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getValuesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + option_ = ""; + + optionLabel_ = ""; + + if (valuesBuilder_ == null) { + values_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + valuesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_ConfigOption_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.ConfigOption getDefaultInstanceForType() { + return cc.arduino.cli.commands.Board.ConfigOption.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.ConfigOption build() { + cc.arduino.cli.commands.Board.ConfigOption result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.ConfigOption buildPartial() { + cc.arduino.cli.commands.Board.ConfigOption result = new cc.arduino.cli.commands.Board.ConfigOption(this); + int from_bitField0_ = bitField0_; + result.option_ = option_; + result.optionLabel_ = optionLabel_; + if (valuesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + values_ = java.util.Collections.unmodifiableList(values_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.values_ = values_; + } else { + result.values_ = valuesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Board.ConfigOption) { + return mergeFrom((cc.arduino.cli.commands.Board.ConfigOption)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Board.ConfigOption other) { + if (other == cc.arduino.cli.commands.Board.ConfigOption.getDefaultInstance()) return this; + if (!other.getOption().isEmpty()) { + option_ = other.option_; + onChanged(); + } + if (!other.getOptionLabel().isEmpty()) { + optionLabel_ = other.optionLabel_; + onChanged(); + } + if (valuesBuilder_ == null) { + if (!other.values_.isEmpty()) { + if (values_.isEmpty()) { + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureValuesIsMutable(); + values_.addAll(other.values_); + } + onChanged(); + } + } else { + if (!other.values_.isEmpty()) { + if (valuesBuilder_.isEmpty()) { + valuesBuilder_.dispose(); + valuesBuilder_ = null; + values_ = other.values_; + bitField0_ = (bitField0_ & ~0x00000001); + valuesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getValuesFieldBuilder() : null; + } else { + valuesBuilder_.addAllMessages(other.values_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Board.ConfigOption parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Board.ConfigOption) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object option_ = ""; + /** + *
+       * ID of the configuration option. For identifying the option to machines.
+       * 
+ * + * string option = 1; + * @return The option. + */ + public java.lang.String getOption() { + java.lang.Object ref = option_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + option_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * ID of the configuration option. For identifying the option to machines.
+       * 
+ * + * string option = 1; + * @return The bytes for option. + */ + public com.google.protobuf.ByteString + getOptionBytes() { + java.lang.Object ref = option_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + option_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * ID of the configuration option. For identifying the option to machines.
+       * 
+ * + * string option = 1; + * @param value The option to set. + * @return This builder for chaining. + */ + public Builder setOption( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + option_ = value; + onChanged(); + return this; + } + /** + *
+       * ID of the configuration option. For identifying the option to machines.
+       * 
+ * + * string option = 1; + * @return This builder for chaining. + */ + public Builder clearOption() { + + option_ = getDefaultInstance().getOption(); + onChanged(); + return this; + } + /** + *
+       * ID of the configuration option. For identifying the option to machines.
+       * 
+ * + * string option = 1; + * @param value The bytes for option to set. + * @return This builder for chaining. + */ + public Builder setOptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + option_ = value; + onChanged(); + return this; + } + + private java.lang.Object optionLabel_ = ""; + /** + *
+       * Name of the configuration option for identifying the option to humans.
+       * 
+ * + * string option_label = 2; + * @return The optionLabel. + */ + public java.lang.String getOptionLabel() { + java.lang.Object ref = optionLabel_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + optionLabel_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Name of the configuration option for identifying the option to humans.
+       * 
+ * + * string option_label = 2; + * @return The bytes for optionLabel. + */ + public com.google.protobuf.ByteString + getOptionLabelBytes() { + java.lang.Object ref = optionLabel_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + optionLabel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Name of the configuration option for identifying the option to humans.
+       * 
+ * + * string option_label = 2; + * @param value The optionLabel to set. + * @return This builder for chaining. + */ + public Builder setOptionLabel( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + optionLabel_ = value; + onChanged(); + return this; + } + /** + *
+       * Name of the configuration option for identifying the option to humans.
+       * 
+ * + * string option_label = 2; + * @return This builder for chaining. + */ + public Builder clearOptionLabel() { + + optionLabel_ = getDefaultInstance().getOptionLabel(); + onChanged(); + return this; + } + /** + *
+       * Name of the configuration option for identifying the option to humans.
+       * 
+ * + * string option_label = 2; + * @param value The bytes for optionLabel to set. + * @return This builder for chaining. + */ + public Builder setOptionLabelBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + optionLabel_ = value; + onChanged(); + return this; + } + + private java.util.List values_ = + java.util.Collections.emptyList(); + private void ensureValuesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + values_ = new java.util.ArrayList(values_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Board.ConfigValue, cc.arduino.cli.commands.Board.ConfigValue.Builder, cc.arduino.cli.commands.Board.ConfigValueOrBuilder> valuesBuilder_; + + /** + *
+       * Possible values of the configuration option.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ConfigValue values = 3; + */ + public java.util.List getValuesList() { + if (valuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(values_); + } else { + return valuesBuilder_.getMessageList(); + } + } + /** + *
+       * Possible values of the configuration option.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ConfigValue values = 3; + */ + public int getValuesCount() { + if (valuesBuilder_ == null) { + return values_.size(); + } else { + return valuesBuilder_.getCount(); + } + } + /** + *
+       * Possible values of the configuration option.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ConfigValue values = 3; + */ + public cc.arduino.cli.commands.Board.ConfigValue getValues(int index) { + if (valuesBuilder_ == null) { + return values_.get(index); + } else { + return valuesBuilder_.getMessage(index); + } + } + /** + *
+       * Possible values of the configuration option.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ConfigValue values = 3; + */ + public Builder setValues( + int index, cc.arduino.cli.commands.Board.ConfigValue value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.set(index, value); + onChanged(); + } else { + valuesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Possible values of the configuration option.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ConfigValue values = 3; + */ + public Builder setValues( + int index, cc.arduino.cli.commands.Board.ConfigValue.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.set(index, builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Possible values of the configuration option.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ConfigValue values = 3; + */ + public Builder addValues(cc.arduino.cli.commands.Board.ConfigValue value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(value); + onChanged(); + } else { + valuesBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Possible values of the configuration option.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ConfigValue values = 3; + */ + public Builder addValues( + int index, cc.arduino.cli.commands.Board.ConfigValue value) { + if (valuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureValuesIsMutable(); + values_.add(index, value); + onChanged(); + } else { + valuesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Possible values of the configuration option.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ConfigValue values = 3; + */ + public Builder addValues( + cc.arduino.cli.commands.Board.ConfigValue.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Possible values of the configuration option.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ConfigValue values = 3; + */ + public Builder addValues( + int index, cc.arduino.cli.commands.Board.ConfigValue.Builder builderForValue) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(index, builderForValue.build()); + onChanged(); + } else { + valuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Possible values of the configuration option.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ConfigValue values = 3; + */ + public Builder addAllValues( + java.lang.Iterable values) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, values_); + onChanged(); + } else { + valuesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Possible values of the configuration option.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ConfigValue values = 3; + */ + public Builder clearValues() { + if (valuesBuilder_ == null) { + values_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + valuesBuilder_.clear(); + } + return this; + } + /** + *
+       * Possible values of the configuration option.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ConfigValue values = 3; + */ + public Builder removeValues(int index) { + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.remove(index); + onChanged(); + } else { + valuesBuilder_.remove(index); + } + return this; + } + /** + *
+       * Possible values of the configuration option.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ConfigValue values = 3; + */ + public cc.arduino.cli.commands.Board.ConfigValue.Builder getValuesBuilder( + int index) { + return getValuesFieldBuilder().getBuilder(index); + } + /** + *
+       * Possible values of the configuration option.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ConfigValue values = 3; + */ + public cc.arduino.cli.commands.Board.ConfigValueOrBuilder getValuesOrBuilder( + int index) { + if (valuesBuilder_ == null) { + return values_.get(index); } else { + return valuesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Possible values of the configuration option.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ConfigValue values = 3; + */ + public java.util.List + getValuesOrBuilderList() { + if (valuesBuilder_ != null) { + return valuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(values_); + } + } + /** + *
+       * Possible values of the configuration option.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ConfigValue values = 3; + */ + public cc.arduino.cli.commands.Board.ConfigValue.Builder addValuesBuilder() { + return getValuesFieldBuilder().addBuilder( + cc.arduino.cli.commands.Board.ConfigValue.getDefaultInstance()); + } + /** + *
+       * Possible values of the configuration option.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ConfigValue values = 3; + */ + public cc.arduino.cli.commands.Board.ConfigValue.Builder addValuesBuilder( + int index) { + return getValuesFieldBuilder().addBuilder( + index, cc.arduino.cli.commands.Board.ConfigValue.getDefaultInstance()); + } + /** + *
+       * Possible values of the configuration option.
+       * 
+ * + * repeated .cc.arduino.cli.commands.ConfigValue values = 3; + */ + public java.util.List + getValuesBuilderList() { + return getValuesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Board.ConfigValue, cc.arduino.cli.commands.Board.ConfigValue.Builder, cc.arduino.cli.commands.Board.ConfigValueOrBuilder> + getValuesFieldBuilder() { + if (valuesBuilder_ == null) { + valuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Board.ConfigValue, cc.arduino.cli.commands.Board.ConfigValue.Builder, cc.arduino.cli.commands.Board.ConfigValueOrBuilder>( + values_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + values_ = null; + } + return valuesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.ConfigOption) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.ConfigOption) + private static final cc.arduino.cli.commands.Board.ConfigOption DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Board.ConfigOption(); + } + + public static cc.arduino.cli.commands.Board.ConfigOption getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConfigOption parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ConfigOption(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.ConfigOption getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ConfigValueOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.ConfigValue) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The configuration option value.
+     * 
+ * + * string value = 1; + * @return The value. + */ + java.lang.String getValue(); + /** + *
+     * The configuration option value.
+     * 
+ * + * string value = 1; + * @return The bytes for value. + */ + com.google.protobuf.ByteString + getValueBytes(); + + /** + *
+     * Label to identify the configuration option to humans.
+     * 
+ * + * string value_label = 2; + * @return The valueLabel. + */ + java.lang.String getValueLabel(); + /** + *
+     * Label to identify the configuration option to humans.
+     * 
+ * + * string value_label = 2; + * @return The bytes for valueLabel. + */ + com.google.protobuf.ByteString + getValueLabelBytes(); + + /** + *
+     * Whether the configuration option is selected.
+     * 
+ * + * bool selected = 3; + * @return The selected. + */ + boolean getSelected(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.ConfigValue} + */ + public static final class ConfigValue extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.ConfigValue) + ConfigValueOrBuilder { + private static final long serialVersionUID = 0L; + // Use ConfigValue.newBuilder() to construct. + private ConfigValue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ConfigValue() { + value_ = ""; + valueLabel_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ConfigValue(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ConfigValue( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + value_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + valueLabel_ = s; + break; + } + case 24: { + + selected_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_ConfigValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_ConfigValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Board.ConfigValue.class, cc.arduino.cli.commands.Board.ConfigValue.Builder.class); + } + + public static final int VALUE_FIELD_NUMBER = 1; + private volatile java.lang.Object value_; + /** + *
+     * The configuration option value.
+     * 
+ * + * string value = 1; + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + 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(); + value_ = s; + return s; + } + } + /** + *
+     * The configuration option value.
+     * 
+ * + * string value = 1; + * @return The bytes for value. + */ + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_LABEL_FIELD_NUMBER = 2; + private volatile java.lang.Object valueLabel_; + /** + *
+     * Label to identify the configuration option to humans.
+     * 
+ * + * string value_label = 2; + * @return The valueLabel. + */ + public java.lang.String getValueLabel() { + java.lang.Object ref = valueLabel_; + 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(); + valueLabel_ = s; + return s; + } + } + /** + *
+     * Label to identify the configuration option to humans.
+     * 
+ * + * string value_label = 2; + * @return The bytes for valueLabel. + */ + public com.google.protobuf.ByteString + getValueLabelBytes() { + java.lang.Object ref = valueLabel_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + valueLabel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SELECTED_FIELD_NUMBER = 3; + private boolean selected_; + /** + *
+     * Whether the configuration option is selected.
+     * 
+ * + * bool selected = 3; + * @return The selected. + */ + public boolean getSelected() { + return selected_; + } + + 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 (!getValueBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, value_); + } + if (!getValueLabelBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, valueLabel_); + } + if (selected_ != false) { + output.writeBool(3, selected_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getValueBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, value_); + } + if (!getValueLabelBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, valueLabel_); + } + if (selected_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, selected_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Board.ConfigValue)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Board.ConfigValue other = (cc.arduino.cli.commands.Board.ConfigValue) obj; + + if (!getValue() + .equals(other.getValue())) return false; + if (!getValueLabel() + .equals(other.getValueLabel())) return false; + if (getSelected() + != other.getSelected()) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + hash = (37 * hash) + VALUE_LABEL_FIELD_NUMBER; + hash = (53 * hash) + getValueLabel().hashCode(); + hash = (37 * hash) + SELECTED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getSelected()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Board.ConfigValue parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.ConfigValue parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.ConfigValue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.ConfigValue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.ConfigValue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.ConfigValue parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.ConfigValue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.ConfigValue parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.ConfigValue parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.ConfigValue parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.ConfigValue parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.ConfigValue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Board.ConfigValue 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.ConfigValue} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.ConfigValue) + cc.arduino.cli.commands.Board.ConfigValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_ConfigValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_ConfigValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Board.ConfigValue.class, cc.arduino.cli.commands.Board.ConfigValue.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Board.ConfigValue.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + value_ = ""; + + valueLabel_ = ""; + + selected_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_ConfigValue_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.ConfigValue getDefaultInstanceForType() { + return cc.arduino.cli.commands.Board.ConfigValue.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.ConfigValue build() { + cc.arduino.cli.commands.Board.ConfigValue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.ConfigValue buildPartial() { + cc.arduino.cli.commands.Board.ConfigValue result = new cc.arduino.cli.commands.Board.ConfigValue(this); + result.value_ = value_; + result.valueLabel_ = valueLabel_; + result.selected_ = selected_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Board.ConfigValue) { + return mergeFrom((cc.arduino.cli.commands.Board.ConfigValue)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Board.ConfigValue other) { + if (other == cc.arduino.cli.commands.Board.ConfigValue.getDefaultInstance()) return this; + if (!other.getValue().isEmpty()) { + value_ = other.value_; + onChanged(); + } + if (!other.getValueLabel().isEmpty()) { + valueLabel_ = other.valueLabel_; + onChanged(); + } + if (other.getSelected() != false) { + setSelected(other.getSelected()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Board.ConfigValue parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Board.ConfigValue) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object value_ = ""; + /** + *
+       * The configuration option value.
+       * 
+ * + * string value = 1; + * @return The value. + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The configuration option value.
+       * 
+ * + * string value = 1; + * @return The bytes for value. + */ + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The configuration option value.
+       * 
+ * + * string value = 1; + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + value_ = value; + onChanged(); + return this; + } + /** + *
+       * The configuration option value.
+       * 
+ * + * string value = 1; + * @return This builder for chaining. + */ + public Builder clearValue() { + + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + /** + *
+       * The configuration option value.
+       * 
+ * + * string value = 1; + * @param value The bytes for value to set. + * @return This builder for chaining. + */ + public Builder setValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + value_ = value; + onChanged(); + return this; + } + + private java.lang.Object valueLabel_ = ""; + /** + *
+       * Label to identify the configuration option to humans.
+       * 
+ * + * string value_label = 2; + * @return The valueLabel. + */ + public java.lang.String getValueLabel() { + java.lang.Object ref = valueLabel_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + valueLabel_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Label to identify the configuration option to humans.
+       * 
+ * + * string value_label = 2; + * @return The bytes for valueLabel. + */ + public com.google.protobuf.ByteString + getValueLabelBytes() { + java.lang.Object ref = valueLabel_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + valueLabel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Label to identify the configuration option to humans.
+       * 
+ * + * string value_label = 2; + * @param value The valueLabel to set. + * @return This builder for chaining. + */ + public Builder setValueLabel( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + valueLabel_ = value; + onChanged(); + return this; + } + /** + *
+       * Label to identify the configuration option to humans.
+       * 
+ * + * string value_label = 2; + * @return This builder for chaining. + */ + public Builder clearValueLabel() { + + valueLabel_ = getDefaultInstance().getValueLabel(); + onChanged(); + return this; + } + /** + *
+       * Label to identify the configuration option to humans.
+       * 
+ * + * string value_label = 2; + * @param value The bytes for valueLabel to set. + * @return This builder for chaining. + */ + public Builder setValueLabelBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + valueLabel_ = value; + onChanged(); + return this; + } + + private boolean selected_ ; + /** + *
+       * Whether the configuration option is selected.
+       * 
+ * + * bool selected = 3; + * @return The selected. + */ + public boolean getSelected() { + return selected_; + } + /** + *
+       * Whether the configuration option is selected.
+       * 
+ * + * bool selected = 3; + * @param value The selected to set. + * @return This builder for chaining. + */ + public Builder setSelected(boolean value) { + + selected_ = value; + onChanged(); + return this; + } + /** + *
+       * Whether the configuration option is selected.
+       * 
+ * + * bool selected = 3; + * @return This builder for chaining. + */ + public Builder clearSelected() { + + selected_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.ConfigValue) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.ConfigValue) + private static final cc.arduino.cli.commands.Board.ConfigValue DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Board.ConfigValue(); + } + + public static cc.arduino.cli.commands.Board.ConfigValue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConfigValue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ConfigValue(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.ConfigValue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface BoardAttachReqOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.BoardAttachReq) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + boolean hasInstance(); + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + cc.arduino.cli.commands.Common.Instance getInstance(); + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder(); + + /** + *
+     * The board's URI (e.g., /dev/ttyACM0).
+     * 
+ * + * string board_uri = 2; + * @return The boardUri. + */ + java.lang.String getBoardUri(); + /** + *
+     * The board's URI (e.g., /dev/ttyACM0).
+     * 
+ * + * string board_uri = 2; + * @return The bytes for boardUri. + */ + com.google.protobuf.ByteString + getBoardUriBytes(); + + /** + *
+     * Path of the sketch to attach the board to. The board attachment
+     * metadata will be saved to `{sketch_path}/sketch.json`.
+     * 
+ * + * string sketch_path = 3; + * @return The sketchPath. + */ + java.lang.String getSketchPath(); + /** + *
+     * Path of the sketch to attach the board to. The board attachment
+     * metadata will be saved to `{sketch_path}/sketch.json`.
+     * 
+ * + * string sketch_path = 3; + * @return The bytes for sketchPath. + */ + com.google.protobuf.ByteString + getSketchPathBytes(); + + /** + *
+     * Duration in seconds to search the given URI for a connected board before
+     * timing out. The default value is 5 seconds.
+     * 
+ * + * string search_timeout = 4; + * @return The searchTimeout. + */ + java.lang.String getSearchTimeout(); + /** + *
+     * Duration in seconds to search the given URI for a connected board before
+     * timing out. The default value is 5 seconds.
+     * 
+ * + * string search_timeout = 4; + * @return The bytes for searchTimeout. + */ + com.google.protobuf.ByteString + getSearchTimeoutBytes(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.BoardAttachReq} + */ + public static final class BoardAttachReq extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.BoardAttachReq) + BoardAttachReqOrBuilder { + private static final long serialVersionUID = 0L; + // Use BoardAttachReq.newBuilder() to construct. + private BoardAttachReq(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BoardAttachReq() { + boardUri_ = ""; + sketchPath_ = ""; + searchTimeout_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BoardAttachReq(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BoardAttachReq( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cc.arduino.cli.commands.Common.Instance.Builder subBuilder = null; + if (instance_ != null) { + subBuilder = instance_.toBuilder(); + } + instance_ = input.readMessage(cc.arduino.cli.commands.Common.Instance.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instance_); + instance_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + boardUri_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + sketchPath_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + searchTimeout_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardAttachReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardAttachReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Board.BoardAttachReq.class, cc.arduino.cli.commands.Board.BoardAttachReq.Builder.class); + } + + public static final int INSTANCE_FIELD_NUMBER = 1; + private cc.arduino.cli.commands.Common.Instance instance_; + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instance_ != null; + } + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + return getInstance(); + } + + public static final int BOARD_URI_FIELD_NUMBER = 2; + private volatile java.lang.Object boardUri_; + /** + *
+     * The board's URI (e.g., /dev/ttyACM0).
+     * 
+ * + * string board_uri = 2; + * @return The boardUri. + */ + public java.lang.String getBoardUri() { + java.lang.Object ref = boardUri_; + 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(); + boardUri_ = s; + return s; + } + } + /** + *
+     * The board's URI (e.g., /dev/ttyACM0).
+     * 
+ * + * string board_uri = 2; + * @return The bytes for boardUri. + */ + public com.google.protobuf.ByteString + getBoardUriBytes() { + java.lang.Object ref = boardUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + boardUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SKETCH_PATH_FIELD_NUMBER = 3; + private volatile java.lang.Object sketchPath_; + /** + *
+     * Path of the sketch to attach the board to. The board attachment
+     * metadata will be saved to `{sketch_path}/sketch.json`.
+     * 
+ * + * string sketch_path = 3; + * @return The sketchPath. + */ + public java.lang.String getSketchPath() { + java.lang.Object ref = sketchPath_; + 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(); + sketchPath_ = s; + return s; + } + } + /** + *
+     * Path of the sketch to attach the board to. The board attachment
+     * metadata will be saved to `{sketch_path}/sketch.json`.
+     * 
+ * + * string sketch_path = 3; + * @return The bytes for sketchPath. + */ + public com.google.protobuf.ByteString + getSketchPathBytes() { + java.lang.Object ref = sketchPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sketchPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SEARCH_TIMEOUT_FIELD_NUMBER = 4; + private volatile java.lang.Object searchTimeout_; + /** + *
+     * Duration in seconds to search the given URI for a connected board before
+     * timing out. The default value is 5 seconds.
+     * 
+ * + * string search_timeout = 4; + * @return The searchTimeout. + */ + public java.lang.String getSearchTimeout() { + java.lang.Object ref = searchTimeout_; + 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(); + searchTimeout_ = s; + return s; + } + } + /** + *
+     * Duration in seconds to search the given URI for a connected board before
+     * timing out. The default value is 5 seconds.
+     * 
+ * + * string search_timeout = 4; + * @return The bytes for searchTimeout. + */ + public com.google.protobuf.ByteString + getSearchTimeoutBytes() { + java.lang.Object ref = searchTimeout_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + searchTimeout_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (instance_ != null) { + output.writeMessage(1, getInstance()); + } + if (!getBoardUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, boardUri_); + } + if (!getSketchPathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, sketchPath_); + } + if (!getSearchTimeoutBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, searchTimeout_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (instance_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInstance()); + } + if (!getBoardUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, boardUri_); + } + if (!getSketchPathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, sketchPath_); + } + if (!getSearchTimeoutBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, searchTimeout_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Board.BoardAttachReq)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Board.BoardAttachReq other = (cc.arduino.cli.commands.Board.BoardAttachReq) obj; + + if (hasInstance() != other.hasInstance()) return false; + if (hasInstance()) { + if (!getInstance() + .equals(other.getInstance())) return false; + } + if (!getBoardUri() + .equals(other.getBoardUri())) return false; + if (!getSketchPath() + .equals(other.getSketchPath())) return false; + if (!getSearchTimeout() + .equals(other.getSearchTimeout())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInstance()) { + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + } + hash = (37 * hash) + BOARD_URI_FIELD_NUMBER; + hash = (53 * hash) + getBoardUri().hashCode(); + hash = (37 * hash) + SKETCH_PATH_FIELD_NUMBER; + hash = (53 * hash) + getSketchPath().hashCode(); + hash = (37 * hash) + SEARCH_TIMEOUT_FIELD_NUMBER; + hash = (53 * hash) + getSearchTimeout().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Board.BoardAttachReq parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.BoardAttachReq parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardAttachReq parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.BoardAttachReq parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardAttachReq parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.BoardAttachReq parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardAttachReq parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.BoardAttachReq parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardAttachReq parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.BoardAttachReq parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardAttachReq parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.BoardAttachReq parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Board.BoardAttachReq 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.BoardAttachReq} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.BoardAttachReq) + cc.arduino.cli.commands.Board.BoardAttachReqOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardAttachReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardAttachReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Board.BoardAttachReq.class, cc.arduino.cli.commands.Board.BoardAttachReq.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Board.BoardAttachReq.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (instanceBuilder_ == null) { + instance_ = null; + } else { + instance_ = null; + instanceBuilder_ = null; + } + boardUri_ = ""; + + sketchPath_ = ""; + + searchTimeout_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardAttachReq_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.BoardAttachReq getDefaultInstanceForType() { + return cc.arduino.cli.commands.Board.BoardAttachReq.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.BoardAttachReq build() { + cc.arduino.cli.commands.Board.BoardAttachReq result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.BoardAttachReq buildPartial() { + cc.arduino.cli.commands.Board.BoardAttachReq result = new cc.arduino.cli.commands.Board.BoardAttachReq(this); + if (instanceBuilder_ == null) { + result.instance_ = instance_; + } else { + result.instance_ = instanceBuilder_.build(); + } + result.boardUri_ = boardUri_; + result.sketchPath_ = sketchPath_; + result.searchTimeout_ = searchTimeout_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Board.BoardAttachReq) { + return mergeFrom((cc.arduino.cli.commands.Board.BoardAttachReq)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Board.BoardAttachReq other) { + if (other == cc.arduino.cli.commands.Board.BoardAttachReq.getDefaultInstance()) return this; + if (other.hasInstance()) { + mergeInstance(other.getInstance()); + } + if (!other.getBoardUri().isEmpty()) { + boardUri_ = other.boardUri_; + onChanged(); + } + if (!other.getSketchPath().isEmpty()) { + sketchPath_ = other.sketchPath_; + onChanged(); + } + if (!other.getSearchTimeout().isEmpty()) { + searchTimeout_ = other.searchTimeout_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Board.BoardAttachReq parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Board.BoardAttachReq) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private cc.arduino.cli.commands.Common.Instance instance_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> instanceBuilder_; + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instanceBuilder_ != null || instance_ != null; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + if (instanceBuilder_ == null) { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } else { + return instanceBuilder_.getMessage(); + } + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + onChanged(); + } else { + instanceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance( + cc.arduino.cli.commands.Common.Instance.Builder builderForValue) { + if (instanceBuilder_ == null) { + instance_ = builderForValue.build(); + onChanged(); + } else { + instanceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder mergeInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (instance_ != null) { + instance_ = + cc.arduino.cli.commands.Common.Instance.newBuilder(instance_).mergeFrom(value).buildPartial(); + } else { + instance_ = value; + } + onChanged(); + } else { + instanceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder clearInstance() { + if (instanceBuilder_ == null) { + instance_ = null; + onChanged(); + } else { + instance_ = null; + instanceBuilder_ = null; + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.Instance.Builder getInstanceBuilder() { + + onChanged(); + return getInstanceFieldBuilder().getBuilder(); + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + if (instanceBuilder_ != null) { + return instanceBuilder_.getMessageOrBuilder(); + } else { + return instance_ == null ? + cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> + getInstanceFieldBuilder() { + if (instanceBuilder_ == null) { + instanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder>( + getInstance(), + getParentForChildren(), + isClean()); + instance_ = null; + } + return instanceBuilder_; + } + + private java.lang.Object boardUri_ = ""; + /** + *
+       * The board's URI (e.g., /dev/ttyACM0).
+       * 
+ * + * string board_uri = 2; + * @return The boardUri. + */ + public java.lang.String getBoardUri() { + java.lang.Object ref = boardUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + boardUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The board's URI (e.g., /dev/ttyACM0).
+       * 
+ * + * string board_uri = 2; + * @return The bytes for boardUri. + */ + public com.google.protobuf.ByteString + getBoardUriBytes() { + java.lang.Object ref = boardUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + boardUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The board's URI (e.g., /dev/ttyACM0).
+       * 
+ * + * string board_uri = 2; + * @param value The boardUri to set. + * @return This builder for chaining. + */ + public Builder setBoardUri( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + boardUri_ = value; + onChanged(); + return this; + } + /** + *
+       * The board's URI (e.g., /dev/ttyACM0).
+       * 
+ * + * string board_uri = 2; + * @return This builder for chaining. + */ + public Builder clearBoardUri() { + + boardUri_ = getDefaultInstance().getBoardUri(); + onChanged(); + return this; + } + /** + *
+       * The board's URI (e.g., /dev/ttyACM0).
+       * 
+ * + * string board_uri = 2; + * @param value The bytes for boardUri to set. + * @return This builder for chaining. + */ + public Builder setBoardUriBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + boardUri_ = value; + onChanged(); + return this; + } + + private java.lang.Object sketchPath_ = ""; + /** + *
+       * Path of the sketch to attach the board to. The board attachment
+       * metadata will be saved to `{sketch_path}/sketch.json`.
+       * 
+ * + * string sketch_path = 3; + * @return The sketchPath. + */ + public java.lang.String getSketchPath() { + java.lang.Object ref = sketchPath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sketchPath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Path of the sketch to attach the board to. The board attachment
+       * metadata will be saved to `{sketch_path}/sketch.json`.
+       * 
+ * + * string sketch_path = 3; + * @return The bytes for sketchPath. + */ + public com.google.protobuf.ByteString + getSketchPathBytes() { + java.lang.Object ref = sketchPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sketchPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Path of the sketch to attach the board to. The board attachment
+       * metadata will be saved to `{sketch_path}/sketch.json`.
+       * 
+ * + * string sketch_path = 3; + * @param value The sketchPath to set. + * @return This builder for chaining. + */ + public Builder setSketchPath( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sketchPath_ = value; + onChanged(); + return this; + } + /** + *
+       * Path of the sketch to attach the board to. The board attachment
+       * metadata will be saved to `{sketch_path}/sketch.json`.
+       * 
+ * + * string sketch_path = 3; + * @return This builder for chaining. + */ + public Builder clearSketchPath() { + + sketchPath_ = getDefaultInstance().getSketchPath(); + onChanged(); + return this; + } + /** + *
+       * Path of the sketch to attach the board to. The board attachment
+       * metadata will be saved to `{sketch_path}/sketch.json`.
+       * 
+ * + * string sketch_path = 3; + * @param value The bytes for sketchPath to set. + * @return This builder for chaining. + */ + public Builder setSketchPathBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sketchPath_ = value; + onChanged(); + return this; + } + + private java.lang.Object searchTimeout_ = ""; + /** + *
+       * Duration in seconds to search the given URI for a connected board before
+       * timing out. The default value is 5 seconds.
+       * 
+ * + * string search_timeout = 4; + * @return The searchTimeout. + */ + public java.lang.String getSearchTimeout() { + java.lang.Object ref = searchTimeout_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + searchTimeout_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Duration in seconds to search the given URI for a connected board before
+       * timing out. The default value is 5 seconds.
+       * 
+ * + * string search_timeout = 4; + * @return The bytes for searchTimeout. + */ + public com.google.protobuf.ByteString + getSearchTimeoutBytes() { + java.lang.Object ref = searchTimeout_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + searchTimeout_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Duration in seconds to search the given URI for a connected board before
+       * timing out. The default value is 5 seconds.
+       * 
+ * + * string search_timeout = 4; + * @param value The searchTimeout to set. + * @return This builder for chaining. + */ + public Builder setSearchTimeout( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + searchTimeout_ = value; + onChanged(); + return this; + } + /** + *
+       * Duration in seconds to search the given URI for a connected board before
+       * timing out. The default value is 5 seconds.
+       * 
+ * + * string search_timeout = 4; + * @return This builder for chaining. + */ + public Builder clearSearchTimeout() { + + searchTimeout_ = getDefaultInstance().getSearchTimeout(); + onChanged(); + return this; + } + /** + *
+       * Duration in seconds to search the given URI for a connected board before
+       * timing out. The default value is 5 seconds.
+       * 
+ * + * string search_timeout = 4; + * @param value The bytes for searchTimeout to set. + * @return This builder for chaining. + */ + public Builder setSearchTimeoutBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + searchTimeout_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.BoardAttachReq) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.BoardAttachReq) + private static final cc.arduino.cli.commands.Board.BoardAttachReq DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Board.BoardAttachReq(); + } + + public static cc.arduino.cli.commands.Board.BoardAttachReq getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BoardAttachReq parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BoardAttachReq(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.BoardAttachReq getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface BoardAttachRespOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.BoardAttachResp) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Description of the current stage of the board attachment.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + * @return Whether the taskProgress field is set. + */ + boolean hasTaskProgress(); + /** + *
+     * Description of the current stage of the board attachment.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + * @return The taskProgress. + */ + cc.arduino.cli.commands.Common.TaskProgress getTaskProgress(); + /** + *
+     * Description of the current stage of the board attachment.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + */ + cc.arduino.cli.commands.Common.TaskProgressOrBuilder getTaskProgressOrBuilder(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.BoardAttachResp} + */ + public static final class BoardAttachResp extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.BoardAttachResp) + BoardAttachRespOrBuilder { + private static final long serialVersionUID = 0L; + // Use BoardAttachResp.newBuilder() to construct. + private BoardAttachResp(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BoardAttachResp() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BoardAttachResp(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BoardAttachResp( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + 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; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardAttachResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardAttachResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Board.BoardAttachResp.class, cc.arduino.cli.commands.Board.BoardAttachResp.Builder.class); + } + + public static final int TASK_PROGRESS_FIELD_NUMBER = 1; + private cc.arduino.cli.commands.Common.TaskProgress taskProgress_; + /** + *
+     * Description of the current stage of the board attachment.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + * @return Whether the taskProgress field is set. + */ + public boolean hasTaskProgress() { + return taskProgress_ != null; + } + /** + *
+     * Description of the current stage of the board attachment.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + * @return The taskProgress. + */ + public cc.arduino.cli.commands.Common.TaskProgress getTaskProgress() { + return taskProgress_ == null ? cc.arduino.cli.commands.Common.TaskProgress.getDefaultInstance() : taskProgress_; + } + /** + *
+     * Description of the current stage of the board attachment.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + */ + public cc.arduino.cli.commands.Common.TaskProgressOrBuilder getTaskProgressOrBuilder() { + return getTaskProgress(); + } + + 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 (taskProgress_ != null) { + output.writeMessage(1, getTaskProgress()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (taskProgress_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getTaskProgress()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Board.BoardAttachResp)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Board.BoardAttachResp other = (cc.arduino.cli.commands.Board.BoardAttachResp) obj; + + if (hasTaskProgress() != other.hasTaskProgress()) return false; + if (hasTaskProgress()) { + if (!getTaskProgress() + .equals(other.getTaskProgress())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTaskProgress()) { + hash = (37 * hash) + TASK_PROGRESS_FIELD_NUMBER; + hash = (53 * hash) + getTaskProgress().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Board.BoardAttachResp parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.BoardAttachResp parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardAttachResp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.BoardAttachResp parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardAttachResp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.BoardAttachResp parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardAttachResp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.BoardAttachResp parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardAttachResp parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.BoardAttachResp parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardAttachResp parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.BoardAttachResp parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Board.BoardAttachResp 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.BoardAttachResp} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.BoardAttachResp) + cc.arduino.cli.commands.Board.BoardAttachRespOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardAttachResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardAttachResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Board.BoardAttachResp.class, cc.arduino.cli.commands.Board.BoardAttachResp.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Board.BoardAttachResp.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (taskProgressBuilder_ == null) { + taskProgress_ = null; + } else { + taskProgress_ = null; + taskProgressBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardAttachResp_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.BoardAttachResp getDefaultInstanceForType() { + return cc.arduino.cli.commands.Board.BoardAttachResp.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.BoardAttachResp build() { + cc.arduino.cli.commands.Board.BoardAttachResp result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.BoardAttachResp buildPartial() { + cc.arduino.cli.commands.Board.BoardAttachResp result = new cc.arduino.cli.commands.Board.BoardAttachResp(this); + if (taskProgressBuilder_ == null) { + result.taskProgress_ = taskProgress_; + } else { + result.taskProgress_ = taskProgressBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Board.BoardAttachResp) { + return mergeFrom((cc.arduino.cli.commands.Board.BoardAttachResp)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Board.BoardAttachResp other) { + if (other == cc.arduino.cli.commands.Board.BoardAttachResp.getDefaultInstance()) return this; + if (other.hasTaskProgress()) { + mergeTaskProgress(other.getTaskProgress()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Board.BoardAttachResp parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Board.BoardAttachResp) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + 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_; + /** + *
+       * Description of the current stage of the board attachment.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + * @return Whether the taskProgress field is set. + */ + public boolean hasTaskProgress() { + return taskProgressBuilder_ != null || taskProgress_ != null; + } + /** + *
+       * Description of the current stage of the board attachment.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + * @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(); + } + } + /** + *
+       * Description of the current stage of the board attachment.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + */ + 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; + } + /** + *
+       * Description of the current stage of the board attachment.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + */ + 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; + } + /** + *
+       * Description of the current stage of the board attachment.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + */ + 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; + } + /** + *
+       * Description of the current stage of the board attachment.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + */ + public Builder clearTaskProgress() { + if (taskProgressBuilder_ == null) { + taskProgress_ = null; + onChanged(); + } else { + taskProgress_ = null; + taskProgressBuilder_ = null; + } + + return this; + } + /** + *
+       * Description of the current stage of the board attachment.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + */ + public cc.arduino.cli.commands.Common.TaskProgress.Builder getTaskProgressBuilder() { + + onChanged(); + return getTaskProgressFieldBuilder().getBuilder(); + } + /** + *
+       * Description of the current stage of the board attachment.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + */ + 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_; + } + } + /** + *
+       * Description of the current stage of the board attachment.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + */ + 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_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.BoardAttachResp) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.BoardAttachResp) + private static final cc.arduino.cli.commands.Board.BoardAttachResp DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Board.BoardAttachResp(); + } + + public static cc.arduino.cli.commands.Board.BoardAttachResp getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BoardAttachResp parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BoardAttachResp(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.BoardAttachResp getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface BoardListReqOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.BoardListReq) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + boolean hasInstance(); + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + cc.arduino.cli.commands.Common.Instance getInstance(); + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.BoardListReq} + */ + public static final class BoardListReq extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.BoardListReq) + BoardListReqOrBuilder { + private static final long serialVersionUID = 0L; + // Use BoardListReq.newBuilder() to construct. + private BoardListReq(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BoardListReq() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BoardListReq(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BoardListReq( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cc.arduino.cli.commands.Common.Instance.Builder subBuilder = null; + if (instance_ != null) { + subBuilder = instance_.toBuilder(); + } + instance_ = input.readMessage(cc.arduino.cli.commands.Common.Instance.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instance_); + instance_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardListReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardListReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Board.BoardListReq.class, cc.arduino.cli.commands.Board.BoardListReq.Builder.class); + } + + public static final int INSTANCE_FIELD_NUMBER = 1; + private cc.arduino.cli.commands.Common.Instance instance_; + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instance_ != null; + } + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + return getInstance(); + } + + 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 (instance_ != null) { + output.writeMessage(1, getInstance()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (instance_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInstance()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Board.BoardListReq)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Board.BoardListReq other = (cc.arduino.cli.commands.Board.BoardListReq) obj; + + if (hasInstance() != other.hasInstance()) return false; + if (hasInstance()) { + if (!getInstance() + .equals(other.getInstance())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInstance()) { + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Board.BoardListReq parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.BoardListReq parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardListReq parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.BoardListReq parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardListReq parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.BoardListReq parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardListReq parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.BoardListReq parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardListReq parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.BoardListReq parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardListReq parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.BoardListReq parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Board.BoardListReq 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.BoardListReq} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.BoardListReq) + cc.arduino.cli.commands.Board.BoardListReqOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardListReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardListReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Board.BoardListReq.class, cc.arduino.cli.commands.Board.BoardListReq.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Board.BoardListReq.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (instanceBuilder_ == null) { + instance_ = null; + } else { + instance_ = null; + instanceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardListReq_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.BoardListReq getDefaultInstanceForType() { + return cc.arduino.cli.commands.Board.BoardListReq.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.BoardListReq build() { + cc.arduino.cli.commands.Board.BoardListReq result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.BoardListReq buildPartial() { + cc.arduino.cli.commands.Board.BoardListReq result = new cc.arduino.cli.commands.Board.BoardListReq(this); + if (instanceBuilder_ == null) { + result.instance_ = instance_; + } else { + result.instance_ = instanceBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Board.BoardListReq) { + return mergeFrom((cc.arduino.cli.commands.Board.BoardListReq)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Board.BoardListReq other) { + if (other == cc.arduino.cli.commands.Board.BoardListReq.getDefaultInstance()) return this; + if (other.hasInstance()) { + mergeInstance(other.getInstance()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Board.BoardListReq parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Board.BoardListReq) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private cc.arduino.cli.commands.Common.Instance instance_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> instanceBuilder_; + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instanceBuilder_ != null || instance_ != null; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + if (instanceBuilder_ == null) { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } else { + return instanceBuilder_.getMessage(); + } + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + onChanged(); + } else { + instanceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance( + cc.arduino.cli.commands.Common.Instance.Builder builderForValue) { + if (instanceBuilder_ == null) { + instance_ = builderForValue.build(); + onChanged(); + } else { + instanceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder mergeInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (instance_ != null) { + instance_ = + cc.arduino.cli.commands.Common.Instance.newBuilder(instance_).mergeFrom(value).buildPartial(); + } else { + instance_ = value; + } + onChanged(); + } else { + instanceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder clearInstance() { + if (instanceBuilder_ == null) { + instance_ = null; + onChanged(); + } else { + instance_ = null; + instanceBuilder_ = null; + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.Instance.Builder getInstanceBuilder() { + + onChanged(); + return getInstanceFieldBuilder().getBuilder(); + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + if (instanceBuilder_ != null) { + return instanceBuilder_.getMessageOrBuilder(); + } else { + return instance_ == null ? + cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> + getInstanceFieldBuilder() { + if (instanceBuilder_ == null) { + instanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder>( + getInstance(), + getParentForChildren(), + isClean()); + instance_ = null; + } + return instanceBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.BoardListReq) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.BoardListReq) + private static final cc.arduino.cli.commands.Board.BoardListReq DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Board.BoardListReq(); + } + + public static cc.arduino.cli.commands.Board.BoardListReq getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BoardListReq parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BoardListReq(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.BoardListReq getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface BoardListRespOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.BoardListResp) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * List of ports and the boards detected on those ports.
+     * 
+ * + * repeated .cc.arduino.cli.commands.DetectedPort ports = 1; + */ + java.util.List + getPortsList(); + /** + *
+     * List of ports and the boards detected on those ports.
+     * 
+ * + * repeated .cc.arduino.cli.commands.DetectedPort ports = 1; + */ + cc.arduino.cli.commands.Board.DetectedPort getPorts(int index); + /** + *
+     * List of ports and the boards detected on those ports.
+     * 
+ * + * repeated .cc.arduino.cli.commands.DetectedPort ports = 1; + */ + int getPortsCount(); + /** + *
+     * List of ports and the boards detected on those ports.
+     * 
+ * + * repeated .cc.arduino.cli.commands.DetectedPort ports = 1; + */ + java.util.List + getPortsOrBuilderList(); + /** + *
+     * List of ports and the boards detected on those ports.
+     * 
+ * + * repeated .cc.arduino.cli.commands.DetectedPort ports = 1; + */ + cc.arduino.cli.commands.Board.DetectedPortOrBuilder getPortsOrBuilder( + int index); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.BoardListResp} + */ + public static final class BoardListResp extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.BoardListResp) + BoardListRespOrBuilder { + private static final long serialVersionUID = 0L; + // Use BoardListResp.newBuilder() to construct. + private BoardListResp(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BoardListResp() { + ports_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BoardListResp(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BoardListResp( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + ports_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + ports_.add( + input.readMessage(cc.arduino.cli.commands.Board.DetectedPort.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + ports_ = java.util.Collections.unmodifiableList(ports_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardListResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardListResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Board.BoardListResp.class, cc.arduino.cli.commands.Board.BoardListResp.Builder.class); + } + + public static final int PORTS_FIELD_NUMBER = 1; + private java.util.List ports_; + /** + *
+     * List of ports and the boards detected on those ports.
+     * 
+ * + * repeated .cc.arduino.cli.commands.DetectedPort ports = 1; + */ + public java.util.List getPortsList() { + return ports_; + } + /** + *
+     * List of ports and the boards detected on those ports.
+     * 
+ * + * repeated .cc.arduino.cli.commands.DetectedPort ports = 1; + */ + public java.util.List + getPortsOrBuilderList() { + return ports_; + } + /** + *
+     * List of ports and the boards detected on those ports.
+     * 
+ * + * repeated .cc.arduino.cli.commands.DetectedPort ports = 1; + */ + public int getPortsCount() { + return ports_.size(); + } + /** + *
+     * List of ports and the boards detected on those ports.
+     * 
+ * + * repeated .cc.arduino.cli.commands.DetectedPort ports = 1; + */ + public cc.arduino.cli.commands.Board.DetectedPort getPorts(int index) { + return ports_.get(index); + } + /** + *
+     * List of ports and the boards detected on those ports.
+     * 
+ * + * repeated .cc.arduino.cli.commands.DetectedPort ports = 1; + */ + public cc.arduino.cli.commands.Board.DetectedPortOrBuilder getPortsOrBuilder( + int index) { + return ports_.get(index); + } + + 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 < ports_.size(); i++) { + output.writeMessage(1, ports_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < ports_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, ports_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Board.BoardListResp)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Board.BoardListResp other = (cc.arduino.cli.commands.Board.BoardListResp) obj; + + if (!getPortsList() + .equals(other.getPortsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPortsCount() > 0) { + hash = (37 * hash) + PORTS_FIELD_NUMBER; + hash = (53 * hash) + getPortsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Board.BoardListResp parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.BoardListResp parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardListResp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.BoardListResp parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardListResp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.BoardListResp parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardListResp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.BoardListResp parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardListResp parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.BoardListResp parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardListResp parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.BoardListResp parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Board.BoardListResp 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.BoardListResp} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.BoardListResp) + cc.arduino.cli.commands.Board.BoardListRespOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardListResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardListResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Board.BoardListResp.class, cc.arduino.cli.commands.Board.BoardListResp.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Board.BoardListResp.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getPortsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (portsBuilder_ == null) { + ports_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + portsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardListResp_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.BoardListResp getDefaultInstanceForType() { + return cc.arduino.cli.commands.Board.BoardListResp.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.BoardListResp build() { + cc.arduino.cli.commands.Board.BoardListResp result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.BoardListResp buildPartial() { + cc.arduino.cli.commands.Board.BoardListResp result = new cc.arduino.cli.commands.Board.BoardListResp(this); + int from_bitField0_ = bitField0_; + if (portsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + ports_ = java.util.Collections.unmodifiableList(ports_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.ports_ = ports_; + } else { + result.ports_ = portsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Board.BoardListResp) { + return mergeFrom((cc.arduino.cli.commands.Board.BoardListResp)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Board.BoardListResp other) { + if (other == cc.arduino.cli.commands.Board.BoardListResp.getDefaultInstance()) return this; + if (portsBuilder_ == null) { + if (!other.ports_.isEmpty()) { + if (ports_.isEmpty()) { + ports_ = other.ports_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePortsIsMutable(); + ports_.addAll(other.ports_); + } + onChanged(); + } + } else { + if (!other.ports_.isEmpty()) { + if (portsBuilder_.isEmpty()) { + portsBuilder_.dispose(); + portsBuilder_ = null; + ports_ = other.ports_; + bitField0_ = (bitField0_ & ~0x00000001); + portsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPortsFieldBuilder() : null; + } else { + portsBuilder_.addAllMessages(other.ports_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Board.BoardListResp parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Board.BoardListResp) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List ports_ = + java.util.Collections.emptyList(); + private void ensurePortsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + ports_ = new java.util.ArrayList(ports_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Board.DetectedPort, cc.arduino.cli.commands.Board.DetectedPort.Builder, cc.arduino.cli.commands.Board.DetectedPortOrBuilder> portsBuilder_; + + /** + *
+       * List of ports and the boards detected on those ports.
+       * 
+ * + * repeated .cc.arduino.cli.commands.DetectedPort ports = 1; + */ + public java.util.List getPortsList() { + if (portsBuilder_ == null) { + return java.util.Collections.unmodifiableList(ports_); + } else { + return portsBuilder_.getMessageList(); + } + } + /** + *
+       * List of ports and the boards detected on those ports.
+       * 
+ * + * repeated .cc.arduino.cli.commands.DetectedPort ports = 1; + */ + public int getPortsCount() { + if (portsBuilder_ == null) { + return ports_.size(); + } else { + return portsBuilder_.getCount(); + } + } + /** + *
+       * List of ports and the boards detected on those ports.
+       * 
+ * + * repeated .cc.arduino.cli.commands.DetectedPort ports = 1; + */ + public cc.arduino.cli.commands.Board.DetectedPort getPorts(int index) { + if (portsBuilder_ == null) { + return ports_.get(index); + } else { + return portsBuilder_.getMessage(index); + } + } + /** + *
+       * List of ports and the boards detected on those ports.
+       * 
+ * + * repeated .cc.arduino.cli.commands.DetectedPort ports = 1; + */ + public Builder setPorts( + int index, cc.arduino.cli.commands.Board.DetectedPort value) { + if (portsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePortsIsMutable(); + ports_.set(index, value); + onChanged(); + } else { + portsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * List of ports and the boards detected on those ports.
+       * 
+ * + * repeated .cc.arduino.cli.commands.DetectedPort ports = 1; + */ + public Builder setPorts( + int index, cc.arduino.cli.commands.Board.DetectedPort.Builder builderForValue) { + if (portsBuilder_ == null) { + ensurePortsIsMutable(); + ports_.set(index, builderForValue.build()); + onChanged(); + } else { + portsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * List of ports and the boards detected on those ports.
+       * 
+ * + * repeated .cc.arduino.cli.commands.DetectedPort ports = 1; + */ + public Builder addPorts(cc.arduino.cli.commands.Board.DetectedPort value) { + if (portsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePortsIsMutable(); + ports_.add(value); + onChanged(); + } else { + portsBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * List of ports and the boards detected on those ports.
+       * 
+ * + * repeated .cc.arduino.cli.commands.DetectedPort ports = 1; + */ + public Builder addPorts( + int index, cc.arduino.cli.commands.Board.DetectedPort value) { + if (portsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePortsIsMutable(); + ports_.add(index, value); + onChanged(); + } else { + portsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * List of ports and the boards detected on those ports.
+       * 
+ * + * repeated .cc.arduino.cli.commands.DetectedPort ports = 1; + */ + public Builder addPorts( + cc.arduino.cli.commands.Board.DetectedPort.Builder builderForValue) { + if (portsBuilder_ == null) { + ensurePortsIsMutable(); + ports_.add(builderForValue.build()); + onChanged(); + } else { + portsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * List of ports and the boards detected on those ports.
+       * 
+ * + * repeated .cc.arduino.cli.commands.DetectedPort ports = 1; + */ + public Builder addPorts( + int index, cc.arduino.cli.commands.Board.DetectedPort.Builder builderForValue) { + if (portsBuilder_ == null) { + ensurePortsIsMutable(); + ports_.add(index, builderForValue.build()); + onChanged(); + } else { + portsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * List of ports and the boards detected on those ports.
+       * 
+ * + * repeated .cc.arduino.cli.commands.DetectedPort ports = 1; + */ + public Builder addAllPorts( + java.lang.Iterable values) { + if (portsBuilder_ == null) { + ensurePortsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, ports_); + onChanged(); + } else { + portsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * List of ports and the boards detected on those ports.
+       * 
+ * + * repeated .cc.arduino.cli.commands.DetectedPort ports = 1; + */ + public Builder clearPorts() { + if (portsBuilder_ == null) { + ports_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + portsBuilder_.clear(); + } + return this; + } + /** + *
+       * List of ports and the boards detected on those ports.
+       * 
+ * + * repeated .cc.arduino.cli.commands.DetectedPort ports = 1; + */ + public Builder removePorts(int index) { + if (portsBuilder_ == null) { + ensurePortsIsMutable(); + ports_.remove(index); + onChanged(); + } else { + portsBuilder_.remove(index); + } + return this; + } + /** + *
+       * List of ports and the boards detected on those ports.
+       * 
+ * + * repeated .cc.arduino.cli.commands.DetectedPort ports = 1; + */ + public cc.arduino.cli.commands.Board.DetectedPort.Builder getPortsBuilder( + int index) { + return getPortsFieldBuilder().getBuilder(index); + } + /** + *
+       * List of ports and the boards detected on those ports.
+       * 
+ * + * repeated .cc.arduino.cli.commands.DetectedPort ports = 1; + */ + public cc.arduino.cli.commands.Board.DetectedPortOrBuilder getPortsOrBuilder( + int index) { + if (portsBuilder_ == null) { + return ports_.get(index); } else { + return portsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * List of ports and the boards detected on those ports.
+       * 
+ * + * repeated .cc.arduino.cli.commands.DetectedPort ports = 1; + */ + public java.util.List + getPortsOrBuilderList() { + if (portsBuilder_ != null) { + return portsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(ports_); + } + } + /** + *
+       * List of ports and the boards detected on those ports.
+       * 
+ * + * repeated .cc.arduino.cli.commands.DetectedPort ports = 1; + */ + public cc.arduino.cli.commands.Board.DetectedPort.Builder addPortsBuilder() { + return getPortsFieldBuilder().addBuilder( + cc.arduino.cli.commands.Board.DetectedPort.getDefaultInstance()); + } + /** + *
+       * List of ports and the boards detected on those ports.
+       * 
+ * + * repeated .cc.arduino.cli.commands.DetectedPort ports = 1; + */ + public cc.arduino.cli.commands.Board.DetectedPort.Builder addPortsBuilder( + int index) { + return getPortsFieldBuilder().addBuilder( + index, cc.arduino.cli.commands.Board.DetectedPort.getDefaultInstance()); + } + /** + *
+       * List of ports and the boards detected on those ports.
+       * 
+ * + * repeated .cc.arduino.cli.commands.DetectedPort ports = 1; + */ + public java.util.List + getPortsBuilderList() { + return getPortsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Board.DetectedPort, cc.arduino.cli.commands.Board.DetectedPort.Builder, cc.arduino.cli.commands.Board.DetectedPortOrBuilder> + getPortsFieldBuilder() { + if (portsBuilder_ == null) { + portsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Board.DetectedPort, cc.arduino.cli.commands.Board.DetectedPort.Builder, cc.arduino.cli.commands.Board.DetectedPortOrBuilder>( + ports_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + ports_ = null; + } + return portsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.BoardListResp) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.BoardListResp) + private static final cc.arduino.cli.commands.Board.BoardListResp DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Board.BoardListResp(); + } + + public static cc.arduino.cli.commands.Board.BoardListResp getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BoardListResp parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BoardListResp(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.BoardListResp getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DetectedPortOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.DetectedPort) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Address of the port (e.g., `serial:///dev/ttyACM0`).
+     * 
+ * + * string address = 1; + * @return The address. + */ + java.lang.String getAddress(); + /** + *
+     * Address of the port (e.g., `serial:///dev/ttyACM0`).
+     * 
+ * + * string address = 1; + * @return The bytes for address. + */ + com.google.protobuf.ByteString + getAddressBytes(); + + /** + *
+     * Protocol of the port (e.g., `serial`).
+     * 
+ * + * string protocol = 2; + * @return The protocol. + */ + java.lang.String getProtocol(); + /** + *
+     * Protocol of the port (e.g., `serial`).
+     * 
+ * + * string protocol = 2; + * @return The bytes for protocol. + */ + com.google.protobuf.ByteString + getProtocolBytes(); + + /** + *
+     * A human friendly description of the protocol (e.g., "Serial Port (USB)").
+     * 
+ * + * string protocol_label = 3; + * @return The protocolLabel. + */ + java.lang.String getProtocolLabel(); + /** + *
+     * A human friendly description of the protocol (e.g., "Serial Port (USB)").
+     * 
+ * + * string protocol_label = 3; + * @return The bytes for protocolLabel. + */ + com.google.protobuf.ByteString + getProtocolLabelBytes(); + + /** + *
+     * The boards attached to the port.
+     * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 4; + */ + java.util.List + getBoardsList(); + /** + *
+     * The boards attached to the port.
+     * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 4; + */ + cc.arduino.cli.commands.Board.BoardListItem getBoards(int index); + /** + *
+     * The boards attached to the port.
+     * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 4; + */ + int getBoardsCount(); + /** + *
+     * The boards attached to the port.
+     * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 4; + */ + java.util.List + getBoardsOrBuilderList(); + /** + *
+     * The boards attached to the port.
+     * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 4; + */ + cc.arduino.cli.commands.Board.BoardListItemOrBuilder getBoardsOrBuilder( + int index); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.DetectedPort} + */ + public static final class DetectedPort extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.DetectedPort) + DetectedPortOrBuilder { + private static final long serialVersionUID = 0L; + // Use DetectedPort.newBuilder() to construct. + private DetectedPort(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DetectedPort() { + address_ = ""; + protocol_ = ""; + protocolLabel_ = ""; + boards_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DetectedPort(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DetectedPort( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + address_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + protocol_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + protocolLabel_ = s; + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + boards_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + boards_.add( + input.readMessage(cc.arduino.cli.commands.Board.BoardListItem.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + boards_ = java.util.Collections.unmodifiableList(boards_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_DetectedPort_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_DetectedPort_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Board.DetectedPort.class, cc.arduino.cli.commands.Board.DetectedPort.Builder.class); + } + + public static final int ADDRESS_FIELD_NUMBER = 1; + private volatile java.lang.Object address_; + /** + *
+     * Address of the port (e.g., `serial:///dev/ttyACM0`).
+     * 
+ * + * string address = 1; + * @return The address. + */ + public java.lang.String getAddress() { + java.lang.Object ref = address_; + 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(); + address_ = s; + return s; + } + } + /** + *
+     * Address of the port (e.g., `serial:///dev/ttyACM0`).
+     * 
+ * + * string address = 1; + * @return The bytes for address. + */ + public com.google.protobuf.ByteString + getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROTOCOL_FIELD_NUMBER = 2; + private volatile java.lang.Object protocol_; + /** + *
+     * Protocol of the port (e.g., `serial`).
+     * 
+ * + * string protocol = 2; + * @return The protocol. + */ + public java.lang.String getProtocol() { + java.lang.Object ref = protocol_; + 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(); + protocol_ = s; + return s; + } + } + /** + *
+     * Protocol of the port (e.g., `serial`).
+     * 
+ * + * string protocol = 2; + * @return The bytes for protocol. + */ + public com.google.protobuf.ByteString + getProtocolBytes() { + java.lang.Object ref = protocol_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + protocol_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROTOCOL_LABEL_FIELD_NUMBER = 3; + private volatile java.lang.Object protocolLabel_; + /** + *
+     * A human friendly description of the protocol (e.g., "Serial Port (USB)").
+     * 
+ * + * string protocol_label = 3; + * @return The protocolLabel. + */ + public java.lang.String getProtocolLabel() { + java.lang.Object ref = protocolLabel_; + 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(); + protocolLabel_ = s; + return s; + } + } + /** + *
+     * A human friendly description of the protocol (e.g., "Serial Port (USB)").
+     * 
+ * + * string protocol_label = 3; + * @return The bytes for protocolLabel. + */ + public com.google.protobuf.ByteString + getProtocolLabelBytes() { + java.lang.Object ref = protocolLabel_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + protocolLabel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BOARDS_FIELD_NUMBER = 4; + private java.util.List boards_; + /** + *
+     * The boards attached to the port.
+     * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 4; + */ + public java.util.List getBoardsList() { + return boards_; + } + /** + *
+     * The boards attached to the port.
+     * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 4; + */ + public java.util.List + getBoardsOrBuilderList() { + return boards_; + } + /** + *
+     * The boards attached to the port.
+     * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 4; + */ + public int getBoardsCount() { + return boards_.size(); + } + /** + *
+     * The boards attached to the port.
+     * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 4; + */ + public cc.arduino.cli.commands.Board.BoardListItem getBoards(int index) { + return boards_.get(index); + } + /** + *
+     * The boards attached to the port.
+     * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 4; + */ + public cc.arduino.cli.commands.Board.BoardListItemOrBuilder getBoardsOrBuilder( + int index) { + return boards_.get(index); + } + + 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 (!getAddressBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, address_); + } + if (!getProtocolBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, protocol_); + } + if (!getProtocolLabelBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, protocolLabel_); + } + for (int i = 0; i < boards_.size(); i++) { + output.writeMessage(4, boards_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getAddressBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, address_); + } + if (!getProtocolBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, protocol_); + } + if (!getProtocolLabelBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, protocolLabel_); + } + for (int i = 0; i < boards_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, boards_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Board.DetectedPort)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Board.DetectedPort other = (cc.arduino.cli.commands.Board.DetectedPort) obj; + + if (!getAddress() + .equals(other.getAddress())) return false; + if (!getProtocol() + .equals(other.getProtocol())) return false; + if (!getProtocolLabel() + .equals(other.getProtocolLabel())) return false; + if (!getBoardsList() + .equals(other.getBoardsList())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getAddress().hashCode(); + hash = (37 * hash) + PROTOCOL_FIELD_NUMBER; + hash = (53 * hash) + getProtocol().hashCode(); + hash = (37 * hash) + PROTOCOL_LABEL_FIELD_NUMBER; + hash = (53 * hash) + getProtocolLabel().hashCode(); + if (getBoardsCount() > 0) { + hash = (37 * hash) + BOARDS_FIELD_NUMBER; + hash = (53 * hash) + getBoardsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Board.DetectedPort parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.DetectedPort parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.DetectedPort parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.DetectedPort parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.DetectedPort parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.DetectedPort parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.DetectedPort parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.DetectedPort parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.DetectedPort parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.DetectedPort parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.DetectedPort parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.DetectedPort parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Board.DetectedPort 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.DetectedPort} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.DetectedPort) + cc.arduino.cli.commands.Board.DetectedPortOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_DetectedPort_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_DetectedPort_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Board.DetectedPort.class, cc.arduino.cli.commands.Board.DetectedPort.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Board.DetectedPort.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getBoardsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + address_ = ""; + + protocol_ = ""; + + protocolLabel_ = ""; + + if (boardsBuilder_ == null) { + boards_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + boardsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_DetectedPort_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.DetectedPort getDefaultInstanceForType() { + return cc.arduino.cli.commands.Board.DetectedPort.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.DetectedPort build() { + cc.arduino.cli.commands.Board.DetectedPort result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.DetectedPort buildPartial() { + cc.arduino.cli.commands.Board.DetectedPort result = new cc.arduino.cli.commands.Board.DetectedPort(this); + int from_bitField0_ = bitField0_; + result.address_ = address_; + result.protocol_ = protocol_; + result.protocolLabel_ = protocolLabel_; + if (boardsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + boards_ = java.util.Collections.unmodifiableList(boards_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.boards_ = boards_; + } else { + result.boards_ = boardsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Board.DetectedPort) { + return mergeFrom((cc.arduino.cli.commands.Board.DetectedPort)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Board.DetectedPort other) { + if (other == cc.arduino.cli.commands.Board.DetectedPort.getDefaultInstance()) return this; + if (!other.getAddress().isEmpty()) { + address_ = other.address_; + onChanged(); + } + if (!other.getProtocol().isEmpty()) { + protocol_ = other.protocol_; + onChanged(); + } + if (!other.getProtocolLabel().isEmpty()) { + protocolLabel_ = other.protocolLabel_; + onChanged(); + } + if (boardsBuilder_ == null) { + if (!other.boards_.isEmpty()) { + if (boards_.isEmpty()) { + boards_ = other.boards_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBoardsIsMutable(); + boards_.addAll(other.boards_); + } + onChanged(); + } + } else { + if (!other.boards_.isEmpty()) { + if (boardsBuilder_.isEmpty()) { + boardsBuilder_.dispose(); + boardsBuilder_ = null; + boards_ = other.boards_; + bitField0_ = (bitField0_ & ~0x00000001); + boardsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getBoardsFieldBuilder() : null; + } else { + boardsBuilder_.addAllMessages(other.boards_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Board.DetectedPort parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Board.DetectedPort) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object address_ = ""; + /** + *
+       * Address of the port (e.g., `serial:///dev/ttyACM0`).
+       * 
+ * + * string address = 1; + * @return The address. + */ + public java.lang.String getAddress() { + java.lang.Object ref = address_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + address_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Address of the port (e.g., `serial:///dev/ttyACM0`).
+       * 
+ * + * string address = 1; + * @return The bytes for address. + */ + public com.google.protobuf.ByteString + getAddressBytes() { + java.lang.Object ref = address_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + address_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Address of the port (e.g., `serial:///dev/ttyACM0`).
+       * 
+ * + * string address = 1; + * @param value The address to set. + * @return This builder for chaining. + */ + public Builder setAddress( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + address_ = value; + onChanged(); + return this; + } + /** + *
+       * Address of the port (e.g., `serial:///dev/ttyACM0`).
+       * 
+ * + * string address = 1; + * @return This builder for chaining. + */ + public Builder clearAddress() { + + address_ = getDefaultInstance().getAddress(); + onChanged(); + return this; + } + /** + *
+       * Address of the port (e.g., `serial:///dev/ttyACM0`).
+       * 
+ * + * string address = 1; + * @param value The bytes for address to set. + * @return This builder for chaining. + */ + public Builder setAddressBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + address_ = value; + onChanged(); + return this; + } + + private java.lang.Object protocol_ = ""; + /** + *
+       * Protocol of the port (e.g., `serial`).
+       * 
+ * + * string protocol = 2; + * @return The protocol. + */ + public java.lang.String getProtocol() { + java.lang.Object ref = protocol_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + protocol_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Protocol of the port (e.g., `serial`).
+       * 
+ * + * string protocol = 2; + * @return The bytes for protocol. + */ + public com.google.protobuf.ByteString + getProtocolBytes() { + java.lang.Object ref = protocol_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + protocol_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Protocol of the port (e.g., `serial`).
+       * 
+ * + * string protocol = 2; + * @param value The protocol to set. + * @return This builder for chaining. + */ + public Builder setProtocol( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + protocol_ = value; + onChanged(); + return this; + } + /** + *
+       * Protocol of the port (e.g., `serial`).
+       * 
+ * + * string protocol = 2; + * @return This builder for chaining. + */ + public Builder clearProtocol() { + + protocol_ = getDefaultInstance().getProtocol(); + onChanged(); + return this; + } + /** + *
+       * Protocol of the port (e.g., `serial`).
+       * 
+ * + * string protocol = 2; + * @param value The bytes for protocol to set. + * @return This builder for chaining. + */ + public Builder setProtocolBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + protocol_ = value; + onChanged(); + return this; + } + + private java.lang.Object protocolLabel_ = ""; + /** + *
+       * A human friendly description of the protocol (e.g., "Serial Port (USB)").
+       * 
+ * + * string protocol_label = 3; + * @return The protocolLabel. + */ + public java.lang.String getProtocolLabel() { + java.lang.Object ref = protocolLabel_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + protocolLabel_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * A human friendly description of the protocol (e.g., "Serial Port (USB)").
+       * 
+ * + * string protocol_label = 3; + * @return The bytes for protocolLabel. + */ + public com.google.protobuf.ByteString + getProtocolLabelBytes() { + java.lang.Object ref = protocolLabel_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + protocolLabel_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * A human friendly description of the protocol (e.g., "Serial Port (USB)").
+       * 
+ * + * string protocol_label = 3; + * @param value The protocolLabel to set. + * @return This builder for chaining. + */ + public Builder setProtocolLabel( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + protocolLabel_ = value; + onChanged(); + return this; + } + /** + *
+       * A human friendly description of the protocol (e.g., "Serial Port (USB)").
+       * 
+ * + * string protocol_label = 3; + * @return This builder for chaining. + */ + public Builder clearProtocolLabel() { + + protocolLabel_ = getDefaultInstance().getProtocolLabel(); + onChanged(); + return this; + } + /** + *
+       * A human friendly description of the protocol (e.g., "Serial Port (USB)").
+       * 
+ * + * string protocol_label = 3; + * @param value The bytes for protocolLabel to set. + * @return This builder for chaining. + */ + public Builder setProtocolLabelBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + protocolLabel_ = value; + onChanged(); + return this; + } + + private java.util.List boards_ = + java.util.Collections.emptyList(); + private void ensureBoardsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + boards_ = new java.util.ArrayList(boards_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Board.BoardListItem, cc.arduino.cli.commands.Board.BoardListItem.Builder, cc.arduino.cli.commands.Board.BoardListItemOrBuilder> boardsBuilder_; + + /** + *
+       * The boards attached to the port.
+       * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 4; + */ + public java.util.List getBoardsList() { + if (boardsBuilder_ == null) { + return java.util.Collections.unmodifiableList(boards_); + } else { + return boardsBuilder_.getMessageList(); + } + } + /** + *
+       * The boards attached to the port.
+       * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 4; + */ + public int getBoardsCount() { + if (boardsBuilder_ == null) { + return boards_.size(); + } else { + return boardsBuilder_.getCount(); + } + } + /** + *
+       * The boards attached to the port.
+       * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 4; + */ + public cc.arduino.cli.commands.Board.BoardListItem getBoards(int index) { + if (boardsBuilder_ == null) { + return boards_.get(index); + } else { + return boardsBuilder_.getMessage(index); + } + } + /** + *
+       * The boards attached to the port.
+       * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 4; + */ + public Builder setBoards( + int index, cc.arduino.cli.commands.Board.BoardListItem value) { + if (boardsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBoardsIsMutable(); + boards_.set(index, value); + onChanged(); + } else { + boardsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * The boards attached to the port.
+       * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 4; + */ + public Builder setBoards( + int index, cc.arduino.cli.commands.Board.BoardListItem.Builder builderForValue) { + if (boardsBuilder_ == null) { + ensureBoardsIsMutable(); + boards_.set(index, builderForValue.build()); + onChanged(); + } else { + boardsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * The boards attached to the port.
+       * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 4; + */ + public Builder addBoards(cc.arduino.cli.commands.Board.BoardListItem value) { + if (boardsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBoardsIsMutable(); + boards_.add(value); + onChanged(); + } else { + boardsBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * The boards attached to the port.
+       * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 4; + */ + public Builder addBoards( + int index, cc.arduino.cli.commands.Board.BoardListItem value) { + if (boardsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBoardsIsMutable(); + boards_.add(index, value); + onChanged(); + } else { + boardsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * The boards attached to the port.
+       * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 4; + */ + public Builder addBoards( + cc.arduino.cli.commands.Board.BoardListItem.Builder builderForValue) { + if (boardsBuilder_ == null) { + ensureBoardsIsMutable(); + boards_.add(builderForValue.build()); + onChanged(); + } else { + boardsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * The boards attached to the port.
+       * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 4; + */ + public Builder addBoards( + int index, cc.arduino.cli.commands.Board.BoardListItem.Builder builderForValue) { + if (boardsBuilder_ == null) { + ensureBoardsIsMutable(); + boards_.add(index, builderForValue.build()); + onChanged(); + } else { + boardsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * The boards attached to the port.
+       * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 4; + */ + public Builder addAllBoards( + java.lang.Iterable values) { + if (boardsBuilder_ == null) { + ensureBoardsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, boards_); + onChanged(); + } else { + boardsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * The boards attached to the port.
+       * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 4; + */ + public Builder clearBoards() { + if (boardsBuilder_ == null) { + boards_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + boardsBuilder_.clear(); + } + return this; + } + /** + *
+       * The boards attached to the port.
+       * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 4; + */ + public Builder removeBoards(int index) { + if (boardsBuilder_ == null) { + ensureBoardsIsMutable(); + boards_.remove(index); + onChanged(); + } else { + boardsBuilder_.remove(index); + } + return this; + } + /** + *
+       * The boards attached to the port.
+       * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 4; + */ + public cc.arduino.cli.commands.Board.BoardListItem.Builder getBoardsBuilder( + int index) { + return getBoardsFieldBuilder().getBuilder(index); + } + /** + *
+       * The boards attached to the port.
+       * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 4; + */ + public cc.arduino.cli.commands.Board.BoardListItemOrBuilder getBoardsOrBuilder( + int index) { + if (boardsBuilder_ == null) { + return boards_.get(index); } else { + return boardsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * The boards attached to the port.
+       * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 4; + */ + public java.util.List + getBoardsOrBuilderList() { + if (boardsBuilder_ != null) { + return boardsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(boards_); + } + } + /** + *
+       * The boards attached to the port.
+       * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 4; + */ + public cc.arduino.cli.commands.Board.BoardListItem.Builder addBoardsBuilder() { + return getBoardsFieldBuilder().addBuilder( + cc.arduino.cli.commands.Board.BoardListItem.getDefaultInstance()); + } + /** + *
+       * The boards attached to the port.
+       * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 4; + */ + public cc.arduino.cli.commands.Board.BoardListItem.Builder addBoardsBuilder( + int index) { + return getBoardsFieldBuilder().addBuilder( + index, cc.arduino.cli.commands.Board.BoardListItem.getDefaultInstance()); + } + /** + *
+       * The boards attached to the port.
+       * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 4; + */ + public java.util.List + getBoardsBuilderList() { + return getBoardsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Board.BoardListItem, cc.arduino.cli.commands.Board.BoardListItem.Builder, cc.arduino.cli.commands.Board.BoardListItemOrBuilder> + getBoardsFieldBuilder() { + if (boardsBuilder_ == null) { + boardsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Board.BoardListItem, cc.arduino.cli.commands.Board.BoardListItem.Builder, cc.arduino.cli.commands.Board.BoardListItemOrBuilder>( + boards_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + boards_ = null; + } + return boardsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.DetectedPort) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.DetectedPort) + private static final cc.arduino.cli.commands.Board.DetectedPort DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Board.DetectedPort(); + } + + public static cc.arduino.cli.commands.Board.DetectedPort getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DetectedPort parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DetectedPort(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.DetectedPort getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface BoardListAllReqOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.BoardListAllReq) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + boolean hasInstance(); + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + cc.arduino.cli.commands.Common.Instance getInstance(); + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder(); + + /** + *
+     * The search query to filter the board list by.
+     * 
+ * + * repeated string search_args = 2; + * @return A list containing the searchArgs. + */ + java.util.List + getSearchArgsList(); + /** + *
+     * The search query to filter the board list by.
+     * 
+ * + * repeated string search_args = 2; + * @return The count of searchArgs. + */ + int getSearchArgsCount(); + /** + *
+     * The search query to filter the board list by.
+     * 
+ * + * repeated string search_args = 2; + * @param index The index of the element to return. + * @return The searchArgs at the given index. + */ + java.lang.String getSearchArgs(int index); + /** + *
+     * The search query to filter the board list by.
+     * 
+ * + * repeated string search_args = 2; + * @param index The index of the value to return. + * @return The bytes of the searchArgs at the given index. + */ + com.google.protobuf.ByteString + getSearchArgsBytes(int index); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.BoardListAllReq} + */ + public static final class BoardListAllReq extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.BoardListAllReq) + BoardListAllReqOrBuilder { + private static final long serialVersionUID = 0L; + // Use BoardListAllReq.newBuilder() to construct. + private BoardListAllReq(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BoardListAllReq() { + searchArgs_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BoardListAllReq(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BoardListAllReq( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cc.arduino.cli.commands.Common.Instance.Builder subBuilder = null; + if (instance_ != null) { + subBuilder = instance_.toBuilder(); + } + instance_ = input.readMessage(cc.arduino.cli.commands.Common.Instance.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instance_); + instance_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + searchArgs_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + searchArgs_.add(s); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + searchArgs_ = searchArgs_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardListAllReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardListAllReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Board.BoardListAllReq.class, cc.arduino.cli.commands.Board.BoardListAllReq.Builder.class); + } + + public static final int INSTANCE_FIELD_NUMBER = 1; + private cc.arduino.cli.commands.Common.Instance instance_; + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instance_ != null; + } + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + return getInstance(); + } + + public static final int SEARCH_ARGS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList searchArgs_; + /** + *
+     * The search query to filter the board list by.
+     * 
+ * + * repeated string search_args = 2; + * @return A list containing the searchArgs. + */ + public com.google.protobuf.ProtocolStringList + getSearchArgsList() { + return searchArgs_; + } + /** + *
+     * The search query to filter the board list by.
+     * 
+ * + * repeated string search_args = 2; + * @return The count of searchArgs. + */ + public int getSearchArgsCount() { + return searchArgs_.size(); + } + /** + *
+     * The search query to filter the board list by.
+     * 
+ * + * repeated string search_args = 2; + * @param index The index of the element to return. + * @return The searchArgs at the given index. + */ + public java.lang.String getSearchArgs(int index) { + return searchArgs_.get(index); + } + /** + *
+     * The search query to filter the board list by.
+     * 
+ * + * repeated string search_args = 2; + * @param index The index of the value to return. + * @return The bytes of the searchArgs at the given index. + */ + public com.google.protobuf.ByteString + getSearchArgsBytes(int index) { + return searchArgs_.getByteString(index); + } + + 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 (instance_ != null) { + output.writeMessage(1, getInstance()); + } + for (int i = 0; i < searchArgs_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, searchArgs_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (instance_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInstance()); + } + { + int dataSize = 0; + for (int i = 0; i < searchArgs_.size(); i++) { + dataSize += computeStringSizeNoTag(searchArgs_.getRaw(i)); + } + size += dataSize; + size += 1 * getSearchArgsList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Board.BoardListAllReq)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Board.BoardListAllReq other = (cc.arduino.cli.commands.Board.BoardListAllReq) obj; + + if (hasInstance() != other.hasInstance()) return false; + if (hasInstance()) { + if (!getInstance() + .equals(other.getInstance())) return false; + } + if (!getSearchArgsList() + .equals(other.getSearchArgsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInstance()) { + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + } + if (getSearchArgsCount() > 0) { + hash = (37 * hash) + SEARCH_ARGS_FIELD_NUMBER; + hash = (53 * hash) + getSearchArgsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Board.BoardListAllReq parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.BoardListAllReq parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardListAllReq parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.BoardListAllReq parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardListAllReq parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.BoardListAllReq parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardListAllReq parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.BoardListAllReq parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardListAllReq parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.BoardListAllReq parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardListAllReq parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.BoardListAllReq parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Board.BoardListAllReq 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.BoardListAllReq} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.BoardListAllReq) + cc.arduino.cli.commands.Board.BoardListAllReqOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardListAllReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardListAllReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Board.BoardListAllReq.class, cc.arduino.cli.commands.Board.BoardListAllReq.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Board.BoardListAllReq.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (instanceBuilder_ == null) { + instance_ = null; + } else { + instance_ = null; + instanceBuilder_ = null; + } + searchArgs_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardListAllReq_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.BoardListAllReq getDefaultInstanceForType() { + return cc.arduino.cli.commands.Board.BoardListAllReq.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.BoardListAllReq build() { + cc.arduino.cli.commands.Board.BoardListAllReq result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.BoardListAllReq buildPartial() { + cc.arduino.cli.commands.Board.BoardListAllReq result = new cc.arduino.cli.commands.Board.BoardListAllReq(this); + int from_bitField0_ = bitField0_; + if (instanceBuilder_ == null) { + result.instance_ = instance_; + } else { + result.instance_ = instanceBuilder_.build(); + } + if (((bitField0_ & 0x00000001) != 0)) { + searchArgs_ = searchArgs_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.searchArgs_ = searchArgs_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Board.BoardListAllReq) { + return mergeFrom((cc.arduino.cli.commands.Board.BoardListAllReq)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Board.BoardListAllReq other) { + if (other == cc.arduino.cli.commands.Board.BoardListAllReq.getDefaultInstance()) return this; + if (other.hasInstance()) { + mergeInstance(other.getInstance()); + } + if (!other.searchArgs_.isEmpty()) { + if (searchArgs_.isEmpty()) { + searchArgs_ = other.searchArgs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSearchArgsIsMutable(); + searchArgs_.addAll(other.searchArgs_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Board.BoardListAllReq parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Board.BoardListAllReq) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private cc.arduino.cli.commands.Common.Instance instance_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> instanceBuilder_; + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instanceBuilder_ != null || instance_ != null; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + if (instanceBuilder_ == null) { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } else { + return instanceBuilder_.getMessage(); + } + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + onChanged(); + } else { + instanceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance( + cc.arduino.cli.commands.Common.Instance.Builder builderForValue) { + if (instanceBuilder_ == null) { + instance_ = builderForValue.build(); + onChanged(); + } else { + instanceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder mergeInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (instance_ != null) { + instance_ = + cc.arduino.cli.commands.Common.Instance.newBuilder(instance_).mergeFrom(value).buildPartial(); + } else { + instance_ = value; + } + onChanged(); + } else { + instanceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder clearInstance() { + if (instanceBuilder_ == null) { + instance_ = null; + onChanged(); + } else { + instance_ = null; + instanceBuilder_ = null; + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.Instance.Builder getInstanceBuilder() { + + onChanged(); + return getInstanceFieldBuilder().getBuilder(); + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + if (instanceBuilder_ != null) { + return instanceBuilder_.getMessageOrBuilder(); + } else { + return instance_ == null ? + cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> + getInstanceFieldBuilder() { + if (instanceBuilder_ == null) { + instanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder>( + getInstance(), + getParentForChildren(), + isClean()); + instance_ = null; + } + return instanceBuilder_; + } + + private com.google.protobuf.LazyStringList searchArgs_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureSearchArgsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + searchArgs_ = new com.google.protobuf.LazyStringArrayList(searchArgs_); + bitField0_ |= 0x00000001; + } + } + /** + *
+       * The search query to filter the board list by.
+       * 
+ * + * repeated string search_args = 2; + * @return A list containing the searchArgs. + */ + public com.google.protobuf.ProtocolStringList + getSearchArgsList() { + return searchArgs_.getUnmodifiableView(); + } + /** + *
+       * The search query to filter the board list by.
+       * 
+ * + * repeated string search_args = 2; + * @return The count of searchArgs. + */ + public int getSearchArgsCount() { + return searchArgs_.size(); + } + /** + *
+       * The search query to filter the board list by.
+       * 
+ * + * repeated string search_args = 2; + * @param index The index of the element to return. + * @return The searchArgs at the given index. + */ + public java.lang.String getSearchArgs(int index) { + return searchArgs_.get(index); + } + /** + *
+       * The search query to filter the board list by.
+       * 
+ * + * repeated string search_args = 2; + * @param index The index of the value to return. + * @return The bytes of the searchArgs at the given index. + */ + public com.google.protobuf.ByteString + getSearchArgsBytes(int index) { + return searchArgs_.getByteString(index); + } + /** + *
+       * The search query to filter the board list by.
+       * 
+ * + * repeated string search_args = 2; + * @param index The index to set the value at. + * @param value The searchArgs to set. + * @return This builder for chaining. + */ + public Builder setSearchArgs( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSearchArgsIsMutable(); + searchArgs_.set(index, value); + onChanged(); + return this; + } + /** + *
+       * The search query to filter the board list by.
+       * 
+ * + * repeated string search_args = 2; + * @param value The searchArgs to add. + * @return This builder for chaining. + */ + public Builder addSearchArgs( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSearchArgsIsMutable(); + searchArgs_.add(value); + onChanged(); + return this; + } + /** + *
+       * The search query to filter the board list by.
+       * 
+ * + * repeated string search_args = 2; + * @param values The searchArgs to add. + * @return This builder for chaining. + */ + public Builder addAllSearchArgs( + java.lang.Iterable values) { + ensureSearchArgsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, searchArgs_); + onChanged(); + return this; + } + /** + *
+       * The search query to filter the board list by.
+       * 
+ * + * repeated string search_args = 2; + * @return This builder for chaining. + */ + public Builder clearSearchArgs() { + searchArgs_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * The search query to filter the board list by.
+       * 
+ * + * repeated string search_args = 2; + * @param value The bytes of the searchArgs to add. + * @return This builder for chaining. + */ + public Builder addSearchArgsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureSearchArgsIsMutable(); + searchArgs_.add(value); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.BoardListAllReq) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.BoardListAllReq) + private static final cc.arduino.cli.commands.Board.BoardListAllReq DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Board.BoardListAllReq(); + } + + public static cc.arduino.cli.commands.Board.BoardListAllReq getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BoardListAllReq parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BoardListAllReq(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.BoardListAllReq getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface BoardListAllRespOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.BoardListAllResp) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * List of installed boards.
+     * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 1; + */ + java.util.List + getBoardsList(); + /** + *
+     * List of installed boards.
+     * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 1; + */ + cc.arduino.cli.commands.Board.BoardListItem getBoards(int index); + /** + *
+     * List of installed boards.
+     * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 1; + */ + int getBoardsCount(); + /** + *
+     * List of installed boards.
+     * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 1; + */ + java.util.List + getBoardsOrBuilderList(); + /** + *
+     * List of installed boards.
+     * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 1; + */ + cc.arduino.cli.commands.Board.BoardListItemOrBuilder getBoardsOrBuilder( + int index); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.BoardListAllResp} + */ + public static final class BoardListAllResp extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.BoardListAllResp) + BoardListAllRespOrBuilder { + private static final long serialVersionUID = 0L; + // Use BoardListAllResp.newBuilder() to construct. + private BoardListAllResp(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BoardListAllResp() { + boards_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BoardListAllResp(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BoardListAllResp( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + boards_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + boards_.add( + input.readMessage(cc.arduino.cli.commands.Board.BoardListItem.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + boards_ = java.util.Collections.unmodifiableList(boards_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardListAllResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardListAllResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Board.BoardListAllResp.class, cc.arduino.cli.commands.Board.BoardListAllResp.Builder.class); + } + + public static final int BOARDS_FIELD_NUMBER = 1; + private java.util.List boards_; + /** + *
+     * List of installed boards.
+     * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 1; + */ + public java.util.List getBoardsList() { + return boards_; + } + /** + *
+     * List of installed boards.
+     * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 1; + */ + public java.util.List + getBoardsOrBuilderList() { + return boards_; + } + /** + *
+     * List of installed boards.
+     * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 1; + */ + public int getBoardsCount() { + return boards_.size(); + } + /** + *
+     * List of installed boards.
+     * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 1; + */ + public cc.arduino.cli.commands.Board.BoardListItem getBoards(int index) { + return boards_.get(index); + } + /** + *
+     * List of installed boards.
+     * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 1; + */ + public cc.arduino.cli.commands.Board.BoardListItemOrBuilder getBoardsOrBuilder( + int index) { + return boards_.get(index); + } + + 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 < boards_.size(); i++) { + output.writeMessage(1, boards_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < boards_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, boards_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Board.BoardListAllResp)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Board.BoardListAllResp other = (cc.arduino.cli.commands.Board.BoardListAllResp) obj; + + if (!getBoardsList() + .equals(other.getBoardsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getBoardsCount() > 0) { + hash = (37 * hash) + BOARDS_FIELD_NUMBER; + hash = (53 * hash) + getBoardsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Board.BoardListAllResp parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.BoardListAllResp parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardListAllResp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.BoardListAllResp parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardListAllResp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.BoardListAllResp parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardListAllResp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.BoardListAllResp parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardListAllResp parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.BoardListAllResp parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardListAllResp parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.BoardListAllResp parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Board.BoardListAllResp 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.BoardListAllResp} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.BoardListAllResp) + cc.arduino.cli.commands.Board.BoardListAllRespOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardListAllResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardListAllResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Board.BoardListAllResp.class, cc.arduino.cli.commands.Board.BoardListAllResp.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Board.BoardListAllResp.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getBoardsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (boardsBuilder_ == null) { + boards_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + boardsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardListAllResp_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.BoardListAllResp getDefaultInstanceForType() { + return cc.arduino.cli.commands.Board.BoardListAllResp.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.BoardListAllResp build() { + cc.arduino.cli.commands.Board.BoardListAllResp result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.BoardListAllResp buildPartial() { + cc.arduino.cli.commands.Board.BoardListAllResp result = new cc.arduino.cli.commands.Board.BoardListAllResp(this); + int from_bitField0_ = bitField0_; + if (boardsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + boards_ = java.util.Collections.unmodifiableList(boards_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.boards_ = boards_; + } else { + result.boards_ = boardsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Board.BoardListAllResp) { + return mergeFrom((cc.arduino.cli.commands.Board.BoardListAllResp)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Board.BoardListAllResp other) { + if (other == cc.arduino.cli.commands.Board.BoardListAllResp.getDefaultInstance()) return this; + if (boardsBuilder_ == null) { + if (!other.boards_.isEmpty()) { + if (boards_.isEmpty()) { + boards_ = other.boards_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBoardsIsMutable(); + boards_.addAll(other.boards_); + } + onChanged(); + } + } else { + if (!other.boards_.isEmpty()) { + if (boardsBuilder_.isEmpty()) { + boardsBuilder_.dispose(); + boardsBuilder_ = null; + boards_ = other.boards_; + bitField0_ = (bitField0_ & ~0x00000001); + boardsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getBoardsFieldBuilder() : null; + } else { + boardsBuilder_.addAllMessages(other.boards_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Board.BoardListAllResp parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Board.BoardListAllResp) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List boards_ = + java.util.Collections.emptyList(); + private void ensureBoardsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + boards_ = new java.util.ArrayList(boards_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Board.BoardListItem, cc.arduino.cli.commands.Board.BoardListItem.Builder, cc.arduino.cli.commands.Board.BoardListItemOrBuilder> boardsBuilder_; + + /** + *
+       * List of installed boards.
+       * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 1; + */ + public java.util.List getBoardsList() { + if (boardsBuilder_ == null) { + return java.util.Collections.unmodifiableList(boards_); + } else { + return boardsBuilder_.getMessageList(); + } + } + /** + *
+       * List of installed boards.
+       * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 1; + */ + public int getBoardsCount() { + if (boardsBuilder_ == null) { + return boards_.size(); + } else { + return boardsBuilder_.getCount(); + } + } + /** + *
+       * List of installed boards.
+       * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 1; + */ + public cc.arduino.cli.commands.Board.BoardListItem getBoards(int index) { + if (boardsBuilder_ == null) { + return boards_.get(index); + } else { + return boardsBuilder_.getMessage(index); + } + } + /** + *
+       * List of installed boards.
+       * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 1; + */ + public Builder setBoards( + int index, cc.arduino.cli.commands.Board.BoardListItem value) { + if (boardsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBoardsIsMutable(); + boards_.set(index, value); + onChanged(); + } else { + boardsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * List of installed boards.
+       * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 1; + */ + public Builder setBoards( + int index, cc.arduino.cli.commands.Board.BoardListItem.Builder builderForValue) { + if (boardsBuilder_ == null) { + ensureBoardsIsMutable(); + boards_.set(index, builderForValue.build()); + onChanged(); + } else { + boardsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * List of installed boards.
+       * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 1; + */ + public Builder addBoards(cc.arduino.cli.commands.Board.BoardListItem value) { + if (boardsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBoardsIsMutable(); + boards_.add(value); + onChanged(); + } else { + boardsBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * List of installed boards.
+       * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 1; + */ + public Builder addBoards( + int index, cc.arduino.cli.commands.Board.BoardListItem value) { + if (boardsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBoardsIsMutable(); + boards_.add(index, value); + onChanged(); + } else { + boardsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * List of installed boards.
+       * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 1; + */ + public Builder addBoards( + cc.arduino.cli.commands.Board.BoardListItem.Builder builderForValue) { + if (boardsBuilder_ == null) { + ensureBoardsIsMutable(); + boards_.add(builderForValue.build()); + onChanged(); + } else { + boardsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * List of installed boards.
+       * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 1; + */ + public Builder addBoards( + int index, cc.arduino.cli.commands.Board.BoardListItem.Builder builderForValue) { + if (boardsBuilder_ == null) { + ensureBoardsIsMutable(); + boards_.add(index, builderForValue.build()); + onChanged(); + } else { + boardsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * List of installed boards.
+       * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 1; + */ + public Builder addAllBoards( + java.lang.Iterable values) { + if (boardsBuilder_ == null) { + ensureBoardsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, boards_); + onChanged(); + } else { + boardsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * List of installed boards.
+       * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 1; + */ + public Builder clearBoards() { + if (boardsBuilder_ == null) { + boards_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + boardsBuilder_.clear(); + } + return this; + } + /** + *
+       * List of installed boards.
+       * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 1; + */ + public Builder removeBoards(int index) { + if (boardsBuilder_ == null) { + ensureBoardsIsMutable(); + boards_.remove(index); + onChanged(); + } else { + boardsBuilder_.remove(index); + } + return this; + } + /** + *
+       * List of installed boards.
+       * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 1; + */ + public cc.arduino.cli.commands.Board.BoardListItem.Builder getBoardsBuilder( + int index) { + return getBoardsFieldBuilder().getBuilder(index); + } + /** + *
+       * List of installed boards.
+       * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 1; + */ + public cc.arduino.cli.commands.Board.BoardListItemOrBuilder getBoardsOrBuilder( + int index) { + if (boardsBuilder_ == null) { + return boards_.get(index); } else { + return boardsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * List of installed boards.
+       * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 1; + */ + public java.util.List + getBoardsOrBuilderList() { + if (boardsBuilder_ != null) { + return boardsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(boards_); + } + } + /** + *
+       * List of installed boards.
+       * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 1; + */ + public cc.arduino.cli.commands.Board.BoardListItem.Builder addBoardsBuilder() { + return getBoardsFieldBuilder().addBuilder( + cc.arduino.cli.commands.Board.BoardListItem.getDefaultInstance()); + } + /** + *
+       * List of installed boards.
+       * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 1; + */ + public cc.arduino.cli.commands.Board.BoardListItem.Builder addBoardsBuilder( + int index) { + return getBoardsFieldBuilder().addBuilder( + index, cc.arduino.cli.commands.Board.BoardListItem.getDefaultInstance()); + } + /** + *
+       * List of installed boards.
+       * 
+ * + * repeated .cc.arduino.cli.commands.BoardListItem boards = 1; + */ + public java.util.List + getBoardsBuilderList() { + return getBoardsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Board.BoardListItem, cc.arduino.cli.commands.Board.BoardListItem.Builder, cc.arduino.cli.commands.Board.BoardListItemOrBuilder> + getBoardsFieldBuilder() { + if (boardsBuilder_ == null) { + boardsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Board.BoardListItem, cc.arduino.cli.commands.Board.BoardListItem.Builder, cc.arduino.cli.commands.Board.BoardListItemOrBuilder>( + boards_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + boards_ = null; + } + return boardsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.BoardListAllResp) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.BoardListAllResp) + private static final cc.arduino.cli.commands.Board.BoardListAllResp DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Board.BoardListAllResp(); + } + + public static cc.arduino.cli.commands.Board.BoardListAllResp getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BoardListAllResp parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BoardListAllResp(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.BoardListAllResp getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface BoardListItemOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.BoardListItem) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The name for use when identifying the board to a human.
+     * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+     * The name for use when identifying the board to a human.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+     * The fully qualified board name. Used to identify the board to a machine.
+     * 
+ * + * string FQBN = 2; + * @return The fQBN. + */ + java.lang.String getFQBN(); + /** + *
+     * The fully qualified board name. Used to identify the board to a machine.
+     * 
+ * + * string FQBN = 2; + * @return The bytes for fQBN. + */ + com.google.protobuf.ByteString + getFQBNBytes(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.BoardListItem} + */ + public static final class BoardListItem extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.BoardListItem) + BoardListItemOrBuilder { + private static final long serialVersionUID = 0L; + // Use BoardListItem.newBuilder() to construct. + private BoardListItem(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BoardListItem() { + name_ = ""; + fQBN_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BoardListItem(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BoardListItem( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + fQBN_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardListItem_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardListItem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Board.BoardListItem.class, cc.arduino.cli.commands.Board.BoardListItem.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+     * The name for use when identifying the board to a human.
+     * 
+ * + * string name = 1; + * @return The name. + */ + 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; + } + } + /** + *
+     * The name for use when identifying the board to a human.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + 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 FQBN_FIELD_NUMBER = 2; + private volatile java.lang.Object fQBN_; + /** + *
+     * The fully qualified board name. Used to identify the board to a machine.
+     * 
+ * + * string FQBN = 2; + * @return The fQBN. + */ + public java.lang.String getFQBN() { + java.lang.Object ref = fQBN_; + 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(); + fQBN_ = s; + return s; + } + } + /** + *
+     * The fully qualified board name. Used to identify the board to a machine.
+     * 
+ * + * string FQBN = 2; + * @return The bytes for fQBN. + */ + public com.google.protobuf.ByteString + getFQBNBytes() { + java.lang.Object ref = fQBN_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fQBN_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getFQBNBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, fQBN_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getFQBNBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, fQBN_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Board.BoardListItem)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Board.BoardListItem other = (cc.arduino.cli.commands.Board.BoardListItem) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getFQBN() + .equals(other.getFQBN())) return false; + if (!unknownFields.equals(other.unknownFields)) 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(); + hash = (37 * hash) + FQBN_FIELD_NUMBER; + hash = (53 * hash) + getFQBN().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Board.BoardListItem parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.BoardListItem parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardListItem parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.BoardListItem parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardListItem parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Board.BoardListItem parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardListItem parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.BoardListItem parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardListItem parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.BoardListItem parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Board.BoardListItem parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Board.BoardListItem parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Board.BoardListItem 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.BoardListItem} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.BoardListItem) + cc.arduino.cli.commands.Board.BoardListItemOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardListItem_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardListItem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Board.BoardListItem.class, cc.arduino.cli.commands.Board.BoardListItem.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Board.BoardListItem.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + fQBN_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Board.internal_static_cc_arduino_cli_commands_BoardListItem_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.BoardListItem getDefaultInstanceForType() { + return cc.arduino.cli.commands.Board.BoardListItem.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.BoardListItem build() { + cc.arduino.cli.commands.Board.BoardListItem result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.BoardListItem buildPartial() { + cc.arduino.cli.commands.Board.BoardListItem result = new cc.arduino.cli.commands.Board.BoardListItem(this); + result.name_ = name_; + result.fQBN_ = fQBN_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Board.BoardListItem) { + return mergeFrom((cc.arduino.cli.commands.Board.BoardListItem)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Board.BoardListItem other) { + if (other == cc.arduino.cli.commands.Board.BoardListItem.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getFQBN().isEmpty()) { + fQBN_ = other.fQBN_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Board.BoardListItem parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Board.BoardListItem) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+       * The name for use when identifying the board to a human.
+       * 
+ * + * 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; + } + } + /** + *
+       * The name for use when identifying the board to a human.
+       * 
+ * + * 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; + } + } + /** + *
+       * The name for use when identifying the board to a human.
+       * 
+ * + * 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; + onChanged(); + return this; + } + /** + *
+       * The name for use when identifying the board to a human.
+       * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+       * The name for use when identifying the board to a human.
+       * 
+ * + * 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; + onChanged(); + return this; + } + + private java.lang.Object fQBN_ = ""; + /** + *
+       * The fully qualified board name. Used to identify the board to a machine.
+       * 
+ * + * string FQBN = 2; + * @return The fQBN. + */ + public java.lang.String getFQBN() { + java.lang.Object ref = fQBN_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fQBN_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The fully qualified board name. Used to identify the board to a machine.
+       * 
+ * + * string FQBN = 2; + * @return The bytes for fQBN. + */ + public com.google.protobuf.ByteString + getFQBNBytes() { + java.lang.Object ref = fQBN_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fQBN_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The fully qualified board name. Used to identify the board to a machine.
+       * 
+ * + * string FQBN = 2; + * @param value The fQBN to set. + * @return This builder for chaining. + */ + public Builder setFQBN( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + fQBN_ = value; + onChanged(); + return this; + } + /** + *
+       * The fully qualified board name. Used to identify the board to a machine.
+       * 
+ * + * string FQBN = 2; + * @return This builder for chaining. + */ + public Builder clearFQBN() { + + fQBN_ = getDefaultInstance().getFQBN(); + onChanged(); + return this; + } + /** + *
+       * The fully qualified board name. Used to identify the board to a machine.
+       * 
+ * + * string FQBN = 2; + * @param value The bytes for fQBN to set. + * @return This builder for chaining. + */ + public Builder setFQBNBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + fQBN_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.BoardListItem) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.BoardListItem) + private static final cc.arduino.cli.commands.Board.BoardListItem DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Board.BoardListItem(); + } + + public static cc.arduino.cli.commands.Board.BoardListItem getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BoardListItem parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BoardListItem(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Board.BoardListItem getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_BoardDetailsReq_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_BoardDetailsReq_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_BoardDetailsResp_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_BoardDetailsResp_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_IdentificationPref_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_IdentificationPref_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_USBID_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_USBID_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_Package_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_Package_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_Help_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_Help_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_BoardPlatform_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_BoardPlatform_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_ToolsDependencies_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_ToolsDependencies_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_Systems_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_Systems_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_ConfigOption_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_ConfigOption_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_ConfigValue_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_ConfigValue_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_BoardAttachReq_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_BoardAttachReq_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_BoardAttachResp_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_BoardAttachResp_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_BoardListReq_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_BoardListReq_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_BoardListResp_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_BoardListResp_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_DetectedPort_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_DetectedPort_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_BoardListAllReq_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_BoardListAllReq_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_BoardListAllResp_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_BoardListAllResp_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_BoardListItem_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_BoardListItem_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\024commands/board.proto\022\027cc.arduino.cli.c" + + "ommands\032\025commands/common.proto\"T\n\017BoardD" + + "etailsReq\0223\n\010instance\030\001 \001(\0132!.cc.arduino" + + ".cli.commands.Instance\022\014\n\004fqbn\030\002 \001(\t\"\303\003\n" + + "\020BoardDetailsResp\022\014\n\004fqbn\030\001 \001(\t\022\014\n\004name\030" + + "\002 \001(\t\022\017\n\007version\030\003 \001(\t\022\024\n\014propertiesId\030\004" + + " \001(\t\022\r\n\005alias\030\005 \001(\t\022\020\n\010official\030\006 \001(\010\022\016\n" + + "\006pinout\030\007 \001(\t\0221\n\007package\030\010 \001(\0132 .cc.ardu" + + "ino.cli.commands.Package\0228\n\010platform\030\t \001" + + "(\0132&.cc.arduino.cli.commands.BoardPlatfo" + + "rm\022E\n\021toolsDependencies\030\n \003(\0132*.cc.ardui" + + "no.cli.commands.ToolsDependencies\022=\n\016con" + + "fig_options\030\013 \003(\0132%.cc.arduino.cli.comma" + + "nds.ConfigOption\022H\n\023identification_pref\030" + + "\014 \003(\0132+.cc.arduino.cli.commands.Identifi" + + "cationPref\"C\n\022IdentificationPref\022-\n\005usbI" + + "D\030\001 \001(\0132\036.cc.arduino.cli.commands.USBID\"" + + "!\n\005USBID\022\013\n\003VID\030\001 \001(\t\022\013\n\003PID\030\002 \001(\t\"\210\001\n\007P" + + "ackage\022\022\n\nmaintainer\030\001 \001(\t\022\013\n\003url\030\002 \001(\t\022" + + "\022\n\nwebsiteURL\030\003 \001(\t\022\r\n\005email\030\004 \001(\t\022\014\n\004na" + + "me\030\005 \001(\t\022+\n\004help\030\006 \001(\0132\035.cc.arduino.cli." + + "commands.Help\"\026\n\004Help\022\016\n\006online\030\001 \001(\t\"\213\001" + + "\n\rBoardPlatform\022\024\n\014architecture\030\001 \001(\t\022\020\n" + + "\010category\030\002 \001(\t\022\013\n\003url\030\003 \001(\t\022\027\n\017archiveF" + + "ileName\030\004 \001(\t\022\020\n\010checksum\030\005 \001(\t\022\014\n\004size\030" + + "\006 \001(\003\022\014\n\004name\030\007 \001(\t\"w\n\021ToolsDependencies" + + "\022\020\n\010packager\030\001 \001(\t\022\014\n\004name\030\002 \001(\t\022\017\n\007vers" + + "ion\030\003 \001(\t\0221\n\007systems\030\004 \003(\0132 .cc.arduino." + + "cli.commands.Systems\"]\n\007Systems\022\020\n\010check" + + "sum\030\001 \001(\t\022\014\n\004host\030\002 \001(\t\022\027\n\017archiveFileNa" + + "me\030\003 \001(\t\022\013\n\003url\030\004 \001(\t\022\014\n\004size\030\005 \001(\003\"j\n\014C" + + "onfigOption\022\016\n\006option\030\001 \001(\t\022\024\n\014option_la" + + "bel\030\002 \001(\t\0224\n\006values\030\003 \003(\0132$.cc.arduino.c" + + "li.commands.ConfigValue\"C\n\013ConfigValue\022\r" + + "\n\005value\030\001 \001(\t\022\023\n\013value_label\030\002 \001(\t\022\020\n\010se" + + "lected\030\003 \001(\010\"\205\001\n\016BoardAttachReq\0223\n\010insta" + + "nce\030\001 \001(\0132!.cc.arduino.cli.commands.Inst" + + "ance\022\021\n\tboard_uri\030\002 \001(\t\022\023\n\013sketch_path\030\003" + + " \001(\t\022\026\n\016search_timeout\030\004 \001(\t\"O\n\017BoardAtt" + + "achResp\022<\n\rtask_progress\030\001 \001(\0132%.cc.ardu" + + "ino.cli.commands.TaskProgress\"C\n\014BoardLi" + + "stReq\0223\n\010instance\030\001 \001(\0132!.cc.arduino.cli" + + ".commands.Instance\"E\n\rBoardListResp\0224\n\005p" + + "orts\030\001 \003(\0132%.cc.arduino.cli.commands.Det" + + "ectedPort\"\201\001\n\014DetectedPort\022\017\n\007address\030\001 " + + "\001(\t\022\020\n\010protocol\030\002 \001(\t\022\026\n\016protocol_label\030" + + "\003 \001(\t\0226\n\006boards\030\004 \003(\0132&.cc.arduino.cli.c" + + "ommands.BoardListItem\"[\n\017BoardListAllReq" + + "\0223\n\010instance\030\001 \001(\0132!.cc.arduino.cli.comm" + + "ands.Instance\022\023\n\013search_args\030\002 \003(\t\"J\n\020Bo" + + "ardListAllResp\0226\n\006boards\030\001 \003(\0132&.cc.ardu" + + "ino.cli.commands.BoardListItem\"+\n\rBoardL" + + "istItem\022\014\n\004name\030\001 \001(\t\022\014\n\004FQBN\030\002 \001(\tB-Z+g" + + "ithub.com/arduino/arduino-cli/rpc/comman" + + "dsb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + cc.arduino.cli.commands.Common.getDescriptor(), + }); + internal_static_cc_arduino_cli_commands_BoardDetailsReq_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_cc_arduino_cli_commands_BoardDetailsReq_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_BoardDetailsReq_descriptor, + new java.lang.String[] { "Instance", "Fqbn", }); + internal_static_cc_arduino_cli_commands_BoardDetailsResp_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_cc_arduino_cli_commands_BoardDetailsResp_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_BoardDetailsResp_descriptor, + new java.lang.String[] { "Fqbn", "Name", "Version", "PropertiesId", "Alias", "Official", "Pinout", "Package", "Platform", "ToolsDependencies", "ConfigOptions", "IdentificationPref", }); + internal_static_cc_arduino_cli_commands_IdentificationPref_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_cc_arduino_cli_commands_IdentificationPref_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_IdentificationPref_descriptor, + new java.lang.String[] { "UsbID", }); + internal_static_cc_arduino_cli_commands_USBID_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_cc_arduino_cli_commands_USBID_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_USBID_descriptor, + new java.lang.String[] { "VID", "PID", }); + internal_static_cc_arduino_cli_commands_Package_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_cc_arduino_cli_commands_Package_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_Package_descriptor, + new java.lang.String[] { "Maintainer", "Url", "WebsiteURL", "Email", "Name", "Help", }); + internal_static_cc_arduino_cli_commands_Help_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_cc_arduino_cli_commands_Help_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_Help_descriptor, + new java.lang.String[] { "Online", }); + internal_static_cc_arduino_cli_commands_BoardPlatform_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_cc_arduino_cli_commands_BoardPlatform_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_BoardPlatform_descriptor, + new java.lang.String[] { "Architecture", "Category", "Url", "ArchiveFileName", "Checksum", "Size", "Name", }); + internal_static_cc_arduino_cli_commands_ToolsDependencies_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_cc_arduino_cli_commands_ToolsDependencies_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_ToolsDependencies_descriptor, + new java.lang.String[] { "Packager", "Name", "Version", "Systems", }); + internal_static_cc_arduino_cli_commands_Systems_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_cc_arduino_cli_commands_Systems_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_Systems_descriptor, + new java.lang.String[] { "Checksum", "Host", "ArchiveFileName", "Url", "Size", }); + internal_static_cc_arduino_cli_commands_ConfigOption_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_cc_arduino_cli_commands_ConfigOption_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_ConfigOption_descriptor, + new java.lang.String[] { "Option", "OptionLabel", "Values", }); + internal_static_cc_arduino_cli_commands_ConfigValue_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_cc_arduino_cli_commands_ConfigValue_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_ConfigValue_descriptor, + new java.lang.String[] { "Value", "ValueLabel", "Selected", }); + internal_static_cc_arduino_cli_commands_BoardAttachReq_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_cc_arduino_cli_commands_BoardAttachReq_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_BoardAttachReq_descriptor, + new java.lang.String[] { "Instance", "BoardUri", "SketchPath", "SearchTimeout", }); + internal_static_cc_arduino_cli_commands_BoardAttachResp_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_cc_arduino_cli_commands_BoardAttachResp_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_BoardAttachResp_descriptor, + new java.lang.String[] { "TaskProgress", }); + internal_static_cc_arduino_cli_commands_BoardListReq_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_cc_arduino_cli_commands_BoardListReq_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_BoardListReq_descriptor, + new java.lang.String[] { "Instance", }); + internal_static_cc_arduino_cli_commands_BoardListResp_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_cc_arduino_cli_commands_BoardListResp_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_BoardListResp_descriptor, + new java.lang.String[] { "Ports", }); + internal_static_cc_arduino_cli_commands_DetectedPort_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_cc_arduino_cli_commands_DetectedPort_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_DetectedPort_descriptor, + new java.lang.String[] { "Address", "Protocol", "ProtocolLabel", "Boards", }); + internal_static_cc_arduino_cli_commands_BoardListAllReq_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_cc_arduino_cli_commands_BoardListAllReq_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_BoardListAllReq_descriptor, + new java.lang.String[] { "Instance", "SearchArgs", }); + internal_static_cc_arduino_cli_commands_BoardListAllResp_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_cc_arduino_cli_commands_BoardListAllResp_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_BoardListAllResp_descriptor, + new java.lang.String[] { "Boards", }); + internal_static_cc_arduino_cli_commands_BoardListItem_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_cc_arduino_cli_commands_BoardListItem_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_BoardListItem_descriptor, + new java.lang.String[] { "Name", "FQBN", }); + cc.arduino.cli.commands.Common.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/arduino-core/src/cc/arduino/cli/commands/Commands.java b/arduino-core/src/cc/arduino/cli/commands/Commands.java new file mode 100644 index 00000000000..85191b54079 --- /dev/null +++ b/arduino-core/src/cc/arduino/cli/commands/Commands.java @@ -0,0 +1,8910 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: commands/commands.proto + +package cc.arduino.cli.commands; + +public final class Commands { + private Commands() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface InitReqOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.InitReq) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Start a Arduino Core Service instance that will provide only Library
+     * Manager functionality.
+     * 
+ * + * bool library_manager_only = 2; + * @return The libraryManagerOnly. + */ + boolean getLibraryManagerOnly(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.InitReq} + */ + public static final class InitReq extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.InitReq) + InitReqOrBuilder { + private static final long serialVersionUID = 0L; + // Use InitReq.newBuilder() to construct. + private InitReq(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private InitReq() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new InitReq(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private InitReq( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 16: { + + libraryManagerOnly_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_InitReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_InitReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Commands.InitReq.class, cc.arduino.cli.commands.Commands.InitReq.Builder.class); + } + + public static final int LIBRARY_MANAGER_ONLY_FIELD_NUMBER = 2; + private boolean libraryManagerOnly_; + /** + *
+     * Start a Arduino Core Service instance that will provide only Library
+     * Manager functionality.
+     * 
+ * + * bool library_manager_only = 2; + * @return The libraryManagerOnly. + */ + public boolean getLibraryManagerOnly() { + return libraryManagerOnly_; + } + + 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 (libraryManagerOnly_ != false) { + output.writeBool(2, libraryManagerOnly_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (libraryManagerOnly_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, libraryManagerOnly_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Commands.InitReq)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Commands.InitReq other = (cc.arduino.cli.commands.Commands.InitReq) obj; + + if (getLibraryManagerOnly() + != other.getLibraryManagerOnly()) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + LIBRARY_MANAGER_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getLibraryManagerOnly()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Commands.InitReq parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Commands.InitReq parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.InitReq parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Commands.InitReq parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.InitReq parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Commands.InitReq parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.InitReq parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Commands.InitReq parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.InitReq parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Commands.InitReq parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.InitReq parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Commands.InitReq parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Commands.InitReq 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.InitReq} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.InitReq) + cc.arduino.cli.commands.Commands.InitReqOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_InitReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_InitReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Commands.InitReq.class, cc.arduino.cli.commands.Commands.InitReq.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Commands.InitReq.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + libraryManagerOnly_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_InitReq_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.InitReq getDefaultInstanceForType() { + return cc.arduino.cli.commands.Commands.InitReq.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.InitReq build() { + cc.arduino.cli.commands.Commands.InitReq result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.InitReq buildPartial() { + cc.arduino.cli.commands.Commands.InitReq result = new cc.arduino.cli.commands.Commands.InitReq(this); + result.libraryManagerOnly_ = libraryManagerOnly_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Commands.InitReq) { + return mergeFrom((cc.arduino.cli.commands.Commands.InitReq)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Commands.InitReq other) { + if (other == cc.arduino.cli.commands.Commands.InitReq.getDefaultInstance()) return this; + if (other.getLibraryManagerOnly() != false) { + setLibraryManagerOnly(other.getLibraryManagerOnly()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Commands.InitReq parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Commands.InitReq) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean libraryManagerOnly_ ; + /** + *
+       * Start a Arduino Core Service instance that will provide only Library
+       * Manager functionality.
+       * 
+ * + * bool library_manager_only = 2; + * @return The libraryManagerOnly. + */ + public boolean getLibraryManagerOnly() { + return libraryManagerOnly_; + } + /** + *
+       * Start a Arduino Core Service instance that will provide only Library
+       * Manager functionality.
+       * 
+ * + * bool library_manager_only = 2; + * @param value The libraryManagerOnly to set. + * @return This builder for chaining. + */ + public Builder setLibraryManagerOnly(boolean value) { + + libraryManagerOnly_ = value; + onChanged(); + return this; + } + /** + *
+       * Start a Arduino Core Service instance that will provide only Library
+       * Manager functionality.
+       * 
+ * + * bool library_manager_only = 2; + * @return This builder for chaining. + */ + public Builder clearLibraryManagerOnly() { + + libraryManagerOnly_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.InitReq) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.InitReq) + private static final cc.arduino.cli.commands.Commands.InitReq DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Commands.InitReq(); + } + + public static cc.arduino.cli.commands.Commands.InitReq getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InitReq parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InitReq(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.InitReq getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface InitRespOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.InitResp) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * An Arduino Core Service instance.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + boolean hasInstance(); + /** + *
+     * An Arduino Core Service instance.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + cc.arduino.cli.commands.Common.Instance getInstance(); + /** + *
+     * An Arduino Core Service instance.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder(); + + /** + *
+     * Error messages related to any problems encountered while parsing the
+     * platforms index files.
+     * 
+ * + * repeated string platforms_index_errors = 2; + * @return A list containing the platformsIndexErrors. + */ + java.util.List + getPlatformsIndexErrorsList(); + /** + *
+     * Error messages related to any problems encountered while parsing the
+     * platforms index files.
+     * 
+ * + * repeated string platforms_index_errors = 2; + * @return The count of platformsIndexErrors. + */ + int getPlatformsIndexErrorsCount(); + /** + *
+     * Error messages related to any problems encountered while parsing the
+     * platforms index files.
+     * 
+ * + * repeated string platforms_index_errors = 2; + * @param index The index of the element to return. + * @return The platformsIndexErrors at the given index. + */ + java.lang.String getPlatformsIndexErrors(int index); + /** + *
+     * Error messages related to any problems encountered while parsing the
+     * platforms index files.
+     * 
+ * + * repeated string platforms_index_errors = 2; + * @param index The index of the value to return. + * @return The bytes of the platformsIndexErrors at the given index. + */ + com.google.protobuf.ByteString + getPlatformsIndexErrorsBytes(int index); + + /** + *
+     * Error message if a problem was encountered while parsing the libraries
+     * index file.
+     * 
+ * + * string libraries_index_error = 3; + * @return The librariesIndexError. + */ + java.lang.String getLibrariesIndexError(); + /** + *
+     * Error message if a problem was encountered while parsing the libraries
+     * index file.
+     * 
+ * + * string libraries_index_error = 3; + * @return The bytes for librariesIndexError. + */ + com.google.protobuf.ByteString + getLibrariesIndexErrorBytes(); + + /** + *
+     * Progress of the downloads of platforms and libraries index files.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 4; + * @return Whether the downloadProgress field is set. + */ + boolean hasDownloadProgress(); + /** + *
+     * Progress of the downloads of platforms and libraries index files.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 4; + * @return The downloadProgress. + */ + cc.arduino.cli.commands.Common.DownloadProgress getDownloadProgress(); + /** + *
+     * Progress of the downloads of platforms and libraries index files.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 4; + */ + cc.arduino.cli.commands.Common.DownloadProgressOrBuilder getDownloadProgressOrBuilder(); + + /** + *
+     * Describes the current stage of the initialization.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 5; + * @return Whether the taskProgress field is set. + */ + boolean hasTaskProgress(); + /** + *
+     * Describes the current stage of the initialization.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 5; + * @return The taskProgress. + */ + cc.arduino.cli.commands.Common.TaskProgress getTaskProgress(); + /** + *
+     * Describes the current stage of the initialization.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 5; + */ + cc.arduino.cli.commands.Common.TaskProgressOrBuilder getTaskProgressOrBuilder(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.InitResp} + */ + public static final class InitResp extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.InitResp) + InitRespOrBuilder { + private static final long serialVersionUID = 0L; + // Use InitResp.newBuilder() to construct. + private InitResp(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private InitResp() { + platformsIndexErrors_ = com.google.protobuf.LazyStringArrayList.EMPTY; + librariesIndexError_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new InitResp(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private InitResp( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cc.arduino.cli.commands.Common.Instance.Builder subBuilder = null; + if (instance_ != null) { + subBuilder = instance_.toBuilder(); + } + instance_ = input.readMessage(cc.arduino.cli.commands.Common.Instance.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instance_); + instance_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + platformsIndexErrors_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + platformsIndexErrors_.add(s); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + librariesIndexError_ = s; + break; + } + case 34: { + cc.arduino.cli.commands.Common.DownloadProgress.Builder subBuilder = null; + if (downloadProgress_ != null) { + subBuilder = downloadProgress_.toBuilder(); + } + downloadProgress_ = input.readMessage(cc.arduino.cli.commands.Common.DownloadProgress.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(downloadProgress_); + downloadProgress_ = subBuilder.buildPartial(); + } + + break; + } + case 42: { + 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; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + platformsIndexErrors_ = platformsIndexErrors_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_InitResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_InitResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Commands.InitResp.class, cc.arduino.cli.commands.Commands.InitResp.Builder.class); + } + + public static final int INSTANCE_FIELD_NUMBER = 1; + private cc.arduino.cli.commands.Common.Instance instance_; + /** + *
+     * An Arduino Core Service instance.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instance_ != null; + } + /** + *
+     * An Arduino Core Service instance.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + /** + *
+     * An Arduino Core Service instance.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + return getInstance(); + } + + public static final int PLATFORMS_INDEX_ERRORS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList platformsIndexErrors_; + /** + *
+     * Error messages related to any problems encountered while parsing the
+     * platforms index files.
+     * 
+ * + * repeated string platforms_index_errors = 2; + * @return A list containing the platformsIndexErrors. + */ + public com.google.protobuf.ProtocolStringList + getPlatformsIndexErrorsList() { + return platformsIndexErrors_; + } + /** + *
+     * Error messages related to any problems encountered while parsing the
+     * platforms index files.
+     * 
+ * + * repeated string platforms_index_errors = 2; + * @return The count of platformsIndexErrors. + */ + public int getPlatformsIndexErrorsCount() { + return platformsIndexErrors_.size(); + } + /** + *
+     * Error messages related to any problems encountered while parsing the
+     * platforms index files.
+     * 
+ * + * repeated string platforms_index_errors = 2; + * @param index The index of the element to return. + * @return The platformsIndexErrors at the given index. + */ + public java.lang.String getPlatformsIndexErrors(int index) { + return platformsIndexErrors_.get(index); + } + /** + *
+     * Error messages related to any problems encountered while parsing the
+     * platforms index files.
+     * 
+ * + * repeated string platforms_index_errors = 2; + * @param index The index of the value to return. + * @return The bytes of the platformsIndexErrors at the given index. + */ + public com.google.protobuf.ByteString + getPlatformsIndexErrorsBytes(int index) { + return platformsIndexErrors_.getByteString(index); + } + + public static final int LIBRARIES_INDEX_ERROR_FIELD_NUMBER = 3; + private volatile java.lang.Object librariesIndexError_; + /** + *
+     * Error message if a problem was encountered while parsing the libraries
+     * index file.
+     * 
+ * + * string libraries_index_error = 3; + * @return The librariesIndexError. + */ + public java.lang.String getLibrariesIndexError() { + java.lang.Object ref = librariesIndexError_; + 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(); + librariesIndexError_ = s; + return s; + } + } + /** + *
+     * Error message if a problem was encountered while parsing the libraries
+     * index file.
+     * 
+ * + * string libraries_index_error = 3; + * @return The bytes for librariesIndexError. + */ + public com.google.protobuf.ByteString + getLibrariesIndexErrorBytes() { + java.lang.Object ref = librariesIndexError_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + librariesIndexError_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DOWNLOAD_PROGRESS_FIELD_NUMBER = 4; + private cc.arduino.cli.commands.Common.DownloadProgress downloadProgress_; + /** + *
+     * Progress of the downloads of platforms and libraries index files.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 4; + * @return Whether the downloadProgress field is set. + */ + public boolean hasDownloadProgress() { + return downloadProgress_ != null; + } + /** + *
+     * Progress of the downloads of platforms and libraries index files.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 4; + * @return The downloadProgress. + */ + public cc.arduino.cli.commands.Common.DownloadProgress getDownloadProgress() { + return downloadProgress_ == null ? cc.arduino.cli.commands.Common.DownloadProgress.getDefaultInstance() : downloadProgress_; + } + /** + *
+     * Progress of the downloads of platforms and libraries index files.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 4; + */ + public cc.arduino.cli.commands.Common.DownloadProgressOrBuilder getDownloadProgressOrBuilder() { + return getDownloadProgress(); + } + + public static final int TASK_PROGRESS_FIELD_NUMBER = 5; + private cc.arduino.cli.commands.Common.TaskProgress taskProgress_; + /** + *
+     * Describes the current stage of the initialization.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 5; + * @return Whether the taskProgress field is set. + */ + public boolean hasTaskProgress() { + return taskProgress_ != null; + } + /** + *
+     * Describes the current stage of the initialization.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 5; + * @return The taskProgress. + */ + public cc.arduino.cli.commands.Common.TaskProgress getTaskProgress() { + return taskProgress_ == null ? cc.arduino.cli.commands.Common.TaskProgress.getDefaultInstance() : taskProgress_; + } + /** + *
+     * Describes the current stage of the initialization.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 5; + */ + public cc.arduino.cli.commands.Common.TaskProgressOrBuilder getTaskProgressOrBuilder() { + return getTaskProgress(); + } + + 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 (instance_ != null) { + output.writeMessage(1, getInstance()); + } + for (int i = 0; i < platformsIndexErrors_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, platformsIndexErrors_.getRaw(i)); + } + if (!getLibrariesIndexErrorBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, librariesIndexError_); + } + if (downloadProgress_ != null) { + output.writeMessage(4, getDownloadProgress()); + } + if (taskProgress_ != null) { + output.writeMessage(5, getTaskProgress()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (instance_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInstance()); + } + { + int dataSize = 0; + for (int i = 0; i < platformsIndexErrors_.size(); i++) { + dataSize += computeStringSizeNoTag(platformsIndexErrors_.getRaw(i)); + } + size += dataSize; + size += 1 * getPlatformsIndexErrorsList().size(); + } + if (!getLibrariesIndexErrorBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, librariesIndexError_); + } + if (downloadProgress_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getDownloadProgress()); + } + if (taskProgress_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getTaskProgress()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Commands.InitResp)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Commands.InitResp other = (cc.arduino.cli.commands.Commands.InitResp) obj; + + if (hasInstance() != other.hasInstance()) return false; + if (hasInstance()) { + if (!getInstance() + .equals(other.getInstance())) return false; + } + if (!getPlatformsIndexErrorsList() + .equals(other.getPlatformsIndexErrorsList())) return false; + if (!getLibrariesIndexError() + .equals(other.getLibrariesIndexError())) return false; + if (hasDownloadProgress() != other.hasDownloadProgress()) return false; + if (hasDownloadProgress()) { + if (!getDownloadProgress() + .equals(other.getDownloadProgress())) return false; + } + if (hasTaskProgress() != other.hasTaskProgress()) return false; + if (hasTaskProgress()) { + if (!getTaskProgress() + .equals(other.getTaskProgress())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInstance()) { + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + } + if (getPlatformsIndexErrorsCount() > 0) { + hash = (37 * hash) + PLATFORMS_INDEX_ERRORS_FIELD_NUMBER; + hash = (53 * hash) + getPlatformsIndexErrorsList().hashCode(); + } + hash = (37 * hash) + LIBRARIES_INDEX_ERROR_FIELD_NUMBER; + hash = (53 * hash) + getLibrariesIndexError().hashCode(); + if (hasDownloadProgress()) { + hash = (37 * hash) + DOWNLOAD_PROGRESS_FIELD_NUMBER; + hash = (53 * hash) + getDownloadProgress().hashCode(); + } + if (hasTaskProgress()) { + hash = (37 * hash) + TASK_PROGRESS_FIELD_NUMBER; + hash = (53 * hash) + getTaskProgress().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Commands.InitResp parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Commands.InitResp parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.InitResp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Commands.InitResp parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.InitResp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Commands.InitResp parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.InitResp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Commands.InitResp parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.InitResp parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Commands.InitResp parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.InitResp parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Commands.InitResp parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Commands.InitResp 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.InitResp} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.InitResp) + cc.arduino.cli.commands.Commands.InitRespOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_InitResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_InitResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Commands.InitResp.class, cc.arduino.cli.commands.Commands.InitResp.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Commands.InitResp.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (instanceBuilder_ == null) { + instance_ = null; + } else { + instance_ = null; + instanceBuilder_ = null; + } + platformsIndexErrors_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + librariesIndexError_ = ""; + + if (downloadProgressBuilder_ == null) { + downloadProgress_ = null; + } else { + downloadProgress_ = null; + downloadProgressBuilder_ = null; + } + if (taskProgressBuilder_ == null) { + taskProgress_ = null; + } else { + taskProgress_ = null; + taskProgressBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_InitResp_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.InitResp getDefaultInstanceForType() { + return cc.arduino.cli.commands.Commands.InitResp.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.InitResp build() { + cc.arduino.cli.commands.Commands.InitResp result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.InitResp buildPartial() { + cc.arduino.cli.commands.Commands.InitResp result = new cc.arduino.cli.commands.Commands.InitResp(this); + int from_bitField0_ = bitField0_; + if (instanceBuilder_ == null) { + result.instance_ = instance_; + } else { + result.instance_ = instanceBuilder_.build(); + } + if (((bitField0_ & 0x00000001) != 0)) { + platformsIndexErrors_ = platformsIndexErrors_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.platformsIndexErrors_ = platformsIndexErrors_; + result.librariesIndexError_ = librariesIndexError_; + if (downloadProgressBuilder_ == null) { + result.downloadProgress_ = downloadProgress_; + } else { + result.downloadProgress_ = downloadProgressBuilder_.build(); + } + if (taskProgressBuilder_ == null) { + result.taskProgress_ = taskProgress_; + } else { + result.taskProgress_ = taskProgressBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Commands.InitResp) { + return mergeFrom((cc.arduino.cli.commands.Commands.InitResp)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Commands.InitResp other) { + if (other == cc.arduino.cli.commands.Commands.InitResp.getDefaultInstance()) return this; + if (other.hasInstance()) { + mergeInstance(other.getInstance()); + } + if (!other.platformsIndexErrors_.isEmpty()) { + if (platformsIndexErrors_.isEmpty()) { + platformsIndexErrors_ = other.platformsIndexErrors_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePlatformsIndexErrorsIsMutable(); + platformsIndexErrors_.addAll(other.platformsIndexErrors_); + } + onChanged(); + } + if (!other.getLibrariesIndexError().isEmpty()) { + librariesIndexError_ = other.librariesIndexError_; + onChanged(); + } + if (other.hasDownloadProgress()) { + mergeDownloadProgress(other.getDownloadProgress()); + } + if (other.hasTaskProgress()) { + mergeTaskProgress(other.getTaskProgress()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Commands.InitResp parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Commands.InitResp) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private cc.arduino.cli.commands.Common.Instance instance_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> instanceBuilder_; + /** + *
+       * An Arduino Core Service instance.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instanceBuilder_ != null || instance_ != null; + } + /** + *
+       * An Arduino Core Service instance.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + if (instanceBuilder_ == null) { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } else { + return instanceBuilder_.getMessage(); + } + } + /** + *
+       * An Arduino Core Service instance.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + onChanged(); + } else { + instanceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * An Arduino Core Service instance.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance( + cc.arduino.cli.commands.Common.Instance.Builder builderForValue) { + if (instanceBuilder_ == null) { + instance_ = builderForValue.build(); + onChanged(); + } else { + instanceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * An Arduino Core Service instance.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder mergeInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (instance_ != null) { + instance_ = + cc.arduino.cli.commands.Common.Instance.newBuilder(instance_).mergeFrom(value).buildPartial(); + } else { + instance_ = value; + } + onChanged(); + } else { + instanceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * An Arduino Core Service instance.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder clearInstance() { + if (instanceBuilder_ == null) { + instance_ = null; + onChanged(); + } else { + instance_ = null; + instanceBuilder_ = null; + } + + return this; + } + /** + *
+       * An Arduino Core Service instance.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.Instance.Builder getInstanceBuilder() { + + onChanged(); + return getInstanceFieldBuilder().getBuilder(); + } + /** + *
+       * An Arduino Core Service instance.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + if (instanceBuilder_ != null) { + return instanceBuilder_.getMessageOrBuilder(); + } else { + return instance_ == null ? + cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + } + /** + *
+       * An Arduino Core Service instance.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> + getInstanceFieldBuilder() { + if (instanceBuilder_ == null) { + instanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder>( + getInstance(), + getParentForChildren(), + isClean()); + instance_ = null; + } + return instanceBuilder_; + } + + private com.google.protobuf.LazyStringList platformsIndexErrors_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensurePlatformsIndexErrorsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + platformsIndexErrors_ = new com.google.protobuf.LazyStringArrayList(platformsIndexErrors_); + bitField0_ |= 0x00000001; + } + } + /** + *
+       * Error messages related to any problems encountered while parsing the
+       * platforms index files.
+       * 
+ * + * repeated string platforms_index_errors = 2; + * @return A list containing the platformsIndexErrors. + */ + public com.google.protobuf.ProtocolStringList + getPlatformsIndexErrorsList() { + return platformsIndexErrors_.getUnmodifiableView(); + } + /** + *
+       * Error messages related to any problems encountered while parsing the
+       * platforms index files.
+       * 
+ * + * repeated string platforms_index_errors = 2; + * @return The count of platformsIndexErrors. + */ + public int getPlatformsIndexErrorsCount() { + return platformsIndexErrors_.size(); + } + /** + *
+       * Error messages related to any problems encountered while parsing the
+       * platforms index files.
+       * 
+ * + * repeated string platforms_index_errors = 2; + * @param index The index of the element to return. + * @return The platformsIndexErrors at the given index. + */ + public java.lang.String getPlatformsIndexErrors(int index) { + return platformsIndexErrors_.get(index); + } + /** + *
+       * Error messages related to any problems encountered while parsing the
+       * platforms index files.
+       * 
+ * + * repeated string platforms_index_errors = 2; + * @param index The index of the value to return. + * @return The bytes of the platformsIndexErrors at the given index. + */ + public com.google.protobuf.ByteString + getPlatformsIndexErrorsBytes(int index) { + return platformsIndexErrors_.getByteString(index); + } + /** + *
+       * Error messages related to any problems encountered while parsing the
+       * platforms index files.
+       * 
+ * + * repeated string platforms_index_errors = 2; + * @param index The index to set the value at. + * @param value The platformsIndexErrors to set. + * @return This builder for chaining. + */ + public Builder setPlatformsIndexErrors( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePlatformsIndexErrorsIsMutable(); + platformsIndexErrors_.set(index, value); + onChanged(); + return this; + } + /** + *
+       * Error messages related to any problems encountered while parsing the
+       * platforms index files.
+       * 
+ * + * repeated string platforms_index_errors = 2; + * @param value The platformsIndexErrors to add. + * @return This builder for chaining. + */ + public Builder addPlatformsIndexErrors( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePlatformsIndexErrorsIsMutable(); + platformsIndexErrors_.add(value); + onChanged(); + return this; + } + /** + *
+       * Error messages related to any problems encountered while parsing the
+       * platforms index files.
+       * 
+ * + * repeated string platforms_index_errors = 2; + * @param values The platformsIndexErrors to add. + * @return This builder for chaining. + */ + public Builder addAllPlatformsIndexErrors( + java.lang.Iterable values) { + ensurePlatformsIndexErrorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, platformsIndexErrors_); + onChanged(); + return this; + } + /** + *
+       * Error messages related to any problems encountered while parsing the
+       * platforms index files.
+       * 
+ * + * repeated string platforms_index_errors = 2; + * @return This builder for chaining. + */ + public Builder clearPlatformsIndexErrors() { + platformsIndexErrors_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * Error messages related to any problems encountered while parsing the
+       * platforms index files.
+       * 
+ * + * repeated string platforms_index_errors = 2; + * @param value The bytes of the platformsIndexErrors to add. + * @return This builder for chaining. + */ + public Builder addPlatformsIndexErrorsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensurePlatformsIndexErrorsIsMutable(); + platformsIndexErrors_.add(value); + onChanged(); + return this; + } + + private java.lang.Object librariesIndexError_ = ""; + /** + *
+       * Error message if a problem was encountered while parsing the libraries
+       * index file.
+       * 
+ * + * string libraries_index_error = 3; + * @return The librariesIndexError. + */ + public java.lang.String getLibrariesIndexError() { + java.lang.Object ref = librariesIndexError_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + librariesIndexError_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Error message if a problem was encountered while parsing the libraries
+       * index file.
+       * 
+ * + * string libraries_index_error = 3; + * @return The bytes for librariesIndexError. + */ + public com.google.protobuf.ByteString + getLibrariesIndexErrorBytes() { + java.lang.Object ref = librariesIndexError_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + librariesIndexError_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Error message if a problem was encountered while parsing the libraries
+       * index file.
+       * 
+ * + * string libraries_index_error = 3; + * @param value The librariesIndexError to set. + * @return This builder for chaining. + */ + public Builder setLibrariesIndexError( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + librariesIndexError_ = value; + onChanged(); + return this; + } + /** + *
+       * Error message if a problem was encountered while parsing the libraries
+       * index file.
+       * 
+ * + * string libraries_index_error = 3; + * @return This builder for chaining. + */ + public Builder clearLibrariesIndexError() { + + librariesIndexError_ = getDefaultInstance().getLibrariesIndexError(); + onChanged(); + return this; + } + /** + *
+       * Error message if a problem was encountered while parsing the libraries
+       * index file.
+       * 
+ * + * string libraries_index_error = 3; + * @param value The bytes for librariesIndexError to set. + * @return This builder for chaining. + */ + public Builder setLibrariesIndexErrorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + librariesIndexError_ = value; + onChanged(); + return this; + } + + private cc.arduino.cli.commands.Common.DownloadProgress downloadProgress_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.DownloadProgress, cc.arduino.cli.commands.Common.DownloadProgress.Builder, cc.arduino.cli.commands.Common.DownloadProgressOrBuilder> downloadProgressBuilder_; + /** + *
+       * Progress of the downloads of platforms and libraries index files.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 4; + * @return Whether the downloadProgress field is set. + */ + public boolean hasDownloadProgress() { + return downloadProgressBuilder_ != null || downloadProgress_ != null; + } + /** + *
+       * Progress of the downloads of platforms and libraries index files.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 4; + * @return The downloadProgress. + */ + public cc.arduino.cli.commands.Common.DownloadProgress getDownloadProgress() { + if (downloadProgressBuilder_ == null) { + return downloadProgress_ == null ? cc.arduino.cli.commands.Common.DownloadProgress.getDefaultInstance() : downloadProgress_; + } else { + return downloadProgressBuilder_.getMessage(); + } + } + /** + *
+       * Progress of the downloads of platforms and libraries index files.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 4; + */ + public Builder setDownloadProgress(cc.arduino.cli.commands.Common.DownloadProgress value) { + if (downloadProgressBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + downloadProgress_ = value; + onChanged(); + } else { + downloadProgressBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Progress of the downloads of platforms and libraries index files.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 4; + */ + public Builder setDownloadProgress( + cc.arduino.cli.commands.Common.DownloadProgress.Builder builderForValue) { + if (downloadProgressBuilder_ == null) { + downloadProgress_ = builderForValue.build(); + onChanged(); + } else { + downloadProgressBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Progress of the downloads of platforms and libraries index files.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 4; + */ + public Builder mergeDownloadProgress(cc.arduino.cli.commands.Common.DownloadProgress value) { + if (downloadProgressBuilder_ == null) { + if (downloadProgress_ != null) { + downloadProgress_ = + cc.arduino.cli.commands.Common.DownloadProgress.newBuilder(downloadProgress_).mergeFrom(value).buildPartial(); + } else { + downloadProgress_ = value; + } + onChanged(); + } else { + downloadProgressBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Progress of the downloads of platforms and libraries index files.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 4; + */ + public Builder clearDownloadProgress() { + if (downloadProgressBuilder_ == null) { + downloadProgress_ = null; + onChanged(); + } else { + downloadProgress_ = null; + downloadProgressBuilder_ = null; + } + + return this; + } + /** + *
+       * Progress of the downloads of platforms and libraries index files.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 4; + */ + public cc.arduino.cli.commands.Common.DownloadProgress.Builder getDownloadProgressBuilder() { + + onChanged(); + return getDownloadProgressFieldBuilder().getBuilder(); + } + /** + *
+       * Progress of the downloads of platforms and libraries index files.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 4; + */ + public cc.arduino.cli.commands.Common.DownloadProgressOrBuilder getDownloadProgressOrBuilder() { + if (downloadProgressBuilder_ != null) { + return downloadProgressBuilder_.getMessageOrBuilder(); + } else { + return downloadProgress_ == null ? + cc.arduino.cli.commands.Common.DownloadProgress.getDefaultInstance() : downloadProgress_; + } + } + /** + *
+       * Progress of the downloads of platforms and libraries index files.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.DownloadProgress, cc.arduino.cli.commands.Common.DownloadProgress.Builder, cc.arduino.cli.commands.Common.DownloadProgressOrBuilder> + getDownloadProgressFieldBuilder() { + if (downloadProgressBuilder_ == null) { + downloadProgressBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.DownloadProgress, cc.arduino.cli.commands.Common.DownloadProgress.Builder, cc.arduino.cli.commands.Common.DownloadProgressOrBuilder>( + getDownloadProgress(), + getParentForChildren(), + isClean()); + downloadProgress_ = null; + } + return downloadProgressBuilder_; + } + + 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_; + /** + *
+       * Describes the current stage of the initialization.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 5; + * @return Whether the taskProgress field is set. + */ + public boolean hasTaskProgress() { + return taskProgressBuilder_ != null || taskProgress_ != null; + } + /** + *
+       * Describes the current stage of the initialization.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 5; + * @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(); + } + } + /** + *
+       * Describes the current stage of the initialization.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 5; + */ + 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; + } + /** + *
+       * Describes the current stage of the initialization.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 5; + */ + 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; + } + /** + *
+       * Describes the current stage of the initialization.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 5; + */ + 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; + } + /** + *
+       * Describes the current stage of the initialization.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 5; + */ + public Builder clearTaskProgress() { + if (taskProgressBuilder_ == null) { + taskProgress_ = null; + onChanged(); + } else { + taskProgress_ = null; + taskProgressBuilder_ = null; + } + + return this; + } + /** + *
+       * Describes the current stage of the initialization.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 5; + */ + public cc.arduino.cli.commands.Common.TaskProgress.Builder getTaskProgressBuilder() { + + onChanged(); + return getTaskProgressFieldBuilder().getBuilder(); + } + /** + *
+       * Describes the current stage of the initialization.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 5; + */ + 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_; + } + } + /** + *
+       * Describes the current stage of the initialization.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 5; + */ + 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_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.InitResp) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.InitResp) + private static final cc.arduino.cli.commands.Commands.InitResp DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Commands.InitResp(); + } + + public static cc.arduino.cli.commands.Commands.InitResp getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InitResp parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InitResp(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.InitResp getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DestroyReqOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.DestroyReq) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The Arduino Core Service instance to destroy.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + boolean hasInstance(); + /** + *
+     * The Arduino Core Service instance to destroy.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + cc.arduino.cli.commands.Common.Instance getInstance(); + /** + *
+     * The Arduino Core Service instance to destroy.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.DestroyReq} + */ + public static final class DestroyReq extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.DestroyReq) + DestroyReqOrBuilder { + private static final long serialVersionUID = 0L; + // Use DestroyReq.newBuilder() to construct. + private DestroyReq(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DestroyReq() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DestroyReq(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DestroyReq( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cc.arduino.cli.commands.Common.Instance.Builder subBuilder = null; + if (instance_ != null) { + subBuilder = instance_.toBuilder(); + } + instance_ = input.readMessage(cc.arduino.cli.commands.Common.Instance.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instance_); + instance_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_DestroyReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_DestroyReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Commands.DestroyReq.class, cc.arduino.cli.commands.Commands.DestroyReq.Builder.class); + } + + public static final int INSTANCE_FIELD_NUMBER = 1; + private cc.arduino.cli.commands.Common.Instance instance_; + /** + *
+     * The Arduino Core Service instance to destroy.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instance_ != null; + } + /** + *
+     * The Arduino Core Service instance to destroy.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + /** + *
+     * The Arduino Core Service instance to destroy.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + return getInstance(); + } + + 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 (instance_ != null) { + output.writeMessage(1, getInstance()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (instance_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInstance()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Commands.DestroyReq)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Commands.DestroyReq other = (cc.arduino.cli.commands.Commands.DestroyReq) obj; + + if (hasInstance() != other.hasInstance()) return false; + if (hasInstance()) { + if (!getInstance() + .equals(other.getInstance())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInstance()) { + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Commands.DestroyReq parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Commands.DestroyReq parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.DestroyReq parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Commands.DestroyReq parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.DestroyReq parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Commands.DestroyReq parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.DestroyReq parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Commands.DestroyReq parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.DestroyReq parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Commands.DestroyReq parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.DestroyReq parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Commands.DestroyReq parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Commands.DestroyReq 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.DestroyReq} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.DestroyReq) + cc.arduino.cli.commands.Commands.DestroyReqOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_DestroyReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_DestroyReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Commands.DestroyReq.class, cc.arduino.cli.commands.Commands.DestroyReq.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Commands.DestroyReq.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (instanceBuilder_ == null) { + instance_ = null; + } else { + instance_ = null; + instanceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_DestroyReq_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.DestroyReq getDefaultInstanceForType() { + return cc.arduino.cli.commands.Commands.DestroyReq.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.DestroyReq build() { + cc.arduino.cli.commands.Commands.DestroyReq result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.DestroyReq buildPartial() { + cc.arduino.cli.commands.Commands.DestroyReq result = new cc.arduino.cli.commands.Commands.DestroyReq(this); + if (instanceBuilder_ == null) { + result.instance_ = instance_; + } else { + result.instance_ = instanceBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Commands.DestroyReq) { + return mergeFrom((cc.arduino.cli.commands.Commands.DestroyReq)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Commands.DestroyReq other) { + if (other == cc.arduino.cli.commands.Commands.DestroyReq.getDefaultInstance()) return this; + if (other.hasInstance()) { + mergeInstance(other.getInstance()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Commands.DestroyReq parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Commands.DestroyReq) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private cc.arduino.cli.commands.Common.Instance instance_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> instanceBuilder_; + /** + *
+       * The Arduino Core Service instance to destroy.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instanceBuilder_ != null || instance_ != null; + } + /** + *
+       * The Arduino Core Service instance to destroy.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + if (instanceBuilder_ == null) { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } else { + return instanceBuilder_.getMessage(); + } + } + /** + *
+       * The Arduino Core Service instance to destroy.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + onChanged(); + } else { + instanceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * The Arduino Core Service instance to destroy.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance( + cc.arduino.cli.commands.Common.Instance.Builder builderForValue) { + if (instanceBuilder_ == null) { + instance_ = builderForValue.build(); + onChanged(); + } else { + instanceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * The Arduino Core Service instance to destroy.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder mergeInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (instance_ != null) { + instance_ = + cc.arduino.cli.commands.Common.Instance.newBuilder(instance_).mergeFrom(value).buildPartial(); + } else { + instance_ = value; + } + onChanged(); + } else { + instanceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * The Arduino Core Service instance to destroy.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder clearInstance() { + if (instanceBuilder_ == null) { + instance_ = null; + onChanged(); + } else { + instance_ = null; + instanceBuilder_ = null; + } + + return this; + } + /** + *
+       * The Arduino Core Service instance to destroy.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.Instance.Builder getInstanceBuilder() { + + onChanged(); + return getInstanceFieldBuilder().getBuilder(); + } + /** + *
+       * The Arduino Core Service instance to destroy.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + if (instanceBuilder_ != null) { + return instanceBuilder_.getMessageOrBuilder(); + } else { + return instance_ == null ? + cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + } + /** + *
+       * The Arduino Core Service instance to destroy.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> + getInstanceFieldBuilder() { + if (instanceBuilder_ == null) { + instanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder>( + getInstance(), + getParentForChildren(), + isClean()); + instance_ = null; + } + return instanceBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.DestroyReq) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.DestroyReq) + private static final cc.arduino.cli.commands.Commands.DestroyReq DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Commands.DestroyReq(); + } + + public static cc.arduino.cli.commands.Commands.DestroyReq getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DestroyReq parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DestroyReq(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.DestroyReq getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DestroyRespOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.DestroyResp) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code cc.arduino.cli.commands.DestroyResp} + */ + public static final class DestroyResp extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.DestroyResp) + DestroyRespOrBuilder { + private static final long serialVersionUID = 0L; + // Use DestroyResp.newBuilder() to construct. + private DestroyResp(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DestroyResp() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DestroyResp(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DestroyResp( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_DestroyResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_DestroyResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Commands.DestroyResp.class, cc.arduino.cli.commands.Commands.DestroyResp.Builder.class); + } + + 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 { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Commands.DestroyResp)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Commands.DestroyResp other = (cc.arduino.cli.commands.Commands.DestroyResp) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Commands.DestroyResp parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Commands.DestroyResp parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.DestroyResp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Commands.DestroyResp parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.DestroyResp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Commands.DestroyResp parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.DestroyResp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Commands.DestroyResp parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.DestroyResp parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Commands.DestroyResp parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.DestroyResp parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Commands.DestroyResp parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Commands.DestroyResp 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.DestroyResp} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.DestroyResp) + cc.arduino.cli.commands.Commands.DestroyRespOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_DestroyResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_DestroyResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Commands.DestroyResp.class, cc.arduino.cli.commands.Commands.DestroyResp.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Commands.DestroyResp.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_DestroyResp_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.DestroyResp getDefaultInstanceForType() { + return cc.arduino.cli.commands.Commands.DestroyResp.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.DestroyResp build() { + cc.arduino.cli.commands.Commands.DestroyResp result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.DestroyResp buildPartial() { + cc.arduino.cli.commands.Commands.DestroyResp result = new cc.arduino.cli.commands.Commands.DestroyResp(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Commands.DestroyResp) { + return mergeFrom((cc.arduino.cli.commands.Commands.DestroyResp)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Commands.DestroyResp other) { + if (other == cc.arduino.cli.commands.Commands.DestroyResp.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Commands.DestroyResp parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Commands.DestroyResp) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.DestroyResp) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.DestroyResp) + private static final cc.arduino.cli.commands.Commands.DestroyResp DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Commands.DestroyResp(); + } + + public static cc.arduino.cli.commands.Commands.DestroyResp getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DestroyResp parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DestroyResp(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.DestroyResp getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface RescanReqOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.RescanReq) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Arduino Core Service instance from the Init response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + boolean hasInstance(); + /** + *
+     * Arduino Core Service instance from the Init response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + cc.arduino.cli.commands.Common.Instance getInstance(); + /** + *
+     * Arduino Core Service instance from the Init response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.RescanReq} + */ + public static final class RescanReq extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.RescanReq) + RescanReqOrBuilder { + private static final long serialVersionUID = 0L; + // Use RescanReq.newBuilder() to construct. + private RescanReq(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RescanReq() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RescanReq(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RescanReq( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cc.arduino.cli.commands.Common.Instance.Builder subBuilder = null; + if (instance_ != null) { + subBuilder = instance_.toBuilder(); + } + instance_ = input.readMessage(cc.arduino.cli.commands.Common.Instance.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instance_); + instance_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_RescanReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_RescanReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Commands.RescanReq.class, cc.arduino.cli.commands.Commands.RescanReq.Builder.class); + } + + public static final int INSTANCE_FIELD_NUMBER = 1; + private cc.arduino.cli.commands.Common.Instance instance_; + /** + *
+     * Arduino Core Service instance from the Init response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instance_ != null; + } + /** + *
+     * Arduino Core Service instance from the Init response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + /** + *
+     * Arduino Core Service instance from the Init response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + return getInstance(); + } + + 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 (instance_ != null) { + output.writeMessage(1, getInstance()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (instance_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInstance()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Commands.RescanReq)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Commands.RescanReq other = (cc.arduino.cli.commands.Commands.RescanReq) obj; + + if (hasInstance() != other.hasInstance()) return false; + if (hasInstance()) { + if (!getInstance() + .equals(other.getInstance())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInstance()) { + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Commands.RescanReq parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Commands.RescanReq parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.RescanReq parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Commands.RescanReq parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.RescanReq parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Commands.RescanReq parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.RescanReq parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Commands.RescanReq parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.RescanReq parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Commands.RescanReq parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.RescanReq parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Commands.RescanReq parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Commands.RescanReq 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.RescanReq} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.RescanReq) + cc.arduino.cli.commands.Commands.RescanReqOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_RescanReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_RescanReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Commands.RescanReq.class, cc.arduino.cli.commands.Commands.RescanReq.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Commands.RescanReq.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (instanceBuilder_ == null) { + instance_ = null; + } else { + instance_ = null; + instanceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_RescanReq_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.RescanReq getDefaultInstanceForType() { + return cc.arduino.cli.commands.Commands.RescanReq.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.RescanReq build() { + cc.arduino.cli.commands.Commands.RescanReq result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.RescanReq buildPartial() { + cc.arduino.cli.commands.Commands.RescanReq result = new cc.arduino.cli.commands.Commands.RescanReq(this); + if (instanceBuilder_ == null) { + result.instance_ = instance_; + } else { + result.instance_ = instanceBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Commands.RescanReq) { + return mergeFrom((cc.arduino.cli.commands.Commands.RescanReq)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Commands.RescanReq other) { + if (other == cc.arduino.cli.commands.Commands.RescanReq.getDefaultInstance()) return this; + if (other.hasInstance()) { + mergeInstance(other.getInstance()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Commands.RescanReq parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Commands.RescanReq) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private cc.arduino.cli.commands.Common.Instance instance_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> instanceBuilder_; + /** + *
+       * Arduino Core Service instance from the Init response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instanceBuilder_ != null || instance_ != null; + } + /** + *
+       * Arduino Core Service instance from the Init response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + if (instanceBuilder_ == null) { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } else { + return instanceBuilder_.getMessage(); + } + } + /** + *
+       * Arduino Core Service instance from the Init response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + onChanged(); + } else { + instanceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the Init response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance( + cc.arduino.cli.commands.Common.Instance.Builder builderForValue) { + if (instanceBuilder_ == null) { + instance_ = builderForValue.build(); + onChanged(); + } else { + instanceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the Init response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder mergeInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (instance_ != null) { + instance_ = + cc.arduino.cli.commands.Common.Instance.newBuilder(instance_).mergeFrom(value).buildPartial(); + } else { + instance_ = value; + } + onChanged(); + } else { + instanceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the Init response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder clearInstance() { + if (instanceBuilder_ == null) { + instance_ = null; + onChanged(); + } else { + instance_ = null; + instanceBuilder_ = null; + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the Init response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.Instance.Builder getInstanceBuilder() { + + onChanged(); + return getInstanceFieldBuilder().getBuilder(); + } + /** + *
+       * Arduino Core Service instance from the Init response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + if (instanceBuilder_ != null) { + return instanceBuilder_.getMessageOrBuilder(); + } else { + return instance_ == null ? + cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + } + /** + *
+       * Arduino Core Service instance from the Init response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> + getInstanceFieldBuilder() { + if (instanceBuilder_ == null) { + instanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder>( + getInstance(), + getParentForChildren(), + isClean()); + instance_ = null; + } + return instanceBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.RescanReq) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.RescanReq) + private static final cc.arduino.cli.commands.Commands.RescanReq DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Commands.RescanReq(); + } + + public static cc.arduino.cli.commands.Commands.RescanReq getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RescanReq parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RescanReq(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.RescanReq getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface RescanRespOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.RescanResp) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Error messages related to any problems encountered while parsing the
+     * platforms index file.
+     * 
+ * + * repeated string platforms_index_errors = 1; + * @return A list containing the platformsIndexErrors. + */ + java.util.List + getPlatformsIndexErrorsList(); + /** + *
+     * Error messages related to any problems encountered while parsing the
+     * platforms index file.
+     * 
+ * + * repeated string platforms_index_errors = 1; + * @return The count of platformsIndexErrors. + */ + int getPlatformsIndexErrorsCount(); + /** + *
+     * Error messages related to any problems encountered while parsing the
+     * platforms index file.
+     * 
+ * + * repeated string platforms_index_errors = 1; + * @param index The index of the element to return. + * @return The platformsIndexErrors at the given index. + */ + java.lang.String getPlatformsIndexErrors(int index); + /** + *
+     * Error messages related to any problems encountered while parsing the
+     * platforms index file.
+     * 
+ * + * repeated string platforms_index_errors = 1; + * @param index The index of the value to return. + * @return The bytes of the platformsIndexErrors at the given index. + */ + com.google.protobuf.ByteString + getPlatformsIndexErrorsBytes(int index); + + /** + *
+     * Error message if a problem was encountered while parsing the libraries
+     * index file.
+     * 
+ * + * string libraries_index_error = 2; + * @return The librariesIndexError. + */ + java.lang.String getLibrariesIndexError(); + /** + *
+     * Error message if a problem was encountered while parsing the libraries
+     * index file.
+     * 
+ * + * string libraries_index_error = 2; + * @return The bytes for librariesIndexError. + */ + com.google.protobuf.ByteString + getLibrariesIndexErrorBytes(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.RescanResp} + */ + public static final class RescanResp extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.RescanResp) + RescanRespOrBuilder { + private static final long serialVersionUID = 0L; + // Use RescanResp.newBuilder() to construct. + private RescanResp(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RescanResp() { + platformsIndexErrors_ = com.google.protobuf.LazyStringArrayList.EMPTY; + librariesIndexError_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RescanResp(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RescanResp( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + platformsIndexErrors_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + platformsIndexErrors_.add(s); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + librariesIndexError_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + platformsIndexErrors_ = platformsIndexErrors_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_RescanResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_RescanResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Commands.RescanResp.class, cc.arduino.cli.commands.Commands.RescanResp.Builder.class); + } + + public static final int PLATFORMS_INDEX_ERRORS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList platformsIndexErrors_; + /** + *
+     * Error messages related to any problems encountered while parsing the
+     * platforms index file.
+     * 
+ * + * repeated string platforms_index_errors = 1; + * @return A list containing the platformsIndexErrors. + */ + public com.google.protobuf.ProtocolStringList + getPlatformsIndexErrorsList() { + return platformsIndexErrors_; + } + /** + *
+     * Error messages related to any problems encountered while parsing the
+     * platforms index file.
+     * 
+ * + * repeated string platforms_index_errors = 1; + * @return The count of platformsIndexErrors. + */ + public int getPlatformsIndexErrorsCount() { + return platformsIndexErrors_.size(); + } + /** + *
+     * Error messages related to any problems encountered while parsing the
+     * platforms index file.
+     * 
+ * + * repeated string platforms_index_errors = 1; + * @param index The index of the element to return. + * @return The platformsIndexErrors at the given index. + */ + public java.lang.String getPlatformsIndexErrors(int index) { + return platformsIndexErrors_.get(index); + } + /** + *
+     * Error messages related to any problems encountered while parsing the
+     * platforms index file.
+     * 
+ * + * repeated string platforms_index_errors = 1; + * @param index The index of the value to return. + * @return The bytes of the platformsIndexErrors at the given index. + */ + public com.google.protobuf.ByteString + getPlatformsIndexErrorsBytes(int index) { + return platformsIndexErrors_.getByteString(index); + } + + public static final int LIBRARIES_INDEX_ERROR_FIELD_NUMBER = 2; + private volatile java.lang.Object librariesIndexError_; + /** + *
+     * Error message if a problem was encountered while parsing the libraries
+     * index file.
+     * 
+ * + * string libraries_index_error = 2; + * @return The librariesIndexError. + */ + public java.lang.String getLibrariesIndexError() { + java.lang.Object ref = librariesIndexError_; + 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(); + librariesIndexError_ = s; + return s; + } + } + /** + *
+     * Error message if a problem was encountered while parsing the libraries
+     * index file.
+     * 
+ * + * string libraries_index_error = 2; + * @return The bytes for librariesIndexError. + */ + public com.google.protobuf.ByteString + getLibrariesIndexErrorBytes() { + java.lang.Object ref = librariesIndexError_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + librariesIndexError_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 < platformsIndexErrors_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, platformsIndexErrors_.getRaw(i)); + } + if (!getLibrariesIndexErrorBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, librariesIndexError_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < platformsIndexErrors_.size(); i++) { + dataSize += computeStringSizeNoTag(platformsIndexErrors_.getRaw(i)); + } + size += dataSize; + size += 1 * getPlatformsIndexErrorsList().size(); + } + if (!getLibrariesIndexErrorBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, librariesIndexError_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Commands.RescanResp)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Commands.RescanResp other = (cc.arduino.cli.commands.Commands.RescanResp) obj; + + if (!getPlatformsIndexErrorsList() + .equals(other.getPlatformsIndexErrorsList())) return false; + if (!getLibrariesIndexError() + .equals(other.getLibrariesIndexError())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getPlatformsIndexErrorsCount() > 0) { + hash = (37 * hash) + PLATFORMS_INDEX_ERRORS_FIELD_NUMBER; + hash = (53 * hash) + getPlatformsIndexErrorsList().hashCode(); + } + hash = (37 * hash) + LIBRARIES_INDEX_ERROR_FIELD_NUMBER; + hash = (53 * hash) + getLibrariesIndexError().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Commands.RescanResp parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Commands.RescanResp parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.RescanResp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Commands.RescanResp parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.RescanResp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Commands.RescanResp parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.RescanResp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Commands.RescanResp parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.RescanResp parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Commands.RescanResp parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.RescanResp parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Commands.RescanResp parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Commands.RescanResp 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.RescanResp} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.RescanResp) + cc.arduino.cli.commands.Commands.RescanRespOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_RescanResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_RescanResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Commands.RescanResp.class, cc.arduino.cli.commands.Commands.RescanResp.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Commands.RescanResp.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + platformsIndexErrors_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + librariesIndexError_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_RescanResp_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.RescanResp getDefaultInstanceForType() { + return cc.arduino.cli.commands.Commands.RescanResp.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.RescanResp build() { + cc.arduino.cli.commands.Commands.RescanResp result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.RescanResp buildPartial() { + cc.arduino.cli.commands.Commands.RescanResp result = new cc.arduino.cli.commands.Commands.RescanResp(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + platformsIndexErrors_ = platformsIndexErrors_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.platformsIndexErrors_ = platformsIndexErrors_; + result.librariesIndexError_ = librariesIndexError_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Commands.RescanResp) { + return mergeFrom((cc.arduino.cli.commands.Commands.RescanResp)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Commands.RescanResp other) { + if (other == cc.arduino.cli.commands.Commands.RescanResp.getDefaultInstance()) return this; + if (!other.platformsIndexErrors_.isEmpty()) { + if (platformsIndexErrors_.isEmpty()) { + platformsIndexErrors_ = other.platformsIndexErrors_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePlatformsIndexErrorsIsMutable(); + platformsIndexErrors_.addAll(other.platformsIndexErrors_); + } + onChanged(); + } + if (!other.getLibrariesIndexError().isEmpty()) { + librariesIndexError_ = other.librariesIndexError_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Commands.RescanResp parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Commands.RescanResp) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringList platformsIndexErrors_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensurePlatformsIndexErrorsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + platformsIndexErrors_ = new com.google.protobuf.LazyStringArrayList(platformsIndexErrors_); + bitField0_ |= 0x00000001; + } + } + /** + *
+       * Error messages related to any problems encountered while parsing the
+       * platforms index file.
+       * 
+ * + * repeated string platforms_index_errors = 1; + * @return A list containing the platformsIndexErrors. + */ + public com.google.protobuf.ProtocolStringList + getPlatformsIndexErrorsList() { + return platformsIndexErrors_.getUnmodifiableView(); + } + /** + *
+       * Error messages related to any problems encountered while parsing the
+       * platforms index file.
+       * 
+ * + * repeated string platforms_index_errors = 1; + * @return The count of platformsIndexErrors. + */ + public int getPlatformsIndexErrorsCount() { + return platformsIndexErrors_.size(); + } + /** + *
+       * Error messages related to any problems encountered while parsing the
+       * platforms index file.
+       * 
+ * + * repeated string platforms_index_errors = 1; + * @param index The index of the element to return. + * @return The platformsIndexErrors at the given index. + */ + public java.lang.String getPlatformsIndexErrors(int index) { + return platformsIndexErrors_.get(index); + } + /** + *
+       * Error messages related to any problems encountered while parsing the
+       * platforms index file.
+       * 
+ * + * repeated string platforms_index_errors = 1; + * @param index The index of the value to return. + * @return The bytes of the platformsIndexErrors at the given index. + */ + public com.google.protobuf.ByteString + getPlatformsIndexErrorsBytes(int index) { + return platformsIndexErrors_.getByteString(index); + } + /** + *
+       * Error messages related to any problems encountered while parsing the
+       * platforms index file.
+       * 
+ * + * repeated string platforms_index_errors = 1; + * @param index The index to set the value at. + * @param value The platformsIndexErrors to set. + * @return This builder for chaining. + */ + public Builder setPlatformsIndexErrors( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePlatformsIndexErrorsIsMutable(); + platformsIndexErrors_.set(index, value); + onChanged(); + return this; + } + /** + *
+       * Error messages related to any problems encountered while parsing the
+       * platforms index file.
+       * 
+ * + * repeated string platforms_index_errors = 1; + * @param value The platformsIndexErrors to add. + * @return This builder for chaining. + */ + public Builder addPlatformsIndexErrors( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePlatformsIndexErrorsIsMutable(); + platformsIndexErrors_.add(value); + onChanged(); + return this; + } + /** + *
+       * Error messages related to any problems encountered while parsing the
+       * platforms index file.
+       * 
+ * + * repeated string platforms_index_errors = 1; + * @param values The platformsIndexErrors to add. + * @return This builder for chaining. + */ + public Builder addAllPlatformsIndexErrors( + java.lang.Iterable values) { + ensurePlatformsIndexErrorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, platformsIndexErrors_); + onChanged(); + return this; + } + /** + *
+       * Error messages related to any problems encountered while parsing the
+       * platforms index file.
+       * 
+ * + * repeated string platforms_index_errors = 1; + * @return This builder for chaining. + */ + public Builder clearPlatformsIndexErrors() { + platformsIndexErrors_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * Error messages related to any problems encountered while parsing the
+       * platforms index file.
+       * 
+ * + * repeated string platforms_index_errors = 1; + * @param value The bytes of the platformsIndexErrors to add. + * @return This builder for chaining. + */ + public Builder addPlatformsIndexErrorsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensurePlatformsIndexErrorsIsMutable(); + platformsIndexErrors_.add(value); + onChanged(); + return this; + } + + private java.lang.Object librariesIndexError_ = ""; + /** + *
+       * Error message if a problem was encountered while parsing the libraries
+       * index file.
+       * 
+ * + * string libraries_index_error = 2; + * @return The librariesIndexError. + */ + public java.lang.String getLibrariesIndexError() { + java.lang.Object ref = librariesIndexError_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + librariesIndexError_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Error message if a problem was encountered while parsing the libraries
+       * index file.
+       * 
+ * + * string libraries_index_error = 2; + * @return The bytes for librariesIndexError. + */ + public com.google.protobuf.ByteString + getLibrariesIndexErrorBytes() { + java.lang.Object ref = librariesIndexError_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + librariesIndexError_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Error message if a problem was encountered while parsing the libraries
+       * index file.
+       * 
+ * + * string libraries_index_error = 2; + * @param value The librariesIndexError to set. + * @return This builder for chaining. + */ + public Builder setLibrariesIndexError( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + librariesIndexError_ = value; + onChanged(); + return this; + } + /** + *
+       * Error message if a problem was encountered while parsing the libraries
+       * index file.
+       * 
+ * + * string libraries_index_error = 2; + * @return This builder for chaining. + */ + public Builder clearLibrariesIndexError() { + + librariesIndexError_ = getDefaultInstance().getLibrariesIndexError(); + onChanged(); + return this; + } + /** + *
+       * Error message if a problem was encountered while parsing the libraries
+       * index file.
+       * 
+ * + * string libraries_index_error = 2; + * @param value The bytes for librariesIndexError to set. + * @return This builder for chaining. + */ + public Builder setLibrariesIndexErrorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + librariesIndexError_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.RescanResp) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.RescanResp) + private static final cc.arduino.cli.commands.Commands.RescanResp DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Commands.RescanResp(); + } + + public static cc.arduino.cli.commands.Commands.RescanResp getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RescanResp parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RescanResp(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.RescanResp getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface UpdateIndexReqOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.UpdateIndexReq) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Arduino Core Service instance from the Init response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + boolean hasInstance(); + /** + *
+     * Arduino Core Service instance from the Init response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + cc.arduino.cli.commands.Common.Instance getInstance(); + /** + *
+     * Arduino Core Service instance from the Init response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.UpdateIndexReq} + */ + public static final class UpdateIndexReq extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.UpdateIndexReq) + UpdateIndexReqOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateIndexReq.newBuilder() to construct. + private UpdateIndexReq(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateIndexReq() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateIndexReq(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private UpdateIndexReq( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cc.arduino.cli.commands.Common.Instance.Builder subBuilder = null; + if (instance_ != null) { + subBuilder = instance_.toBuilder(); + } + instance_ = input.readMessage(cc.arduino.cli.commands.Common.Instance.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instance_); + instance_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_UpdateIndexReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_UpdateIndexReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Commands.UpdateIndexReq.class, cc.arduino.cli.commands.Commands.UpdateIndexReq.Builder.class); + } + + public static final int INSTANCE_FIELD_NUMBER = 1; + private cc.arduino.cli.commands.Common.Instance instance_; + /** + *
+     * Arduino Core Service instance from the Init response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instance_ != null; + } + /** + *
+     * Arduino Core Service instance from the Init response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + /** + *
+     * Arduino Core Service instance from the Init response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + return getInstance(); + } + + 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 (instance_ != null) { + output.writeMessage(1, getInstance()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (instance_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInstance()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Commands.UpdateIndexReq)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Commands.UpdateIndexReq other = (cc.arduino.cli.commands.Commands.UpdateIndexReq) obj; + + if (hasInstance() != other.hasInstance()) return false; + if (hasInstance()) { + if (!getInstance() + .equals(other.getInstance())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInstance()) { + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Commands.UpdateIndexReq parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Commands.UpdateIndexReq parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.UpdateIndexReq parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Commands.UpdateIndexReq parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.UpdateIndexReq parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Commands.UpdateIndexReq parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.UpdateIndexReq parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Commands.UpdateIndexReq parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.UpdateIndexReq parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Commands.UpdateIndexReq parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.UpdateIndexReq parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Commands.UpdateIndexReq parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Commands.UpdateIndexReq 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.UpdateIndexReq} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.UpdateIndexReq) + cc.arduino.cli.commands.Commands.UpdateIndexReqOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_UpdateIndexReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_UpdateIndexReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Commands.UpdateIndexReq.class, cc.arduino.cli.commands.Commands.UpdateIndexReq.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Commands.UpdateIndexReq.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (instanceBuilder_ == null) { + instance_ = null; + } else { + instance_ = null; + instanceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_UpdateIndexReq_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.UpdateIndexReq getDefaultInstanceForType() { + return cc.arduino.cli.commands.Commands.UpdateIndexReq.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.UpdateIndexReq build() { + cc.arduino.cli.commands.Commands.UpdateIndexReq result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.UpdateIndexReq buildPartial() { + cc.arduino.cli.commands.Commands.UpdateIndexReq result = new cc.arduino.cli.commands.Commands.UpdateIndexReq(this); + if (instanceBuilder_ == null) { + result.instance_ = instance_; + } else { + result.instance_ = instanceBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Commands.UpdateIndexReq) { + return mergeFrom((cc.arduino.cli.commands.Commands.UpdateIndexReq)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Commands.UpdateIndexReq other) { + if (other == cc.arduino.cli.commands.Commands.UpdateIndexReq.getDefaultInstance()) return this; + if (other.hasInstance()) { + mergeInstance(other.getInstance()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Commands.UpdateIndexReq parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Commands.UpdateIndexReq) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private cc.arduino.cli.commands.Common.Instance instance_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> instanceBuilder_; + /** + *
+       * Arduino Core Service instance from the Init response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instanceBuilder_ != null || instance_ != null; + } + /** + *
+       * Arduino Core Service instance from the Init response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + if (instanceBuilder_ == null) { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } else { + return instanceBuilder_.getMessage(); + } + } + /** + *
+       * Arduino Core Service instance from the Init response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + onChanged(); + } else { + instanceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the Init response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance( + cc.arduino.cli.commands.Common.Instance.Builder builderForValue) { + if (instanceBuilder_ == null) { + instance_ = builderForValue.build(); + onChanged(); + } else { + instanceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the Init response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder mergeInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (instance_ != null) { + instance_ = + cc.arduino.cli.commands.Common.Instance.newBuilder(instance_).mergeFrom(value).buildPartial(); + } else { + instance_ = value; + } + onChanged(); + } else { + instanceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the Init response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder clearInstance() { + if (instanceBuilder_ == null) { + instance_ = null; + onChanged(); + } else { + instance_ = null; + instanceBuilder_ = null; + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the Init response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.Instance.Builder getInstanceBuilder() { + + onChanged(); + return getInstanceFieldBuilder().getBuilder(); + } + /** + *
+       * Arduino Core Service instance from the Init response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + if (instanceBuilder_ != null) { + return instanceBuilder_.getMessageOrBuilder(); + } else { + return instance_ == null ? + cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + } + /** + *
+       * Arduino Core Service instance from the Init response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> + getInstanceFieldBuilder() { + if (instanceBuilder_ == null) { + instanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder>( + getInstance(), + getParentForChildren(), + isClean()); + instance_ = null; + } + return instanceBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.UpdateIndexReq) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.UpdateIndexReq) + private static final cc.arduino.cli.commands.Commands.UpdateIndexReq DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Commands.UpdateIndexReq(); + } + + public static cc.arduino.cli.commands.Commands.UpdateIndexReq getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateIndexReq parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateIndexReq(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.UpdateIndexReq getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface UpdateIndexRespOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.UpdateIndexResp) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Progress of the platforms index download.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 1; + * @return Whether the downloadProgress field is set. + */ + boolean hasDownloadProgress(); + /** + *
+     * Progress of the platforms index download.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 1; + * @return The downloadProgress. + */ + cc.arduino.cli.commands.Common.DownloadProgress getDownloadProgress(); + /** + *
+     * Progress of the platforms index download.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 1; + */ + cc.arduino.cli.commands.Common.DownloadProgressOrBuilder getDownloadProgressOrBuilder(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.UpdateIndexResp} + */ + public static final class UpdateIndexResp extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.UpdateIndexResp) + UpdateIndexRespOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateIndexResp.newBuilder() to construct. + private UpdateIndexResp(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateIndexResp() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateIndexResp(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private UpdateIndexResp( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cc.arduino.cli.commands.Common.DownloadProgress.Builder subBuilder = null; + if (downloadProgress_ != null) { + subBuilder = downloadProgress_.toBuilder(); + } + downloadProgress_ = input.readMessage(cc.arduino.cli.commands.Common.DownloadProgress.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(downloadProgress_); + downloadProgress_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_UpdateIndexResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_UpdateIndexResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Commands.UpdateIndexResp.class, cc.arduino.cli.commands.Commands.UpdateIndexResp.Builder.class); + } + + public static final int DOWNLOAD_PROGRESS_FIELD_NUMBER = 1; + private cc.arduino.cli.commands.Common.DownloadProgress downloadProgress_; + /** + *
+     * Progress of the platforms index download.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 1; + * @return Whether the downloadProgress field is set. + */ + public boolean hasDownloadProgress() { + return downloadProgress_ != null; + } + /** + *
+     * Progress of the platforms index download.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 1; + * @return The downloadProgress. + */ + public cc.arduino.cli.commands.Common.DownloadProgress getDownloadProgress() { + return downloadProgress_ == null ? cc.arduino.cli.commands.Common.DownloadProgress.getDefaultInstance() : downloadProgress_; + } + /** + *
+     * Progress of the platforms index download.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 1; + */ + public cc.arduino.cli.commands.Common.DownloadProgressOrBuilder getDownloadProgressOrBuilder() { + return getDownloadProgress(); + } + + 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 (downloadProgress_ != null) { + output.writeMessage(1, getDownloadProgress()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (downloadProgress_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getDownloadProgress()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Commands.UpdateIndexResp)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Commands.UpdateIndexResp other = (cc.arduino.cli.commands.Commands.UpdateIndexResp) obj; + + if (hasDownloadProgress() != other.hasDownloadProgress()) return false; + if (hasDownloadProgress()) { + if (!getDownloadProgress() + .equals(other.getDownloadProgress())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDownloadProgress()) { + hash = (37 * hash) + DOWNLOAD_PROGRESS_FIELD_NUMBER; + hash = (53 * hash) + getDownloadProgress().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Commands.UpdateIndexResp parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Commands.UpdateIndexResp parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.UpdateIndexResp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Commands.UpdateIndexResp parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.UpdateIndexResp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Commands.UpdateIndexResp parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.UpdateIndexResp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Commands.UpdateIndexResp parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.UpdateIndexResp parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Commands.UpdateIndexResp parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.UpdateIndexResp parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Commands.UpdateIndexResp parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Commands.UpdateIndexResp 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.UpdateIndexResp} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.UpdateIndexResp) + cc.arduino.cli.commands.Commands.UpdateIndexRespOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_UpdateIndexResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_UpdateIndexResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Commands.UpdateIndexResp.class, cc.arduino.cli.commands.Commands.UpdateIndexResp.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Commands.UpdateIndexResp.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (downloadProgressBuilder_ == null) { + downloadProgress_ = null; + } else { + downloadProgress_ = null; + downloadProgressBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_UpdateIndexResp_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.UpdateIndexResp getDefaultInstanceForType() { + return cc.arduino.cli.commands.Commands.UpdateIndexResp.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.UpdateIndexResp build() { + cc.arduino.cli.commands.Commands.UpdateIndexResp result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.UpdateIndexResp buildPartial() { + cc.arduino.cli.commands.Commands.UpdateIndexResp result = new cc.arduino.cli.commands.Commands.UpdateIndexResp(this); + if (downloadProgressBuilder_ == null) { + result.downloadProgress_ = downloadProgress_; + } else { + result.downloadProgress_ = downloadProgressBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Commands.UpdateIndexResp) { + return mergeFrom((cc.arduino.cli.commands.Commands.UpdateIndexResp)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Commands.UpdateIndexResp other) { + if (other == cc.arduino.cli.commands.Commands.UpdateIndexResp.getDefaultInstance()) return this; + if (other.hasDownloadProgress()) { + mergeDownloadProgress(other.getDownloadProgress()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Commands.UpdateIndexResp parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Commands.UpdateIndexResp) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private cc.arduino.cli.commands.Common.DownloadProgress downloadProgress_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.DownloadProgress, cc.arduino.cli.commands.Common.DownloadProgress.Builder, cc.arduino.cli.commands.Common.DownloadProgressOrBuilder> downloadProgressBuilder_; + /** + *
+       * Progress of the platforms index download.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 1; + * @return Whether the downloadProgress field is set. + */ + public boolean hasDownloadProgress() { + return downloadProgressBuilder_ != null || downloadProgress_ != null; + } + /** + *
+       * Progress of the platforms index download.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 1; + * @return The downloadProgress. + */ + public cc.arduino.cli.commands.Common.DownloadProgress getDownloadProgress() { + if (downloadProgressBuilder_ == null) { + return downloadProgress_ == null ? cc.arduino.cli.commands.Common.DownloadProgress.getDefaultInstance() : downloadProgress_; + } else { + return downloadProgressBuilder_.getMessage(); + } + } + /** + *
+       * Progress of the platforms index download.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 1; + */ + public Builder setDownloadProgress(cc.arduino.cli.commands.Common.DownloadProgress value) { + if (downloadProgressBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + downloadProgress_ = value; + onChanged(); + } else { + downloadProgressBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Progress of the platforms index download.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 1; + */ + public Builder setDownloadProgress( + cc.arduino.cli.commands.Common.DownloadProgress.Builder builderForValue) { + if (downloadProgressBuilder_ == null) { + downloadProgress_ = builderForValue.build(); + onChanged(); + } else { + downloadProgressBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Progress of the platforms index download.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 1; + */ + public Builder mergeDownloadProgress(cc.arduino.cli.commands.Common.DownloadProgress value) { + if (downloadProgressBuilder_ == null) { + if (downloadProgress_ != null) { + downloadProgress_ = + cc.arduino.cli.commands.Common.DownloadProgress.newBuilder(downloadProgress_).mergeFrom(value).buildPartial(); + } else { + downloadProgress_ = value; + } + onChanged(); + } else { + downloadProgressBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Progress of the platforms index download.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 1; + */ + public Builder clearDownloadProgress() { + if (downloadProgressBuilder_ == null) { + downloadProgress_ = null; + onChanged(); + } else { + downloadProgress_ = null; + downloadProgressBuilder_ = null; + } + + return this; + } + /** + *
+       * Progress of the platforms index download.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 1; + */ + public cc.arduino.cli.commands.Common.DownloadProgress.Builder getDownloadProgressBuilder() { + + onChanged(); + return getDownloadProgressFieldBuilder().getBuilder(); + } + /** + *
+       * Progress of the platforms index download.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 1; + */ + public cc.arduino.cli.commands.Common.DownloadProgressOrBuilder getDownloadProgressOrBuilder() { + if (downloadProgressBuilder_ != null) { + return downloadProgressBuilder_.getMessageOrBuilder(); + } else { + return downloadProgress_ == null ? + cc.arduino.cli.commands.Common.DownloadProgress.getDefaultInstance() : downloadProgress_; + } + } + /** + *
+       * Progress of the platforms index download.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.DownloadProgress, cc.arduino.cli.commands.Common.DownloadProgress.Builder, cc.arduino.cli.commands.Common.DownloadProgressOrBuilder> + getDownloadProgressFieldBuilder() { + if (downloadProgressBuilder_ == null) { + downloadProgressBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.DownloadProgress, cc.arduino.cli.commands.Common.DownloadProgress.Builder, cc.arduino.cli.commands.Common.DownloadProgressOrBuilder>( + getDownloadProgress(), + getParentForChildren(), + isClean()); + downloadProgress_ = null; + } + return downloadProgressBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.UpdateIndexResp) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.UpdateIndexResp) + private static final cc.arduino.cli.commands.Commands.UpdateIndexResp DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Commands.UpdateIndexResp(); + } + + public static cc.arduino.cli.commands.Commands.UpdateIndexResp getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateIndexResp parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateIndexResp(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.UpdateIndexResp getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface UpdateLibrariesIndexReqOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.UpdateLibrariesIndexReq) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Arduino Core Service instance from the Init response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + boolean hasInstance(); + /** + *
+     * Arduino Core Service instance from the Init response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + cc.arduino.cli.commands.Common.Instance getInstance(); + /** + *
+     * Arduino Core Service instance from the Init response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.UpdateLibrariesIndexReq} + */ + public static final class UpdateLibrariesIndexReq extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.UpdateLibrariesIndexReq) + UpdateLibrariesIndexReqOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateLibrariesIndexReq.newBuilder() to construct. + private UpdateLibrariesIndexReq(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateLibrariesIndexReq() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateLibrariesIndexReq(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private UpdateLibrariesIndexReq( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cc.arduino.cli.commands.Common.Instance.Builder subBuilder = null; + if (instance_ != null) { + subBuilder = instance_.toBuilder(); + } + instance_ = input.readMessage(cc.arduino.cli.commands.Common.Instance.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instance_); + instance_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_UpdateLibrariesIndexReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_UpdateLibrariesIndexReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq.class, cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq.Builder.class); + } + + public static final int INSTANCE_FIELD_NUMBER = 1; + private cc.arduino.cli.commands.Common.Instance instance_; + /** + *
+     * Arduino Core Service instance from the Init response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instance_ != null; + } + /** + *
+     * Arduino Core Service instance from the Init response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + /** + *
+     * Arduino Core Service instance from the Init response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + return getInstance(); + } + + 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 (instance_ != null) { + output.writeMessage(1, getInstance()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (instance_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInstance()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq other = (cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq) obj; + + if (hasInstance() != other.hasInstance()) return false; + if (hasInstance()) { + if (!getInstance() + .equals(other.getInstance())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInstance()) { + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.UpdateLibrariesIndexReq} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.UpdateLibrariesIndexReq) + cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReqOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_UpdateLibrariesIndexReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_UpdateLibrariesIndexReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq.class, cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (instanceBuilder_ == null) { + instance_ = null; + } else { + instance_ = null; + instanceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_UpdateLibrariesIndexReq_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq getDefaultInstanceForType() { + return cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq build() { + cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq buildPartial() { + cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq result = new cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq(this); + if (instanceBuilder_ == null) { + result.instance_ = instance_; + } else { + result.instance_ = instanceBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq) { + return mergeFrom((cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq other) { + if (other == cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq.getDefaultInstance()) return this; + if (other.hasInstance()) { + mergeInstance(other.getInstance()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private cc.arduino.cli.commands.Common.Instance instance_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> instanceBuilder_; + /** + *
+       * Arduino Core Service instance from the Init response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instanceBuilder_ != null || instance_ != null; + } + /** + *
+       * Arduino Core Service instance from the Init response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + if (instanceBuilder_ == null) { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } else { + return instanceBuilder_.getMessage(); + } + } + /** + *
+       * Arduino Core Service instance from the Init response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + onChanged(); + } else { + instanceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the Init response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance( + cc.arduino.cli.commands.Common.Instance.Builder builderForValue) { + if (instanceBuilder_ == null) { + instance_ = builderForValue.build(); + onChanged(); + } else { + instanceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the Init response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder mergeInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (instance_ != null) { + instance_ = + cc.arduino.cli.commands.Common.Instance.newBuilder(instance_).mergeFrom(value).buildPartial(); + } else { + instance_ = value; + } + onChanged(); + } else { + instanceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the Init response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder clearInstance() { + if (instanceBuilder_ == null) { + instance_ = null; + onChanged(); + } else { + instance_ = null; + instanceBuilder_ = null; + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the Init response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.Instance.Builder getInstanceBuilder() { + + onChanged(); + return getInstanceFieldBuilder().getBuilder(); + } + /** + *
+       * Arduino Core Service instance from the Init response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + if (instanceBuilder_ != null) { + return instanceBuilder_.getMessageOrBuilder(); + } else { + return instance_ == null ? + cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + } + /** + *
+       * Arduino Core Service instance from the Init response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> + getInstanceFieldBuilder() { + if (instanceBuilder_ == null) { + instanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder>( + getInstance(), + getParentForChildren(), + isClean()); + instance_ = null; + } + return instanceBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.UpdateLibrariesIndexReq) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.UpdateLibrariesIndexReq) + private static final cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq(); + } + + public static cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateLibrariesIndexReq parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateLibrariesIndexReq(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.UpdateLibrariesIndexReq getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface UpdateLibrariesIndexRespOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.UpdateLibrariesIndexResp) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Progress of the libraries index download.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 1; + * @return Whether the downloadProgress field is set. + */ + boolean hasDownloadProgress(); + /** + *
+     * Progress of the libraries index download.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 1; + * @return The downloadProgress. + */ + cc.arduino.cli.commands.Common.DownloadProgress getDownloadProgress(); + /** + *
+     * Progress of the libraries index download.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 1; + */ + cc.arduino.cli.commands.Common.DownloadProgressOrBuilder getDownloadProgressOrBuilder(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.UpdateLibrariesIndexResp} + */ + public static final class UpdateLibrariesIndexResp extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.UpdateLibrariesIndexResp) + UpdateLibrariesIndexRespOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateLibrariesIndexResp.newBuilder() to construct. + private UpdateLibrariesIndexResp(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateLibrariesIndexResp() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateLibrariesIndexResp(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private UpdateLibrariesIndexResp( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cc.arduino.cli.commands.Common.DownloadProgress.Builder subBuilder = null; + if (downloadProgress_ != null) { + subBuilder = downloadProgress_.toBuilder(); + } + downloadProgress_ = input.readMessage(cc.arduino.cli.commands.Common.DownloadProgress.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(downloadProgress_); + downloadProgress_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_UpdateLibrariesIndexResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_UpdateLibrariesIndexResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Commands.UpdateLibrariesIndexResp.class, cc.arduino.cli.commands.Commands.UpdateLibrariesIndexResp.Builder.class); + } + + public static final int DOWNLOAD_PROGRESS_FIELD_NUMBER = 1; + private cc.arduino.cli.commands.Common.DownloadProgress downloadProgress_; + /** + *
+     * Progress of the libraries index download.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 1; + * @return Whether the downloadProgress field is set. + */ + public boolean hasDownloadProgress() { + return downloadProgress_ != null; + } + /** + *
+     * Progress of the libraries index download.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 1; + * @return The downloadProgress. + */ + public cc.arduino.cli.commands.Common.DownloadProgress getDownloadProgress() { + return downloadProgress_ == null ? cc.arduino.cli.commands.Common.DownloadProgress.getDefaultInstance() : downloadProgress_; + } + /** + *
+     * Progress of the libraries index download.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 1; + */ + public cc.arduino.cli.commands.Common.DownloadProgressOrBuilder getDownloadProgressOrBuilder() { + return getDownloadProgress(); + } + + 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 (downloadProgress_ != null) { + output.writeMessage(1, getDownloadProgress()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (downloadProgress_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getDownloadProgress()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Commands.UpdateLibrariesIndexResp)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Commands.UpdateLibrariesIndexResp other = (cc.arduino.cli.commands.Commands.UpdateLibrariesIndexResp) obj; + + if (hasDownloadProgress() != other.hasDownloadProgress()) return false; + if (hasDownloadProgress()) { + if (!getDownloadProgress() + .equals(other.getDownloadProgress())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDownloadProgress()) { + hash = (37 * hash) + DOWNLOAD_PROGRESS_FIELD_NUMBER; + hash = (53 * hash) + getDownloadProgress().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Commands.UpdateLibrariesIndexResp parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Commands.UpdateLibrariesIndexResp parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.UpdateLibrariesIndexResp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Commands.UpdateLibrariesIndexResp parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.UpdateLibrariesIndexResp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Commands.UpdateLibrariesIndexResp parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.UpdateLibrariesIndexResp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Commands.UpdateLibrariesIndexResp parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.UpdateLibrariesIndexResp parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Commands.UpdateLibrariesIndexResp parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.UpdateLibrariesIndexResp parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Commands.UpdateLibrariesIndexResp parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Commands.UpdateLibrariesIndexResp 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.UpdateLibrariesIndexResp} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.UpdateLibrariesIndexResp) + cc.arduino.cli.commands.Commands.UpdateLibrariesIndexRespOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_UpdateLibrariesIndexResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_UpdateLibrariesIndexResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Commands.UpdateLibrariesIndexResp.class, cc.arduino.cli.commands.Commands.UpdateLibrariesIndexResp.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Commands.UpdateLibrariesIndexResp.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (downloadProgressBuilder_ == null) { + downloadProgress_ = null; + } else { + downloadProgress_ = null; + downloadProgressBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_UpdateLibrariesIndexResp_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.UpdateLibrariesIndexResp getDefaultInstanceForType() { + return cc.arduino.cli.commands.Commands.UpdateLibrariesIndexResp.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.UpdateLibrariesIndexResp build() { + cc.arduino.cli.commands.Commands.UpdateLibrariesIndexResp result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.UpdateLibrariesIndexResp buildPartial() { + cc.arduino.cli.commands.Commands.UpdateLibrariesIndexResp result = new cc.arduino.cli.commands.Commands.UpdateLibrariesIndexResp(this); + if (downloadProgressBuilder_ == null) { + result.downloadProgress_ = downloadProgress_; + } else { + result.downloadProgress_ = downloadProgressBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Commands.UpdateLibrariesIndexResp) { + return mergeFrom((cc.arduino.cli.commands.Commands.UpdateLibrariesIndexResp)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Commands.UpdateLibrariesIndexResp other) { + if (other == cc.arduino.cli.commands.Commands.UpdateLibrariesIndexResp.getDefaultInstance()) return this; + if (other.hasDownloadProgress()) { + mergeDownloadProgress(other.getDownloadProgress()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Commands.UpdateLibrariesIndexResp parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Commands.UpdateLibrariesIndexResp) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private cc.arduino.cli.commands.Common.DownloadProgress downloadProgress_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.DownloadProgress, cc.arduino.cli.commands.Common.DownloadProgress.Builder, cc.arduino.cli.commands.Common.DownloadProgressOrBuilder> downloadProgressBuilder_; + /** + *
+       * Progress of the libraries index download.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 1; + * @return Whether the downloadProgress field is set. + */ + public boolean hasDownloadProgress() { + return downloadProgressBuilder_ != null || downloadProgress_ != null; + } + /** + *
+       * Progress of the libraries index download.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 1; + * @return The downloadProgress. + */ + public cc.arduino.cli.commands.Common.DownloadProgress getDownloadProgress() { + if (downloadProgressBuilder_ == null) { + return downloadProgress_ == null ? cc.arduino.cli.commands.Common.DownloadProgress.getDefaultInstance() : downloadProgress_; + } else { + return downloadProgressBuilder_.getMessage(); + } + } + /** + *
+       * Progress of the libraries index download.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 1; + */ + public Builder setDownloadProgress(cc.arduino.cli.commands.Common.DownloadProgress value) { + if (downloadProgressBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + downloadProgress_ = value; + onChanged(); + } else { + downloadProgressBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Progress of the libraries index download.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 1; + */ + public Builder setDownloadProgress( + cc.arduino.cli.commands.Common.DownloadProgress.Builder builderForValue) { + if (downloadProgressBuilder_ == null) { + downloadProgress_ = builderForValue.build(); + onChanged(); + } else { + downloadProgressBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Progress of the libraries index download.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 1; + */ + public Builder mergeDownloadProgress(cc.arduino.cli.commands.Common.DownloadProgress value) { + if (downloadProgressBuilder_ == null) { + if (downloadProgress_ != null) { + downloadProgress_ = + cc.arduino.cli.commands.Common.DownloadProgress.newBuilder(downloadProgress_).mergeFrom(value).buildPartial(); + } else { + downloadProgress_ = value; + } + onChanged(); + } else { + downloadProgressBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Progress of the libraries index download.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 1; + */ + public Builder clearDownloadProgress() { + if (downloadProgressBuilder_ == null) { + downloadProgress_ = null; + onChanged(); + } else { + downloadProgress_ = null; + downloadProgressBuilder_ = null; + } + + return this; + } + /** + *
+       * Progress of the libraries index download.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 1; + */ + public cc.arduino.cli.commands.Common.DownloadProgress.Builder getDownloadProgressBuilder() { + + onChanged(); + return getDownloadProgressFieldBuilder().getBuilder(); + } + /** + *
+       * Progress of the libraries index download.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 1; + */ + public cc.arduino.cli.commands.Common.DownloadProgressOrBuilder getDownloadProgressOrBuilder() { + if (downloadProgressBuilder_ != null) { + return downloadProgressBuilder_.getMessageOrBuilder(); + } else { + return downloadProgress_ == null ? + cc.arduino.cli.commands.Common.DownloadProgress.getDefaultInstance() : downloadProgress_; + } + } + /** + *
+       * Progress of the libraries index download.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress download_progress = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.DownloadProgress, cc.arduino.cli.commands.Common.DownloadProgress.Builder, cc.arduino.cli.commands.Common.DownloadProgressOrBuilder> + getDownloadProgressFieldBuilder() { + if (downloadProgressBuilder_ == null) { + downloadProgressBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.DownloadProgress, cc.arduino.cli.commands.Common.DownloadProgress.Builder, cc.arduino.cli.commands.Common.DownloadProgressOrBuilder>( + getDownloadProgress(), + getParentForChildren(), + isClean()); + downloadProgress_ = null; + } + return downloadProgressBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.UpdateLibrariesIndexResp) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.UpdateLibrariesIndexResp) + private static final cc.arduino.cli.commands.Commands.UpdateLibrariesIndexResp DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Commands.UpdateLibrariesIndexResp(); + } + + public static cc.arduino.cli.commands.Commands.UpdateLibrariesIndexResp getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateLibrariesIndexResp parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateLibrariesIndexResp(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.UpdateLibrariesIndexResp getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface VersionReqOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.VersionReq) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code cc.arduino.cli.commands.VersionReq} + */ + public static final class VersionReq extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.VersionReq) + VersionReqOrBuilder { + private static final long serialVersionUID = 0L; + // Use VersionReq.newBuilder() to construct. + private VersionReq(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private VersionReq() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new VersionReq(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private VersionReq( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_VersionReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_VersionReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Commands.VersionReq.class, cc.arduino.cli.commands.Commands.VersionReq.Builder.class); + } + + 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 { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Commands.VersionReq)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Commands.VersionReq other = (cc.arduino.cli.commands.Commands.VersionReq) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Commands.VersionReq parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Commands.VersionReq parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.VersionReq parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Commands.VersionReq parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.VersionReq parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Commands.VersionReq parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.VersionReq parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Commands.VersionReq parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.VersionReq parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Commands.VersionReq parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.VersionReq parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Commands.VersionReq parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Commands.VersionReq 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.VersionReq} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.VersionReq) + cc.arduino.cli.commands.Commands.VersionReqOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_VersionReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_VersionReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Commands.VersionReq.class, cc.arduino.cli.commands.Commands.VersionReq.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Commands.VersionReq.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_VersionReq_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.VersionReq getDefaultInstanceForType() { + return cc.arduino.cli.commands.Commands.VersionReq.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.VersionReq build() { + cc.arduino.cli.commands.Commands.VersionReq result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.VersionReq buildPartial() { + cc.arduino.cli.commands.Commands.VersionReq result = new cc.arduino.cli.commands.Commands.VersionReq(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Commands.VersionReq) { + return mergeFrom((cc.arduino.cli.commands.Commands.VersionReq)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Commands.VersionReq other) { + if (other == cc.arduino.cli.commands.Commands.VersionReq.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Commands.VersionReq parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Commands.VersionReq) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.VersionReq) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.VersionReq) + private static final cc.arduino.cli.commands.Commands.VersionReq DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Commands.VersionReq(); + } + + public static cc.arduino.cli.commands.Commands.VersionReq getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VersionReq parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VersionReq(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.VersionReq getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface VersionRespOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.VersionResp) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The version of Arduino CLI in use.
+     * 
+ * + * string version = 1; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+     * The version of Arduino CLI in use.
+     * 
+ * + * string version = 1; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.VersionResp} + */ + public static final class VersionResp extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.VersionResp) + VersionRespOrBuilder { + private static final long serialVersionUID = 0L; + // Use VersionResp.newBuilder() to construct. + private VersionResp(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private VersionResp() { + version_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new VersionResp(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private VersionResp( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + version_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_VersionResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_VersionResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Commands.VersionResp.class, cc.arduino.cli.commands.Commands.VersionResp.Builder.class); + } + + public static final int VERSION_FIELD_NUMBER = 1; + private volatile java.lang.Object version_; + /** + *
+     * The version of Arduino CLI in use.
+     * 
+ * + * string version = 1; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + 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(); + version_ = s; + return s; + } + } + /** + *
+     * The version of Arduino CLI in use.
+     * 
+ * + * string version = 1; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (!getVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Commands.VersionResp)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Commands.VersionResp other = (cc.arduino.cli.commands.Commands.VersionResp) obj; + + if (!getVersion() + .equals(other.getVersion())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Commands.VersionResp parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Commands.VersionResp parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.VersionResp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Commands.VersionResp parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.VersionResp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Commands.VersionResp parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.VersionResp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Commands.VersionResp parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.VersionResp parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Commands.VersionResp parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Commands.VersionResp parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Commands.VersionResp parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Commands.VersionResp 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.VersionResp} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.VersionResp) + cc.arduino.cli.commands.Commands.VersionRespOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_VersionResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_VersionResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Commands.VersionResp.class, cc.arduino.cli.commands.Commands.VersionResp.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Commands.VersionResp.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + version_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Commands.internal_static_cc_arduino_cli_commands_VersionResp_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.VersionResp getDefaultInstanceForType() { + return cc.arduino.cli.commands.Commands.VersionResp.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.VersionResp build() { + cc.arduino.cli.commands.Commands.VersionResp result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.VersionResp buildPartial() { + cc.arduino.cli.commands.Commands.VersionResp result = new cc.arduino.cli.commands.Commands.VersionResp(this); + result.version_ = version_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Commands.VersionResp) { + return mergeFrom((cc.arduino.cli.commands.Commands.VersionResp)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Commands.VersionResp other) { + if (other == cc.arduino.cli.commands.Commands.VersionResp.getDefaultInstance()) return this; + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Commands.VersionResp parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Commands.VersionResp) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object version_ = ""; + /** + *
+       * The version of Arduino CLI in use.
+       * 
+ * + * string version = 1; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The version of Arduino CLI in use.
+       * 
+ * + * string version = 1; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The version of Arduino CLI in use.
+       * 
+ * + * string version = 1; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + *
+       * The version of Arduino CLI in use.
+       * 
+ * + * string version = 1; + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + *
+       * The version of Arduino CLI in use.
+       * 
+ * + * string version = 1; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.VersionResp) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.VersionResp) + private static final cc.arduino.cli.commands.Commands.VersionResp DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Commands.VersionResp(); + } + + public static cc.arduino.cli.commands.Commands.VersionResp getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VersionResp parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new VersionResp(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Commands.VersionResp getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_InitReq_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_InitReq_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_InitResp_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_InitResp_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_DestroyReq_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_DestroyReq_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_DestroyResp_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_DestroyResp_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_RescanReq_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_RescanReq_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_RescanResp_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_RescanResp_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_UpdateIndexReq_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_UpdateIndexReq_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_UpdateIndexResp_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_UpdateIndexResp_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_UpdateLibrariesIndexReq_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_UpdateLibrariesIndexReq_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_UpdateLibrariesIndexResp_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_UpdateLibrariesIndexResp_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_VersionReq_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_VersionReq_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_VersionResp_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_VersionResp_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\027commands/commands.proto\022\027cc.arduino.cl" + + "i.commands\032\025commands/common.proto\032\024comma" + + "nds/board.proto\032\026commands/compile.proto\032" + + "\023commands/core.proto\032\025commands/upload.pr" + + "oto\032\022commands/lib.proto\"\'\n\007InitReq\022\034\n\024li" + + "brary_manager_only\030\002 \001(\010\"\202\002\n\010InitResp\0223\n" + + "\010instance\030\001 \001(\0132!.cc.arduino.cli.command" + + "s.Instance\022\036\n\026platforms_index_errors\030\002 \003" + + "(\t\022\035\n\025libraries_index_error\030\003 \001(\t\022D\n\021dow" + + "nload_progress\030\004 \001(\0132).cc.arduino.cli.co" + + "mmands.DownloadProgress\022<\n\rtask_progress" + + "\030\005 \001(\0132%.cc.arduino.cli.commands.TaskPro" + + "gress\"A\n\nDestroyReq\0223\n\010instance\030\001 \001(\0132!." + + "cc.arduino.cli.commands.Instance\"\r\n\013Dest" + + "royResp\"@\n\tRescanReq\0223\n\010instance\030\001 \001(\0132!" + + ".cc.arduino.cli.commands.Instance\"K\n\nRes" + + "canResp\022\036\n\026platforms_index_errors\030\001 \003(\t\022" + + "\035\n\025libraries_index_error\030\002 \001(\t\"E\n\016Update" + + "IndexReq\0223\n\010instance\030\001 \001(\0132!.cc.arduino." + + "cli.commands.Instance\"W\n\017UpdateIndexResp" + + "\022D\n\021download_progress\030\001 \001(\0132).cc.arduino" + + ".cli.commands.DownloadProgress\"N\n\027Update" + + "LibrariesIndexReq\0223\n\010instance\030\001 \001(\0132!.cc" + + ".arduino.cli.commands.Instance\"`\n\030Update" + + "LibrariesIndexResp\022D\n\021download_progress\030" + + "\001 \001(\0132).cc.arduino.cli.commands.Download" + + "Progress\"\014\n\nVersionReq\"\036\n\013VersionResp\022\017\n" + + "\007version\030\001 \001(\t2\314\026\n\013ArduinoCore\022O\n\004Init\022 " + + ".cc.arduino.cli.commands.InitReq\032!.cc.ar" + + "duino.cli.commands.InitResp\"\0000\001\022V\n\007Destr" + + "oy\022#.cc.arduino.cli.commands.DestroyReq\032" + + "$.cc.arduino.cli.commands.DestroyResp\"\000\022" + + "S\n\006Rescan\022\".cc.arduino.cli.commands.Resc" + + "anReq\032#.cc.arduino.cli.commands.RescanRe" + + "sp\"\000\022d\n\013UpdateIndex\022\'.cc.arduino.cli.com" + + "mands.UpdateIndexReq\032(.cc.arduino.cli.co" + + "mmands.UpdateIndexResp\"\0000\001\022\177\n\024UpdateLibr" + + "ariesIndex\0220.cc.arduino.cli.commands.Upd" + + "ateLibrariesIndexReq\0321.cc.arduino.cli.co" + + "mmands.UpdateLibrariesIndexResp\"\0000\001\022V\n\007V" + + "ersion\022#.cc.arduino.cli.commands.Version" + + "Req\032$.cc.arduino.cli.commands.VersionRes" + + "p\"\000\022c\n\014BoardDetails\022(.cc.arduino.cli.com" + + "mands.BoardDetailsReq\032).cc.arduino.cli.c" + + "ommands.BoardDetailsResp\022b\n\013BoardAttach\022" + + "\'.cc.arduino.cli.commands.BoardAttachReq" + + "\032(.cc.arduino.cli.commands.BoardAttachRe" + + "sp0\001\022Z\n\tBoardList\022%.cc.arduino.cli.comma" + + "nds.BoardListReq\032&.cc.arduino.cli.comman" + + "ds.BoardListResp\022c\n\014BoardListAll\022(.cc.ar" + + "duino.cli.commands.BoardListAllReq\032).cc." + + "arduino.cli.commands.BoardListAllResp\022V\n" + + "\007Compile\022#.cc.arduino.cli.commands.Compi" + + "leReq\032$.cc.arduino.cli.commands.CompileR" + + "esp0\001\022n\n\017PlatformInstall\022+.cc.arduino.cl" + + "i.commands.PlatformInstallReq\032,.cc.ardui" + + "no.cli.commands.PlatformInstallResp0\001\022q\n" + + "\020PlatformDownload\022,.cc.arduino.cli.comma" + + "nds.PlatformDownloadReq\032-.cc.arduino.cli" + + ".commands.PlatformDownloadResp0\001\022t\n\021Plat" + + "formUninstall\022-.cc.arduino.cli.commands." + + "PlatformUninstallReq\032..cc.arduino.cli.co" + + "mmands.PlatformUninstallResp0\001\022n\n\017Platfo" + + "rmUpgrade\022+.cc.arduino.cli.commands.Plat" + + "formUpgradeReq\032,.cc.arduino.cli.commands" + + ".PlatformUpgradeResp0\001\022S\n\006Upload\022\".cc.ar" + + "duino.cli.commands.UploadReq\032#.cc.arduin" + + "o.cli.commands.UploadResp0\001\022\242\001\n!ListProg" + + "rammersAvailableForUpload\022=.cc.arduino.c" + + "li.commands.ListProgrammersAvailableForU" + + "ploadReq\032>.cc.arduino.cli.commands.ListP" + + "rogrammersAvailableForUploadResp\022k\n\016Burn" + + "Bootloader\022*.cc.arduino.cli.commands.Bur" + + "nBootloaderReq\032+.cc.arduino.cli.commands" + + ".BurnBootloaderResp0\001\022i\n\016PlatformSearch\022" + + "*.cc.arduino.cli.commands.PlatformSearch" + + "Req\032+.cc.arduino.cli.commands.PlatformSe" + + "archResp\022c\n\014PlatformList\022(.cc.arduino.cl" + + "i.commands.PlatformListReq\032).cc.arduino." + + "cli.commands.PlatformListResp\022n\n\017Library" + + "Download\022+.cc.arduino.cli.commands.Libra" + + "ryDownloadReq\032,.cc.arduino.cli.commands." + + "LibraryDownloadResp0\001\022k\n\016LibraryInstall\022" + + "*.cc.arduino.cli.commands.LibraryInstall" + + "Req\032+.cc.arduino.cli.commands.LibraryIns" + + "tallResp0\001\022q\n\020LibraryUninstall\022,.cc.ardu" + + "ino.cli.commands.LibraryUninstallReq\032-.c" + + "c.arduino.cli.commands.LibraryUninstallR" + + "esp0\001\022t\n\021LibraryUpgradeAll\022-.cc.arduino." + + "cli.commands.LibraryUpgradeAllReq\032..cc.a" + + "rduino.cli.commands.LibraryUpgradeAllRes" + + "p0\001\022\215\001\n\032LibraryResolveDependencies\0226.cc." + + "arduino.cli.commands.LibraryResolveDepen" + + "denciesReq\0327.cc.arduino.cli.commands.Lib" + + "raryResolveDependenciesResp\022f\n\rLibrarySe" + + "arch\022).cc.arduino.cli.commands.LibrarySe" + + "archReq\032*.cc.arduino.cli.commands.Librar" + + "ySearchResp\022`\n\013LibraryList\022\'.cc.arduino." + + "cli.commands.LibraryListReq\032(.cc.arduino" + + ".cli.commands.LibraryListRespB-Z+github." + + "com/arduino/arduino-cli/rpc/commandsb\006pr" + + "oto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + cc.arduino.cli.commands.Common.getDescriptor(), + cc.arduino.cli.commands.Board.getDescriptor(), + cc.arduino.cli.commands.Compile.getDescriptor(), + cc.arduino.cli.commands.Core.getDescriptor(), + cc.arduino.cli.commands.Upload.getDescriptor(), + cc.arduino.cli.commands.Lib.getDescriptor(), + }); + internal_static_cc_arduino_cli_commands_InitReq_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_cc_arduino_cli_commands_InitReq_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_InitReq_descriptor, + new java.lang.String[] { "LibraryManagerOnly", }); + internal_static_cc_arduino_cli_commands_InitResp_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_cc_arduino_cli_commands_InitResp_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_InitResp_descriptor, + new java.lang.String[] { "Instance", "PlatformsIndexErrors", "LibrariesIndexError", "DownloadProgress", "TaskProgress", }); + internal_static_cc_arduino_cli_commands_DestroyReq_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_cc_arduino_cli_commands_DestroyReq_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_DestroyReq_descriptor, + new java.lang.String[] { "Instance", }); + internal_static_cc_arduino_cli_commands_DestroyResp_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_cc_arduino_cli_commands_DestroyResp_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_DestroyResp_descriptor, + new java.lang.String[] { }); + internal_static_cc_arduino_cli_commands_RescanReq_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_cc_arduino_cli_commands_RescanReq_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_RescanReq_descriptor, + new java.lang.String[] { "Instance", }); + internal_static_cc_arduino_cli_commands_RescanResp_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_cc_arduino_cli_commands_RescanResp_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_RescanResp_descriptor, + new java.lang.String[] { "PlatformsIndexErrors", "LibrariesIndexError", }); + internal_static_cc_arduino_cli_commands_UpdateIndexReq_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_cc_arduino_cli_commands_UpdateIndexReq_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_UpdateIndexReq_descriptor, + new java.lang.String[] { "Instance", }); + internal_static_cc_arduino_cli_commands_UpdateIndexResp_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_cc_arduino_cli_commands_UpdateIndexResp_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_UpdateIndexResp_descriptor, + new java.lang.String[] { "DownloadProgress", }); + internal_static_cc_arduino_cli_commands_UpdateLibrariesIndexReq_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_cc_arduino_cli_commands_UpdateLibrariesIndexReq_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_UpdateLibrariesIndexReq_descriptor, + new java.lang.String[] { "Instance", }); + internal_static_cc_arduino_cli_commands_UpdateLibrariesIndexResp_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_cc_arduino_cli_commands_UpdateLibrariesIndexResp_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_UpdateLibrariesIndexResp_descriptor, + new java.lang.String[] { "DownloadProgress", }); + internal_static_cc_arduino_cli_commands_VersionReq_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_cc_arduino_cli_commands_VersionReq_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_VersionReq_descriptor, + new java.lang.String[] { }); + internal_static_cc_arduino_cli_commands_VersionResp_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_cc_arduino_cli_commands_VersionResp_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_VersionResp_descriptor, + new java.lang.String[] { "Version", }); + cc.arduino.cli.commands.Common.getDescriptor(); + cc.arduino.cli.commands.Board.getDescriptor(); + cc.arduino.cli.commands.Compile.getDescriptor(); + cc.arduino.cli.commands.Core.getDescriptor(); + cc.arduino.cli.commands.Upload.getDescriptor(); + cc.arduino.cli.commands.Lib.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/arduino-core/src/cc/arduino/cli/commands/Common.java b/arduino-core/src/cc/arduino/cli/commands/Common.java new file mode 100644 index 00000000000..dce2219505a --- /dev/null +++ b/arduino-core/src/cc/arduino/cli/commands/Common.java @@ -0,0 +1,2600 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: commands/common.proto + +package cc.arduino.cli.commands; + +public final class Common { + private Common() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface InstanceOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.Instance) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The ID of the instance.
+     * 
+ * + * int32 id = 1; + * @return The id. + */ + int getId(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.Instance} + */ + public static final class Instance extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.Instance) + InstanceOrBuilder { + private static final long serialVersionUID = 0L; + // Use Instance.newBuilder() to construct. + private Instance(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Instance() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Instance(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Instance( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + + id_ = input.readInt32(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Common.internal_static_cc_arduino_cli_commands_Instance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Common.internal_static_cc_arduino_cli_commands_Instance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Common.Instance.class, cc.arduino.cli.commands.Common.Instance.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + private int id_; + /** + *
+     * The ID of the instance.
+     * 
+ * + * int32 id = 1; + * @return The id. + */ + public int getId() { + return id_; + } + + 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 (id_ != 0) { + output.writeInt32(1, id_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (id_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, id_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Common.Instance)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Common.Instance other = (cc.arduino.cli.commands.Common.Instance) obj; + + if (getId() + != other.getId()) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Common.Instance parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Common.Instance parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Common.Instance parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Common.Instance parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Common.Instance parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Common.Instance parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Common.Instance parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Common.Instance parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Common.Instance parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Common.Instance parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Common.Instance parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Common.Instance parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Common.Instance 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.Instance} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.Instance) + cc.arduino.cli.commands.Common.InstanceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Common.internal_static_cc_arduino_cli_commands_Instance_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Common.internal_static_cc_arduino_cli_commands_Instance_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Common.Instance.class, cc.arduino.cli.commands.Common.Instance.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Common.Instance.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + id_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Common.internal_static_cc_arduino_cli_commands_Instance_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Common.Instance getDefaultInstanceForType() { + return cc.arduino.cli.commands.Common.Instance.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Common.Instance build() { + cc.arduino.cli.commands.Common.Instance result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Common.Instance buildPartial() { + cc.arduino.cli.commands.Common.Instance result = new cc.arduino.cli.commands.Common.Instance(this); + result.id_ = id_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Common.Instance) { + return mergeFrom((cc.arduino.cli.commands.Common.Instance)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Common.Instance other) { + if (other == cc.arduino.cli.commands.Common.Instance.getDefaultInstance()) return this; + if (other.getId() != 0) { + setId(other.getId()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Common.Instance parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Common.Instance) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int id_ ; + /** + *
+       * The ID of the instance.
+       * 
+ * + * int32 id = 1; + * @return The id. + */ + public int getId() { + return id_; + } + /** + *
+       * The ID of the instance.
+       * 
+ * + * int32 id = 1; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(int value) { + + id_ = value; + onChanged(); + return this; + } + /** + *
+       * The ID of the instance.
+       * 
+ * + * int32 id = 1; + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.Instance) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.Instance) + private static final cc.arduino.cli.commands.Common.Instance DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Common.Instance(); + } + + public static cc.arduino.cli.commands.Common.Instance getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Instance parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Instance(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Common.Instance getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DownloadProgressOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.DownloadProgress) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * URL of the download.
+     * 
+ * + * string url = 1; + * @return The url. + */ + java.lang.String getUrl(); + /** + *
+     * URL of the download.
+     * 
+ * + * string url = 1; + * @return The bytes for url. + */ + com.google.protobuf.ByteString + getUrlBytes(); + + /** + *
+     * The file being downloaded.
+     * 
+ * + * string file = 2; + * @return The file. + */ + java.lang.String getFile(); + /** + *
+     * The file being downloaded.
+     * 
+ * + * string file = 2; + * @return The bytes for file. + */ + com.google.protobuf.ByteString + getFileBytes(); + + /** + *
+     * Total size of the file being downloaded.
+     * 
+ * + * int64 total_size = 3; + * @return The totalSize. + */ + long getTotalSize(); + + /** + *
+     * Size of the downloaded portion of the file.
+     * 
+ * + * int64 downloaded = 4; + * @return The downloaded. + */ + long getDownloaded(); + + /** + *
+     * Whether the download is complete.
+     * 
+ * + * bool completed = 5; + * @return The completed. + */ + boolean getCompleted(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.DownloadProgress} + */ + public static final class DownloadProgress extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.DownloadProgress) + DownloadProgressOrBuilder { + private static final long serialVersionUID = 0L; + // Use DownloadProgress.newBuilder() to construct. + private DownloadProgress(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DownloadProgress() { + url_ = ""; + file_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DownloadProgress(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DownloadProgress( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + url_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + file_ = s; + break; + } + case 24: { + + totalSize_ = input.readInt64(); + break; + } + case 32: { + + downloaded_ = input.readInt64(); + break; + } + case 40: { + + completed_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Common.internal_static_cc_arduino_cli_commands_DownloadProgress_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Common.internal_static_cc_arduino_cli_commands_DownloadProgress_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Common.DownloadProgress.class, cc.arduino.cli.commands.Common.DownloadProgress.Builder.class); + } + + public static final int URL_FIELD_NUMBER = 1; + private volatile java.lang.Object url_; + /** + *
+     * URL of the download.
+     * 
+ * + * string url = 1; + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + 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(); + url_ = s; + return s; + } + } + /** + *
+     * URL of the download.
+     * 
+ * + * string url = 1; + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILE_FIELD_NUMBER = 2; + private volatile java.lang.Object file_; + /** + *
+     * The file being downloaded.
+     * 
+ * + * string file = 2; + * @return The file. + */ + public java.lang.String getFile() { + java.lang.Object ref = file_; + 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(); + file_ = s; + return s; + } + } + /** + *
+     * The file being downloaded.
+     * 
+ * + * string file = 2; + * @return The bytes for file. + */ + public com.google.protobuf.ByteString + getFileBytes() { + java.lang.Object ref = file_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + file_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TOTAL_SIZE_FIELD_NUMBER = 3; + private long totalSize_; + /** + *
+     * Total size of the file being downloaded.
+     * 
+ * + * int64 total_size = 3; + * @return The totalSize. + */ + public long getTotalSize() { + return totalSize_; + } + + public static final int DOWNLOADED_FIELD_NUMBER = 4; + private long downloaded_; + /** + *
+     * Size of the downloaded portion of the file.
+     * 
+ * + * int64 downloaded = 4; + * @return The downloaded. + */ + public long getDownloaded() { + return downloaded_; + } + + public static final int COMPLETED_FIELD_NUMBER = 5; + private boolean completed_; + /** + *
+     * Whether the download is complete.
+     * 
+ * + * bool completed = 5; + * @return The completed. + */ + public boolean getCompleted() { + return completed_; + } + + 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 (!getUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); + } + if (!getFileBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, file_); + } + if (totalSize_ != 0L) { + output.writeInt64(3, totalSize_); + } + if (downloaded_ != 0L) { + output.writeInt64(4, downloaded_); + } + if (completed_ != false) { + output.writeBool(5, completed_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); + } + if (!getFileBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, file_); + } + if (totalSize_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, totalSize_); + } + if (downloaded_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, downloaded_); + } + if (completed_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, completed_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Common.DownloadProgress)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Common.DownloadProgress other = (cc.arduino.cli.commands.Common.DownloadProgress) obj; + + if (!getUrl() + .equals(other.getUrl())) return false; + if (!getFile() + .equals(other.getFile())) return false; + if (getTotalSize() + != other.getTotalSize()) return false; + if (getDownloaded() + != other.getDownloaded()) return false; + if (getCompleted() + != other.getCompleted()) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + hash = (37 * hash) + FILE_FIELD_NUMBER; + hash = (53 * hash) + getFile().hashCode(); + hash = (37 * hash) + TOTAL_SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getTotalSize()); + hash = (37 * hash) + DOWNLOADED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getDownloaded()); + hash = (37 * hash) + COMPLETED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getCompleted()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Common.DownloadProgress parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Common.DownloadProgress parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Common.DownloadProgress parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Common.DownloadProgress parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Common.DownloadProgress parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Common.DownloadProgress parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Common.DownloadProgress parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Common.DownloadProgress parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Common.DownloadProgress parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Common.DownloadProgress parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Common.DownloadProgress parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Common.DownloadProgress parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Common.DownloadProgress 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.DownloadProgress} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.DownloadProgress) + cc.arduino.cli.commands.Common.DownloadProgressOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Common.internal_static_cc_arduino_cli_commands_DownloadProgress_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Common.internal_static_cc_arduino_cli_commands_DownloadProgress_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Common.DownloadProgress.class, cc.arduino.cli.commands.Common.DownloadProgress.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Common.DownloadProgress.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + url_ = ""; + + file_ = ""; + + totalSize_ = 0L; + + downloaded_ = 0L; + + completed_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Common.internal_static_cc_arduino_cli_commands_DownloadProgress_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Common.DownloadProgress getDefaultInstanceForType() { + return cc.arduino.cli.commands.Common.DownloadProgress.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Common.DownloadProgress build() { + cc.arduino.cli.commands.Common.DownloadProgress result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Common.DownloadProgress buildPartial() { + cc.arduino.cli.commands.Common.DownloadProgress result = new cc.arduino.cli.commands.Common.DownloadProgress(this); + result.url_ = url_; + result.file_ = file_; + result.totalSize_ = totalSize_; + result.downloaded_ = downloaded_; + result.completed_ = completed_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Common.DownloadProgress) { + return mergeFrom((cc.arduino.cli.commands.Common.DownloadProgress)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Common.DownloadProgress other) { + if (other == cc.arduino.cli.commands.Common.DownloadProgress.getDefaultInstance()) return this; + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + onChanged(); + } + if (!other.getFile().isEmpty()) { + file_ = other.file_; + onChanged(); + } + if (other.getTotalSize() != 0L) { + setTotalSize(other.getTotalSize()); + } + if (other.getDownloaded() != 0L) { + setDownloaded(other.getDownloaded()); + } + if (other.getCompleted() != false) { + setCompleted(other.getCompleted()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Common.DownloadProgress parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Common.DownloadProgress) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object url_ = ""; + /** + *
+       * URL of the download.
+       * 
+ * + * string url = 1; + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * URL of the download.
+       * 
+ * + * string url = 1; + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * URL of the download.
+       * 
+ * + * string url = 1; + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + url_ = value; + onChanged(); + return this; + } + /** + *
+       * URL of the download.
+       * 
+ * + * string url = 1; + * @return This builder for chaining. + */ + public Builder clearUrl() { + + url_ = getDefaultInstance().getUrl(); + onChanged(); + return this; + } + /** + *
+       * URL of the download.
+       * 
+ * + * string url = 1; + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + url_ = value; + onChanged(); + return this; + } + + private java.lang.Object file_ = ""; + /** + *
+       * The file being downloaded.
+       * 
+ * + * string file = 2; + * @return The file. + */ + public java.lang.String getFile() { + java.lang.Object ref = file_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + file_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The file being downloaded.
+       * 
+ * + * string file = 2; + * @return The bytes for file. + */ + public com.google.protobuf.ByteString + getFileBytes() { + java.lang.Object ref = file_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + file_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The file being downloaded.
+       * 
+ * + * string file = 2; + * @param value The file to set. + * @return This builder for chaining. + */ + public Builder setFile( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + file_ = value; + onChanged(); + return this; + } + /** + *
+       * The file being downloaded.
+       * 
+ * + * string file = 2; + * @return This builder for chaining. + */ + public Builder clearFile() { + + file_ = getDefaultInstance().getFile(); + onChanged(); + return this; + } + /** + *
+       * The file being downloaded.
+       * 
+ * + * string file = 2; + * @param value The bytes for file to set. + * @return This builder for chaining. + */ + public Builder setFileBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + file_ = value; + onChanged(); + return this; + } + + private long totalSize_ ; + /** + *
+       * Total size of the file being downloaded.
+       * 
+ * + * int64 total_size = 3; + * @return The totalSize. + */ + public long getTotalSize() { + return totalSize_; + } + /** + *
+       * Total size of the file being downloaded.
+       * 
+ * + * int64 total_size = 3; + * @param value The totalSize to set. + * @return This builder for chaining. + */ + public Builder setTotalSize(long value) { + + totalSize_ = value; + onChanged(); + return this; + } + /** + *
+       * Total size of the file being downloaded.
+       * 
+ * + * int64 total_size = 3; + * @return This builder for chaining. + */ + public Builder clearTotalSize() { + + totalSize_ = 0L; + onChanged(); + return this; + } + + private long downloaded_ ; + /** + *
+       * Size of the downloaded portion of the file.
+       * 
+ * + * int64 downloaded = 4; + * @return The downloaded. + */ + public long getDownloaded() { + return downloaded_; + } + /** + *
+       * Size of the downloaded portion of the file.
+       * 
+ * + * int64 downloaded = 4; + * @param value The downloaded to set. + * @return This builder for chaining. + */ + public Builder setDownloaded(long value) { + + downloaded_ = value; + onChanged(); + return this; + } + /** + *
+       * Size of the downloaded portion of the file.
+       * 
+ * + * int64 downloaded = 4; + * @return This builder for chaining. + */ + public Builder clearDownloaded() { + + downloaded_ = 0L; + onChanged(); + return this; + } + + private boolean completed_ ; + /** + *
+       * Whether the download is complete.
+       * 
+ * + * bool completed = 5; + * @return The completed. + */ + public boolean getCompleted() { + return completed_; + } + /** + *
+       * Whether the download is complete.
+       * 
+ * + * bool completed = 5; + * @param value The completed to set. + * @return This builder for chaining. + */ + public Builder setCompleted(boolean value) { + + completed_ = value; + onChanged(); + return this; + } + /** + *
+       * Whether the download is complete.
+       * 
+ * + * bool completed = 5; + * @return This builder for chaining. + */ + public Builder clearCompleted() { + + completed_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.DownloadProgress) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.DownloadProgress) + private static final cc.arduino.cli.commands.Common.DownloadProgress DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Common.DownloadProgress(); + } + + public static cc.arduino.cli.commands.Common.DownloadProgress getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DownloadProgress parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DownloadProgress(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Common.DownloadProgress getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface TaskProgressOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.TaskProgress) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Description of the task.
+     * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+     * Description of the task.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+     * Additional information about the task.
+     * 
+ * + * string message = 2; + * @return The message. + */ + java.lang.String getMessage(); + /** + *
+     * Additional information about the task.
+     * 
+ * + * string message = 2; + * @return The bytes for message. + */ + com.google.protobuf.ByteString + getMessageBytes(); + + /** + *
+     * Whether the task is complete.
+     * 
+ * + * bool completed = 3; + * @return The completed. + */ + boolean getCompleted(); + + /** + *
+     * Amount in percent of the task completion (if available)
+     * 
+ * + * float percent_completed = 4; + * @return The percentCompleted. + */ + float getPercentCompleted(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.TaskProgress} + */ + public static final class TaskProgress extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.TaskProgress) + TaskProgressOrBuilder { + private static final long serialVersionUID = 0L; + // Use TaskProgress.newBuilder() to construct. + private TaskProgress(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TaskProgress() { + name_ = ""; + message_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TaskProgress(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TaskProgress( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + message_ = s; + break; + } + case 24: { + + completed_ = input.readBool(); + break; + } + case 37: { + + percentCompleted_ = input.readFloat(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Common.internal_static_cc_arduino_cli_commands_TaskProgress_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Common.internal_static_cc_arduino_cli_commands_TaskProgress_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Common.TaskProgress.class, cc.arduino.cli.commands.Common.TaskProgress.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+     * Description of the task.
+     * 
+ * + * string name = 1; + * @return The name. + */ + 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; + } + } + /** + *
+     * Description of the task.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + 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 MESSAGE_FIELD_NUMBER = 2; + private volatile java.lang.Object message_; + /** + *
+     * Additional information about the task.
+     * 
+ * + * string message = 2; + * @return The message. + */ + public java.lang.String getMessage() { + java.lang.Object ref = message_; + 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(); + message_ = s; + return s; + } + } + /** + *
+     * Additional information about the task.
+     * 
+ * + * string message = 2; + * @return The bytes for message. + */ + public com.google.protobuf.ByteString + getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COMPLETED_FIELD_NUMBER = 3; + private boolean completed_; + /** + *
+     * Whether the task is complete.
+     * 
+ * + * bool completed = 3; + * @return The completed. + */ + public boolean getCompleted() { + return completed_; + } + + public static final int PERCENT_COMPLETED_FIELD_NUMBER = 4; + private float percentCompleted_; + /** + *
+     * Amount in percent of the task completion (if available)
+     * 
+ * + * float percent_completed = 4; + * @return The percentCompleted. + */ + public float getPercentCompleted() { + return percentCompleted_; + } + + 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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getMessageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, message_); + } + if (completed_ != false) { + output.writeBool(3, completed_); + } + if (percentCompleted_ != 0F) { + output.writeFloat(4, percentCompleted_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getMessageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, message_); + } + if (completed_ != false) { + 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; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Common.TaskProgress)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Common.TaskProgress other = (cc.arduino.cli.commands.Common.TaskProgress) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getMessage() + .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; + } + + @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(); + hash = (37 * hash) + MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getMessage().hashCode(); + 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; + } + + public static cc.arduino.cli.commands.Common.TaskProgress parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Common.TaskProgress parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Common.TaskProgress parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Common.TaskProgress parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Common.TaskProgress parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Common.TaskProgress parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Common.TaskProgress parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Common.TaskProgress parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Common.TaskProgress parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Common.TaskProgress parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Common.TaskProgress parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Common.TaskProgress parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Common.TaskProgress 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.TaskProgress} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.TaskProgress) + cc.arduino.cli.commands.Common.TaskProgressOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Common.internal_static_cc_arduino_cli_commands_TaskProgress_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Common.internal_static_cc_arduino_cli_commands_TaskProgress_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Common.TaskProgress.class, cc.arduino.cli.commands.Common.TaskProgress.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Common.TaskProgress.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + message_ = ""; + + completed_ = false; + + percentCompleted_ = 0F; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Common.internal_static_cc_arduino_cli_commands_TaskProgress_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Common.TaskProgress getDefaultInstanceForType() { + return cc.arduino.cli.commands.Common.TaskProgress.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Common.TaskProgress build() { + cc.arduino.cli.commands.Common.TaskProgress result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Common.TaskProgress buildPartial() { + cc.arduino.cli.commands.Common.TaskProgress result = new cc.arduino.cli.commands.Common.TaskProgress(this); + result.name_ = name_; + result.message_ = message_; + result.completed_ = completed_; + result.percentCompleted_ = percentCompleted_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Common.TaskProgress) { + return mergeFrom((cc.arduino.cli.commands.Common.TaskProgress)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Common.TaskProgress other) { + if (other == cc.arduino.cli.commands.Common.TaskProgress.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getMessage().isEmpty()) { + message_ = other.message_; + onChanged(); + } + if (other.getCompleted() != false) { + setCompleted(other.getCompleted()); + } + if (other.getPercentCompleted() != 0F) { + setPercentCompleted(other.getPercentCompleted()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Common.TaskProgress parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Common.TaskProgress) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+       * Description of the task.
+       * 
+ * + * 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; + } + } + /** + *
+       * Description of the task.
+       * 
+ * + * 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; + } + } + /** + *
+       * Description of the task.
+       * 
+ * + * 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; + onChanged(); + return this; + } + /** + *
+       * Description of the task.
+       * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+       * Description of the task.
+       * 
+ * + * 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; + onChanged(); + return this; + } + + private java.lang.Object message_ = ""; + /** + *
+       * Additional information about the task.
+       * 
+ * + * string message = 2; + * @return The message. + */ + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + message_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Additional information about the task.
+       * 
+ * + * string message = 2; + * @return The bytes for message. + */ + public com.google.protobuf.ByteString + getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Additional information about the task.
+       * 
+ * + * string message = 2; + * @param value The message to set. + * @return This builder for chaining. + */ + public Builder setMessage( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + message_ = value; + onChanged(); + return this; + } + /** + *
+       * Additional information about the task.
+       * 
+ * + * string message = 2; + * @return This builder for chaining. + */ + public Builder clearMessage() { + + message_ = getDefaultInstance().getMessage(); + onChanged(); + return this; + } + /** + *
+       * Additional information about the task.
+       * 
+ * + * string message = 2; + * @param value The bytes for message to set. + * @return This builder for chaining. + */ + public Builder setMessageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + message_ = value; + onChanged(); + return this; + } + + private boolean completed_ ; + /** + *
+       * Whether the task is complete.
+       * 
+ * + * bool completed = 3; + * @return The completed. + */ + public boolean getCompleted() { + return completed_; + } + /** + *
+       * Whether the task is complete.
+       * 
+ * + * bool completed = 3; + * @param value The completed to set. + * @return This builder for chaining. + */ + public Builder setCompleted(boolean value) { + + completed_ = value; + onChanged(); + return this; + } + /** + *
+       * Whether the task is complete.
+       * 
+ * + * bool completed = 3; + * @return This builder for chaining. + */ + public Builder clearCompleted() { + + completed_ = false; + onChanged(); + return this; + } + + private float percentCompleted_ ; + /** + *
+       * Amount in percent of the task completion (if available)
+       * 
+ * + * float percent_completed = 4; + * @return The percentCompleted. + */ + public float getPercentCompleted() { + return percentCompleted_; + } + /** + *
+       * Amount in percent of the task completion (if available)
+       * 
+ * + * 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; + } + /** + *
+       * Amount in percent of the task completion (if available)
+       * 
+ * + * 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) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.TaskProgress) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.TaskProgress) + private static final cc.arduino.cli.commands.Common.TaskProgress DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Common.TaskProgress(); + } + + public static cc.arduino.cli.commands.Common.TaskProgress getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TaskProgress parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TaskProgress(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Common.TaskProgress getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_Instance_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_Instance_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_DownloadProgress_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_DownloadProgress_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_TaskProgress_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_TaskProgress_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\025commands/common.proto\022\027cc.arduino.cli." + + "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" + + "me\030\001 \001(\t\022\017\n\007message\030\002 \001(\t\022\021\n\tcompleted\030\003" + + " \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, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_cc_arduino_cli_commands_Instance_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_cc_arduino_cli_commands_Instance_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_Instance_descriptor, + new java.lang.String[] { "Id", }); + internal_static_cc_arduino_cli_commands_DownloadProgress_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_cc_arduino_cli_commands_DownloadProgress_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_DownloadProgress_descriptor, + new java.lang.String[] { "Url", "File", "TotalSize", "Downloaded", "Completed", }); + internal_static_cc_arduino_cli_commands_TaskProgress_descriptor = + getDescriptor().getMessageTypes().get(2); + 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", "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 new file mode 100644 index 00000000000..91af80d8ea7 --- /dev/null +++ b/arduino-core/src/cc/arduino/cli/commands/Compile.java @@ -0,0 +1,4618 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: commands/compile.proto + +package cc.arduino.cli.commands; + +public final class Compile { + private Compile() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + /** + * Protobuf enum {@code cc.arduino.cli.commands.CompileResult} + */ + public enum CompileResult + implements com.google.protobuf.ProtocolMessageEnum { + /** + * compile_success = 0; + */ + compile_success(0), + /** + * compile_error = 1; + */ + compile_error(1), + UNRECOGNIZED(-1), + ; + + /** + * compile_success = 0; + */ + public static final int compile_success_VALUE = 0; + /** + * compile_error = 1; + */ + public static final int compile_error_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 CompileResult 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 CompileResult forNumber(int value) { + switch (value) { + case 0: return compile_success; + case 1: return compile_error; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + CompileResult> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public CompileResult findValueByNumber(int number) { + return CompileResult.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.Compile.getDescriptor().getEnumTypes().get(0); + } + + private static final CompileResult[] VALUES = values(); + + public static CompileResult 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 CompileResult(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:cc.arduino.cli.commands.CompileResult) + } + + public interface CompileReqOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.CompileReq) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + boolean hasInstance(); + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + cc.arduino.cli.commands.Common.Instance getInstance(); + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder(); + + /** + *
+     * Fully Qualified Board Name, e.g.: `arduino:avr:uno`. If this field is not defined, the FQBN of the board attached to the sketch via the `BoardAttach` method is used.
+     * 
+ * + * string fqbn = 2; + * @return The fqbn. + */ + java.lang.String getFqbn(); + /** + *
+     * Fully Qualified Board Name, e.g.: `arduino:avr:uno`. If this field is not defined, the FQBN of the board attached to the sketch via the `BoardAttach` method is used.
+     * 
+ * + * string fqbn = 2; + * @return The bytes for fqbn. + */ + com.google.protobuf.ByteString + getFqbnBytes(); + + /** + *
+     * The path where the sketch is stored.
+     * 
+ * + * string sketchPath = 3; + * @return The sketchPath. + */ + java.lang.String getSketchPath(); + /** + *
+     * The path where the sketch is stored.
+     * 
+ * + * string sketchPath = 3; + * @return The bytes for sketchPath. + */ + com.google.protobuf.ByteString + getSketchPathBytes(); + + /** + *
+     * Show all build preferences used instead of compiling.
+     * 
+ * + * bool showProperties = 4; + * @return The showProperties. + */ + boolean getShowProperties(); + + /** + *
+     * Print preprocessed code to stdout instead of compiling.
+     * 
+ * + * bool preprocess = 5; + * @return The preprocess. + */ + boolean getPreprocess(); + + /** + *
+     * Builds of 'core.a' are saved into this path to be cached and reused.
+     * 
+ * + * string buildCachePath = 6; + * @return The buildCachePath. + */ + java.lang.String getBuildCachePath(); + /** + *
+     * Builds of 'core.a' are saved into this path to be cached and reused.
+     * 
+ * + * string buildCachePath = 6; + * @return The bytes for buildCachePath. + */ + com.google.protobuf.ByteString + getBuildCachePathBytes(); + + /** + *
+     * Path to use to store the files used for the compilation. If omitted, a directory will be created in the operating system's default temporary path.
+     * 
+ * + * string buildPath = 7; + * @return The buildPath. + */ + java.lang.String getBuildPath(); + /** + *
+     * Path to use to store the files used for the compilation. If omitted, a directory will be created in the operating system's default temporary path.
+     * 
+ * + * string buildPath = 7; + * @return The bytes for buildPath. + */ + com.google.protobuf.ByteString + getBuildPathBytes(); + + /** + *
+     * List of custom build properties separated by commas.
+     * 
+ * + * repeated string buildProperties = 8; + * @return A list containing the buildProperties. + */ + java.util.List + getBuildPropertiesList(); + /** + *
+     * List of custom build properties separated by commas.
+     * 
+ * + * repeated string buildProperties = 8; + * @return The count of buildProperties. + */ + int getBuildPropertiesCount(); + /** + *
+     * List of custom build properties separated by commas.
+     * 
+ * + * repeated string buildProperties = 8; + * @param index The index of the element to return. + * @return The buildProperties at the given index. + */ + java.lang.String getBuildProperties(int index); + /** + *
+     * List of custom build properties separated by commas.
+     * 
+ * + * repeated string buildProperties = 8; + * @param index The index of the value to return. + * @return The bytes of the buildProperties at the given index. + */ + com.google.protobuf.ByteString + getBuildPropertiesBytes(int index); + + /** + *
+     * Used to tell gcc which warning level to use. The level names are: "none", "default", "more" and "all".
+     * 
+ * + * string warnings = 9; + * @return The warnings. + */ + java.lang.String getWarnings(); + /** + *
+     * Used to tell gcc which warning level to use. The level names are: "none", "default", "more" and "all".
+     * 
+ * + * string warnings = 9; + * @return The bytes for warnings. + */ + com.google.protobuf.ByteString + getWarningsBytes(); + + /** + *
+     * Turns on verbose mode.
+     * 
+ * + * bool verbose = 10; + * @return The verbose. + */ + boolean getVerbose(); + + /** + *
+     * Suppresses almost every output.
+     * 
+ * + * bool quiet = 11; + * @return The quiet. + */ + boolean getQuiet(); + + /** + *
+     * VID/PID specific build properties.
+     * 
+ * + * string vidPid = 12; + * @return The vidPid. + */ + java.lang.String getVidPid(); + /** + *
+     * VID/PID specific build properties.
+     * 
+ * + * string vidPid = 12; + * @return The bytes for vidPid. + */ + com.google.protobuf.ByteString + getVidPidBytes(); + + /** + *
+     * DEPRECATED: use exportDir instead
+     * 
+ * + * string exportFile = 13 [deprecated = true]; + * @return The exportFile. + */ + @java.lang.Deprecated java.lang.String getExportFile(); + /** + *
+     * DEPRECATED: use exportDir instead
+     * 
+ * + * string exportFile = 13 [deprecated = true]; + * @return The bytes for exportFile. + */ + @java.lang.Deprecated com.google.protobuf.ByteString + getExportFileBytes(); + + /** + *
+     * The max number of concurrent compiler instances to run (as `make -jx`). If jobs is set to 0, it will use the number of available CPUs as the maximum.
+     * 
+ * + * int32 jobs = 14; + * @return The jobs. + */ + int getJobs(); + + /** + *
+     * List of custom libraries paths separated by commas.
+     * 
+ * + * repeated string libraries = 15; + * @return A list containing the libraries. + */ + java.util.List + getLibrariesList(); + /** + *
+     * List of custom libraries paths separated by commas.
+     * 
+ * + * repeated string libraries = 15; + * @return The count of libraries. + */ + int getLibrariesCount(); + /** + *
+     * List of custom libraries paths separated by commas.
+     * 
+ * + * repeated string libraries = 15; + * @param index The index of the element to return. + * @return The libraries at the given index. + */ + java.lang.String getLibraries(int index); + /** + *
+     * List of custom libraries paths separated by commas.
+     * 
+ * + * repeated string libraries = 15; + * @param index The index of the value to return. + * @return The bytes of the libraries at the given index. + */ + com.google.protobuf.ByteString + getLibrariesBytes(int index); + + /** + *
+     * Optimize compile output for debug, not for release.
+     * 
+ * + * bool optimizeForDebug = 16; + * @return The optimizeForDebug. + */ + boolean getOptimizeForDebug(); + + /** + *
+     * When set to `true` the compiled binary will not be copied to the export directory.
+     * 
+ * + * bool dryRun = 17; + * @return The dryRun. + */ + boolean getDryRun(); + + /** + *
+     * Optional: save the build artifacts in this directory, the directory must exist.
+     * 
+ * + * string export_dir = 18; + * @return The exportDir. + */ + java.lang.String getExportDir(); + /** + *
+     * Optional: save the build artifacts in this directory, the directory must exist.
+     * 
+ * + * string export_dir = 18; + * @return The bytes for exportDir. + */ + com.google.protobuf.ByteString + getExportDirBytes(); + + /** + *
+     * External programmer for upload
+     * 
+ * + * string programmer = 19; + * @return The programmer. + */ + java.lang.String getProgrammer(); + /** + *
+     * External programmer for upload
+     * 
+ * + * string programmer = 19; + * @return The bytes for programmer. + */ + com.google.protobuf.ByteString + getProgrammerBytes(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.CompileReq} + */ + public static final class CompileReq extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.CompileReq) + CompileReqOrBuilder { + private static final long serialVersionUID = 0L; + // Use CompileReq.newBuilder() to construct. + private CompileReq(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CompileReq() { + fqbn_ = ""; + sketchPath_ = ""; + buildCachePath_ = ""; + buildPath_ = ""; + buildProperties_ = com.google.protobuf.LazyStringArrayList.EMPTY; + warnings_ = ""; + vidPid_ = ""; + exportFile_ = ""; + libraries_ = com.google.protobuf.LazyStringArrayList.EMPTY; + exportDir_ = ""; + programmer_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CompileReq(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CompileReq( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cc.arduino.cli.commands.Common.Instance.Builder subBuilder = null; + if (instance_ != null) { + subBuilder = instance_.toBuilder(); + } + instance_ = input.readMessage(cc.arduino.cli.commands.Common.Instance.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instance_); + instance_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + fqbn_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + sketchPath_ = s; + break; + } + case 32: { + + showProperties_ = input.readBool(); + break; + } + case 40: { + + preprocess_ = input.readBool(); + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + buildCachePath_ = s; + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + + buildPath_ = s; + break; + } + case 66: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + buildProperties_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + buildProperties_.add(s); + break; + } + case 74: { + java.lang.String s = input.readStringRequireUtf8(); + + warnings_ = s; + break; + } + case 80: { + + verbose_ = input.readBool(); + break; + } + case 88: { + + quiet_ = input.readBool(); + break; + } + case 98: { + java.lang.String s = input.readStringRequireUtf8(); + + vidPid_ = s; + break; + } + case 106: { + java.lang.String s = input.readStringRequireUtf8(); + + exportFile_ = s; + break; + } + case 112: { + + jobs_ = input.readInt32(); + break; + } + case 122: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + libraries_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + libraries_.add(s); + break; + } + case 128: { + + optimizeForDebug_ = input.readBool(); + break; + } + case 136: { + + dryRun_ = input.readBool(); + break; + } + case 146: { + java.lang.String s = input.readStringRequireUtf8(); + + exportDir_ = s; + break; + } + case 154: { + java.lang.String s = input.readStringRequireUtf8(); + + programmer_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + buildProperties_ = buildProperties_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + libraries_ = libraries_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Compile.internal_static_cc_arduino_cli_commands_CompileReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Compile.internal_static_cc_arduino_cli_commands_CompileReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Compile.CompileReq.class, cc.arduino.cli.commands.Compile.CompileReq.Builder.class); + } + + public static final int INSTANCE_FIELD_NUMBER = 1; + private cc.arduino.cli.commands.Common.Instance instance_; + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instance_ != null; + } + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + return getInstance(); + } + + public static final int FQBN_FIELD_NUMBER = 2; + private volatile java.lang.Object fqbn_; + /** + *
+     * Fully Qualified Board Name, e.g.: `arduino:avr:uno`. If this field is not defined, the FQBN of the board attached to the sketch via the `BoardAttach` method is used.
+     * 
+ * + * string fqbn = 2; + * @return The fqbn. + */ + public java.lang.String getFqbn() { + java.lang.Object ref = fqbn_; + 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(); + fqbn_ = s; + return s; + } + } + /** + *
+     * Fully Qualified Board Name, e.g.: `arduino:avr:uno`. If this field is not defined, the FQBN of the board attached to the sketch via the `BoardAttach` method is used.
+     * 
+ * + * string fqbn = 2; + * @return The bytes for fqbn. + */ + public com.google.protobuf.ByteString + getFqbnBytes() { + java.lang.Object ref = fqbn_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fqbn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SKETCHPATH_FIELD_NUMBER = 3; + private volatile java.lang.Object sketchPath_; + /** + *
+     * The path where the sketch is stored.
+     * 
+ * + * string sketchPath = 3; + * @return The sketchPath. + */ + public java.lang.String getSketchPath() { + java.lang.Object ref = sketchPath_; + 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(); + sketchPath_ = s; + return s; + } + } + /** + *
+     * The path where the sketch is stored.
+     * 
+ * + * string sketchPath = 3; + * @return The bytes for sketchPath. + */ + public com.google.protobuf.ByteString + getSketchPathBytes() { + java.lang.Object ref = sketchPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sketchPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SHOWPROPERTIES_FIELD_NUMBER = 4; + private boolean showProperties_; + /** + *
+     * Show all build preferences used instead of compiling.
+     * 
+ * + * bool showProperties = 4; + * @return The showProperties. + */ + public boolean getShowProperties() { + return showProperties_; + } + + public static final int PREPROCESS_FIELD_NUMBER = 5; + private boolean preprocess_; + /** + *
+     * Print preprocessed code to stdout instead of compiling.
+     * 
+ * + * bool preprocess = 5; + * @return The preprocess. + */ + public boolean getPreprocess() { + return preprocess_; + } + + public static final int BUILDCACHEPATH_FIELD_NUMBER = 6; + private volatile java.lang.Object buildCachePath_; + /** + *
+     * Builds of 'core.a' are saved into this path to be cached and reused.
+     * 
+ * + * string buildCachePath = 6; + * @return The buildCachePath. + */ + public java.lang.String getBuildCachePath() { + java.lang.Object ref = buildCachePath_; + 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(); + buildCachePath_ = s; + return s; + } + } + /** + *
+     * Builds of 'core.a' are saved into this path to be cached and reused.
+     * 
+ * + * string buildCachePath = 6; + * @return The bytes for buildCachePath. + */ + public com.google.protobuf.ByteString + getBuildCachePathBytes() { + java.lang.Object ref = buildCachePath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + buildCachePath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BUILDPATH_FIELD_NUMBER = 7; + private volatile java.lang.Object buildPath_; + /** + *
+     * Path to use to store the files used for the compilation. If omitted, a directory will be created in the operating system's default temporary path.
+     * 
+ * + * string buildPath = 7; + * @return The buildPath. + */ + public java.lang.String getBuildPath() { + java.lang.Object ref = buildPath_; + 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(); + buildPath_ = s; + return s; + } + } + /** + *
+     * Path to use to store the files used for the compilation. If omitted, a directory will be created in the operating system's default temporary path.
+     * 
+ * + * string buildPath = 7; + * @return The bytes for buildPath. + */ + public com.google.protobuf.ByteString + getBuildPathBytes() { + java.lang.Object ref = buildPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + buildPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BUILDPROPERTIES_FIELD_NUMBER = 8; + private com.google.protobuf.LazyStringList buildProperties_; + /** + *
+     * List of custom build properties separated by commas.
+     * 
+ * + * repeated string buildProperties = 8; + * @return A list containing the buildProperties. + */ + public com.google.protobuf.ProtocolStringList + getBuildPropertiesList() { + return buildProperties_; + } + /** + *
+     * List of custom build properties separated by commas.
+     * 
+ * + * repeated string buildProperties = 8; + * @return The count of buildProperties. + */ + public int getBuildPropertiesCount() { + return buildProperties_.size(); + } + /** + *
+     * List of custom build properties separated by commas.
+     * 
+ * + * repeated string buildProperties = 8; + * @param index The index of the element to return. + * @return The buildProperties at the given index. + */ + public java.lang.String getBuildProperties(int index) { + return buildProperties_.get(index); + } + /** + *
+     * List of custom build properties separated by commas.
+     * 
+ * + * repeated string buildProperties = 8; + * @param index The index of the value to return. + * @return The bytes of the buildProperties at the given index. + */ + public com.google.protobuf.ByteString + getBuildPropertiesBytes(int index) { + return buildProperties_.getByteString(index); + } + + public static final int WARNINGS_FIELD_NUMBER = 9; + private volatile java.lang.Object warnings_; + /** + *
+     * Used to tell gcc which warning level to use. The level names are: "none", "default", "more" and "all".
+     * 
+ * + * string warnings = 9; + * @return The warnings. + */ + public java.lang.String getWarnings() { + java.lang.Object ref = warnings_; + 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(); + warnings_ = s; + return s; + } + } + /** + *
+     * Used to tell gcc which warning level to use. The level names are: "none", "default", "more" and "all".
+     * 
+ * + * string warnings = 9; + * @return The bytes for warnings. + */ + public com.google.protobuf.ByteString + getWarningsBytes() { + java.lang.Object ref = warnings_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + warnings_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERBOSE_FIELD_NUMBER = 10; + private boolean verbose_; + /** + *
+     * Turns on verbose mode.
+     * 
+ * + * bool verbose = 10; + * @return The verbose. + */ + public boolean getVerbose() { + return verbose_; + } + + public static final int QUIET_FIELD_NUMBER = 11; + private boolean quiet_; + /** + *
+     * Suppresses almost every output.
+     * 
+ * + * bool quiet = 11; + * @return The quiet. + */ + public boolean getQuiet() { + return quiet_; + } + + public static final int VIDPID_FIELD_NUMBER = 12; + private volatile java.lang.Object vidPid_; + /** + *
+     * VID/PID specific build properties.
+     * 
+ * + * string vidPid = 12; + * @return The vidPid. + */ + public java.lang.String getVidPid() { + java.lang.Object ref = vidPid_; + 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(); + vidPid_ = s; + return s; + } + } + /** + *
+     * VID/PID specific build properties.
+     * 
+ * + * string vidPid = 12; + * @return The bytes for vidPid. + */ + public com.google.protobuf.ByteString + getVidPidBytes() { + java.lang.Object ref = vidPid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + vidPid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXPORTFILE_FIELD_NUMBER = 13; + private volatile java.lang.Object exportFile_; + /** + *
+     * DEPRECATED: use exportDir instead
+     * 
+ * + * string exportFile = 13 [deprecated = true]; + * @return The exportFile. + */ + @java.lang.Deprecated public java.lang.String getExportFile() { + java.lang.Object ref = exportFile_; + 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(); + exportFile_ = s; + return s; + } + } + /** + *
+     * DEPRECATED: use exportDir instead
+     * 
+ * + * string exportFile = 13 [deprecated = true]; + * @return The bytes for exportFile. + */ + @java.lang.Deprecated public com.google.protobuf.ByteString + getExportFileBytes() { + java.lang.Object ref = exportFile_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + exportFile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int JOBS_FIELD_NUMBER = 14; + private int jobs_; + /** + *
+     * The max number of concurrent compiler instances to run (as `make -jx`). If jobs is set to 0, it will use the number of available CPUs as the maximum.
+     * 
+ * + * int32 jobs = 14; + * @return The jobs. + */ + public int getJobs() { + return jobs_; + } + + public static final int LIBRARIES_FIELD_NUMBER = 15; + private com.google.protobuf.LazyStringList libraries_; + /** + *
+     * List of custom libraries paths separated by commas.
+     * 
+ * + * repeated string libraries = 15; + * @return A list containing the libraries. + */ + public com.google.protobuf.ProtocolStringList + getLibrariesList() { + return libraries_; + } + /** + *
+     * List of custom libraries paths separated by commas.
+     * 
+ * + * repeated string libraries = 15; + * @return The count of libraries. + */ + public int getLibrariesCount() { + return libraries_.size(); + } + /** + *
+     * List of custom libraries paths separated by commas.
+     * 
+ * + * repeated string libraries = 15; + * @param index The index of the element to return. + * @return The libraries at the given index. + */ + public java.lang.String getLibraries(int index) { + return libraries_.get(index); + } + /** + *
+     * List of custom libraries paths separated by commas.
+     * 
+ * + * repeated string libraries = 15; + * @param index The index of the value to return. + * @return The bytes of the libraries at the given index. + */ + public com.google.protobuf.ByteString + getLibrariesBytes(int index) { + return libraries_.getByteString(index); + } + + public static final int OPTIMIZEFORDEBUG_FIELD_NUMBER = 16; + private boolean optimizeForDebug_; + /** + *
+     * Optimize compile output for debug, not for release.
+     * 
+ * + * bool optimizeForDebug = 16; + * @return The optimizeForDebug. + */ + public boolean getOptimizeForDebug() { + return optimizeForDebug_; + } + + public static final int DRYRUN_FIELD_NUMBER = 17; + private boolean dryRun_; + /** + *
+     * When set to `true` the compiled binary will not be copied to the export directory.
+     * 
+ * + * bool dryRun = 17; + * @return The dryRun. + */ + public boolean getDryRun() { + return dryRun_; + } + + public static final int EXPORT_DIR_FIELD_NUMBER = 18; + private volatile java.lang.Object exportDir_; + /** + *
+     * Optional: save the build artifacts in this directory, the directory must exist.
+     * 
+ * + * string export_dir = 18; + * @return The exportDir. + */ + public java.lang.String getExportDir() { + java.lang.Object ref = exportDir_; + 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(); + exportDir_ = s; + return s; + } + } + /** + *
+     * Optional: save the build artifacts in this directory, the directory must exist.
+     * 
+ * + * string export_dir = 18; + * @return The bytes for exportDir. + */ + public com.google.protobuf.ByteString + getExportDirBytes() { + java.lang.Object ref = exportDir_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + exportDir_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROGRAMMER_FIELD_NUMBER = 19; + private volatile java.lang.Object programmer_; + /** + *
+     * External programmer for upload
+     * 
+ * + * string programmer = 19; + * @return The programmer. + */ + public java.lang.String getProgrammer() { + java.lang.Object ref = programmer_; + 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(); + programmer_ = s; + return s; + } + } + /** + *
+     * External programmer for upload
+     * 
+ * + * string programmer = 19; + * @return The bytes for programmer. + */ + public com.google.protobuf.ByteString + getProgrammerBytes() { + java.lang.Object ref = programmer_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + programmer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (instance_ != null) { + output.writeMessage(1, getInstance()); + } + if (!getFqbnBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, fqbn_); + } + if (!getSketchPathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, sketchPath_); + } + if (showProperties_ != false) { + output.writeBool(4, showProperties_); + } + if (preprocess_ != false) { + output.writeBool(5, preprocess_); + } + if (!getBuildCachePathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, buildCachePath_); + } + if (!getBuildPathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, buildPath_); + } + for (int i = 0; i < buildProperties_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, buildProperties_.getRaw(i)); + } + if (!getWarningsBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, warnings_); + } + if (verbose_ != false) { + output.writeBool(10, verbose_); + } + if (quiet_ != false) { + output.writeBool(11, quiet_); + } + if (!getVidPidBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, vidPid_); + } + if (!getExportFileBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, exportFile_); + } + if (jobs_ != 0) { + output.writeInt32(14, jobs_); + } + for (int i = 0; i < libraries_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 15, libraries_.getRaw(i)); + } + if (optimizeForDebug_ != false) { + output.writeBool(16, optimizeForDebug_); + } + if (dryRun_ != false) { + output.writeBool(17, dryRun_); + } + if (!getExportDirBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 18, exportDir_); + } + if (!getProgrammerBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 19, programmer_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (instance_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInstance()); + } + if (!getFqbnBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, fqbn_); + } + if (!getSketchPathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, sketchPath_); + } + if (showProperties_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, showProperties_); + } + if (preprocess_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, preprocess_); + } + if (!getBuildCachePathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, buildCachePath_); + } + if (!getBuildPathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, buildPath_); + } + { + int dataSize = 0; + for (int i = 0; i < buildProperties_.size(); i++) { + dataSize += computeStringSizeNoTag(buildProperties_.getRaw(i)); + } + size += dataSize; + size += 1 * getBuildPropertiesList().size(); + } + if (!getWarningsBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, warnings_); + } + if (verbose_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(10, verbose_); + } + if (quiet_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(11, quiet_); + } + if (!getVidPidBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, vidPid_); + } + if (!getExportFileBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, exportFile_); + } + if (jobs_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(14, jobs_); + } + { + int dataSize = 0; + for (int i = 0; i < libraries_.size(); i++) { + dataSize += computeStringSizeNoTag(libraries_.getRaw(i)); + } + size += dataSize; + size += 1 * getLibrariesList().size(); + } + if (optimizeForDebug_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(16, optimizeForDebug_); + } + if (dryRun_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(17, dryRun_); + } + if (!getExportDirBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(18, exportDir_); + } + if (!getProgrammerBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(19, programmer_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Compile.CompileReq)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Compile.CompileReq other = (cc.arduino.cli.commands.Compile.CompileReq) obj; + + if (hasInstance() != other.hasInstance()) return false; + if (hasInstance()) { + if (!getInstance() + .equals(other.getInstance())) return false; + } + if (!getFqbn() + .equals(other.getFqbn())) return false; + if (!getSketchPath() + .equals(other.getSketchPath())) return false; + if (getShowProperties() + != other.getShowProperties()) return false; + if (getPreprocess() + != other.getPreprocess()) return false; + if (!getBuildCachePath() + .equals(other.getBuildCachePath())) return false; + if (!getBuildPath() + .equals(other.getBuildPath())) return false; + if (!getBuildPropertiesList() + .equals(other.getBuildPropertiesList())) return false; + if (!getWarnings() + .equals(other.getWarnings())) return false; + if (getVerbose() + != other.getVerbose()) return false; + if (getQuiet() + != other.getQuiet()) return false; + if (!getVidPid() + .equals(other.getVidPid())) return false; + if (!getExportFile() + .equals(other.getExportFile())) return false; + if (getJobs() + != other.getJobs()) return false; + if (!getLibrariesList() + .equals(other.getLibrariesList())) return false; + if (getOptimizeForDebug() + != other.getOptimizeForDebug()) return false; + if (getDryRun() + != other.getDryRun()) return false; + if (!getExportDir() + .equals(other.getExportDir())) return false; + if (!getProgrammer() + .equals(other.getProgrammer())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInstance()) { + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + } + hash = (37 * hash) + FQBN_FIELD_NUMBER; + hash = (53 * hash) + getFqbn().hashCode(); + hash = (37 * hash) + SKETCHPATH_FIELD_NUMBER; + hash = (53 * hash) + getSketchPath().hashCode(); + hash = (37 * hash) + SHOWPROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getShowProperties()); + hash = (37 * hash) + PREPROCESS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getPreprocess()); + hash = (37 * hash) + BUILDCACHEPATH_FIELD_NUMBER; + hash = (53 * hash) + getBuildCachePath().hashCode(); + hash = (37 * hash) + BUILDPATH_FIELD_NUMBER; + hash = (53 * hash) + getBuildPath().hashCode(); + if (getBuildPropertiesCount() > 0) { + hash = (37 * hash) + BUILDPROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + getBuildPropertiesList().hashCode(); + } + hash = (37 * hash) + WARNINGS_FIELD_NUMBER; + hash = (53 * hash) + getWarnings().hashCode(); + hash = (37 * hash) + VERBOSE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getVerbose()); + hash = (37 * hash) + QUIET_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getQuiet()); + hash = (37 * hash) + VIDPID_FIELD_NUMBER; + hash = (53 * hash) + getVidPid().hashCode(); + hash = (37 * hash) + EXPORTFILE_FIELD_NUMBER; + hash = (53 * hash) + getExportFile().hashCode(); + hash = (37 * hash) + JOBS_FIELD_NUMBER; + hash = (53 * hash) + getJobs(); + if (getLibrariesCount() > 0) { + hash = (37 * hash) + LIBRARIES_FIELD_NUMBER; + hash = (53 * hash) + getLibrariesList().hashCode(); + } + hash = (37 * hash) + OPTIMIZEFORDEBUG_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getOptimizeForDebug()); + hash = (37 * hash) + DRYRUN_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getDryRun()); + hash = (37 * hash) + EXPORT_DIR_FIELD_NUMBER; + hash = (53 * hash) + getExportDir().hashCode(); + hash = (37 * hash) + PROGRAMMER_FIELD_NUMBER; + hash = (53 * hash) + getProgrammer().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Compile.CompileReq parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Compile.CompileReq parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Compile.CompileReq parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Compile.CompileReq parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Compile.CompileReq parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Compile.CompileReq parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Compile.CompileReq parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Compile.CompileReq parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Compile.CompileReq parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Compile.CompileReq parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Compile.CompileReq parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Compile.CompileReq parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Compile.CompileReq 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.CompileReq} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.CompileReq) + cc.arduino.cli.commands.Compile.CompileReqOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Compile.internal_static_cc_arduino_cli_commands_CompileReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Compile.internal_static_cc_arduino_cli_commands_CompileReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Compile.CompileReq.class, cc.arduino.cli.commands.Compile.CompileReq.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Compile.CompileReq.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (instanceBuilder_ == null) { + instance_ = null; + } else { + instance_ = null; + instanceBuilder_ = null; + } + fqbn_ = ""; + + sketchPath_ = ""; + + showProperties_ = false; + + preprocess_ = false; + + buildCachePath_ = ""; + + buildPath_ = ""; + + buildProperties_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + warnings_ = ""; + + verbose_ = false; + + quiet_ = false; + + vidPid_ = ""; + + exportFile_ = ""; + + jobs_ = 0; + + libraries_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + optimizeForDebug_ = false; + + dryRun_ = false; + + exportDir_ = ""; + + programmer_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Compile.internal_static_cc_arduino_cli_commands_CompileReq_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Compile.CompileReq getDefaultInstanceForType() { + return cc.arduino.cli.commands.Compile.CompileReq.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Compile.CompileReq build() { + cc.arduino.cli.commands.Compile.CompileReq result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Compile.CompileReq buildPartial() { + cc.arduino.cli.commands.Compile.CompileReq result = new cc.arduino.cli.commands.Compile.CompileReq(this); + int from_bitField0_ = bitField0_; + if (instanceBuilder_ == null) { + result.instance_ = instance_; + } else { + result.instance_ = instanceBuilder_.build(); + } + result.fqbn_ = fqbn_; + result.sketchPath_ = sketchPath_; + result.showProperties_ = showProperties_; + result.preprocess_ = preprocess_; + result.buildCachePath_ = buildCachePath_; + result.buildPath_ = buildPath_; + if (((bitField0_ & 0x00000001) != 0)) { + buildProperties_ = buildProperties_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.buildProperties_ = buildProperties_; + result.warnings_ = warnings_; + result.verbose_ = verbose_; + result.quiet_ = quiet_; + result.vidPid_ = vidPid_; + result.exportFile_ = exportFile_; + result.jobs_ = jobs_; + if (((bitField0_ & 0x00000002) != 0)) { + libraries_ = libraries_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.libraries_ = libraries_; + result.optimizeForDebug_ = optimizeForDebug_; + result.dryRun_ = dryRun_; + result.exportDir_ = exportDir_; + result.programmer_ = programmer_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Compile.CompileReq) { + return mergeFrom((cc.arduino.cli.commands.Compile.CompileReq)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Compile.CompileReq other) { + if (other == cc.arduino.cli.commands.Compile.CompileReq.getDefaultInstance()) return this; + if (other.hasInstance()) { + mergeInstance(other.getInstance()); + } + if (!other.getFqbn().isEmpty()) { + fqbn_ = other.fqbn_; + onChanged(); + } + if (!other.getSketchPath().isEmpty()) { + sketchPath_ = other.sketchPath_; + onChanged(); + } + if (other.getShowProperties() != false) { + setShowProperties(other.getShowProperties()); + } + if (other.getPreprocess() != false) { + setPreprocess(other.getPreprocess()); + } + if (!other.getBuildCachePath().isEmpty()) { + buildCachePath_ = other.buildCachePath_; + onChanged(); + } + if (!other.getBuildPath().isEmpty()) { + buildPath_ = other.buildPath_; + onChanged(); + } + if (!other.buildProperties_.isEmpty()) { + if (buildProperties_.isEmpty()) { + buildProperties_ = other.buildProperties_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBuildPropertiesIsMutable(); + buildProperties_.addAll(other.buildProperties_); + } + onChanged(); + } + if (!other.getWarnings().isEmpty()) { + warnings_ = other.warnings_; + onChanged(); + } + if (other.getVerbose() != false) { + setVerbose(other.getVerbose()); + } + if (other.getQuiet() != false) { + setQuiet(other.getQuiet()); + } + if (!other.getVidPid().isEmpty()) { + vidPid_ = other.vidPid_; + onChanged(); + } + if (!other.getExportFile().isEmpty()) { + exportFile_ = other.exportFile_; + onChanged(); + } + if (other.getJobs() != 0) { + setJobs(other.getJobs()); + } + if (!other.libraries_.isEmpty()) { + if (libraries_.isEmpty()) { + libraries_ = other.libraries_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureLibrariesIsMutable(); + libraries_.addAll(other.libraries_); + } + onChanged(); + } + if (other.getOptimizeForDebug() != false) { + setOptimizeForDebug(other.getOptimizeForDebug()); + } + if (other.getDryRun() != false) { + setDryRun(other.getDryRun()); + } + if (!other.getExportDir().isEmpty()) { + exportDir_ = other.exportDir_; + onChanged(); + } + if (!other.getProgrammer().isEmpty()) { + programmer_ = other.programmer_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Compile.CompileReq parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Compile.CompileReq) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private cc.arduino.cli.commands.Common.Instance instance_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> instanceBuilder_; + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instanceBuilder_ != null || instance_ != null; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + if (instanceBuilder_ == null) { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } else { + return instanceBuilder_.getMessage(); + } + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + onChanged(); + } else { + instanceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance( + cc.arduino.cli.commands.Common.Instance.Builder builderForValue) { + if (instanceBuilder_ == null) { + instance_ = builderForValue.build(); + onChanged(); + } else { + instanceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder mergeInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (instance_ != null) { + instance_ = + cc.arduino.cli.commands.Common.Instance.newBuilder(instance_).mergeFrom(value).buildPartial(); + } else { + instance_ = value; + } + onChanged(); + } else { + instanceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder clearInstance() { + if (instanceBuilder_ == null) { + instance_ = null; + onChanged(); + } else { + instance_ = null; + instanceBuilder_ = null; + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.Instance.Builder getInstanceBuilder() { + + onChanged(); + return getInstanceFieldBuilder().getBuilder(); + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + if (instanceBuilder_ != null) { + return instanceBuilder_.getMessageOrBuilder(); + } else { + return instance_ == null ? + cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> + getInstanceFieldBuilder() { + if (instanceBuilder_ == null) { + instanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder>( + getInstance(), + getParentForChildren(), + isClean()); + instance_ = null; + } + return instanceBuilder_; + } + + private java.lang.Object fqbn_ = ""; + /** + *
+       * Fully Qualified Board Name, e.g.: `arduino:avr:uno`. If this field is not defined, the FQBN of the board attached to the sketch via the `BoardAttach` method is used.
+       * 
+ * + * string fqbn = 2; + * @return The fqbn. + */ + public java.lang.String getFqbn() { + java.lang.Object ref = fqbn_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fqbn_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Fully Qualified Board Name, e.g.: `arduino:avr:uno`. If this field is not defined, the FQBN of the board attached to the sketch via the `BoardAttach` method is used.
+       * 
+ * + * string fqbn = 2; + * @return The bytes for fqbn. + */ + public com.google.protobuf.ByteString + getFqbnBytes() { + java.lang.Object ref = fqbn_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fqbn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Fully Qualified Board Name, e.g.: `arduino:avr:uno`. If this field is not defined, the FQBN of the board attached to the sketch via the `BoardAttach` method is used.
+       * 
+ * + * string fqbn = 2; + * @param value The fqbn to set. + * @return This builder for chaining. + */ + public Builder setFqbn( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + fqbn_ = value; + onChanged(); + return this; + } + /** + *
+       * Fully Qualified Board Name, e.g.: `arduino:avr:uno`. If this field is not defined, the FQBN of the board attached to the sketch via the `BoardAttach` method is used.
+       * 
+ * + * string fqbn = 2; + * @return This builder for chaining. + */ + public Builder clearFqbn() { + + fqbn_ = getDefaultInstance().getFqbn(); + onChanged(); + return this; + } + /** + *
+       * Fully Qualified Board Name, e.g.: `arduino:avr:uno`. If this field is not defined, the FQBN of the board attached to the sketch via the `BoardAttach` method is used.
+       * 
+ * + * string fqbn = 2; + * @param value The bytes for fqbn to set. + * @return This builder for chaining. + */ + public Builder setFqbnBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + fqbn_ = value; + onChanged(); + return this; + } + + private java.lang.Object sketchPath_ = ""; + /** + *
+       * The path where the sketch is stored.
+       * 
+ * + * string sketchPath = 3; + * @return The sketchPath. + */ + public java.lang.String getSketchPath() { + java.lang.Object ref = sketchPath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sketchPath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The path where the sketch is stored.
+       * 
+ * + * string sketchPath = 3; + * @return The bytes for sketchPath. + */ + public com.google.protobuf.ByteString + getSketchPathBytes() { + java.lang.Object ref = sketchPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sketchPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The path where the sketch is stored.
+       * 
+ * + * string sketchPath = 3; + * @param value The sketchPath to set. + * @return This builder for chaining. + */ + public Builder setSketchPath( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sketchPath_ = value; + onChanged(); + return this; + } + /** + *
+       * The path where the sketch is stored.
+       * 
+ * + * string sketchPath = 3; + * @return This builder for chaining. + */ + public Builder clearSketchPath() { + + sketchPath_ = getDefaultInstance().getSketchPath(); + onChanged(); + return this; + } + /** + *
+       * The path where the sketch is stored.
+       * 
+ * + * string sketchPath = 3; + * @param value The bytes for sketchPath to set. + * @return This builder for chaining. + */ + public Builder setSketchPathBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sketchPath_ = value; + onChanged(); + return this; + } + + private boolean showProperties_ ; + /** + *
+       * Show all build preferences used instead of compiling.
+       * 
+ * + * bool showProperties = 4; + * @return The showProperties. + */ + public boolean getShowProperties() { + return showProperties_; + } + /** + *
+       * Show all build preferences used instead of compiling.
+       * 
+ * + * bool showProperties = 4; + * @param value The showProperties to set. + * @return This builder for chaining. + */ + public Builder setShowProperties(boolean value) { + + showProperties_ = value; + onChanged(); + return this; + } + /** + *
+       * Show all build preferences used instead of compiling.
+       * 
+ * + * bool showProperties = 4; + * @return This builder for chaining. + */ + public Builder clearShowProperties() { + + showProperties_ = false; + onChanged(); + return this; + } + + private boolean preprocess_ ; + /** + *
+       * Print preprocessed code to stdout instead of compiling.
+       * 
+ * + * bool preprocess = 5; + * @return The preprocess. + */ + public boolean getPreprocess() { + return preprocess_; + } + /** + *
+       * Print preprocessed code to stdout instead of compiling.
+       * 
+ * + * bool preprocess = 5; + * @param value The preprocess to set. + * @return This builder for chaining. + */ + public Builder setPreprocess(boolean value) { + + preprocess_ = value; + onChanged(); + return this; + } + /** + *
+       * Print preprocessed code to stdout instead of compiling.
+       * 
+ * + * bool preprocess = 5; + * @return This builder for chaining. + */ + public Builder clearPreprocess() { + + preprocess_ = false; + onChanged(); + return this; + } + + private java.lang.Object buildCachePath_ = ""; + /** + *
+       * Builds of 'core.a' are saved into this path to be cached and reused.
+       * 
+ * + * string buildCachePath = 6; + * @return The buildCachePath. + */ + public java.lang.String getBuildCachePath() { + java.lang.Object ref = buildCachePath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + buildCachePath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Builds of 'core.a' are saved into this path to be cached and reused.
+       * 
+ * + * string buildCachePath = 6; + * @return The bytes for buildCachePath. + */ + public com.google.protobuf.ByteString + getBuildCachePathBytes() { + java.lang.Object ref = buildCachePath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + buildCachePath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Builds of 'core.a' are saved into this path to be cached and reused.
+       * 
+ * + * string buildCachePath = 6; + * @param value The buildCachePath to set. + * @return This builder for chaining. + */ + public Builder setBuildCachePath( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + buildCachePath_ = value; + onChanged(); + return this; + } + /** + *
+       * Builds of 'core.a' are saved into this path to be cached and reused.
+       * 
+ * + * string buildCachePath = 6; + * @return This builder for chaining. + */ + public Builder clearBuildCachePath() { + + buildCachePath_ = getDefaultInstance().getBuildCachePath(); + onChanged(); + return this; + } + /** + *
+       * Builds of 'core.a' are saved into this path to be cached and reused.
+       * 
+ * + * string buildCachePath = 6; + * @param value The bytes for buildCachePath to set. + * @return This builder for chaining. + */ + public Builder setBuildCachePathBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + buildCachePath_ = value; + onChanged(); + return this; + } + + private java.lang.Object buildPath_ = ""; + /** + *
+       * Path to use to store the files used for the compilation. If omitted, a directory will be created in the operating system's default temporary path.
+       * 
+ * + * string buildPath = 7; + * @return The buildPath. + */ + public java.lang.String getBuildPath() { + java.lang.Object ref = buildPath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + buildPath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Path to use to store the files used for the compilation. If omitted, a directory will be created in the operating system's default temporary path.
+       * 
+ * + * string buildPath = 7; + * @return The bytes for buildPath. + */ + public com.google.protobuf.ByteString + getBuildPathBytes() { + java.lang.Object ref = buildPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + buildPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Path to use to store the files used for the compilation. If omitted, a directory will be created in the operating system's default temporary path.
+       * 
+ * + * string buildPath = 7; + * @param value The buildPath to set. + * @return This builder for chaining. + */ + public Builder setBuildPath( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + buildPath_ = value; + onChanged(); + return this; + } + /** + *
+       * Path to use to store the files used for the compilation. If omitted, a directory will be created in the operating system's default temporary path.
+       * 
+ * + * string buildPath = 7; + * @return This builder for chaining. + */ + public Builder clearBuildPath() { + + buildPath_ = getDefaultInstance().getBuildPath(); + onChanged(); + return this; + } + /** + *
+       * Path to use to store the files used for the compilation. If omitted, a directory will be created in the operating system's default temporary path.
+       * 
+ * + * string buildPath = 7; + * @param value The bytes for buildPath to set. + * @return This builder for chaining. + */ + public Builder setBuildPathBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + buildPath_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList buildProperties_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureBuildPropertiesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + buildProperties_ = new com.google.protobuf.LazyStringArrayList(buildProperties_); + bitField0_ |= 0x00000001; + } + } + /** + *
+       * List of custom build properties separated by commas.
+       * 
+ * + * repeated string buildProperties = 8; + * @return A list containing the buildProperties. + */ + public com.google.protobuf.ProtocolStringList + getBuildPropertiesList() { + return buildProperties_.getUnmodifiableView(); + } + /** + *
+       * List of custom build properties separated by commas.
+       * 
+ * + * repeated string buildProperties = 8; + * @return The count of buildProperties. + */ + public int getBuildPropertiesCount() { + return buildProperties_.size(); + } + /** + *
+       * List of custom build properties separated by commas.
+       * 
+ * + * repeated string buildProperties = 8; + * @param index The index of the element to return. + * @return The buildProperties at the given index. + */ + public java.lang.String getBuildProperties(int index) { + return buildProperties_.get(index); + } + /** + *
+       * List of custom build properties separated by commas.
+       * 
+ * + * repeated string buildProperties = 8; + * @param index The index of the value to return. + * @return The bytes of the buildProperties at the given index. + */ + public com.google.protobuf.ByteString + getBuildPropertiesBytes(int index) { + return buildProperties_.getByteString(index); + } + /** + *
+       * List of custom build properties separated by commas.
+       * 
+ * + * repeated string buildProperties = 8; + * @param index The index to set the value at. + * @param value The buildProperties to set. + * @return This builder for chaining. + */ + public Builder setBuildProperties( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureBuildPropertiesIsMutable(); + buildProperties_.set(index, value); + onChanged(); + return this; + } + /** + *
+       * List of custom build properties separated by commas.
+       * 
+ * + * repeated string buildProperties = 8; + * @param value The buildProperties to add. + * @return This builder for chaining. + */ + public Builder addBuildProperties( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureBuildPropertiesIsMutable(); + buildProperties_.add(value); + onChanged(); + return this; + } + /** + *
+       * List of custom build properties separated by commas.
+       * 
+ * + * repeated string buildProperties = 8; + * @param values The buildProperties to add. + * @return This builder for chaining. + */ + public Builder addAllBuildProperties( + java.lang.Iterable values) { + ensureBuildPropertiesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, buildProperties_); + onChanged(); + return this; + } + /** + *
+       * List of custom build properties separated by commas.
+       * 
+ * + * repeated string buildProperties = 8; + * @return This builder for chaining. + */ + public Builder clearBuildProperties() { + buildProperties_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * List of custom build properties separated by commas.
+       * 
+ * + * repeated string buildProperties = 8; + * @param value The bytes of the buildProperties to add. + * @return This builder for chaining. + */ + public Builder addBuildPropertiesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureBuildPropertiesIsMutable(); + buildProperties_.add(value); + onChanged(); + return this; + } + + private java.lang.Object warnings_ = ""; + /** + *
+       * Used to tell gcc which warning level to use. The level names are: "none", "default", "more" and "all".
+       * 
+ * + * string warnings = 9; + * @return The warnings. + */ + public java.lang.String getWarnings() { + java.lang.Object ref = warnings_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + warnings_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Used to tell gcc which warning level to use. The level names are: "none", "default", "more" and "all".
+       * 
+ * + * string warnings = 9; + * @return The bytes for warnings. + */ + public com.google.protobuf.ByteString + getWarningsBytes() { + java.lang.Object ref = warnings_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + warnings_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Used to tell gcc which warning level to use. The level names are: "none", "default", "more" and "all".
+       * 
+ * + * string warnings = 9; + * @param value The warnings to set. + * @return This builder for chaining. + */ + public Builder setWarnings( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + warnings_ = value; + onChanged(); + return this; + } + /** + *
+       * Used to tell gcc which warning level to use. The level names are: "none", "default", "more" and "all".
+       * 
+ * + * string warnings = 9; + * @return This builder for chaining. + */ + public Builder clearWarnings() { + + warnings_ = getDefaultInstance().getWarnings(); + onChanged(); + return this; + } + /** + *
+       * Used to tell gcc which warning level to use. The level names are: "none", "default", "more" and "all".
+       * 
+ * + * string warnings = 9; + * @param value The bytes for warnings to set. + * @return This builder for chaining. + */ + public Builder setWarningsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + warnings_ = value; + onChanged(); + return this; + } + + private boolean verbose_ ; + /** + *
+       * Turns on verbose mode.
+       * 
+ * + * bool verbose = 10; + * @return The verbose. + */ + public boolean getVerbose() { + return verbose_; + } + /** + *
+       * Turns on verbose mode.
+       * 
+ * + * bool verbose = 10; + * @param value The verbose to set. + * @return This builder for chaining. + */ + public Builder setVerbose(boolean value) { + + verbose_ = value; + onChanged(); + return this; + } + /** + *
+       * Turns on verbose mode.
+       * 
+ * + * bool verbose = 10; + * @return This builder for chaining. + */ + public Builder clearVerbose() { + + verbose_ = false; + onChanged(); + return this; + } + + private boolean quiet_ ; + /** + *
+       * Suppresses almost every output.
+       * 
+ * + * bool quiet = 11; + * @return The quiet. + */ + public boolean getQuiet() { + return quiet_; + } + /** + *
+       * Suppresses almost every output.
+       * 
+ * + * bool quiet = 11; + * @param value The quiet to set. + * @return This builder for chaining. + */ + public Builder setQuiet(boolean value) { + + quiet_ = value; + onChanged(); + return this; + } + /** + *
+       * Suppresses almost every output.
+       * 
+ * + * bool quiet = 11; + * @return This builder for chaining. + */ + public Builder clearQuiet() { + + quiet_ = false; + onChanged(); + return this; + } + + private java.lang.Object vidPid_ = ""; + /** + *
+       * VID/PID specific build properties.
+       * 
+ * + * string vidPid = 12; + * @return The vidPid. + */ + public java.lang.String getVidPid() { + java.lang.Object ref = vidPid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vidPid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * VID/PID specific build properties.
+       * 
+ * + * string vidPid = 12; + * @return The bytes for vidPid. + */ + public com.google.protobuf.ByteString + getVidPidBytes() { + java.lang.Object ref = vidPid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + vidPid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * VID/PID specific build properties.
+       * 
+ * + * string vidPid = 12; + * @param value The vidPid to set. + * @return This builder for chaining. + */ + public Builder setVidPid( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + vidPid_ = value; + onChanged(); + return this; + } + /** + *
+       * VID/PID specific build properties.
+       * 
+ * + * string vidPid = 12; + * @return This builder for chaining. + */ + public Builder clearVidPid() { + + vidPid_ = getDefaultInstance().getVidPid(); + onChanged(); + return this; + } + /** + *
+       * VID/PID specific build properties.
+       * 
+ * + * string vidPid = 12; + * @param value The bytes for vidPid to set. + * @return This builder for chaining. + */ + public Builder setVidPidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + vidPid_ = value; + onChanged(); + return this; + } + + private java.lang.Object exportFile_ = ""; + /** + *
+       * DEPRECATED: use exportDir instead
+       * 
+ * + * string exportFile = 13 [deprecated = true]; + * @return The exportFile. + */ + @java.lang.Deprecated public java.lang.String getExportFile() { + java.lang.Object ref = exportFile_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + exportFile_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * DEPRECATED: use exportDir instead
+       * 
+ * + * string exportFile = 13 [deprecated = true]; + * @return The bytes for exportFile. + */ + @java.lang.Deprecated public com.google.protobuf.ByteString + getExportFileBytes() { + java.lang.Object ref = exportFile_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + exportFile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * DEPRECATED: use exportDir instead
+       * 
+ * + * string exportFile = 13 [deprecated = true]; + * @param value The exportFile to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder setExportFile( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + exportFile_ = value; + onChanged(); + return this; + } + /** + *
+       * DEPRECATED: use exportDir instead
+       * 
+ * + * string exportFile = 13 [deprecated = true]; + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder clearExportFile() { + + exportFile_ = getDefaultInstance().getExportFile(); + onChanged(); + return this; + } + /** + *
+       * DEPRECATED: use exportDir instead
+       * 
+ * + * string exportFile = 13 [deprecated = true]; + * @param value The bytes for exportFile to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder setExportFileBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + exportFile_ = value; + onChanged(); + return this; + } + + private int jobs_ ; + /** + *
+       * The max number of concurrent compiler instances to run (as `make -jx`). If jobs is set to 0, it will use the number of available CPUs as the maximum.
+       * 
+ * + * int32 jobs = 14; + * @return The jobs. + */ + public int getJobs() { + return jobs_; + } + /** + *
+       * The max number of concurrent compiler instances to run (as `make -jx`). If jobs is set to 0, it will use the number of available CPUs as the maximum.
+       * 
+ * + * int32 jobs = 14; + * @param value The jobs to set. + * @return This builder for chaining. + */ + public Builder setJobs(int value) { + + jobs_ = value; + onChanged(); + return this; + } + /** + *
+       * The max number of concurrent compiler instances to run (as `make -jx`). If jobs is set to 0, it will use the number of available CPUs as the maximum.
+       * 
+ * + * int32 jobs = 14; + * @return This builder for chaining. + */ + public Builder clearJobs() { + + jobs_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList libraries_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureLibrariesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + libraries_ = new com.google.protobuf.LazyStringArrayList(libraries_); + bitField0_ |= 0x00000002; + } + } + /** + *
+       * List of custom libraries paths separated by commas.
+       * 
+ * + * repeated string libraries = 15; + * @return A list containing the libraries. + */ + public com.google.protobuf.ProtocolStringList + getLibrariesList() { + return libraries_.getUnmodifiableView(); + } + /** + *
+       * List of custom libraries paths separated by commas.
+       * 
+ * + * repeated string libraries = 15; + * @return The count of libraries. + */ + public int getLibrariesCount() { + return libraries_.size(); + } + /** + *
+       * List of custom libraries paths separated by commas.
+       * 
+ * + * repeated string libraries = 15; + * @param index The index of the element to return. + * @return The libraries at the given index. + */ + public java.lang.String getLibraries(int index) { + return libraries_.get(index); + } + /** + *
+       * List of custom libraries paths separated by commas.
+       * 
+ * + * repeated string libraries = 15; + * @param index The index of the value to return. + * @return The bytes of the libraries at the given index. + */ + public com.google.protobuf.ByteString + getLibrariesBytes(int index) { + return libraries_.getByteString(index); + } + /** + *
+       * List of custom libraries paths separated by commas.
+       * 
+ * + * repeated string libraries = 15; + * @param index The index to set the value at. + * @param value The libraries to set. + * @return This builder for chaining. + */ + public Builder setLibraries( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLibrariesIsMutable(); + libraries_.set(index, value); + onChanged(); + return this; + } + /** + *
+       * List of custom libraries paths separated by commas.
+       * 
+ * + * repeated string libraries = 15; + * @param value The libraries to add. + * @return This builder for chaining. + */ + public Builder addLibraries( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLibrariesIsMutable(); + libraries_.add(value); + onChanged(); + return this; + } + /** + *
+       * List of custom libraries paths separated by commas.
+       * 
+ * + * repeated string libraries = 15; + * @param values The libraries to add. + * @return This builder for chaining. + */ + public Builder addAllLibraries( + java.lang.Iterable values) { + ensureLibrariesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, libraries_); + onChanged(); + return this; + } + /** + *
+       * List of custom libraries paths separated by commas.
+       * 
+ * + * repeated string libraries = 15; + * @return This builder for chaining. + */ + public Builder clearLibraries() { + libraries_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+       * List of custom libraries paths separated by commas.
+       * 
+ * + * repeated string libraries = 15; + * @param value The bytes of the libraries to add. + * @return This builder for chaining. + */ + public Builder addLibrariesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureLibrariesIsMutable(); + libraries_.add(value); + onChanged(); + return this; + } + + private boolean optimizeForDebug_ ; + /** + *
+       * Optimize compile output for debug, not for release.
+       * 
+ * + * bool optimizeForDebug = 16; + * @return The optimizeForDebug. + */ + public boolean getOptimizeForDebug() { + return optimizeForDebug_; + } + /** + *
+       * Optimize compile output for debug, not for release.
+       * 
+ * + * bool optimizeForDebug = 16; + * @param value The optimizeForDebug to set. + * @return This builder for chaining. + */ + public Builder setOptimizeForDebug(boolean value) { + + optimizeForDebug_ = value; + onChanged(); + return this; + } + /** + *
+       * Optimize compile output for debug, not for release.
+       * 
+ * + * bool optimizeForDebug = 16; + * @return This builder for chaining. + */ + public Builder clearOptimizeForDebug() { + + optimizeForDebug_ = false; + onChanged(); + return this; + } + + private boolean dryRun_ ; + /** + *
+       * When set to `true` the compiled binary will not be copied to the export directory.
+       * 
+ * + * bool dryRun = 17; + * @return The dryRun. + */ + public boolean getDryRun() { + return dryRun_; + } + /** + *
+       * When set to `true` the compiled binary will not be copied to the export directory.
+       * 
+ * + * bool dryRun = 17; + * @param value The dryRun to set. + * @return This builder for chaining. + */ + public Builder setDryRun(boolean value) { + + dryRun_ = value; + onChanged(); + return this; + } + /** + *
+       * When set to `true` the compiled binary will not be copied to the export directory.
+       * 
+ * + * bool dryRun = 17; + * @return This builder for chaining. + */ + public Builder clearDryRun() { + + dryRun_ = false; + onChanged(); + return this; + } + + private java.lang.Object exportDir_ = ""; + /** + *
+       * Optional: save the build artifacts in this directory, the directory must exist.
+       * 
+ * + * string export_dir = 18; + * @return The exportDir. + */ + public java.lang.String getExportDir() { + java.lang.Object ref = exportDir_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + exportDir_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Optional: save the build artifacts in this directory, the directory must exist.
+       * 
+ * + * string export_dir = 18; + * @return The bytes for exportDir. + */ + public com.google.protobuf.ByteString + getExportDirBytes() { + java.lang.Object ref = exportDir_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + exportDir_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Optional: save the build artifacts in this directory, the directory must exist.
+       * 
+ * + * string export_dir = 18; + * @param value The exportDir to set. + * @return This builder for chaining. + */ + public Builder setExportDir( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + exportDir_ = value; + onChanged(); + return this; + } + /** + *
+       * Optional: save the build artifacts in this directory, the directory must exist.
+       * 
+ * + * string export_dir = 18; + * @return This builder for chaining. + */ + public Builder clearExportDir() { + + exportDir_ = getDefaultInstance().getExportDir(); + onChanged(); + return this; + } + /** + *
+       * Optional: save the build artifacts in this directory, the directory must exist.
+       * 
+ * + * string export_dir = 18; + * @param value The bytes for exportDir to set. + * @return This builder for chaining. + */ + public Builder setExportDirBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + exportDir_ = value; + onChanged(); + return this; + } + + private java.lang.Object programmer_ = ""; + /** + *
+       * External programmer for upload
+       * 
+ * + * string programmer = 19; + * @return The programmer. + */ + public java.lang.String getProgrammer() { + java.lang.Object ref = programmer_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + programmer_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * External programmer for upload
+       * 
+ * + * string programmer = 19; + * @return The bytes for programmer. + */ + public com.google.protobuf.ByteString + getProgrammerBytes() { + java.lang.Object ref = programmer_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + programmer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * External programmer for upload
+       * 
+ * + * string programmer = 19; + * @param value The programmer to set. + * @return This builder for chaining. + */ + public Builder setProgrammer( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + programmer_ = value; + onChanged(); + return this; + } + /** + *
+       * External programmer for upload
+       * 
+ * + * string programmer = 19; + * @return This builder for chaining. + */ + public Builder clearProgrammer() { + + programmer_ = getDefaultInstance().getProgrammer(); + onChanged(); + return this; + } + /** + *
+       * External programmer for upload
+       * 
+ * + * string programmer = 19; + * @param value The bytes for programmer to set. + * @return This builder for chaining. + */ + public Builder setProgrammerBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + programmer_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.CompileReq) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.CompileReq) + private static final cc.arduino.cli.commands.Compile.CompileReq DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Compile.CompileReq(); + } + + public static cc.arduino.cli.commands.Compile.CompileReq getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CompileReq parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CompileReq(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Compile.CompileReq getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface CompileRespOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.CompileResp) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The output of the compilation process.
+     * 
+ * + * bytes out_stream = 1; + * @return The outStream. + */ + com.google.protobuf.ByteString getOutStream(); + + /** + *
+     * The error output of the compilation process.
+     * 
+ * + * bytes err_stream = 2; + * @return The errStream. + */ + com.google.protobuf.ByteString getErrStream(); + + /** + * .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 = 4; + * @return The result. + */ + cc.arduino.cli.commands.Compile.CompileResult getResult(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.CompileResp} + */ + public static final class CompileResp extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.CompileResp) + CompileRespOrBuilder { + private static final long serialVersionUID = 0L; + // Use CompileResp.newBuilder() to construct. + private CompileResp(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CompileResp() { + outStream_ = com.google.protobuf.ByteString.EMPTY; + errStream_ = com.google.protobuf.ByteString.EMPTY; + result_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CompileResp(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CompileResp( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + + outStream_ = input.readBytes(); + break; + } + case 18: { + + errStream_ = input.readBytes(); + break; + } + 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; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Compile.internal_static_cc_arduino_cli_commands_CompileResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Compile.internal_static_cc_arduino_cli_commands_CompileResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Compile.CompileResp.class, cc.arduino.cli.commands.Compile.CompileResp.Builder.class); + } + + public static final int OUT_STREAM_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString outStream_; + /** + *
+     * The output of the compilation process.
+     * 
+ * + * bytes out_stream = 1; + * @return The outStream. + */ + public com.google.protobuf.ByteString getOutStream() { + return outStream_; + } + + public static final int ERR_STREAM_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString errStream_; + /** + *
+     * The error output of the compilation process.
+     * 
+ * + * bytes err_stream = 2; + * @return The errStream. + */ + public com.google.protobuf.ByteString getErrStream() { + return errStream_; + } + + 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 = 4; + * @return The enum numeric value on the wire for result. + */ + public int getResultValue() { + return result_; + } + /** + * .cc.arduino.cli.commands.CompileResult result = 4; + * @return The result. + */ + public cc.arduino.cli.commands.Compile.CompileResult getResult() { + @SuppressWarnings("deprecation") + cc.arduino.cli.commands.Compile.CompileResult result = cc.arduino.cli.commands.Compile.CompileResult.valueOf(result_); + return result == null ? cc.arduino.cli.commands.Compile.CompileResult.UNRECOGNIZED : result; + } + + 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 (!outStream_.isEmpty()) { + output.writeBytes(1, outStream_); + } + if (!errStream_.isEmpty()) { + output.writeBytes(2, errStream_); + } + 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); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!outStream_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, outStream_); + } + if (!errStream_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, errStream_); + } + if (taskProgress_ != null) { + size += com.google.protobuf.CodedOutputStream + .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; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Compile.CompileResp)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Compile.CompileResp other = (cc.arduino.cli.commands.Compile.CompileResp) obj; + + if (!getOutStream() + .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; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + OUT_STREAM_FIELD_NUMBER; + 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(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Compile.CompileResp parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Compile.CompileResp parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Compile.CompileResp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Compile.CompileResp parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Compile.CompileResp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Compile.CompileResp parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Compile.CompileResp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Compile.CompileResp parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Compile.CompileResp parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Compile.CompileResp parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Compile.CompileResp parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Compile.CompileResp parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Compile.CompileResp 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.CompileResp} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.CompileResp) + cc.arduino.cli.commands.Compile.CompileRespOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Compile.internal_static_cc_arduino_cli_commands_CompileResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Compile.internal_static_cc_arduino_cli_commands_CompileResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Compile.CompileResp.class, cc.arduino.cli.commands.Compile.CompileResp.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Compile.CompileResp.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + outStream_ = com.google.protobuf.ByteString.EMPTY; + + errStream_ = com.google.protobuf.ByteString.EMPTY; + + if (taskProgressBuilder_ == null) { + taskProgress_ = null; + } else { + taskProgress_ = null; + taskProgressBuilder_ = null; + } + result_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Compile.internal_static_cc_arduino_cli_commands_CompileResp_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Compile.CompileResp getDefaultInstanceForType() { + return cc.arduino.cli.commands.Compile.CompileResp.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Compile.CompileResp build() { + cc.arduino.cli.commands.Compile.CompileResp result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Compile.CompileResp buildPartial() { + 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; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Compile.CompileResp) { + return mergeFrom((cc.arduino.cli.commands.Compile.CompileResp)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Compile.CompileResp other) { + if (other == cc.arduino.cli.commands.Compile.CompileResp.getDefaultInstance()) return this; + if (other.getOutStream() != com.google.protobuf.ByteString.EMPTY) { + setOutStream(other.getOutStream()); + } + if (other.getErrStream() != com.google.protobuf.ByteString.EMPTY) { + setErrStream(other.getErrStream()); + } + if (other.hasTaskProgress()) { + mergeTaskProgress(other.getTaskProgress()); + } + if (other.result_ != 0) { + setResultValue(other.getResultValue()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Compile.CompileResp parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Compile.CompileResp) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.ByteString outStream_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+       * The output of the compilation process.
+       * 
+ * + * bytes out_stream = 1; + * @return The outStream. + */ + public com.google.protobuf.ByteString getOutStream() { + return outStream_; + } + /** + *
+       * The output of the compilation process.
+       * 
+ * + * bytes out_stream = 1; + * @param value The outStream to set. + * @return This builder for chaining. + */ + public Builder setOutStream(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + outStream_ = value; + onChanged(); + return this; + } + /** + *
+       * The output of the compilation process.
+       * 
+ * + * bytes out_stream = 1; + * @return This builder for chaining. + */ + public Builder clearOutStream() { + + outStream_ = getDefaultInstance().getOutStream(); + onChanged(); + return this; + } + + private com.google.protobuf.ByteString errStream_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+       * The error output of the compilation process.
+       * 
+ * + * bytes err_stream = 2; + * @return The errStream. + */ + public com.google.protobuf.ByteString getErrStream() { + return errStream_; + } + /** + *
+       * The error output of the compilation process.
+       * 
+ * + * bytes err_stream = 2; + * @param value The errStream to set. + * @return This builder for chaining. + */ + public Builder setErrStream(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + errStream_ = value; + onChanged(); + return this; + } + /** + *
+       * The error output of the compilation process.
+       * 
+ * + * bytes err_stream = 2; + * @return This builder for chaining. + */ + public Builder clearErrStream() { + + errStream_ = getDefaultInstance().getErrStream(); + onChanged(); + 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 = 4; + * @return The enum numeric value on the wire for result. + */ + public int getResultValue() { + return result_; + } + /** + * .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. + */ + public Builder setResultValue(int value) { + result_ = value; + onChanged(); + return this; + } + /** + * .cc.arduino.cli.commands.CompileResult result = 4; + * @return The result. + */ + public cc.arduino.cli.commands.Compile.CompileResult getResult() { + @SuppressWarnings("deprecation") + cc.arduino.cli.commands.Compile.CompileResult result = cc.arduino.cli.commands.Compile.CompileResult.valueOf(result_); + return result == null ? cc.arduino.cli.commands.Compile.CompileResult.UNRECOGNIZED : result; + } + /** + * .cc.arduino.cli.commands.CompileResult result = 4; + * @param value The result to set. + * @return This builder for chaining. + */ + public Builder setResult(cc.arduino.cli.commands.Compile.CompileResult value) { + if (value == null) { + throw new NullPointerException(); + } + + result_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .cc.arduino.cli.commands.CompileResult result = 4; + * @return This builder for chaining. + */ + public Builder clearResult() { + + result_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.CompileResp) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.CompileResp) + private static final cc.arduino.cli.commands.Compile.CompileResp DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Compile.CompileResp(); + } + + public static cc.arduino.cli.commands.Compile.CompileResp getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CompileResp parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CompileResp(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Compile.CompileResp getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_CompileReq_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_CompileReq_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_CompileResp_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_CompileResp_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\026commands/compile.proto\022\027cc.arduino.cli" + + ".commands\032\025commands/common.proto\"\240\003\n\nCom" + + "pileReq\0223\n\010instance\030\001 \001(\0132!.cc.arduino.c" + + "li.commands.Instance\022\014\n\004fqbn\030\002 \001(\t\022\022\n\nsk" + + "etchPath\030\003 \001(\t\022\026\n\016showProperties\030\004 \001(\010\022\022" + + "\n\npreprocess\030\005 \001(\010\022\026\n\016buildCachePath\030\006 \001" + + "(\t\022\021\n\tbuildPath\030\007 \001(\t\022\027\n\017buildProperties" + + "\030\010 \003(\t\022\020\n\010warnings\030\t \001(\t\022\017\n\007verbose\030\n \001(" + + "\010\022\r\n\005quiet\030\013 \001(\010\022\016\n\006vidPid\030\014 \001(\t\022\026\n\nexpo" + + "rtFile\030\r \001(\tB\002\030\001\022\014\n\004jobs\030\016 \001(\005\022\021\n\tlibrar" + + "ies\030\017 \003(\t\022\030\n\020optimizeForDebug\030\020 \001(\010\022\016\n\006d" + + "ryRun\030\021 \001(\010\022\022\n\nexport_dir\030\022 \001(\t\022\022\n\nprogr" + + "ammer\030\023 \001(\t\"\253\001\n\013CompileResp\022\022\n\nout_strea" + + "m\030\001 \001(\014\022\022\n\nerr_stream\030\002 \001(\014\022<\n\rtask_prog" + + "ress\030\003 \001(\0132%.cc.arduino.cli.commands.Tas" + + "kProgress\0226\n\006result\030\004 \001(\0162&.cc.arduino.c" + + "li.commands.CompileResult*7\n\rCompileResu" + + "lt\022\023\n\017compile_success\020\000\022\021\n\rcompile_error" + + "\020\001B-Z+github.com/arduino/arduino-cli/rpc" + + "/commandsb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + cc.arduino.cli.commands.Common.getDescriptor(), + }); + internal_static_cc_arduino_cli_commands_CompileReq_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_cc_arduino_cli_commands_CompileReq_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_CompileReq_descriptor, + new java.lang.String[] { "Instance", "Fqbn", "SketchPath", "ShowProperties", "Preprocess", "BuildCachePath", "BuildPath", "BuildProperties", "Warnings", "Verbose", "Quiet", "VidPid", "ExportFile", "Jobs", "Libraries", "OptimizeForDebug", "DryRun", "ExportDir", "Programmer", }); + internal_static_cc_arduino_cli_commands_CompileResp_descriptor = + getDescriptor().getMessageTypes().get(1); + 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", "TaskProgress", "Result", }); + cc.arduino.cli.commands.Common.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/arduino-core/src/cc/arduino/cli/commands/Core.java b/arduino-core/src/cc/arduino/cli/commands/Core.java new file mode 100644 index 00000000000..0eca6d5c911 --- /dev/null +++ b/arduino-core/src/cc/arduino/cli/commands/Core.java @@ -0,0 +1,14585 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: commands/core.proto + +package cc.arduino.cli.commands; + +public final class Core { + private Core() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface PlatformInstallReqOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.PlatformInstallReq) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + boolean hasInstance(); + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + cc.arduino.cli.commands.Common.Instance getInstance(); + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder(); + + /** + *
+     * Vendor name of the platform (e.g., `arduino`).
+     * 
+ * + * string platform_package = 2; + * @return The platformPackage. + */ + java.lang.String getPlatformPackage(); + /** + *
+     * Vendor name of the platform (e.g., `arduino`).
+     * 
+ * + * string platform_package = 2; + * @return The bytes for platformPackage. + */ + com.google.protobuf.ByteString + getPlatformPackageBytes(); + + /** + *
+     * Architecture name of the platform (e.g., `avr`).
+     * 
+ * + * string architecture = 3; + * @return The architecture. + */ + java.lang.String getArchitecture(); + /** + *
+     * Architecture name of the platform (e.g., `avr`).
+     * 
+ * + * string architecture = 3; + * @return The bytes for architecture. + */ + com.google.protobuf.ByteString + getArchitectureBytes(); + + /** + *
+     * Platform version to install.
+     * 
+ * + * string version = 4; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+     * Platform version to install.
+     * 
+ * + * string version = 4; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.PlatformInstallReq} + */ + public static final class PlatformInstallReq extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.PlatformInstallReq) + PlatformInstallReqOrBuilder { + private static final long serialVersionUID = 0L; + // Use PlatformInstallReq.newBuilder() to construct. + private PlatformInstallReq(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PlatformInstallReq() { + platformPackage_ = ""; + architecture_ = ""; + version_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PlatformInstallReq(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PlatformInstallReq( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cc.arduino.cli.commands.Common.Instance.Builder subBuilder = null; + if (instance_ != null) { + subBuilder = instance_.toBuilder(); + } + instance_ = input.readMessage(cc.arduino.cli.commands.Common.Instance.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instance_); + instance_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + platformPackage_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + architecture_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + version_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformInstallReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformInstallReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Core.PlatformInstallReq.class, cc.arduino.cli.commands.Core.PlatformInstallReq.Builder.class); + } + + public static final int INSTANCE_FIELD_NUMBER = 1; + private cc.arduino.cli.commands.Common.Instance instance_; + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instance_ != null; + } + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + return getInstance(); + } + + public static final int PLATFORM_PACKAGE_FIELD_NUMBER = 2; + private volatile java.lang.Object platformPackage_; + /** + *
+     * Vendor name of the platform (e.g., `arduino`).
+     * 
+ * + * string platform_package = 2; + * @return The platformPackage. + */ + public java.lang.String getPlatformPackage() { + java.lang.Object ref = platformPackage_; + 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(); + platformPackage_ = s; + return s; + } + } + /** + *
+     * Vendor name of the platform (e.g., `arduino`).
+     * 
+ * + * string platform_package = 2; + * @return The bytes for platformPackage. + */ + public com.google.protobuf.ByteString + getPlatformPackageBytes() { + java.lang.Object ref = platformPackage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + platformPackage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ARCHITECTURE_FIELD_NUMBER = 3; + private volatile java.lang.Object architecture_; + /** + *
+     * Architecture name of the platform (e.g., `avr`).
+     * 
+ * + * string architecture = 3; + * @return The architecture. + */ + public java.lang.String getArchitecture() { + java.lang.Object ref = architecture_; + 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(); + architecture_ = s; + return s; + } + } + /** + *
+     * Architecture name of the platform (e.g., `avr`).
+     * 
+ * + * string architecture = 3; + * @return The bytes for architecture. + */ + public com.google.protobuf.ByteString + getArchitectureBytes() { + java.lang.Object ref = architecture_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + architecture_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_FIELD_NUMBER = 4; + private volatile java.lang.Object version_; + /** + *
+     * Platform version to install.
+     * 
+ * + * string version = 4; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + 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(); + version_ = s; + return s; + } + } + /** + *
+     * Platform version to install.
+     * 
+ * + * string version = 4; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (instance_ != null) { + output.writeMessage(1, getInstance()); + } + if (!getPlatformPackageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, platformPackage_); + } + if (!getArchitectureBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, architecture_); + } + if (!getVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, version_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (instance_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInstance()); + } + if (!getPlatformPackageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, platformPackage_); + } + if (!getArchitectureBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, architecture_); + } + if (!getVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, version_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Core.PlatformInstallReq)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Core.PlatformInstallReq other = (cc.arduino.cli.commands.Core.PlatformInstallReq) obj; + + if (hasInstance() != other.hasInstance()) return false; + if (hasInstance()) { + if (!getInstance() + .equals(other.getInstance())) return false; + } + if (!getPlatformPackage() + .equals(other.getPlatformPackage())) return false; + if (!getArchitecture() + .equals(other.getArchitecture())) return false; + if (!getVersion() + .equals(other.getVersion())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInstance()) { + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + } + hash = (37 * hash) + PLATFORM_PACKAGE_FIELD_NUMBER; + hash = (53 * hash) + getPlatformPackage().hashCode(); + hash = (37 * hash) + ARCHITECTURE_FIELD_NUMBER; + hash = (53 * hash) + getArchitecture().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Core.PlatformInstallReq parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Core.PlatformInstallReq parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformInstallReq parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Core.PlatformInstallReq parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformInstallReq parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Core.PlatformInstallReq parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformInstallReq parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Core.PlatformInstallReq parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformInstallReq parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Core.PlatformInstallReq parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformInstallReq parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Core.PlatformInstallReq parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Core.PlatformInstallReq 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.PlatformInstallReq} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.PlatformInstallReq) + cc.arduino.cli.commands.Core.PlatformInstallReqOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformInstallReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformInstallReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Core.PlatformInstallReq.class, cc.arduino.cli.commands.Core.PlatformInstallReq.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Core.PlatformInstallReq.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (instanceBuilder_ == null) { + instance_ = null; + } else { + instance_ = null; + instanceBuilder_ = null; + } + platformPackage_ = ""; + + architecture_ = ""; + + version_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformInstallReq_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformInstallReq getDefaultInstanceForType() { + return cc.arduino.cli.commands.Core.PlatformInstallReq.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformInstallReq build() { + cc.arduino.cli.commands.Core.PlatformInstallReq result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformInstallReq buildPartial() { + cc.arduino.cli.commands.Core.PlatformInstallReq result = new cc.arduino.cli.commands.Core.PlatformInstallReq(this); + if (instanceBuilder_ == null) { + result.instance_ = instance_; + } else { + result.instance_ = instanceBuilder_.build(); + } + result.platformPackage_ = platformPackage_; + result.architecture_ = architecture_; + result.version_ = version_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Core.PlatformInstallReq) { + return mergeFrom((cc.arduino.cli.commands.Core.PlatformInstallReq)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Core.PlatformInstallReq other) { + if (other == cc.arduino.cli.commands.Core.PlatformInstallReq.getDefaultInstance()) return this; + if (other.hasInstance()) { + mergeInstance(other.getInstance()); + } + if (!other.getPlatformPackage().isEmpty()) { + platformPackage_ = other.platformPackage_; + onChanged(); + } + if (!other.getArchitecture().isEmpty()) { + architecture_ = other.architecture_; + onChanged(); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Core.PlatformInstallReq parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Core.PlatformInstallReq) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private cc.arduino.cli.commands.Common.Instance instance_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> instanceBuilder_; + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instanceBuilder_ != null || instance_ != null; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + if (instanceBuilder_ == null) { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } else { + return instanceBuilder_.getMessage(); + } + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + onChanged(); + } else { + instanceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance( + cc.arduino.cli.commands.Common.Instance.Builder builderForValue) { + if (instanceBuilder_ == null) { + instance_ = builderForValue.build(); + onChanged(); + } else { + instanceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder mergeInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (instance_ != null) { + instance_ = + cc.arduino.cli.commands.Common.Instance.newBuilder(instance_).mergeFrom(value).buildPartial(); + } else { + instance_ = value; + } + onChanged(); + } else { + instanceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder clearInstance() { + if (instanceBuilder_ == null) { + instance_ = null; + onChanged(); + } else { + instance_ = null; + instanceBuilder_ = null; + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.Instance.Builder getInstanceBuilder() { + + onChanged(); + return getInstanceFieldBuilder().getBuilder(); + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + if (instanceBuilder_ != null) { + return instanceBuilder_.getMessageOrBuilder(); + } else { + return instance_ == null ? + cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> + getInstanceFieldBuilder() { + if (instanceBuilder_ == null) { + instanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder>( + getInstance(), + getParentForChildren(), + isClean()); + instance_ = null; + } + return instanceBuilder_; + } + + private java.lang.Object platformPackage_ = ""; + /** + *
+       * Vendor name of the platform (e.g., `arduino`).
+       * 
+ * + * string platform_package = 2; + * @return The platformPackage. + */ + public java.lang.String getPlatformPackage() { + java.lang.Object ref = platformPackage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + platformPackage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Vendor name of the platform (e.g., `arduino`).
+       * 
+ * + * string platform_package = 2; + * @return The bytes for platformPackage. + */ + public com.google.protobuf.ByteString + getPlatformPackageBytes() { + java.lang.Object ref = platformPackage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + platformPackage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Vendor name of the platform (e.g., `arduino`).
+       * 
+ * + * string platform_package = 2; + * @param value The platformPackage to set. + * @return This builder for chaining. + */ + public Builder setPlatformPackage( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + platformPackage_ = value; + onChanged(); + return this; + } + /** + *
+       * Vendor name of the platform (e.g., `arduino`).
+       * 
+ * + * string platform_package = 2; + * @return This builder for chaining. + */ + public Builder clearPlatformPackage() { + + platformPackage_ = getDefaultInstance().getPlatformPackage(); + onChanged(); + return this; + } + /** + *
+       * Vendor name of the platform (e.g., `arduino`).
+       * 
+ * + * string platform_package = 2; + * @param value The bytes for platformPackage to set. + * @return This builder for chaining. + */ + public Builder setPlatformPackageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + platformPackage_ = value; + onChanged(); + return this; + } + + private java.lang.Object architecture_ = ""; + /** + *
+       * Architecture name of the platform (e.g., `avr`).
+       * 
+ * + * string architecture = 3; + * @return The architecture. + */ + public java.lang.String getArchitecture() { + java.lang.Object ref = architecture_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + architecture_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Architecture name of the platform (e.g., `avr`).
+       * 
+ * + * string architecture = 3; + * @return The bytes for architecture. + */ + public com.google.protobuf.ByteString + getArchitectureBytes() { + java.lang.Object ref = architecture_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + architecture_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Architecture name of the platform (e.g., `avr`).
+       * 
+ * + * string architecture = 3; + * @param value The architecture to set. + * @return This builder for chaining. + */ + public Builder setArchitecture( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + architecture_ = value; + onChanged(); + return this; + } + /** + *
+       * Architecture name of the platform (e.g., `avr`).
+       * 
+ * + * string architecture = 3; + * @return This builder for chaining. + */ + public Builder clearArchitecture() { + + architecture_ = getDefaultInstance().getArchitecture(); + onChanged(); + return this; + } + /** + *
+       * Architecture name of the platform (e.g., `avr`).
+       * 
+ * + * string architecture = 3; + * @param value The bytes for architecture to set. + * @return This builder for chaining. + */ + public Builder setArchitectureBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + architecture_ = value; + onChanged(); + return this; + } + + private java.lang.Object version_ = ""; + /** + *
+       * Platform version to install.
+       * 
+ * + * string version = 4; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Platform version to install.
+       * 
+ * + * string version = 4; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Platform version to install.
+       * 
+ * + * string version = 4; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + *
+       * Platform version to install.
+       * 
+ * + * string version = 4; + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + *
+       * Platform version to install.
+       * 
+ * + * string version = 4; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.PlatformInstallReq) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.PlatformInstallReq) + private static final cc.arduino.cli.commands.Core.PlatformInstallReq DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Core.PlatformInstallReq(); + } + + public static cc.arduino.cli.commands.Core.PlatformInstallReq getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PlatformInstallReq parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PlatformInstallReq(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformInstallReq getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PlatformInstallRespOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.PlatformInstallResp) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Progress of the downloads of the platform and tool files.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + * @return Whether the progress field is set. + */ + boolean hasProgress(); + /** + *
+     * Progress of the downloads of the platform and tool files.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + * @return The progress. + */ + cc.arduino.cli.commands.Common.DownloadProgress getProgress(); + /** + *
+     * Progress of the downloads of the platform and tool files.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + cc.arduino.cli.commands.Common.DownloadProgressOrBuilder getProgressOrBuilder(); + + /** + *
+     * Description of the current stage of the installation.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + * @return Whether the taskProgress field is set. + */ + boolean hasTaskProgress(); + /** + *
+     * Description of the current stage of the installation.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + * @return The taskProgress. + */ + cc.arduino.cli.commands.Common.TaskProgress getTaskProgress(); + /** + *
+     * Description of the current stage of the installation.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + */ + cc.arduino.cli.commands.Common.TaskProgressOrBuilder getTaskProgressOrBuilder(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.PlatformInstallResp} + */ + public static final class PlatformInstallResp extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.PlatformInstallResp) + PlatformInstallRespOrBuilder { + private static final long serialVersionUID = 0L; + // Use PlatformInstallResp.newBuilder() to construct. + private PlatformInstallResp(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PlatformInstallResp() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PlatformInstallResp(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PlatformInstallResp( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cc.arduino.cli.commands.Common.DownloadProgress.Builder subBuilder = null; + if (progress_ != null) { + subBuilder = progress_.toBuilder(); + } + progress_ = input.readMessage(cc.arduino.cli.commands.Common.DownloadProgress.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(progress_); + progress_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + 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; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformInstallResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformInstallResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Core.PlatformInstallResp.class, cc.arduino.cli.commands.Core.PlatformInstallResp.Builder.class); + } + + public static final int PROGRESS_FIELD_NUMBER = 1; + private cc.arduino.cli.commands.Common.DownloadProgress progress_; + /** + *
+     * Progress of the downloads of the platform and tool files.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + * @return Whether the progress field is set. + */ + public boolean hasProgress() { + return progress_ != null; + } + /** + *
+     * Progress of the downloads of the platform and tool files.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + * @return The progress. + */ + public cc.arduino.cli.commands.Common.DownloadProgress getProgress() { + return progress_ == null ? cc.arduino.cli.commands.Common.DownloadProgress.getDefaultInstance() : progress_; + } + /** + *
+     * Progress of the downloads of the platform and tool files.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + public cc.arduino.cli.commands.Common.DownloadProgressOrBuilder getProgressOrBuilder() { + return getProgress(); + } + + public static final int TASK_PROGRESS_FIELD_NUMBER = 2; + private cc.arduino.cli.commands.Common.TaskProgress taskProgress_; + /** + *
+     * Description of the current stage of the installation.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + * @return Whether the taskProgress field is set. + */ + public boolean hasTaskProgress() { + return taskProgress_ != null; + } + /** + *
+     * Description of the current stage of the installation.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + * @return The taskProgress. + */ + public cc.arduino.cli.commands.Common.TaskProgress getTaskProgress() { + return taskProgress_ == null ? cc.arduino.cli.commands.Common.TaskProgress.getDefaultInstance() : taskProgress_; + } + /** + *
+     * Description of the current stage of the installation.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + */ + public cc.arduino.cli.commands.Common.TaskProgressOrBuilder getTaskProgressOrBuilder() { + return getTaskProgress(); + } + + 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 (progress_ != null) { + output.writeMessage(1, getProgress()); + } + if (taskProgress_ != null) { + output.writeMessage(2, getTaskProgress()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (progress_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProgress()); + } + if (taskProgress_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getTaskProgress()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Core.PlatformInstallResp)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Core.PlatformInstallResp other = (cc.arduino.cli.commands.Core.PlatformInstallResp) obj; + + if (hasProgress() != other.hasProgress()) return false; + if (hasProgress()) { + if (!getProgress() + .equals(other.getProgress())) return false; + } + if (hasTaskProgress() != other.hasTaskProgress()) return false; + if (hasTaskProgress()) { + if (!getTaskProgress() + .equals(other.getTaskProgress())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProgress()) { + hash = (37 * hash) + PROGRESS_FIELD_NUMBER; + hash = (53 * hash) + getProgress().hashCode(); + } + if (hasTaskProgress()) { + hash = (37 * hash) + TASK_PROGRESS_FIELD_NUMBER; + hash = (53 * hash) + getTaskProgress().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Core.PlatformInstallResp parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Core.PlatformInstallResp parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformInstallResp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Core.PlatformInstallResp parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformInstallResp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Core.PlatformInstallResp parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformInstallResp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Core.PlatformInstallResp parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformInstallResp parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Core.PlatformInstallResp parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformInstallResp parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Core.PlatformInstallResp parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Core.PlatformInstallResp 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.PlatformInstallResp} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.PlatformInstallResp) + cc.arduino.cli.commands.Core.PlatformInstallRespOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformInstallResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformInstallResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Core.PlatformInstallResp.class, cc.arduino.cli.commands.Core.PlatformInstallResp.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Core.PlatformInstallResp.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (progressBuilder_ == null) { + progress_ = null; + } else { + progress_ = null; + progressBuilder_ = null; + } + if (taskProgressBuilder_ == null) { + taskProgress_ = null; + } else { + taskProgress_ = null; + taskProgressBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformInstallResp_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformInstallResp getDefaultInstanceForType() { + return cc.arduino.cli.commands.Core.PlatformInstallResp.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformInstallResp build() { + cc.arduino.cli.commands.Core.PlatformInstallResp result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformInstallResp buildPartial() { + cc.arduino.cli.commands.Core.PlatformInstallResp result = new cc.arduino.cli.commands.Core.PlatformInstallResp(this); + if (progressBuilder_ == null) { + result.progress_ = progress_; + } else { + result.progress_ = progressBuilder_.build(); + } + if (taskProgressBuilder_ == null) { + result.taskProgress_ = taskProgress_; + } else { + result.taskProgress_ = taskProgressBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Core.PlatformInstallResp) { + return mergeFrom((cc.arduino.cli.commands.Core.PlatformInstallResp)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Core.PlatformInstallResp other) { + if (other == cc.arduino.cli.commands.Core.PlatformInstallResp.getDefaultInstance()) return this; + if (other.hasProgress()) { + mergeProgress(other.getProgress()); + } + if (other.hasTaskProgress()) { + mergeTaskProgress(other.getTaskProgress()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Core.PlatformInstallResp parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Core.PlatformInstallResp) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private cc.arduino.cli.commands.Common.DownloadProgress progress_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.DownloadProgress, cc.arduino.cli.commands.Common.DownloadProgress.Builder, cc.arduino.cli.commands.Common.DownloadProgressOrBuilder> progressBuilder_; + /** + *
+       * Progress of the downloads of the platform and tool files.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + * @return Whether the progress field is set. + */ + public boolean hasProgress() { + return progressBuilder_ != null || progress_ != null; + } + /** + *
+       * Progress of the downloads of the platform and tool files.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + * @return The progress. + */ + public cc.arduino.cli.commands.Common.DownloadProgress getProgress() { + if (progressBuilder_ == null) { + return progress_ == null ? cc.arduino.cli.commands.Common.DownloadProgress.getDefaultInstance() : progress_; + } else { + return progressBuilder_.getMessage(); + } + } + /** + *
+       * Progress of the downloads of the platform and tool files.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + public Builder setProgress(cc.arduino.cli.commands.Common.DownloadProgress value) { + if (progressBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + progress_ = value; + onChanged(); + } else { + progressBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Progress of the downloads of the platform and tool files.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + public Builder setProgress( + cc.arduino.cli.commands.Common.DownloadProgress.Builder builderForValue) { + if (progressBuilder_ == null) { + progress_ = builderForValue.build(); + onChanged(); + } else { + progressBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Progress of the downloads of the platform and tool files.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + public Builder mergeProgress(cc.arduino.cli.commands.Common.DownloadProgress value) { + if (progressBuilder_ == null) { + if (progress_ != null) { + progress_ = + cc.arduino.cli.commands.Common.DownloadProgress.newBuilder(progress_).mergeFrom(value).buildPartial(); + } else { + progress_ = value; + } + onChanged(); + } else { + progressBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Progress of the downloads of the platform and tool files.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + public Builder clearProgress() { + if (progressBuilder_ == null) { + progress_ = null; + onChanged(); + } else { + progress_ = null; + progressBuilder_ = null; + } + + return this; + } + /** + *
+       * Progress of the downloads of the platform and tool files.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + public cc.arduino.cli.commands.Common.DownloadProgress.Builder getProgressBuilder() { + + onChanged(); + return getProgressFieldBuilder().getBuilder(); + } + /** + *
+       * Progress of the downloads of the platform and tool files.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + public cc.arduino.cli.commands.Common.DownloadProgressOrBuilder getProgressOrBuilder() { + if (progressBuilder_ != null) { + return progressBuilder_.getMessageOrBuilder(); + } else { + return progress_ == null ? + cc.arduino.cli.commands.Common.DownloadProgress.getDefaultInstance() : progress_; + } + } + /** + *
+       * Progress of the downloads of the platform and tool files.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.DownloadProgress, cc.arduino.cli.commands.Common.DownloadProgress.Builder, cc.arduino.cli.commands.Common.DownloadProgressOrBuilder> + getProgressFieldBuilder() { + if (progressBuilder_ == null) { + progressBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.DownloadProgress, cc.arduino.cli.commands.Common.DownloadProgress.Builder, cc.arduino.cli.commands.Common.DownloadProgressOrBuilder>( + getProgress(), + getParentForChildren(), + isClean()); + progress_ = null; + } + return progressBuilder_; + } + + 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_; + /** + *
+       * Description of the current stage of the installation.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + * @return Whether the taskProgress field is set. + */ + public boolean hasTaskProgress() { + return taskProgressBuilder_ != null || taskProgress_ != null; + } + /** + *
+       * Description of the current stage of the installation.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + * @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(); + } + } + /** + *
+       * Description of the current stage of the installation.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + */ + 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; + } + /** + *
+       * Description of the current stage of the installation.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + */ + 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; + } + /** + *
+       * Description of the current stage of the installation.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + */ + 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; + } + /** + *
+       * Description of the current stage of the installation.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + */ + public Builder clearTaskProgress() { + if (taskProgressBuilder_ == null) { + taskProgress_ = null; + onChanged(); + } else { + taskProgress_ = null; + taskProgressBuilder_ = null; + } + + return this; + } + /** + *
+       * Description of the current stage of the installation.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + */ + public cc.arduino.cli.commands.Common.TaskProgress.Builder getTaskProgressBuilder() { + + onChanged(); + return getTaskProgressFieldBuilder().getBuilder(); + } + /** + *
+       * Description of the current stage of the installation.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + */ + 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_; + } + } + /** + *
+       * Description of the current stage of the installation.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + */ + 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_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.PlatformInstallResp) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.PlatformInstallResp) + private static final cc.arduino.cli.commands.Core.PlatformInstallResp DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Core.PlatformInstallResp(); + } + + public static cc.arduino.cli.commands.Core.PlatformInstallResp getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PlatformInstallResp parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PlatformInstallResp(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformInstallResp getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PlatformDownloadReqOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.PlatformDownloadReq) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + boolean hasInstance(); + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + cc.arduino.cli.commands.Common.Instance getInstance(); + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder(); + + /** + * string platform_package = 2; + * @return The platformPackage. + */ + java.lang.String getPlatformPackage(); + /** + * string platform_package = 2; + * @return The bytes for platformPackage. + */ + com.google.protobuf.ByteString + getPlatformPackageBytes(); + + /** + *
+     * Architecture name of the platform (e.g., `avr`).
+     * 
+ * + * string architecture = 3; + * @return The architecture. + */ + java.lang.String getArchitecture(); + /** + *
+     * Architecture name of the platform (e.g., `avr`).
+     * 
+ * + * string architecture = 3; + * @return The bytes for architecture. + */ + com.google.protobuf.ByteString + getArchitectureBytes(); + + /** + *
+     * Platform version to download.
+     * 
+ * + * string version = 4; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+     * Platform version to download.
+     * 
+ * + * string version = 4; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.PlatformDownloadReq} + */ + public static final class PlatformDownloadReq extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.PlatformDownloadReq) + PlatformDownloadReqOrBuilder { + private static final long serialVersionUID = 0L; + // Use PlatformDownloadReq.newBuilder() to construct. + private PlatformDownloadReq(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PlatformDownloadReq() { + platformPackage_ = ""; + architecture_ = ""; + version_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PlatformDownloadReq(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PlatformDownloadReq( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cc.arduino.cli.commands.Common.Instance.Builder subBuilder = null; + if (instance_ != null) { + subBuilder = instance_.toBuilder(); + } + instance_ = input.readMessage(cc.arduino.cli.commands.Common.Instance.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instance_); + instance_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + platformPackage_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + architecture_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + version_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformDownloadReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformDownloadReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Core.PlatformDownloadReq.class, cc.arduino.cli.commands.Core.PlatformDownloadReq.Builder.class); + } + + public static final int INSTANCE_FIELD_NUMBER = 1; + private cc.arduino.cli.commands.Common.Instance instance_; + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instance_ != null; + } + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + return getInstance(); + } + + public static final int PLATFORM_PACKAGE_FIELD_NUMBER = 2; + private volatile java.lang.Object platformPackage_; + /** + * string platform_package = 2; + * @return The platformPackage. + */ + public java.lang.String getPlatformPackage() { + java.lang.Object ref = platformPackage_; + 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(); + platformPackage_ = s; + return s; + } + } + /** + * string platform_package = 2; + * @return The bytes for platformPackage. + */ + public com.google.protobuf.ByteString + getPlatformPackageBytes() { + java.lang.Object ref = platformPackage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + platformPackage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ARCHITECTURE_FIELD_NUMBER = 3; + private volatile java.lang.Object architecture_; + /** + *
+     * Architecture name of the platform (e.g., `avr`).
+     * 
+ * + * string architecture = 3; + * @return The architecture. + */ + public java.lang.String getArchitecture() { + java.lang.Object ref = architecture_; + 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(); + architecture_ = s; + return s; + } + } + /** + *
+     * Architecture name of the platform (e.g., `avr`).
+     * 
+ * + * string architecture = 3; + * @return The bytes for architecture. + */ + public com.google.protobuf.ByteString + getArchitectureBytes() { + java.lang.Object ref = architecture_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + architecture_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_FIELD_NUMBER = 4; + private volatile java.lang.Object version_; + /** + *
+     * Platform version to download.
+     * 
+ * + * string version = 4; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + 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(); + version_ = s; + return s; + } + } + /** + *
+     * Platform version to download.
+     * 
+ * + * string version = 4; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (instance_ != null) { + output.writeMessage(1, getInstance()); + } + if (!getPlatformPackageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, platformPackage_); + } + if (!getArchitectureBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, architecture_); + } + if (!getVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, version_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (instance_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInstance()); + } + if (!getPlatformPackageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, platformPackage_); + } + if (!getArchitectureBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, architecture_); + } + if (!getVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, version_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Core.PlatformDownloadReq)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Core.PlatformDownloadReq other = (cc.arduino.cli.commands.Core.PlatformDownloadReq) obj; + + if (hasInstance() != other.hasInstance()) return false; + if (hasInstance()) { + if (!getInstance() + .equals(other.getInstance())) return false; + } + if (!getPlatformPackage() + .equals(other.getPlatformPackage())) return false; + if (!getArchitecture() + .equals(other.getArchitecture())) return false; + if (!getVersion() + .equals(other.getVersion())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInstance()) { + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + } + hash = (37 * hash) + PLATFORM_PACKAGE_FIELD_NUMBER; + hash = (53 * hash) + getPlatformPackage().hashCode(); + hash = (37 * hash) + ARCHITECTURE_FIELD_NUMBER; + hash = (53 * hash) + getArchitecture().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Core.PlatformDownloadReq parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Core.PlatformDownloadReq parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformDownloadReq parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Core.PlatformDownloadReq parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformDownloadReq parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Core.PlatformDownloadReq parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformDownloadReq parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Core.PlatformDownloadReq parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformDownloadReq parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Core.PlatformDownloadReq parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformDownloadReq parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Core.PlatformDownloadReq parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Core.PlatformDownloadReq 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.PlatformDownloadReq} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.PlatformDownloadReq) + cc.arduino.cli.commands.Core.PlatformDownloadReqOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformDownloadReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformDownloadReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Core.PlatformDownloadReq.class, cc.arduino.cli.commands.Core.PlatformDownloadReq.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Core.PlatformDownloadReq.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (instanceBuilder_ == null) { + instance_ = null; + } else { + instance_ = null; + instanceBuilder_ = null; + } + platformPackage_ = ""; + + architecture_ = ""; + + version_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformDownloadReq_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformDownloadReq getDefaultInstanceForType() { + return cc.arduino.cli.commands.Core.PlatformDownloadReq.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformDownloadReq build() { + cc.arduino.cli.commands.Core.PlatformDownloadReq result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformDownloadReq buildPartial() { + cc.arduino.cli.commands.Core.PlatformDownloadReq result = new cc.arduino.cli.commands.Core.PlatformDownloadReq(this); + if (instanceBuilder_ == null) { + result.instance_ = instance_; + } else { + result.instance_ = instanceBuilder_.build(); + } + result.platformPackage_ = platformPackage_; + result.architecture_ = architecture_; + result.version_ = version_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Core.PlatformDownloadReq) { + return mergeFrom((cc.arduino.cli.commands.Core.PlatformDownloadReq)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Core.PlatformDownloadReq other) { + if (other == cc.arduino.cli.commands.Core.PlatformDownloadReq.getDefaultInstance()) return this; + if (other.hasInstance()) { + mergeInstance(other.getInstance()); + } + if (!other.getPlatformPackage().isEmpty()) { + platformPackage_ = other.platformPackage_; + onChanged(); + } + if (!other.getArchitecture().isEmpty()) { + architecture_ = other.architecture_; + onChanged(); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Core.PlatformDownloadReq parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Core.PlatformDownloadReq) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private cc.arduino.cli.commands.Common.Instance instance_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> instanceBuilder_; + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instanceBuilder_ != null || instance_ != null; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + if (instanceBuilder_ == null) { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } else { + return instanceBuilder_.getMessage(); + } + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + onChanged(); + } else { + instanceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance( + cc.arduino.cli.commands.Common.Instance.Builder builderForValue) { + if (instanceBuilder_ == null) { + instance_ = builderForValue.build(); + onChanged(); + } else { + instanceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder mergeInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (instance_ != null) { + instance_ = + cc.arduino.cli.commands.Common.Instance.newBuilder(instance_).mergeFrom(value).buildPartial(); + } else { + instance_ = value; + } + onChanged(); + } else { + instanceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder clearInstance() { + if (instanceBuilder_ == null) { + instance_ = null; + onChanged(); + } else { + instance_ = null; + instanceBuilder_ = null; + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.Instance.Builder getInstanceBuilder() { + + onChanged(); + return getInstanceFieldBuilder().getBuilder(); + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + if (instanceBuilder_ != null) { + return instanceBuilder_.getMessageOrBuilder(); + } else { + return instance_ == null ? + cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> + getInstanceFieldBuilder() { + if (instanceBuilder_ == null) { + instanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder>( + getInstance(), + getParentForChildren(), + isClean()); + instance_ = null; + } + return instanceBuilder_; + } + + private java.lang.Object platformPackage_ = ""; + /** + * string platform_package = 2; + * @return The platformPackage. + */ + public java.lang.String getPlatformPackage() { + java.lang.Object ref = platformPackage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + platformPackage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string platform_package = 2; + * @return The bytes for platformPackage. + */ + public com.google.protobuf.ByteString + getPlatformPackageBytes() { + java.lang.Object ref = platformPackage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + platformPackage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string platform_package = 2; + * @param value The platformPackage to set. + * @return This builder for chaining. + */ + public Builder setPlatformPackage( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + platformPackage_ = value; + onChanged(); + return this; + } + /** + * string platform_package = 2; + * @return This builder for chaining. + */ + public Builder clearPlatformPackage() { + + platformPackage_ = getDefaultInstance().getPlatformPackage(); + onChanged(); + return this; + } + /** + * string platform_package = 2; + * @param value The bytes for platformPackage to set. + * @return This builder for chaining. + */ + public Builder setPlatformPackageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + platformPackage_ = value; + onChanged(); + return this; + } + + private java.lang.Object architecture_ = ""; + /** + *
+       * Architecture name of the platform (e.g., `avr`).
+       * 
+ * + * string architecture = 3; + * @return The architecture. + */ + public java.lang.String getArchitecture() { + java.lang.Object ref = architecture_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + architecture_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Architecture name of the platform (e.g., `avr`).
+       * 
+ * + * string architecture = 3; + * @return The bytes for architecture. + */ + public com.google.protobuf.ByteString + getArchitectureBytes() { + java.lang.Object ref = architecture_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + architecture_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Architecture name of the platform (e.g., `avr`).
+       * 
+ * + * string architecture = 3; + * @param value The architecture to set. + * @return This builder for chaining. + */ + public Builder setArchitecture( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + architecture_ = value; + onChanged(); + return this; + } + /** + *
+       * Architecture name of the platform (e.g., `avr`).
+       * 
+ * + * string architecture = 3; + * @return This builder for chaining. + */ + public Builder clearArchitecture() { + + architecture_ = getDefaultInstance().getArchitecture(); + onChanged(); + return this; + } + /** + *
+       * Architecture name of the platform (e.g., `avr`).
+       * 
+ * + * string architecture = 3; + * @param value The bytes for architecture to set. + * @return This builder for chaining. + */ + public Builder setArchitectureBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + architecture_ = value; + onChanged(); + return this; + } + + private java.lang.Object version_ = ""; + /** + *
+       * Platform version to download.
+       * 
+ * + * string version = 4; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Platform version to download.
+       * 
+ * + * string version = 4; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Platform version to download.
+       * 
+ * + * string version = 4; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + *
+       * Platform version to download.
+       * 
+ * + * string version = 4; + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + *
+       * Platform version to download.
+       * 
+ * + * string version = 4; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.PlatformDownloadReq) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.PlatformDownloadReq) + private static final cc.arduino.cli.commands.Core.PlatformDownloadReq DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Core.PlatformDownloadReq(); + } + + public static cc.arduino.cli.commands.Core.PlatformDownloadReq getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PlatformDownloadReq parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PlatformDownloadReq(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformDownloadReq getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PlatformDownloadRespOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.PlatformDownloadResp) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Progress of the downloads of platform and tool files.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + * @return Whether the progress field is set. + */ + boolean hasProgress(); + /** + *
+     * Progress of the downloads of platform and tool files.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + * @return The progress. + */ + cc.arduino.cli.commands.Common.DownloadProgress getProgress(); + /** + *
+     * Progress of the downloads of platform and tool files.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + cc.arduino.cli.commands.Common.DownloadProgressOrBuilder getProgressOrBuilder(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.PlatformDownloadResp} + */ + public static final class PlatformDownloadResp extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.PlatformDownloadResp) + PlatformDownloadRespOrBuilder { + private static final long serialVersionUID = 0L; + // Use PlatformDownloadResp.newBuilder() to construct. + private PlatformDownloadResp(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PlatformDownloadResp() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PlatformDownloadResp(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PlatformDownloadResp( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cc.arduino.cli.commands.Common.DownloadProgress.Builder subBuilder = null; + if (progress_ != null) { + subBuilder = progress_.toBuilder(); + } + progress_ = input.readMessage(cc.arduino.cli.commands.Common.DownloadProgress.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(progress_); + progress_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformDownloadResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformDownloadResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Core.PlatformDownloadResp.class, cc.arduino.cli.commands.Core.PlatformDownloadResp.Builder.class); + } + + public static final int PROGRESS_FIELD_NUMBER = 1; + private cc.arduino.cli.commands.Common.DownloadProgress progress_; + /** + *
+     * Progress of the downloads of platform and tool files.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + * @return Whether the progress field is set. + */ + public boolean hasProgress() { + return progress_ != null; + } + /** + *
+     * Progress of the downloads of platform and tool files.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + * @return The progress. + */ + public cc.arduino.cli.commands.Common.DownloadProgress getProgress() { + return progress_ == null ? cc.arduino.cli.commands.Common.DownloadProgress.getDefaultInstance() : progress_; + } + /** + *
+     * Progress of the downloads of platform and tool files.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + public cc.arduino.cli.commands.Common.DownloadProgressOrBuilder getProgressOrBuilder() { + return getProgress(); + } + + 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 (progress_ != null) { + output.writeMessage(1, getProgress()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (progress_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProgress()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Core.PlatformDownloadResp)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Core.PlatformDownloadResp other = (cc.arduino.cli.commands.Core.PlatformDownloadResp) obj; + + if (hasProgress() != other.hasProgress()) return false; + if (hasProgress()) { + if (!getProgress() + .equals(other.getProgress())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProgress()) { + hash = (37 * hash) + PROGRESS_FIELD_NUMBER; + hash = (53 * hash) + getProgress().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Core.PlatformDownloadResp parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Core.PlatformDownloadResp parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformDownloadResp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Core.PlatformDownloadResp parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformDownloadResp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Core.PlatformDownloadResp parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformDownloadResp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Core.PlatformDownloadResp parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformDownloadResp parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Core.PlatformDownloadResp parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformDownloadResp parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Core.PlatformDownloadResp parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Core.PlatformDownloadResp 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.PlatformDownloadResp} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.PlatformDownloadResp) + cc.arduino.cli.commands.Core.PlatformDownloadRespOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformDownloadResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformDownloadResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Core.PlatformDownloadResp.class, cc.arduino.cli.commands.Core.PlatformDownloadResp.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Core.PlatformDownloadResp.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (progressBuilder_ == null) { + progress_ = null; + } else { + progress_ = null; + progressBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformDownloadResp_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformDownloadResp getDefaultInstanceForType() { + return cc.arduino.cli.commands.Core.PlatformDownloadResp.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformDownloadResp build() { + cc.arduino.cli.commands.Core.PlatformDownloadResp result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformDownloadResp buildPartial() { + cc.arduino.cli.commands.Core.PlatformDownloadResp result = new cc.arduino.cli.commands.Core.PlatformDownloadResp(this); + if (progressBuilder_ == null) { + result.progress_ = progress_; + } else { + result.progress_ = progressBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Core.PlatformDownloadResp) { + return mergeFrom((cc.arduino.cli.commands.Core.PlatformDownloadResp)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Core.PlatformDownloadResp other) { + if (other == cc.arduino.cli.commands.Core.PlatformDownloadResp.getDefaultInstance()) return this; + if (other.hasProgress()) { + mergeProgress(other.getProgress()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Core.PlatformDownloadResp parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Core.PlatformDownloadResp) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private cc.arduino.cli.commands.Common.DownloadProgress progress_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.DownloadProgress, cc.arduino.cli.commands.Common.DownloadProgress.Builder, cc.arduino.cli.commands.Common.DownloadProgressOrBuilder> progressBuilder_; + /** + *
+       * Progress of the downloads of platform and tool files.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + * @return Whether the progress field is set. + */ + public boolean hasProgress() { + return progressBuilder_ != null || progress_ != null; + } + /** + *
+       * Progress of the downloads of platform and tool files.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + * @return The progress. + */ + public cc.arduino.cli.commands.Common.DownloadProgress getProgress() { + if (progressBuilder_ == null) { + return progress_ == null ? cc.arduino.cli.commands.Common.DownloadProgress.getDefaultInstance() : progress_; + } else { + return progressBuilder_.getMessage(); + } + } + /** + *
+       * Progress of the downloads of platform and tool files.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + public Builder setProgress(cc.arduino.cli.commands.Common.DownloadProgress value) { + if (progressBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + progress_ = value; + onChanged(); + } else { + progressBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Progress of the downloads of platform and tool files.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + public Builder setProgress( + cc.arduino.cli.commands.Common.DownloadProgress.Builder builderForValue) { + if (progressBuilder_ == null) { + progress_ = builderForValue.build(); + onChanged(); + } else { + progressBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Progress of the downloads of platform and tool files.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + public Builder mergeProgress(cc.arduino.cli.commands.Common.DownloadProgress value) { + if (progressBuilder_ == null) { + if (progress_ != null) { + progress_ = + cc.arduino.cli.commands.Common.DownloadProgress.newBuilder(progress_).mergeFrom(value).buildPartial(); + } else { + progress_ = value; + } + onChanged(); + } else { + progressBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Progress of the downloads of platform and tool files.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + public Builder clearProgress() { + if (progressBuilder_ == null) { + progress_ = null; + onChanged(); + } else { + progress_ = null; + progressBuilder_ = null; + } + + return this; + } + /** + *
+       * Progress of the downloads of platform and tool files.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + public cc.arduino.cli.commands.Common.DownloadProgress.Builder getProgressBuilder() { + + onChanged(); + return getProgressFieldBuilder().getBuilder(); + } + /** + *
+       * Progress of the downloads of platform and tool files.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + public cc.arduino.cli.commands.Common.DownloadProgressOrBuilder getProgressOrBuilder() { + if (progressBuilder_ != null) { + return progressBuilder_.getMessageOrBuilder(); + } else { + return progress_ == null ? + cc.arduino.cli.commands.Common.DownloadProgress.getDefaultInstance() : progress_; + } + } + /** + *
+       * Progress of the downloads of platform and tool files.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.DownloadProgress, cc.arduino.cli.commands.Common.DownloadProgress.Builder, cc.arduino.cli.commands.Common.DownloadProgressOrBuilder> + getProgressFieldBuilder() { + if (progressBuilder_ == null) { + progressBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.DownloadProgress, cc.arduino.cli.commands.Common.DownloadProgress.Builder, cc.arduino.cli.commands.Common.DownloadProgressOrBuilder>( + getProgress(), + getParentForChildren(), + isClean()); + progress_ = null; + } + return progressBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.PlatformDownloadResp) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.PlatformDownloadResp) + private static final cc.arduino.cli.commands.Core.PlatformDownloadResp DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Core.PlatformDownloadResp(); + } + + public static cc.arduino.cli.commands.Core.PlatformDownloadResp getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PlatformDownloadResp parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PlatformDownloadResp(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformDownloadResp getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PlatformUninstallReqOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.PlatformUninstallReq) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + boolean hasInstance(); + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + cc.arduino.cli.commands.Common.Instance getInstance(); + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder(); + + /** + *
+     * Vendor name of the platform (e.g., `arduino`).
+     * 
+ * + * string platform_package = 2; + * @return The platformPackage. + */ + java.lang.String getPlatformPackage(); + /** + *
+     * Vendor name of the platform (e.g., `arduino`).
+     * 
+ * + * string platform_package = 2; + * @return The bytes for platformPackage. + */ + com.google.protobuf.ByteString + getPlatformPackageBytes(); + + /** + *
+     * Architecture name of the platform (e.g., `avr`).
+     * 
+ * + * string architecture = 3; + * @return The architecture. + */ + java.lang.String getArchitecture(); + /** + *
+     * Architecture name of the platform (e.g., `avr`).
+     * 
+ * + * string architecture = 3; + * @return The bytes for architecture. + */ + com.google.protobuf.ByteString + getArchitectureBytes(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.PlatformUninstallReq} + */ + public static final class PlatformUninstallReq extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.PlatformUninstallReq) + PlatformUninstallReqOrBuilder { + private static final long serialVersionUID = 0L; + // Use PlatformUninstallReq.newBuilder() to construct. + private PlatformUninstallReq(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PlatformUninstallReq() { + platformPackage_ = ""; + architecture_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PlatformUninstallReq(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PlatformUninstallReq( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cc.arduino.cli.commands.Common.Instance.Builder subBuilder = null; + if (instance_ != null) { + subBuilder = instance_.toBuilder(); + } + instance_ = input.readMessage(cc.arduino.cli.commands.Common.Instance.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instance_); + instance_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + platformPackage_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + architecture_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformUninstallReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformUninstallReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Core.PlatformUninstallReq.class, cc.arduino.cli.commands.Core.PlatformUninstallReq.Builder.class); + } + + public static final int INSTANCE_FIELD_NUMBER = 1; + private cc.arduino.cli.commands.Common.Instance instance_; + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instance_ != null; + } + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + return getInstance(); + } + + public static final int PLATFORM_PACKAGE_FIELD_NUMBER = 2; + private volatile java.lang.Object platformPackage_; + /** + *
+     * Vendor name of the platform (e.g., `arduino`).
+     * 
+ * + * string platform_package = 2; + * @return The platformPackage. + */ + public java.lang.String getPlatformPackage() { + java.lang.Object ref = platformPackage_; + 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(); + platformPackage_ = s; + return s; + } + } + /** + *
+     * Vendor name of the platform (e.g., `arduino`).
+     * 
+ * + * string platform_package = 2; + * @return The bytes for platformPackage. + */ + public com.google.protobuf.ByteString + getPlatformPackageBytes() { + java.lang.Object ref = platformPackage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + platformPackage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ARCHITECTURE_FIELD_NUMBER = 3; + private volatile java.lang.Object architecture_; + /** + *
+     * Architecture name of the platform (e.g., `avr`).
+     * 
+ * + * string architecture = 3; + * @return The architecture. + */ + public java.lang.String getArchitecture() { + java.lang.Object ref = architecture_; + 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(); + architecture_ = s; + return s; + } + } + /** + *
+     * Architecture name of the platform (e.g., `avr`).
+     * 
+ * + * string architecture = 3; + * @return The bytes for architecture. + */ + public com.google.protobuf.ByteString + getArchitectureBytes() { + java.lang.Object ref = architecture_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + architecture_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (instance_ != null) { + output.writeMessage(1, getInstance()); + } + if (!getPlatformPackageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, platformPackage_); + } + if (!getArchitectureBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, architecture_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (instance_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInstance()); + } + if (!getPlatformPackageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, platformPackage_); + } + if (!getArchitectureBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, architecture_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Core.PlatformUninstallReq)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Core.PlatformUninstallReq other = (cc.arduino.cli.commands.Core.PlatformUninstallReq) obj; + + if (hasInstance() != other.hasInstance()) return false; + if (hasInstance()) { + if (!getInstance() + .equals(other.getInstance())) return false; + } + if (!getPlatformPackage() + .equals(other.getPlatformPackage())) return false; + if (!getArchitecture() + .equals(other.getArchitecture())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInstance()) { + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + } + hash = (37 * hash) + PLATFORM_PACKAGE_FIELD_NUMBER; + hash = (53 * hash) + getPlatformPackage().hashCode(); + hash = (37 * hash) + ARCHITECTURE_FIELD_NUMBER; + hash = (53 * hash) + getArchitecture().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Core.PlatformUninstallReq parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Core.PlatformUninstallReq parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformUninstallReq parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Core.PlatformUninstallReq parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformUninstallReq parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Core.PlatformUninstallReq parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformUninstallReq parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Core.PlatformUninstallReq parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformUninstallReq parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Core.PlatformUninstallReq parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformUninstallReq parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Core.PlatformUninstallReq parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Core.PlatformUninstallReq 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.PlatformUninstallReq} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.PlatformUninstallReq) + cc.arduino.cli.commands.Core.PlatformUninstallReqOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformUninstallReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformUninstallReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Core.PlatformUninstallReq.class, cc.arduino.cli.commands.Core.PlatformUninstallReq.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Core.PlatformUninstallReq.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (instanceBuilder_ == null) { + instance_ = null; + } else { + instance_ = null; + instanceBuilder_ = null; + } + platformPackage_ = ""; + + architecture_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformUninstallReq_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformUninstallReq getDefaultInstanceForType() { + return cc.arduino.cli.commands.Core.PlatformUninstallReq.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformUninstallReq build() { + cc.arduino.cli.commands.Core.PlatformUninstallReq result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformUninstallReq buildPartial() { + cc.arduino.cli.commands.Core.PlatformUninstallReq result = new cc.arduino.cli.commands.Core.PlatformUninstallReq(this); + if (instanceBuilder_ == null) { + result.instance_ = instance_; + } else { + result.instance_ = instanceBuilder_.build(); + } + result.platformPackage_ = platformPackage_; + result.architecture_ = architecture_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Core.PlatformUninstallReq) { + return mergeFrom((cc.arduino.cli.commands.Core.PlatformUninstallReq)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Core.PlatformUninstallReq other) { + if (other == cc.arduino.cli.commands.Core.PlatformUninstallReq.getDefaultInstance()) return this; + if (other.hasInstance()) { + mergeInstance(other.getInstance()); + } + if (!other.getPlatformPackage().isEmpty()) { + platformPackage_ = other.platformPackage_; + onChanged(); + } + if (!other.getArchitecture().isEmpty()) { + architecture_ = other.architecture_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Core.PlatformUninstallReq parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Core.PlatformUninstallReq) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private cc.arduino.cli.commands.Common.Instance instance_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> instanceBuilder_; + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instanceBuilder_ != null || instance_ != null; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + if (instanceBuilder_ == null) { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } else { + return instanceBuilder_.getMessage(); + } + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + onChanged(); + } else { + instanceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance( + cc.arduino.cli.commands.Common.Instance.Builder builderForValue) { + if (instanceBuilder_ == null) { + instance_ = builderForValue.build(); + onChanged(); + } else { + instanceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder mergeInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (instance_ != null) { + instance_ = + cc.arduino.cli.commands.Common.Instance.newBuilder(instance_).mergeFrom(value).buildPartial(); + } else { + instance_ = value; + } + onChanged(); + } else { + instanceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder clearInstance() { + if (instanceBuilder_ == null) { + instance_ = null; + onChanged(); + } else { + instance_ = null; + instanceBuilder_ = null; + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.Instance.Builder getInstanceBuilder() { + + onChanged(); + return getInstanceFieldBuilder().getBuilder(); + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + if (instanceBuilder_ != null) { + return instanceBuilder_.getMessageOrBuilder(); + } else { + return instance_ == null ? + cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> + getInstanceFieldBuilder() { + if (instanceBuilder_ == null) { + instanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder>( + getInstance(), + getParentForChildren(), + isClean()); + instance_ = null; + } + return instanceBuilder_; + } + + private java.lang.Object platformPackage_ = ""; + /** + *
+       * Vendor name of the platform (e.g., `arduino`).
+       * 
+ * + * string platform_package = 2; + * @return The platformPackage. + */ + public java.lang.String getPlatformPackage() { + java.lang.Object ref = platformPackage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + platformPackage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Vendor name of the platform (e.g., `arduino`).
+       * 
+ * + * string platform_package = 2; + * @return The bytes for platformPackage. + */ + public com.google.protobuf.ByteString + getPlatformPackageBytes() { + java.lang.Object ref = platformPackage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + platformPackage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Vendor name of the platform (e.g., `arduino`).
+       * 
+ * + * string platform_package = 2; + * @param value The platformPackage to set. + * @return This builder for chaining. + */ + public Builder setPlatformPackage( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + platformPackage_ = value; + onChanged(); + return this; + } + /** + *
+       * Vendor name of the platform (e.g., `arduino`).
+       * 
+ * + * string platform_package = 2; + * @return This builder for chaining. + */ + public Builder clearPlatformPackage() { + + platformPackage_ = getDefaultInstance().getPlatformPackage(); + onChanged(); + return this; + } + /** + *
+       * Vendor name of the platform (e.g., `arduino`).
+       * 
+ * + * string platform_package = 2; + * @param value The bytes for platformPackage to set. + * @return This builder for chaining. + */ + public Builder setPlatformPackageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + platformPackage_ = value; + onChanged(); + return this; + } + + private java.lang.Object architecture_ = ""; + /** + *
+       * Architecture name of the platform (e.g., `avr`).
+       * 
+ * + * string architecture = 3; + * @return The architecture. + */ + public java.lang.String getArchitecture() { + java.lang.Object ref = architecture_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + architecture_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Architecture name of the platform (e.g., `avr`).
+       * 
+ * + * string architecture = 3; + * @return The bytes for architecture. + */ + public com.google.protobuf.ByteString + getArchitectureBytes() { + java.lang.Object ref = architecture_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + architecture_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Architecture name of the platform (e.g., `avr`).
+       * 
+ * + * string architecture = 3; + * @param value The architecture to set. + * @return This builder for chaining. + */ + public Builder setArchitecture( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + architecture_ = value; + onChanged(); + return this; + } + /** + *
+       * Architecture name of the platform (e.g., `avr`).
+       * 
+ * + * string architecture = 3; + * @return This builder for chaining. + */ + public Builder clearArchitecture() { + + architecture_ = getDefaultInstance().getArchitecture(); + onChanged(); + return this; + } + /** + *
+       * Architecture name of the platform (e.g., `avr`).
+       * 
+ * + * string architecture = 3; + * @param value The bytes for architecture to set. + * @return This builder for chaining. + */ + public Builder setArchitectureBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + architecture_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.PlatformUninstallReq) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.PlatformUninstallReq) + private static final cc.arduino.cli.commands.Core.PlatformUninstallReq DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Core.PlatformUninstallReq(); + } + + public static cc.arduino.cli.commands.Core.PlatformUninstallReq getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PlatformUninstallReq parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PlatformUninstallReq(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformUninstallReq getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PlatformUninstallRespOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.PlatformUninstallResp) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Description of the current stage of the uninstall.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + * @return Whether the taskProgress field is set. + */ + boolean hasTaskProgress(); + /** + *
+     * Description of the current stage of the uninstall.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + * @return The taskProgress. + */ + cc.arduino.cli.commands.Common.TaskProgress getTaskProgress(); + /** + *
+     * Description of the current stage of the uninstall.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + */ + cc.arduino.cli.commands.Common.TaskProgressOrBuilder getTaskProgressOrBuilder(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.PlatformUninstallResp} + */ + public static final class PlatformUninstallResp extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.PlatformUninstallResp) + PlatformUninstallRespOrBuilder { + private static final long serialVersionUID = 0L; + // Use PlatformUninstallResp.newBuilder() to construct. + private PlatformUninstallResp(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PlatformUninstallResp() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PlatformUninstallResp(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PlatformUninstallResp( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + 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; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformUninstallResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformUninstallResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Core.PlatformUninstallResp.class, cc.arduino.cli.commands.Core.PlatformUninstallResp.Builder.class); + } + + public static final int TASK_PROGRESS_FIELD_NUMBER = 1; + private cc.arduino.cli.commands.Common.TaskProgress taskProgress_; + /** + *
+     * Description of the current stage of the uninstall.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + * @return Whether the taskProgress field is set. + */ + public boolean hasTaskProgress() { + return taskProgress_ != null; + } + /** + *
+     * Description of the current stage of the uninstall.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + * @return The taskProgress. + */ + public cc.arduino.cli.commands.Common.TaskProgress getTaskProgress() { + return taskProgress_ == null ? cc.arduino.cli.commands.Common.TaskProgress.getDefaultInstance() : taskProgress_; + } + /** + *
+     * Description of the current stage of the uninstall.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + */ + public cc.arduino.cli.commands.Common.TaskProgressOrBuilder getTaskProgressOrBuilder() { + return getTaskProgress(); + } + + 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 (taskProgress_ != null) { + output.writeMessage(1, getTaskProgress()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (taskProgress_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getTaskProgress()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Core.PlatformUninstallResp)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Core.PlatformUninstallResp other = (cc.arduino.cli.commands.Core.PlatformUninstallResp) obj; + + if (hasTaskProgress() != other.hasTaskProgress()) return false; + if (hasTaskProgress()) { + if (!getTaskProgress() + .equals(other.getTaskProgress())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTaskProgress()) { + hash = (37 * hash) + TASK_PROGRESS_FIELD_NUMBER; + hash = (53 * hash) + getTaskProgress().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Core.PlatformUninstallResp parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Core.PlatformUninstallResp parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformUninstallResp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Core.PlatformUninstallResp parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformUninstallResp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Core.PlatformUninstallResp parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformUninstallResp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Core.PlatformUninstallResp parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformUninstallResp parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Core.PlatformUninstallResp parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformUninstallResp parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Core.PlatformUninstallResp parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Core.PlatformUninstallResp 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.PlatformUninstallResp} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.PlatformUninstallResp) + cc.arduino.cli.commands.Core.PlatformUninstallRespOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformUninstallResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformUninstallResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Core.PlatformUninstallResp.class, cc.arduino.cli.commands.Core.PlatformUninstallResp.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Core.PlatformUninstallResp.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (taskProgressBuilder_ == null) { + taskProgress_ = null; + } else { + taskProgress_ = null; + taskProgressBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformUninstallResp_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformUninstallResp getDefaultInstanceForType() { + return cc.arduino.cli.commands.Core.PlatformUninstallResp.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformUninstallResp build() { + cc.arduino.cli.commands.Core.PlatformUninstallResp result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformUninstallResp buildPartial() { + cc.arduino.cli.commands.Core.PlatformUninstallResp result = new cc.arduino.cli.commands.Core.PlatformUninstallResp(this); + if (taskProgressBuilder_ == null) { + result.taskProgress_ = taskProgress_; + } else { + result.taskProgress_ = taskProgressBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Core.PlatformUninstallResp) { + return mergeFrom((cc.arduino.cli.commands.Core.PlatformUninstallResp)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Core.PlatformUninstallResp other) { + if (other == cc.arduino.cli.commands.Core.PlatformUninstallResp.getDefaultInstance()) return this; + if (other.hasTaskProgress()) { + mergeTaskProgress(other.getTaskProgress()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Core.PlatformUninstallResp parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Core.PlatformUninstallResp) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + 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_; + /** + *
+       * Description of the current stage of the uninstall.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + * @return Whether the taskProgress field is set. + */ + public boolean hasTaskProgress() { + return taskProgressBuilder_ != null || taskProgress_ != null; + } + /** + *
+       * Description of the current stage of the uninstall.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + * @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(); + } + } + /** + *
+       * Description of the current stage of the uninstall.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + */ + 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; + } + /** + *
+       * Description of the current stage of the uninstall.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + */ + 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; + } + /** + *
+       * Description of the current stage of the uninstall.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + */ + 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; + } + /** + *
+       * Description of the current stage of the uninstall.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + */ + public Builder clearTaskProgress() { + if (taskProgressBuilder_ == null) { + taskProgress_ = null; + onChanged(); + } else { + taskProgress_ = null; + taskProgressBuilder_ = null; + } + + return this; + } + /** + *
+       * Description of the current stage of the uninstall.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + */ + public cc.arduino.cli.commands.Common.TaskProgress.Builder getTaskProgressBuilder() { + + onChanged(); + return getTaskProgressFieldBuilder().getBuilder(); + } + /** + *
+       * Description of the current stage of the uninstall.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + */ + 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_; + } + } + /** + *
+       * Description of the current stage of the uninstall.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + */ + 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_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.PlatformUninstallResp) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.PlatformUninstallResp) + private static final cc.arduino.cli.commands.Core.PlatformUninstallResp DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Core.PlatformUninstallResp(); + } + + public static cc.arduino.cli.commands.Core.PlatformUninstallResp getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PlatformUninstallResp parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PlatformUninstallResp(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformUninstallResp getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PlatformUpgradeReqOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.PlatformUpgradeReq) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + boolean hasInstance(); + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + cc.arduino.cli.commands.Common.Instance getInstance(); + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder(); + + /** + *
+     * Vendor name of the platform (e.g., `arduino`).
+     * 
+ * + * string platform_package = 2; + * @return The platformPackage. + */ + java.lang.String getPlatformPackage(); + /** + *
+     * Vendor name of the platform (e.g., `arduino`).
+     * 
+ * + * string platform_package = 2; + * @return The bytes for platformPackage. + */ + com.google.protobuf.ByteString + getPlatformPackageBytes(); + + /** + *
+     * Architecture name of the platform (e.g., `avr`).
+     * 
+ * + * string architecture = 3; + * @return The architecture. + */ + java.lang.String getArchitecture(); + /** + *
+     * Architecture name of the platform (e.g., `avr`).
+     * 
+ * + * string architecture = 3; + * @return The bytes for architecture. + */ + com.google.protobuf.ByteString + getArchitectureBytes(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.PlatformUpgradeReq} + */ + public static final class PlatformUpgradeReq extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.PlatformUpgradeReq) + PlatformUpgradeReqOrBuilder { + private static final long serialVersionUID = 0L; + // Use PlatformUpgradeReq.newBuilder() to construct. + private PlatformUpgradeReq(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PlatformUpgradeReq() { + platformPackage_ = ""; + architecture_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PlatformUpgradeReq(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PlatformUpgradeReq( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cc.arduino.cli.commands.Common.Instance.Builder subBuilder = null; + if (instance_ != null) { + subBuilder = instance_.toBuilder(); + } + instance_ = input.readMessage(cc.arduino.cli.commands.Common.Instance.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instance_); + instance_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + platformPackage_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + architecture_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformUpgradeReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformUpgradeReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Core.PlatformUpgradeReq.class, cc.arduino.cli.commands.Core.PlatformUpgradeReq.Builder.class); + } + + public static final int INSTANCE_FIELD_NUMBER = 1; + private cc.arduino.cli.commands.Common.Instance instance_; + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instance_ != null; + } + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + return getInstance(); + } + + public static final int PLATFORM_PACKAGE_FIELD_NUMBER = 2; + private volatile java.lang.Object platformPackage_; + /** + *
+     * Vendor name of the platform (e.g., `arduino`).
+     * 
+ * + * string platform_package = 2; + * @return The platformPackage. + */ + public java.lang.String getPlatformPackage() { + java.lang.Object ref = platformPackage_; + 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(); + platformPackage_ = s; + return s; + } + } + /** + *
+     * Vendor name of the platform (e.g., `arduino`).
+     * 
+ * + * string platform_package = 2; + * @return The bytes for platformPackage. + */ + public com.google.protobuf.ByteString + getPlatformPackageBytes() { + java.lang.Object ref = platformPackage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + platformPackage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ARCHITECTURE_FIELD_NUMBER = 3; + private volatile java.lang.Object architecture_; + /** + *
+     * Architecture name of the platform (e.g., `avr`).
+     * 
+ * + * string architecture = 3; + * @return The architecture. + */ + public java.lang.String getArchitecture() { + java.lang.Object ref = architecture_; + 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(); + architecture_ = s; + return s; + } + } + /** + *
+     * Architecture name of the platform (e.g., `avr`).
+     * 
+ * + * string architecture = 3; + * @return The bytes for architecture. + */ + public com.google.protobuf.ByteString + getArchitectureBytes() { + java.lang.Object ref = architecture_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + architecture_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (instance_ != null) { + output.writeMessage(1, getInstance()); + } + if (!getPlatformPackageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, platformPackage_); + } + if (!getArchitectureBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, architecture_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (instance_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInstance()); + } + if (!getPlatformPackageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, platformPackage_); + } + if (!getArchitectureBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, architecture_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Core.PlatformUpgradeReq)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Core.PlatformUpgradeReq other = (cc.arduino.cli.commands.Core.PlatformUpgradeReq) obj; + + if (hasInstance() != other.hasInstance()) return false; + if (hasInstance()) { + if (!getInstance() + .equals(other.getInstance())) return false; + } + if (!getPlatformPackage() + .equals(other.getPlatformPackage())) return false; + if (!getArchitecture() + .equals(other.getArchitecture())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInstance()) { + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + } + hash = (37 * hash) + PLATFORM_PACKAGE_FIELD_NUMBER; + hash = (53 * hash) + getPlatformPackage().hashCode(); + hash = (37 * hash) + ARCHITECTURE_FIELD_NUMBER; + hash = (53 * hash) + getArchitecture().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Core.PlatformUpgradeReq parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Core.PlatformUpgradeReq parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformUpgradeReq parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Core.PlatformUpgradeReq parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformUpgradeReq parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Core.PlatformUpgradeReq parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformUpgradeReq parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Core.PlatformUpgradeReq parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformUpgradeReq parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Core.PlatformUpgradeReq parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformUpgradeReq parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Core.PlatformUpgradeReq parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Core.PlatformUpgradeReq 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.PlatformUpgradeReq} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.PlatformUpgradeReq) + cc.arduino.cli.commands.Core.PlatformUpgradeReqOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformUpgradeReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformUpgradeReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Core.PlatformUpgradeReq.class, cc.arduino.cli.commands.Core.PlatformUpgradeReq.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Core.PlatformUpgradeReq.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (instanceBuilder_ == null) { + instance_ = null; + } else { + instance_ = null; + instanceBuilder_ = null; + } + platformPackage_ = ""; + + architecture_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformUpgradeReq_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformUpgradeReq getDefaultInstanceForType() { + return cc.arduino.cli.commands.Core.PlatformUpgradeReq.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformUpgradeReq build() { + cc.arduino.cli.commands.Core.PlatformUpgradeReq result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformUpgradeReq buildPartial() { + cc.arduino.cli.commands.Core.PlatformUpgradeReq result = new cc.arduino.cli.commands.Core.PlatformUpgradeReq(this); + if (instanceBuilder_ == null) { + result.instance_ = instance_; + } else { + result.instance_ = instanceBuilder_.build(); + } + result.platformPackage_ = platformPackage_; + result.architecture_ = architecture_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Core.PlatformUpgradeReq) { + return mergeFrom((cc.arduino.cli.commands.Core.PlatformUpgradeReq)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Core.PlatformUpgradeReq other) { + if (other == cc.arduino.cli.commands.Core.PlatformUpgradeReq.getDefaultInstance()) return this; + if (other.hasInstance()) { + mergeInstance(other.getInstance()); + } + if (!other.getPlatformPackage().isEmpty()) { + platformPackage_ = other.platformPackage_; + onChanged(); + } + if (!other.getArchitecture().isEmpty()) { + architecture_ = other.architecture_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Core.PlatformUpgradeReq parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Core.PlatformUpgradeReq) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private cc.arduino.cli.commands.Common.Instance instance_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> instanceBuilder_; + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instanceBuilder_ != null || instance_ != null; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + if (instanceBuilder_ == null) { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } else { + return instanceBuilder_.getMessage(); + } + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + onChanged(); + } else { + instanceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance( + cc.arduino.cli.commands.Common.Instance.Builder builderForValue) { + if (instanceBuilder_ == null) { + instance_ = builderForValue.build(); + onChanged(); + } else { + instanceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder mergeInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (instance_ != null) { + instance_ = + cc.arduino.cli.commands.Common.Instance.newBuilder(instance_).mergeFrom(value).buildPartial(); + } else { + instance_ = value; + } + onChanged(); + } else { + instanceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder clearInstance() { + if (instanceBuilder_ == null) { + instance_ = null; + onChanged(); + } else { + instance_ = null; + instanceBuilder_ = null; + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.Instance.Builder getInstanceBuilder() { + + onChanged(); + return getInstanceFieldBuilder().getBuilder(); + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + if (instanceBuilder_ != null) { + return instanceBuilder_.getMessageOrBuilder(); + } else { + return instance_ == null ? + cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> + getInstanceFieldBuilder() { + if (instanceBuilder_ == null) { + instanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder>( + getInstance(), + getParentForChildren(), + isClean()); + instance_ = null; + } + return instanceBuilder_; + } + + private java.lang.Object platformPackage_ = ""; + /** + *
+       * Vendor name of the platform (e.g., `arduino`).
+       * 
+ * + * string platform_package = 2; + * @return The platformPackage. + */ + public java.lang.String getPlatformPackage() { + java.lang.Object ref = platformPackage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + platformPackage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Vendor name of the platform (e.g., `arduino`).
+       * 
+ * + * string platform_package = 2; + * @return The bytes for platformPackage. + */ + public com.google.protobuf.ByteString + getPlatformPackageBytes() { + java.lang.Object ref = platformPackage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + platformPackage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Vendor name of the platform (e.g., `arduino`).
+       * 
+ * + * string platform_package = 2; + * @param value The platformPackage to set. + * @return This builder for chaining. + */ + public Builder setPlatformPackage( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + platformPackage_ = value; + onChanged(); + return this; + } + /** + *
+       * Vendor name of the platform (e.g., `arduino`).
+       * 
+ * + * string platform_package = 2; + * @return This builder for chaining. + */ + public Builder clearPlatformPackage() { + + platformPackage_ = getDefaultInstance().getPlatformPackage(); + onChanged(); + return this; + } + /** + *
+       * Vendor name of the platform (e.g., `arduino`).
+       * 
+ * + * string platform_package = 2; + * @param value The bytes for platformPackage to set. + * @return This builder for chaining. + */ + public Builder setPlatformPackageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + platformPackage_ = value; + onChanged(); + return this; + } + + private java.lang.Object architecture_ = ""; + /** + *
+       * Architecture name of the platform (e.g., `avr`).
+       * 
+ * + * string architecture = 3; + * @return The architecture. + */ + public java.lang.String getArchitecture() { + java.lang.Object ref = architecture_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + architecture_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Architecture name of the platform (e.g., `avr`).
+       * 
+ * + * string architecture = 3; + * @return The bytes for architecture. + */ + public com.google.protobuf.ByteString + getArchitectureBytes() { + java.lang.Object ref = architecture_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + architecture_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Architecture name of the platform (e.g., `avr`).
+       * 
+ * + * string architecture = 3; + * @param value The architecture to set. + * @return This builder for chaining. + */ + public Builder setArchitecture( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + architecture_ = value; + onChanged(); + return this; + } + /** + *
+       * Architecture name of the platform (e.g., `avr`).
+       * 
+ * + * string architecture = 3; + * @return This builder for chaining. + */ + public Builder clearArchitecture() { + + architecture_ = getDefaultInstance().getArchitecture(); + onChanged(); + return this; + } + /** + *
+       * Architecture name of the platform (e.g., `avr`).
+       * 
+ * + * string architecture = 3; + * @param value The bytes for architecture to set. + * @return This builder for chaining. + */ + public Builder setArchitectureBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + architecture_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.PlatformUpgradeReq) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.PlatformUpgradeReq) + private static final cc.arduino.cli.commands.Core.PlatformUpgradeReq DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Core.PlatformUpgradeReq(); + } + + public static cc.arduino.cli.commands.Core.PlatformUpgradeReq getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PlatformUpgradeReq parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PlatformUpgradeReq(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformUpgradeReq getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PlatformUpgradeRespOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.PlatformUpgradeResp) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Progress of the downloads of the platform and tool files.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + * @return Whether the progress field is set. + */ + boolean hasProgress(); + /** + *
+     * Progress of the downloads of the platform and tool files.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + * @return The progress. + */ + cc.arduino.cli.commands.Common.DownloadProgress getProgress(); + /** + *
+     * Progress of the downloads of the platform and tool files.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + cc.arduino.cli.commands.Common.DownloadProgressOrBuilder getProgressOrBuilder(); + + /** + *
+     * Description of the current stage of the upgrade.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + * @return Whether the taskProgress field is set. + */ + boolean hasTaskProgress(); + /** + *
+     * Description of the current stage of the upgrade.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + * @return The taskProgress. + */ + cc.arduino.cli.commands.Common.TaskProgress getTaskProgress(); + /** + *
+     * Description of the current stage of the upgrade.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + */ + cc.arduino.cli.commands.Common.TaskProgressOrBuilder getTaskProgressOrBuilder(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.PlatformUpgradeResp} + */ + public static final class PlatformUpgradeResp extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.PlatformUpgradeResp) + PlatformUpgradeRespOrBuilder { + private static final long serialVersionUID = 0L; + // Use PlatformUpgradeResp.newBuilder() to construct. + private PlatformUpgradeResp(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PlatformUpgradeResp() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PlatformUpgradeResp(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PlatformUpgradeResp( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cc.arduino.cli.commands.Common.DownloadProgress.Builder subBuilder = null; + if (progress_ != null) { + subBuilder = progress_.toBuilder(); + } + progress_ = input.readMessage(cc.arduino.cli.commands.Common.DownloadProgress.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(progress_); + progress_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + 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; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformUpgradeResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformUpgradeResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Core.PlatformUpgradeResp.class, cc.arduino.cli.commands.Core.PlatformUpgradeResp.Builder.class); + } + + public static final int PROGRESS_FIELD_NUMBER = 1; + private cc.arduino.cli.commands.Common.DownloadProgress progress_; + /** + *
+     * Progress of the downloads of the platform and tool files.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + * @return Whether the progress field is set. + */ + public boolean hasProgress() { + return progress_ != null; + } + /** + *
+     * Progress of the downloads of the platform and tool files.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + * @return The progress. + */ + public cc.arduino.cli.commands.Common.DownloadProgress getProgress() { + return progress_ == null ? cc.arduino.cli.commands.Common.DownloadProgress.getDefaultInstance() : progress_; + } + /** + *
+     * Progress of the downloads of the platform and tool files.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + public cc.arduino.cli.commands.Common.DownloadProgressOrBuilder getProgressOrBuilder() { + return getProgress(); + } + + public static final int TASK_PROGRESS_FIELD_NUMBER = 2; + private cc.arduino.cli.commands.Common.TaskProgress taskProgress_; + /** + *
+     * Description of the current stage of the upgrade.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + * @return Whether the taskProgress field is set. + */ + public boolean hasTaskProgress() { + return taskProgress_ != null; + } + /** + *
+     * Description of the current stage of the upgrade.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + * @return The taskProgress. + */ + public cc.arduino.cli.commands.Common.TaskProgress getTaskProgress() { + return taskProgress_ == null ? cc.arduino.cli.commands.Common.TaskProgress.getDefaultInstance() : taskProgress_; + } + /** + *
+     * Description of the current stage of the upgrade.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + */ + public cc.arduino.cli.commands.Common.TaskProgressOrBuilder getTaskProgressOrBuilder() { + return getTaskProgress(); + } + + 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 (progress_ != null) { + output.writeMessage(1, getProgress()); + } + if (taskProgress_ != null) { + output.writeMessage(2, getTaskProgress()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (progress_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProgress()); + } + if (taskProgress_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getTaskProgress()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Core.PlatformUpgradeResp)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Core.PlatformUpgradeResp other = (cc.arduino.cli.commands.Core.PlatformUpgradeResp) obj; + + if (hasProgress() != other.hasProgress()) return false; + if (hasProgress()) { + if (!getProgress() + .equals(other.getProgress())) return false; + } + if (hasTaskProgress() != other.hasTaskProgress()) return false; + if (hasTaskProgress()) { + if (!getTaskProgress() + .equals(other.getTaskProgress())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProgress()) { + hash = (37 * hash) + PROGRESS_FIELD_NUMBER; + hash = (53 * hash) + getProgress().hashCode(); + } + if (hasTaskProgress()) { + hash = (37 * hash) + TASK_PROGRESS_FIELD_NUMBER; + hash = (53 * hash) + getTaskProgress().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Core.PlatformUpgradeResp parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Core.PlatformUpgradeResp parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformUpgradeResp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Core.PlatformUpgradeResp parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformUpgradeResp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Core.PlatformUpgradeResp parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformUpgradeResp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Core.PlatformUpgradeResp parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformUpgradeResp parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Core.PlatformUpgradeResp parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformUpgradeResp parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Core.PlatformUpgradeResp parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Core.PlatformUpgradeResp 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.PlatformUpgradeResp} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.PlatformUpgradeResp) + cc.arduino.cli.commands.Core.PlatformUpgradeRespOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformUpgradeResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformUpgradeResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Core.PlatformUpgradeResp.class, cc.arduino.cli.commands.Core.PlatformUpgradeResp.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Core.PlatformUpgradeResp.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (progressBuilder_ == null) { + progress_ = null; + } else { + progress_ = null; + progressBuilder_ = null; + } + if (taskProgressBuilder_ == null) { + taskProgress_ = null; + } else { + taskProgress_ = null; + taskProgressBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformUpgradeResp_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformUpgradeResp getDefaultInstanceForType() { + return cc.arduino.cli.commands.Core.PlatformUpgradeResp.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformUpgradeResp build() { + cc.arduino.cli.commands.Core.PlatformUpgradeResp result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformUpgradeResp buildPartial() { + cc.arduino.cli.commands.Core.PlatformUpgradeResp result = new cc.arduino.cli.commands.Core.PlatformUpgradeResp(this); + if (progressBuilder_ == null) { + result.progress_ = progress_; + } else { + result.progress_ = progressBuilder_.build(); + } + if (taskProgressBuilder_ == null) { + result.taskProgress_ = taskProgress_; + } else { + result.taskProgress_ = taskProgressBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Core.PlatformUpgradeResp) { + return mergeFrom((cc.arduino.cli.commands.Core.PlatformUpgradeResp)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Core.PlatformUpgradeResp other) { + if (other == cc.arduino.cli.commands.Core.PlatformUpgradeResp.getDefaultInstance()) return this; + if (other.hasProgress()) { + mergeProgress(other.getProgress()); + } + if (other.hasTaskProgress()) { + mergeTaskProgress(other.getTaskProgress()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Core.PlatformUpgradeResp parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Core.PlatformUpgradeResp) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private cc.arduino.cli.commands.Common.DownloadProgress progress_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.DownloadProgress, cc.arduino.cli.commands.Common.DownloadProgress.Builder, cc.arduino.cli.commands.Common.DownloadProgressOrBuilder> progressBuilder_; + /** + *
+       * Progress of the downloads of the platform and tool files.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + * @return Whether the progress field is set. + */ + public boolean hasProgress() { + return progressBuilder_ != null || progress_ != null; + } + /** + *
+       * Progress of the downloads of the platform and tool files.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + * @return The progress. + */ + public cc.arduino.cli.commands.Common.DownloadProgress getProgress() { + if (progressBuilder_ == null) { + return progress_ == null ? cc.arduino.cli.commands.Common.DownloadProgress.getDefaultInstance() : progress_; + } else { + return progressBuilder_.getMessage(); + } + } + /** + *
+       * Progress of the downloads of the platform and tool files.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + public Builder setProgress(cc.arduino.cli.commands.Common.DownloadProgress value) { + if (progressBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + progress_ = value; + onChanged(); + } else { + progressBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Progress of the downloads of the platform and tool files.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + public Builder setProgress( + cc.arduino.cli.commands.Common.DownloadProgress.Builder builderForValue) { + if (progressBuilder_ == null) { + progress_ = builderForValue.build(); + onChanged(); + } else { + progressBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Progress of the downloads of the platform and tool files.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + public Builder mergeProgress(cc.arduino.cli.commands.Common.DownloadProgress value) { + if (progressBuilder_ == null) { + if (progress_ != null) { + progress_ = + cc.arduino.cli.commands.Common.DownloadProgress.newBuilder(progress_).mergeFrom(value).buildPartial(); + } else { + progress_ = value; + } + onChanged(); + } else { + progressBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Progress of the downloads of the platform and tool files.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + public Builder clearProgress() { + if (progressBuilder_ == null) { + progress_ = null; + onChanged(); + } else { + progress_ = null; + progressBuilder_ = null; + } + + return this; + } + /** + *
+       * Progress of the downloads of the platform and tool files.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + public cc.arduino.cli.commands.Common.DownloadProgress.Builder getProgressBuilder() { + + onChanged(); + return getProgressFieldBuilder().getBuilder(); + } + /** + *
+       * Progress of the downloads of the platform and tool files.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + public cc.arduino.cli.commands.Common.DownloadProgressOrBuilder getProgressOrBuilder() { + if (progressBuilder_ != null) { + return progressBuilder_.getMessageOrBuilder(); + } else { + return progress_ == null ? + cc.arduino.cli.commands.Common.DownloadProgress.getDefaultInstance() : progress_; + } + } + /** + *
+       * Progress of the downloads of the platform and tool files.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.DownloadProgress, cc.arduino.cli.commands.Common.DownloadProgress.Builder, cc.arduino.cli.commands.Common.DownloadProgressOrBuilder> + getProgressFieldBuilder() { + if (progressBuilder_ == null) { + progressBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.DownloadProgress, cc.arduino.cli.commands.Common.DownloadProgress.Builder, cc.arduino.cli.commands.Common.DownloadProgressOrBuilder>( + getProgress(), + getParentForChildren(), + isClean()); + progress_ = null; + } + return progressBuilder_; + } + + 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_; + /** + *
+       * Description of the current stage of the upgrade.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + * @return Whether the taskProgress field is set. + */ + public boolean hasTaskProgress() { + return taskProgressBuilder_ != null || taskProgress_ != null; + } + /** + *
+       * Description of the current stage of the upgrade.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + * @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(); + } + } + /** + *
+       * Description of the current stage of the upgrade.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + */ + 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; + } + /** + *
+       * Description of the current stage of the upgrade.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + */ + 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; + } + /** + *
+       * Description of the current stage of the upgrade.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + */ + 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; + } + /** + *
+       * Description of the current stage of the upgrade.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + */ + public Builder clearTaskProgress() { + if (taskProgressBuilder_ == null) { + taskProgress_ = null; + onChanged(); + } else { + taskProgress_ = null; + taskProgressBuilder_ = null; + } + + return this; + } + /** + *
+       * Description of the current stage of the upgrade.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + */ + public cc.arduino.cli.commands.Common.TaskProgress.Builder getTaskProgressBuilder() { + + onChanged(); + return getTaskProgressFieldBuilder().getBuilder(); + } + /** + *
+       * Description of the current stage of the upgrade.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + */ + 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_; + } + } + /** + *
+       * Description of the current stage of the upgrade.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + */ + 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_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.PlatformUpgradeResp) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.PlatformUpgradeResp) + private static final cc.arduino.cli.commands.Core.PlatformUpgradeResp DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Core.PlatformUpgradeResp(); + } + + public static cc.arduino.cli.commands.Core.PlatformUpgradeResp getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PlatformUpgradeResp parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PlatformUpgradeResp(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformUpgradeResp getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PlatformSearchReqOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.PlatformSearchReq) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + boolean hasInstance(); + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + cc.arduino.cli.commands.Common.Instance getInstance(); + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder(); + + /** + *
+     * Keywords for the search.
+     * 
+ * + * string search_args = 2; + * @return The searchArgs. + */ + java.lang.String getSearchArgs(); + /** + *
+     * Keywords for the search.
+     * 
+ * + * string search_args = 2; + * @return The bytes for searchArgs. + */ + com.google.protobuf.ByteString + getSearchArgsBytes(); + + /** + *
+     * Whether to show all available versions. `false` causes only the newest
+     * versions of the cores to be listed in the search results.
+     * 
+ * + * bool all_versions = 3; + * @return The allVersions. + */ + boolean getAllVersions(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.PlatformSearchReq} + */ + public static final class PlatformSearchReq extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.PlatformSearchReq) + PlatformSearchReqOrBuilder { + private static final long serialVersionUID = 0L; + // Use PlatformSearchReq.newBuilder() to construct. + private PlatformSearchReq(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PlatformSearchReq() { + searchArgs_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PlatformSearchReq(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PlatformSearchReq( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cc.arduino.cli.commands.Common.Instance.Builder subBuilder = null; + if (instance_ != null) { + subBuilder = instance_.toBuilder(); + } + instance_ = input.readMessage(cc.arduino.cli.commands.Common.Instance.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instance_); + instance_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + searchArgs_ = s; + break; + } + case 24: { + + allVersions_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformSearchReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformSearchReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Core.PlatformSearchReq.class, cc.arduino.cli.commands.Core.PlatformSearchReq.Builder.class); + } + + public static final int INSTANCE_FIELD_NUMBER = 1; + private cc.arduino.cli.commands.Common.Instance instance_; + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instance_ != null; + } + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + return getInstance(); + } + + public static final int SEARCH_ARGS_FIELD_NUMBER = 2; + private volatile java.lang.Object searchArgs_; + /** + *
+     * Keywords for the search.
+     * 
+ * + * string search_args = 2; + * @return The searchArgs. + */ + public java.lang.String getSearchArgs() { + java.lang.Object ref = searchArgs_; + 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(); + searchArgs_ = s; + return s; + } + } + /** + *
+     * Keywords for the search.
+     * 
+ * + * string search_args = 2; + * @return The bytes for searchArgs. + */ + public com.google.protobuf.ByteString + getSearchArgsBytes() { + java.lang.Object ref = searchArgs_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + searchArgs_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ALL_VERSIONS_FIELD_NUMBER = 3; + private boolean allVersions_; + /** + *
+     * Whether to show all available versions. `false` causes only the newest
+     * versions of the cores to be listed in the search results.
+     * 
+ * + * bool all_versions = 3; + * @return The allVersions. + */ + public boolean getAllVersions() { + return allVersions_; + } + + 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 (instance_ != null) { + output.writeMessage(1, getInstance()); + } + if (!getSearchArgsBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, searchArgs_); + } + if (allVersions_ != false) { + output.writeBool(3, allVersions_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (instance_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInstance()); + } + if (!getSearchArgsBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, searchArgs_); + } + if (allVersions_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, allVersions_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Core.PlatformSearchReq)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Core.PlatformSearchReq other = (cc.arduino.cli.commands.Core.PlatformSearchReq) obj; + + if (hasInstance() != other.hasInstance()) return false; + if (hasInstance()) { + if (!getInstance() + .equals(other.getInstance())) return false; + } + if (!getSearchArgs() + .equals(other.getSearchArgs())) return false; + if (getAllVersions() + != other.getAllVersions()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInstance()) { + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + } + hash = (37 * hash) + SEARCH_ARGS_FIELD_NUMBER; + hash = (53 * hash) + getSearchArgs().hashCode(); + hash = (37 * hash) + ALL_VERSIONS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getAllVersions()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Core.PlatformSearchReq parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Core.PlatformSearchReq parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformSearchReq parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Core.PlatformSearchReq parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformSearchReq parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Core.PlatformSearchReq parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformSearchReq parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Core.PlatformSearchReq parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformSearchReq parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Core.PlatformSearchReq parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformSearchReq parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Core.PlatformSearchReq parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Core.PlatformSearchReq 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.PlatformSearchReq} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.PlatformSearchReq) + cc.arduino.cli.commands.Core.PlatformSearchReqOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformSearchReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformSearchReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Core.PlatformSearchReq.class, cc.arduino.cli.commands.Core.PlatformSearchReq.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Core.PlatformSearchReq.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (instanceBuilder_ == null) { + instance_ = null; + } else { + instance_ = null; + instanceBuilder_ = null; + } + searchArgs_ = ""; + + allVersions_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformSearchReq_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformSearchReq getDefaultInstanceForType() { + return cc.arduino.cli.commands.Core.PlatformSearchReq.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformSearchReq build() { + cc.arduino.cli.commands.Core.PlatformSearchReq result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformSearchReq buildPartial() { + cc.arduino.cli.commands.Core.PlatformSearchReq result = new cc.arduino.cli.commands.Core.PlatformSearchReq(this); + if (instanceBuilder_ == null) { + result.instance_ = instance_; + } else { + result.instance_ = instanceBuilder_.build(); + } + result.searchArgs_ = searchArgs_; + result.allVersions_ = allVersions_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Core.PlatformSearchReq) { + return mergeFrom((cc.arduino.cli.commands.Core.PlatformSearchReq)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Core.PlatformSearchReq other) { + if (other == cc.arduino.cli.commands.Core.PlatformSearchReq.getDefaultInstance()) return this; + if (other.hasInstance()) { + mergeInstance(other.getInstance()); + } + if (!other.getSearchArgs().isEmpty()) { + searchArgs_ = other.searchArgs_; + onChanged(); + } + if (other.getAllVersions() != false) { + setAllVersions(other.getAllVersions()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Core.PlatformSearchReq parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Core.PlatformSearchReq) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private cc.arduino.cli.commands.Common.Instance instance_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> instanceBuilder_; + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instanceBuilder_ != null || instance_ != null; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + if (instanceBuilder_ == null) { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } else { + return instanceBuilder_.getMessage(); + } + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + onChanged(); + } else { + instanceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance( + cc.arduino.cli.commands.Common.Instance.Builder builderForValue) { + if (instanceBuilder_ == null) { + instance_ = builderForValue.build(); + onChanged(); + } else { + instanceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder mergeInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (instance_ != null) { + instance_ = + cc.arduino.cli.commands.Common.Instance.newBuilder(instance_).mergeFrom(value).buildPartial(); + } else { + instance_ = value; + } + onChanged(); + } else { + instanceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder clearInstance() { + if (instanceBuilder_ == null) { + instance_ = null; + onChanged(); + } else { + instance_ = null; + instanceBuilder_ = null; + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.Instance.Builder getInstanceBuilder() { + + onChanged(); + return getInstanceFieldBuilder().getBuilder(); + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + if (instanceBuilder_ != null) { + return instanceBuilder_.getMessageOrBuilder(); + } else { + return instance_ == null ? + cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> + getInstanceFieldBuilder() { + if (instanceBuilder_ == null) { + instanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder>( + getInstance(), + getParentForChildren(), + isClean()); + instance_ = null; + } + return instanceBuilder_; + } + + private java.lang.Object searchArgs_ = ""; + /** + *
+       * Keywords for the search.
+       * 
+ * + * string search_args = 2; + * @return The searchArgs. + */ + public java.lang.String getSearchArgs() { + java.lang.Object ref = searchArgs_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + searchArgs_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Keywords for the search.
+       * 
+ * + * string search_args = 2; + * @return The bytes for searchArgs. + */ + public com.google.protobuf.ByteString + getSearchArgsBytes() { + java.lang.Object ref = searchArgs_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + searchArgs_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Keywords for the search.
+       * 
+ * + * string search_args = 2; + * @param value The searchArgs to set. + * @return This builder for chaining. + */ + public Builder setSearchArgs( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + searchArgs_ = value; + onChanged(); + return this; + } + /** + *
+       * Keywords for the search.
+       * 
+ * + * string search_args = 2; + * @return This builder for chaining. + */ + public Builder clearSearchArgs() { + + searchArgs_ = getDefaultInstance().getSearchArgs(); + onChanged(); + return this; + } + /** + *
+       * Keywords for the search.
+       * 
+ * + * string search_args = 2; + * @param value The bytes for searchArgs to set. + * @return This builder for chaining. + */ + public Builder setSearchArgsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + searchArgs_ = value; + onChanged(); + return this; + } + + private boolean allVersions_ ; + /** + *
+       * Whether to show all available versions. `false` causes only the newest
+       * versions of the cores to be listed in the search results.
+       * 
+ * + * bool all_versions = 3; + * @return The allVersions. + */ + public boolean getAllVersions() { + return allVersions_; + } + /** + *
+       * Whether to show all available versions. `false` causes only the newest
+       * versions of the cores to be listed in the search results.
+       * 
+ * + * bool all_versions = 3; + * @param value The allVersions to set. + * @return This builder for chaining. + */ + public Builder setAllVersions(boolean value) { + + allVersions_ = value; + onChanged(); + return this; + } + /** + *
+       * Whether to show all available versions. `false` causes only the newest
+       * versions of the cores to be listed in the search results.
+       * 
+ * + * bool all_versions = 3; + * @return This builder for chaining. + */ + public Builder clearAllVersions() { + + allVersions_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.PlatformSearchReq) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.PlatformSearchReq) + private static final cc.arduino.cli.commands.Core.PlatformSearchReq DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Core.PlatformSearchReq(); + } + + public static cc.arduino.cli.commands.Core.PlatformSearchReq getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PlatformSearchReq parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PlatformSearchReq(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformSearchReq getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PlatformSearchRespOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.PlatformSearchResp) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Results of the search.
+     * 
+ * + * repeated .cc.arduino.cli.commands.Platform search_output = 1; + */ + java.util.List + getSearchOutputList(); + /** + *
+     * Results of the search.
+     * 
+ * + * repeated .cc.arduino.cli.commands.Platform search_output = 1; + */ + cc.arduino.cli.commands.Core.Platform getSearchOutput(int index); + /** + *
+     * Results of the search.
+     * 
+ * + * repeated .cc.arduino.cli.commands.Platform search_output = 1; + */ + int getSearchOutputCount(); + /** + *
+     * Results of the search.
+     * 
+ * + * repeated .cc.arduino.cli.commands.Platform search_output = 1; + */ + java.util.List + getSearchOutputOrBuilderList(); + /** + *
+     * Results of the search.
+     * 
+ * + * repeated .cc.arduino.cli.commands.Platform search_output = 1; + */ + cc.arduino.cli.commands.Core.PlatformOrBuilder getSearchOutputOrBuilder( + int index); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.PlatformSearchResp} + */ + public static final class PlatformSearchResp extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.PlatformSearchResp) + PlatformSearchRespOrBuilder { + private static final long serialVersionUID = 0L; + // Use PlatformSearchResp.newBuilder() to construct. + private PlatformSearchResp(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PlatformSearchResp() { + searchOutput_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PlatformSearchResp(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PlatformSearchResp( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + searchOutput_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + searchOutput_.add( + input.readMessage(cc.arduino.cli.commands.Core.Platform.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + searchOutput_ = java.util.Collections.unmodifiableList(searchOutput_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformSearchResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformSearchResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Core.PlatformSearchResp.class, cc.arduino.cli.commands.Core.PlatformSearchResp.Builder.class); + } + + public static final int SEARCH_OUTPUT_FIELD_NUMBER = 1; + private java.util.List searchOutput_; + /** + *
+     * Results of the search.
+     * 
+ * + * repeated .cc.arduino.cli.commands.Platform search_output = 1; + */ + public java.util.List getSearchOutputList() { + return searchOutput_; + } + /** + *
+     * Results of the search.
+     * 
+ * + * repeated .cc.arduino.cli.commands.Platform search_output = 1; + */ + public java.util.List + getSearchOutputOrBuilderList() { + return searchOutput_; + } + /** + *
+     * Results of the search.
+     * 
+ * + * repeated .cc.arduino.cli.commands.Platform search_output = 1; + */ + public int getSearchOutputCount() { + return searchOutput_.size(); + } + /** + *
+     * Results of the search.
+     * 
+ * + * repeated .cc.arduino.cli.commands.Platform search_output = 1; + */ + public cc.arduino.cli.commands.Core.Platform getSearchOutput(int index) { + return searchOutput_.get(index); + } + /** + *
+     * Results of the search.
+     * 
+ * + * repeated .cc.arduino.cli.commands.Platform search_output = 1; + */ + public cc.arduino.cli.commands.Core.PlatformOrBuilder getSearchOutputOrBuilder( + int index) { + return searchOutput_.get(index); + } + + 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 < searchOutput_.size(); i++) { + output.writeMessage(1, searchOutput_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < searchOutput_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, searchOutput_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Core.PlatformSearchResp)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Core.PlatformSearchResp other = (cc.arduino.cli.commands.Core.PlatformSearchResp) obj; + + if (!getSearchOutputList() + .equals(other.getSearchOutputList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getSearchOutputCount() > 0) { + hash = (37 * hash) + SEARCH_OUTPUT_FIELD_NUMBER; + hash = (53 * hash) + getSearchOutputList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Core.PlatformSearchResp parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Core.PlatformSearchResp parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformSearchResp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Core.PlatformSearchResp parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformSearchResp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Core.PlatformSearchResp parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformSearchResp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Core.PlatformSearchResp parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformSearchResp parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Core.PlatformSearchResp parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformSearchResp parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Core.PlatformSearchResp parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Core.PlatformSearchResp 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.PlatformSearchResp} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.PlatformSearchResp) + cc.arduino.cli.commands.Core.PlatformSearchRespOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformSearchResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformSearchResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Core.PlatformSearchResp.class, cc.arduino.cli.commands.Core.PlatformSearchResp.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Core.PlatformSearchResp.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getSearchOutputFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (searchOutputBuilder_ == null) { + searchOutput_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + searchOutputBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformSearchResp_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformSearchResp getDefaultInstanceForType() { + return cc.arduino.cli.commands.Core.PlatformSearchResp.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformSearchResp build() { + cc.arduino.cli.commands.Core.PlatformSearchResp result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformSearchResp buildPartial() { + cc.arduino.cli.commands.Core.PlatformSearchResp result = new cc.arduino.cli.commands.Core.PlatformSearchResp(this); + int from_bitField0_ = bitField0_; + if (searchOutputBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + searchOutput_ = java.util.Collections.unmodifiableList(searchOutput_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.searchOutput_ = searchOutput_; + } else { + result.searchOutput_ = searchOutputBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Core.PlatformSearchResp) { + return mergeFrom((cc.arduino.cli.commands.Core.PlatformSearchResp)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Core.PlatformSearchResp other) { + if (other == cc.arduino.cli.commands.Core.PlatformSearchResp.getDefaultInstance()) return this; + if (searchOutputBuilder_ == null) { + if (!other.searchOutput_.isEmpty()) { + if (searchOutput_.isEmpty()) { + searchOutput_ = other.searchOutput_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSearchOutputIsMutable(); + searchOutput_.addAll(other.searchOutput_); + } + onChanged(); + } + } else { + if (!other.searchOutput_.isEmpty()) { + if (searchOutputBuilder_.isEmpty()) { + searchOutputBuilder_.dispose(); + searchOutputBuilder_ = null; + searchOutput_ = other.searchOutput_; + bitField0_ = (bitField0_ & ~0x00000001); + searchOutputBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSearchOutputFieldBuilder() : null; + } else { + searchOutputBuilder_.addAllMessages(other.searchOutput_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Core.PlatformSearchResp parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Core.PlatformSearchResp) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List searchOutput_ = + java.util.Collections.emptyList(); + private void ensureSearchOutputIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + searchOutput_ = new java.util.ArrayList(searchOutput_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Core.Platform, cc.arduino.cli.commands.Core.Platform.Builder, cc.arduino.cli.commands.Core.PlatformOrBuilder> searchOutputBuilder_; + + /** + *
+       * Results of the search.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Platform search_output = 1; + */ + public java.util.List getSearchOutputList() { + if (searchOutputBuilder_ == null) { + return java.util.Collections.unmodifiableList(searchOutput_); + } else { + return searchOutputBuilder_.getMessageList(); + } + } + /** + *
+       * Results of the search.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Platform search_output = 1; + */ + public int getSearchOutputCount() { + if (searchOutputBuilder_ == null) { + return searchOutput_.size(); + } else { + return searchOutputBuilder_.getCount(); + } + } + /** + *
+       * Results of the search.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Platform search_output = 1; + */ + public cc.arduino.cli.commands.Core.Platform getSearchOutput(int index) { + if (searchOutputBuilder_ == null) { + return searchOutput_.get(index); + } else { + return searchOutputBuilder_.getMessage(index); + } + } + /** + *
+       * Results of the search.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Platform search_output = 1; + */ + public Builder setSearchOutput( + int index, cc.arduino.cli.commands.Core.Platform value) { + if (searchOutputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSearchOutputIsMutable(); + searchOutput_.set(index, value); + onChanged(); + } else { + searchOutputBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Results of the search.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Platform search_output = 1; + */ + public Builder setSearchOutput( + int index, cc.arduino.cli.commands.Core.Platform.Builder builderForValue) { + if (searchOutputBuilder_ == null) { + ensureSearchOutputIsMutable(); + searchOutput_.set(index, builderForValue.build()); + onChanged(); + } else { + searchOutputBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Results of the search.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Platform search_output = 1; + */ + public Builder addSearchOutput(cc.arduino.cli.commands.Core.Platform value) { + if (searchOutputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSearchOutputIsMutable(); + searchOutput_.add(value); + onChanged(); + } else { + searchOutputBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Results of the search.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Platform search_output = 1; + */ + public Builder addSearchOutput( + int index, cc.arduino.cli.commands.Core.Platform value) { + if (searchOutputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSearchOutputIsMutable(); + searchOutput_.add(index, value); + onChanged(); + } else { + searchOutputBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Results of the search.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Platform search_output = 1; + */ + public Builder addSearchOutput( + cc.arduino.cli.commands.Core.Platform.Builder builderForValue) { + if (searchOutputBuilder_ == null) { + ensureSearchOutputIsMutable(); + searchOutput_.add(builderForValue.build()); + onChanged(); + } else { + searchOutputBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Results of the search.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Platform search_output = 1; + */ + public Builder addSearchOutput( + int index, cc.arduino.cli.commands.Core.Platform.Builder builderForValue) { + if (searchOutputBuilder_ == null) { + ensureSearchOutputIsMutable(); + searchOutput_.add(index, builderForValue.build()); + onChanged(); + } else { + searchOutputBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Results of the search.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Platform search_output = 1; + */ + public Builder addAllSearchOutput( + java.lang.Iterable values) { + if (searchOutputBuilder_ == null) { + ensureSearchOutputIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, searchOutput_); + onChanged(); + } else { + searchOutputBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Results of the search.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Platform search_output = 1; + */ + public Builder clearSearchOutput() { + if (searchOutputBuilder_ == null) { + searchOutput_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + searchOutputBuilder_.clear(); + } + return this; + } + /** + *
+       * Results of the search.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Platform search_output = 1; + */ + public Builder removeSearchOutput(int index) { + if (searchOutputBuilder_ == null) { + ensureSearchOutputIsMutable(); + searchOutput_.remove(index); + onChanged(); + } else { + searchOutputBuilder_.remove(index); + } + return this; + } + /** + *
+       * Results of the search.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Platform search_output = 1; + */ + public cc.arduino.cli.commands.Core.Platform.Builder getSearchOutputBuilder( + int index) { + return getSearchOutputFieldBuilder().getBuilder(index); + } + /** + *
+       * Results of the search.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Platform search_output = 1; + */ + public cc.arduino.cli.commands.Core.PlatformOrBuilder getSearchOutputOrBuilder( + int index) { + if (searchOutputBuilder_ == null) { + return searchOutput_.get(index); } else { + return searchOutputBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Results of the search.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Platform search_output = 1; + */ + public java.util.List + getSearchOutputOrBuilderList() { + if (searchOutputBuilder_ != null) { + return searchOutputBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(searchOutput_); + } + } + /** + *
+       * Results of the search.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Platform search_output = 1; + */ + public cc.arduino.cli.commands.Core.Platform.Builder addSearchOutputBuilder() { + return getSearchOutputFieldBuilder().addBuilder( + cc.arduino.cli.commands.Core.Platform.getDefaultInstance()); + } + /** + *
+       * Results of the search.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Platform search_output = 1; + */ + public cc.arduino.cli.commands.Core.Platform.Builder addSearchOutputBuilder( + int index) { + return getSearchOutputFieldBuilder().addBuilder( + index, cc.arduino.cli.commands.Core.Platform.getDefaultInstance()); + } + /** + *
+       * Results of the search.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Platform search_output = 1; + */ + public java.util.List + getSearchOutputBuilderList() { + return getSearchOutputFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Core.Platform, cc.arduino.cli.commands.Core.Platform.Builder, cc.arduino.cli.commands.Core.PlatformOrBuilder> + getSearchOutputFieldBuilder() { + if (searchOutputBuilder_ == null) { + searchOutputBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Core.Platform, cc.arduino.cli.commands.Core.Platform.Builder, cc.arduino.cli.commands.Core.PlatformOrBuilder>( + searchOutput_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + searchOutput_ = null; + } + return searchOutputBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.PlatformSearchResp) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.PlatformSearchResp) + private static final cc.arduino.cli.commands.Core.PlatformSearchResp DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Core.PlatformSearchResp(); + } + + public static cc.arduino.cli.commands.Core.PlatformSearchResp getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PlatformSearchResp parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PlatformSearchResp(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformSearchResp getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PlatformListReqOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.PlatformListReq) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + boolean hasInstance(); + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + cc.arduino.cli.commands.Common.Instance getInstance(); + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder(); + + /** + *
+     * Set to true to only list platforms which have a newer version available
+     * than the one currently installed.
+     * 
+ * + * bool updatable_only = 2; + * @return The updatableOnly. + */ + boolean getUpdatableOnly(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.PlatformListReq} + */ + public static final class PlatformListReq extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.PlatformListReq) + PlatformListReqOrBuilder { + private static final long serialVersionUID = 0L; + // Use PlatformListReq.newBuilder() to construct. + private PlatformListReq(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PlatformListReq() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PlatformListReq(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PlatformListReq( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cc.arduino.cli.commands.Common.Instance.Builder subBuilder = null; + if (instance_ != null) { + subBuilder = instance_.toBuilder(); + } + instance_ = input.readMessage(cc.arduino.cli.commands.Common.Instance.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instance_); + instance_ = subBuilder.buildPartial(); + } + + break; + } + case 16: { + + updatableOnly_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformListReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformListReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Core.PlatformListReq.class, cc.arduino.cli.commands.Core.PlatformListReq.Builder.class); + } + + public static final int INSTANCE_FIELD_NUMBER = 1; + private cc.arduino.cli.commands.Common.Instance instance_; + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instance_ != null; + } + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + return getInstance(); + } + + public static final int UPDATABLE_ONLY_FIELD_NUMBER = 2; + private boolean updatableOnly_; + /** + *
+     * Set to true to only list platforms which have a newer version available
+     * than the one currently installed.
+     * 
+ * + * bool updatable_only = 2; + * @return The updatableOnly. + */ + public boolean getUpdatableOnly() { + return updatableOnly_; + } + + 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 (instance_ != null) { + output.writeMessage(1, getInstance()); + } + if (updatableOnly_ != false) { + output.writeBool(2, updatableOnly_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (instance_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInstance()); + } + if (updatableOnly_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, updatableOnly_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Core.PlatformListReq)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Core.PlatformListReq other = (cc.arduino.cli.commands.Core.PlatformListReq) obj; + + if (hasInstance() != other.hasInstance()) return false; + if (hasInstance()) { + if (!getInstance() + .equals(other.getInstance())) return false; + } + if (getUpdatableOnly() + != other.getUpdatableOnly()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInstance()) { + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + } + hash = (37 * hash) + UPDATABLE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getUpdatableOnly()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Core.PlatformListReq parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Core.PlatformListReq parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformListReq parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Core.PlatformListReq parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformListReq parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Core.PlatformListReq parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformListReq parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Core.PlatformListReq parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformListReq parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Core.PlatformListReq parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformListReq parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Core.PlatformListReq parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Core.PlatformListReq 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.PlatformListReq} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.PlatformListReq) + cc.arduino.cli.commands.Core.PlatformListReqOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformListReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformListReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Core.PlatformListReq.class, cc.arduino.cli.commands.Core.PlatformListReq.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Core.PlatformListReq.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (instanceBuilder_ == null) { + instance_ = null; + } else { + instance_ = null; + instanceBuilder_ = null; + } + updatableOnly_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformListReq_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformListReq getDefaultInstanceForType() { + return cc.arduino.cli.commands.Core.PlatformListReq.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformListReq build() { + cc.arduino.cli.commands.Core.PlatformListReq result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformListReq buildPartial() { + cc.arduino.cli.commands.Core.PlatformListReq result = new cc.arduino.cli.commands.Core.PlatformListReq(this); + if (instanceBuilder_ == null) { + result.instance_ = instance_; + } else { + result.instance_ = instanceBuilder_.build(); + } + result.updatableOnly_ = updatableOnly_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Core.PlatformListReq) { + return mergeFrom((cc.arduino.cli.commands.Core.PlatformListReq)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Core.PlatformListReq other) { + if (other == cc.arduino.cli.commands.Core.PlatformListReq.getDefaultInstance()) return this; + if (other.hasInstance()) { + mergeInstance(other.getInstance()); + } + if (other.getUpdatableOnly() != false) { + setUpdatableOnly(other.getUpdatableOnly()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Core.PlatformListReq parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Core.PlatformListReq) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private cc.arduino.cli.commands.Common.Instance instance_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> instanceBuilder_; + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instanceBuilder_ != null || instance_ != null; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + if (instanceBuilder_ == null) { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } else { + return instanceBuilder_.getMessage(); + } + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + onChanged(); + } else { + instanceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance( + cc.arduino.cli.commands.Common.Instance.Builder builderForValue) { + if (instanceBuilder_ == null) { + instance_ = builderForValue.build(); + onChanged(); + } else { + instanceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder mergeInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (instance_ != null) { + instance_ = + cc.arduino.cli.commands.Common.Instance.newBuilder(instance_).mergeFrom(value).buildPartial(); + } else { + instance_ = value; + } + onChanged(); + } else { + instanceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder clearInstance() { + if (instanceBuilder_ == null) { + instance_ = null; + onChanged(); + } else { + instance_ = null; + instanceBuilder_ = null; + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.Instance.Builder getInstanceBuilder() { + + onChanged(); + return getInstanceFieldBuilder().getBuilder(); + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + if (instanceBuilder_ != null) { + return instanceBuilder_.getMessageOrBuilder(); + } else { + return instance_ == null ? + cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> + getInstanceFieldBuilder() { + if (instanceBuilder_ == null) { + instanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder>( + getInstance(), + getParentForChildren(), + isClean()); + instance_ = null; + } + return instanceBuilder_; + } + + private boolean updatableOnly_ ; + /** + *
+       * Set to true to only list platforms which have a newer version available
+       * than the one currently installed.
+       * 
+ * + * bool updatable_only = 2; + * @return The updatableOnly. + */ + public boolean getUpdatableOnly() { + return updatableOnly_; + } + /** + *
+       * Set to true to only list platforms which have a newer version available
+       * than the one currently installed.
+       * 
+ * + * bool updatable_only = 2; + * @param value The updatableOnly to set. + * @return This builder for chaining. + */ + public Builder setUpdatableOnly(boolean value) { + + updatableOnly_ = value; + onChanged(); + return this; + } + /** + *
+       * Set to true to only list platforms which have a newer version available
+       * than the one currently installed.
+       * 
+ * + * bool updatable_only = 2; + * @return This builder for chaining. + */ + public Builder clearUpdatableOnly() { + + updatableOnly_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.PlatformListReq) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.PlatformListReq) + private static final cc.arduino.cli.commands.Core.PlatformListReq DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Core.PlatformListReq(); + } + + public static cc.arduino.cli.commands.Core.PlatformListReq getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PlatformListReq parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PlatformListReq(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformListReq getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PlatformListRespOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.PlatformListResp) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The installed platforms.
+     * 
+ * + * repeated .cc.arduino.cli.commands.Platform installed_platform = 1; + */ + java.util.List + getInstalledPlatformList(); + /** + *
+     * The installed platforms.
+     * 
+ * + * repeated .cc.arduino.cli.commands.Platform installed_platform = 1; + */ + cc.arduino.cli.commands.Core.Platform getInstalledPlatform(int index); + /** + *
+     * The installed platforms.
+     * 
+ * + * repeated .cc.arduino.cli.commands.Platform installed_platform = 1; + */ + int getInstalledPlatformCount(); + /** + *
+     * The installed platforms.
+     * 
+ * + * repeated .cc.arduino.cli.commands.Platform installed_platform = 1; + */ + java.util.List + getInstalledPlatformOrBuilderList(); + /** + *
+     * The installed platforms.
+     * 
+ * + * repeated .cc.arduino.cli.commands.Platform installed_platform = 1; + */ + cc.arduino.cli.commands.Core.PlatformOrBuilder getInstalledPlatformOrBuilder( + int index); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.PlatformListResp} + */ + public static final class PlatformListResp extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.PlatformListResp) + PlatformListRespOrBuilder { + private static final long serialVersionUID = 0L; + // Use PlatformListResp.newBuilder() to construct. + private PlatformListResp(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PlatformListResp() { + installedPlatform_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PlatformListResp(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PlatformListResp( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + installedPlatform_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + installedPlatform_.add( + input.readMessage(cc.arduino.cli.commands.Core.Platform.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + installedPlatform_ = java.util.Collections.unmodifiableList(installedPlatform_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformListResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformListResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Core.PlatformListResp.class, cc.arduino.cli.commands.Core.PlatformListResp.Builder.class); + } + + public static final int INSTALLED_PLATFORM_FIELD_NUMBER = 1; + private java.util.List installedPlatform_; + /** + *
+     * The installed platforms.
+     * 
+ * + * repeated .cc.arduino.cli.commands.Platform installed_platform = 1; + */ + public java.util.List getInstalledPlatformList() { + return installedPlatform_; + } + /** + *
+     * The installed platforms.
+     * 
+ * + * repeated .cc.arduino.cli.commands.Platform installed_platform = 1; + */ + public java.util.List + getInstalledPlatformOrBuilderList() { + return installedPlatform_; + } + /** + *
+     * The installed platforms.
+     * 
+ * + * repeated .cc.arduino.cli.commands.Platform installed_platform = 1; + */ + public int getInstalledPlatformCount() { + return installedPlatform_.size(); + } + /** + *
+     * The installed platforms.
+     * 
+ * + * repeated .cc.arduino.cli.commands.Platform installed_platform = 1; + */ + public cc.arduino.cli.commands.Core.Platform getInstalledPlatform(int index) { + return installedPlatform_.get(index); + } + /** + *
+     * The installed platforms.
+     * 
+ * + * repeated .cc.arduino.cli.commands.Platform installed_platform = 1; + */ + public cc.arduino.cli.commands.Core.PlatformOrBuilder getInstalledPlatformOrBuilder( + int index) { + return installedPlatform_.get(index); + } + + 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 < installedPlatform_.size(); i++) { + output.writeMessage(1, installedPlatform_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < installedPlatform_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, installedPlatform_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Core.PlatformListResp)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Core.PlatformListResp other = (cc.arduino.cli.commands.Core.PlatformListResp) obj; + + if (!getInstalledPlatformList() + .equals(other.getInstalledPlatformList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getInstalledPlatformCount() > 0) { + hash = (37 * hash) + INSTALLED_PLATFORM_FIELD_NUMBER; + hash = (53 * hash) + getInstalledPlatformList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Core.PlatformListResp parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Core.PlatformListResp parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformListResp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Core.PlatformListResp parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformListResp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Core.PlatformListResp parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformListResp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Core.PlatformListResp parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformListResp parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Core.PlatformListResp parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.PlatformListResp parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Core.PlatformListResp parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Core.PlatformListResp 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.PlatformListResp} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.PlatformListResp) + cc.arduino.cli.commands.Core.PlatformListRespOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformListResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformListResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Core.PlatformListResp.class, cc.arduino.cli.commands.Core.PlatformListResp.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Core.PlatformListResp.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getInstalledPlatformFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (installedPlatformBuilder_ == null) { + installedPlatform_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + installedPlatformBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_PlatformListResp_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformListResp getDefaultInstanceForType() { + return cc.arduino.cli.commands.Core.PlatformListResp.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformListResp build() { + cc.arduino.cli.commands.Core.PlatformListResp result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformListResp buildPartial() { + cc.arduino.cli.commands.Core.PlatformListResp result = new cc.arduino.cli.commands.Core.PlatformListResp(this); + int from_bitField0_ = bitField0_; + if (installedPlatformBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + installedPlatform_ = java.util.Collections.unmodifiableList(installedPlatform_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.installedPlatform_ = installedPlatform_; + } else { + result.installedPlatform_ = installedPlatformBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Core.PlatformListResp) { + return mergeFrom((cc.arduino.cli.commands.Core.PlatformListResp)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Core.PlatformListResp other) { + if (other == cc.arduino.cli.commands.Core.PlatformListResp.getDefaultInstance()) return this; + if (installedPlatformBuilder_ == null) { + if (!other.installedPlatform_.isEmpty()) { + if (installedPlatform_.isEmpty()) { + installedPlatform_ = other.installedPlatform_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInstalledPlatformIsMutable(); + installedPlatform_.addAll(other.installedPlatform_); + } + onChanged(); + } + } else { + if (!other.installedPlatform_.isEmpty()) { + if (installedPlatformBuilder_.isEmpty()) { + installedPlatformBuilder_.dispose(); + installedPlatformBuilder_ = null; + installedPlatform_ = other.installedPlatform_; + bitField0_ = (bitField0_ & ~0x00000001); + installedPlatformBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getInstalledPlatformFieldBuilder() : null; + } else { + installedPlatformBuilder_.addAllMessages(other.installedPlatform_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Core.PlatformListResp parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Core.PlatformListResp) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List installedPlatform_ = + java.util.Collections.emptyList(); + private void ensureInstalledPlatformIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + installedPlatform_ = new java.util.ArrayList(installedPlatform_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Core.Platform, cc.arduino.cli.commands.Core.Platform.Builder, cc.arduino.cli.commands.Core.PlatformOrBuilder> installedPlatformBuilder_; + + /** + *
+       * The installed platforms.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Platform installed_platform = 1; + */ + public java.util.List getInstalledPlatformList() { + if (installedPlatformBuilder_ == null) { + return java.util.Collections.unmodifiableList(installedPlatform_); + } else { + return installedPlatformBuilder_.getMessageList(); + } + } + /** + *
+       * The installed platforms.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Platform installed_platform = 1; + */ + public int getInstalledPlatformCount() { + if (installedPlatformBuilder_ == null) { + return installedPlatform_.size(); + } else { + return installedPlatformBuilder_.getCount(); + } + } + /** + *
+       * The installed platforms.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Platform installed_platform = 1; + */ + public cc.arduino.cli.commands.Core.Platform getInstalledPlatform(int index) { + if (installedPlatformBuilder_ == null) { + return installedPlatform_.get(index); + } else { + return installedPlatformBuilder_.getMessage(index); + } + } + /** + *
+       * The installed platforms.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Platform installed_platform = 1; + */ + public Builder setInstalledPlatform( + int index, cc.arduino.cli.commands.Core.Platform value) { + if (installedPlatformBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstalledPlatformIsMutable(); + installedPlatform_.set(index, value); + onChanged(); + } else { + installedPlatformBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * The installed platforms.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Platform installed_platform = 1; + */ + public Builder setInstalledPlatform( + int index, cc.arduino.cli.commands.Core.Platform.Builder builderForValue) { + if (installedPlatformBuilder_ == null) { + ensureInstalledPlatformIsMutable(); + installedPlatform_.set(index, builderForValue.build()); + onChanged(); + } else { + installedPlatformBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * The installed platforms.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Platform installed_platform = 1; + */ + public Builder addInstalledPlatform(cc.arduino.cli.commands.Core.Platform value) { + if (installedPlatformBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstalledPlatformIsMutable(); + installedPlatform_.add(value); + onChanged(); + } else { + installedPlatformBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * The installed platforms.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Platform installed_platform = 1; + */ + public Builder addInstalledPlatform( + int index, cc.arduino.cli.commands.Core.Platform value) { + if (installedPlatformBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstalledPlatformIsMutable(); + installedPlatform_.add(index, value); + onChanged(); + } else { + installedPlatformBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * The installed platforms.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Platform installed_platform = 1; + */ + public Builder addInstalledPlatform( + cc.arduino.cli.commands.Core.Platform.Builder builderForValue) { + if (installedPlatformBuilder_ == null) { + ensureInstalledPlatformIsMutable(); + installedPlatform_.add(builderForValue.build()); + onChanged(); + } else { + installedPlatformBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * The installed platforms.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Platform installed_platform = 1; + */ + public Builder addInstalledPlatform( + int index, cc.arduino.cli.commands.Core.Platform.Builder builderForValue) { + if (installedPlatformBuilder_ == null) { + ensureInstalledPlatformIsMutable(); + installedPlatform_.add(index, builderForValue.build()); + onChanged(); + } else { + installedPlatformBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * The installed platforms.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Platform installed_platform = 1; + */ + public Builder addAllInstalledPlatform( + java.lang.Iterable values) { + if (installedPlatformBuilder_ == null) { + ensureInstalledPlatformIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, installedPlatform_); + onChanged(); + } else { + installedPlatformBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * The installed platforms.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Platform installed_platform = 1; + */ + public Builder clearInstalledPlatform() { + if (installedPlatformBuilder_ == null) { + installedPlatform_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + installedPlatformBuilder_.clear(); + } + return this; + } + /** + *
+       * The installed platforms.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Platform installed_platform = 1; + */ + public Builder removeInstalledPlatform(int index) { + if (installedPlatformBuilder_ == null) { + ensureInstalledPlatformIsMutable(); + installedPlatform_.remove(index); + onChanged(); + } else { + installedPlatformBuilder_.remove(index); + } + return this; + } + /** + *
+       * The installed platforms.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Platform installed_platform = 1; + */ + public cc.arduino.cli.commands.Core.Platform.Builder getInstalledPlatformBuilder( + int index) { + return getInstalledPlatformFieldBuilder().getBuilder(index); + } + /** + *
+       * The installed platforms.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Platform installed_platform = 1; + */ + public cc.arduino.cli.commands.Core.PlatformOrBuilder getInstalledPlatformOrBuilder( + int index) { + if (installedPlatformBuilder_ == null) { + return installedPlatform_.get(index); } else { + return installedPlatformBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * The installed platforms.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Platform installed_platform = 1; + */ + public java.util.List + getInstalledPlatformOrBuilderList() { + if (installedPlatformBuilder_ != null) { + return installedPlatformBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(installedPlatform_); + } + } + /** + *
+       * The installed platforms.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Platform installed_platform = 1; + */ + public cc.arduino.cli.commands.Core.Platform.Builder addInstalledPlatformBuilder() { + return getInstalledPlatformFieldBuilder().addBuilder( + cc.arduino.cli.commands.Core.Platform.getDefaultInstance()); + } + /** + *
+       * The installed platforms.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Platform installed_platform = 1; + */ + public cc.arduino.cli.commands.Core.Platform.Builder addInstalledPlatformBuilder( + int index) { + return getInstalledPlatformFieldBuilder().addBuilder( + index, cc.arduino.cli.commands.Core.Platform.getDefaultInstance()); + } + /** + *
+       * The installed platforms.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Platform installed_platform = 1; + */ + public java.util.List + getInstalledPlatformBuilderList() { + return getInstalledPlatformFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Core.Platform, cc.arduino.cli.commands.Core.Platform.Builder, cc.arduino.cli.commands.Core.PlatformOrBuilder> + getInstalledPlatformFieldBuilder() { + if (installedPlatformBuilder_ == null) { + installedPlatformBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Core.Platform, cc.arduino.cli.commands.Core.Platform.Builder, cc.arduino.cli.commands.Core.PlatformOrBuilder>( + installedPlatform_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + installedPlatform_ = null; + } + return installedPlatformBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.PlatformListResp) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.PlatformListResp) + private static final cc.arduino.cli.commands.Core.PlatformListResp DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Core.PlatformListResp(); + } + + public static cc.arduino.cli.commands.Core.PlatformListResp getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PlatformListResp parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PlatformListResp(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.PlatformListResp getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PlatformOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.Platform) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Platform ID (e.g., `arduino:avr`).
+     * 
+ * + * string ID = 1; + * @return The iD. + */ + java.lang.String getID(); + /** + *
+     * Platform ID (e.g., `arduino:avr`).
+     * 
+ * + * string ID = 1; + * @return The bytes for iD. + */ + com.google.protobuf.ByteString + getIDBytes(); + + /** + *
+     * Version of the platform.
+     * 
+ * + * string Installed = 2; + * @return The installed. + */ + java.lang.String getInstalled(); + /** + *
+     * Version of the platform.
+     * 
+ * + * string Installed = 2; + * @return The bytes for installed. + */ + com.google.protobuf.ByteString + getInstalledBytes(); + + /** + *
+     * Newest available version of the platform.
+     * 
+ * + * string Latest = 3; + * @return The latest. + */ + java.lang.String getLatest(); + /** + *
+     * Newest available version of the platform.
+     * 
+ * + * string Latest = 3; + * @return The bytes for latest. + */ + com.google.protobuf.ByteString + getLatestBytes(); + + /** + *
+     * Name used to identify the platform to humans (e.g., "Arduino AVR Boards").
+     * 
+ * + * string Name = 4; + * @return The name. + */ + java.lang.String getName(); + /** + *
+     * Name used to identify the platform to humans (e.g., "Arduino AVR Boards").
+     * 
+ * + * string Name = 4; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+     * Maintainer of the platform's package.
+     * 
+ * + * string Maintainer = 5; + * @return The maintainer. + */ + java.lang.String getMaintainer(); + /** + *
+     * Maintainer of the platform's package.
+     * 
+ * + * string Maintainer = 5; + * @return The bytes for maintainer. + */ + com.google.protobuf.ByteString + getMaintainerBytes(); + + /** + *
+     * A URL provided by the author of the platform's package, intended to point
+     * to their website.
+     * 
+ * + * string Website = 6; + * @return The website. + */ + java.lang.String getWebsite(); + /** + *
+     * A URL provided by the author of the platform's package, intended to point
+     * to their website.
+     * 
+ * + * string Website = 6; + * @return The bytes for website. + */ + com.google.protobuf.ByteString + getWebsiteBytes(); + + /** + *
+     * Email of the maintainer of the platform's package.
+     * 
+ * + * string Email = 7; + * @return The email. + */ + java.lang.String getEmail(); + /** + *
+     * Email of the maintainer of the platform's package.
+     * 
+ * + * string Email = 7; + * @return The bytes for email. + */ + com.google.protobuf.ByteString + getEmailBytes(); + + /** + *
+     * List of boards provided by the platform. If the platform is installed,
+     * this is the boards listed in the platform's boards.txt. If the platform is
+     * not installed, this is an arbitrary list of board names provided by the
+     * platform author for display and may not match boards.txt.
+     * 
+ * + * repeated .cc.arduino.cli.commands.Board Boards = 8; + */ + java.util.List + getBoardsList(); + /** + *
+     * List of boards provided by the platform. If the platform is installed,
+     * this is the boards listed in the platform's boards.txt. If the platform is
+     * not installed, this is an arbitrary list of board names provided by the
+     * platform author for display and may not match boards.txt.
+     * 
+ * + * repeated .cc.arduino.cli.commands.Board Boards = 8; + */ + cc.arduino.cli.commands.Core.Board getBoards(int index); + /** + *
+     * List of boards provided by the platform. If the platform is installed,
+     * this is the boards listed in the platform's boards.txt. If the platform is
+     * not installed, this is an arbitrary list of board names provided by the
+     * platform author for display and may not match boards.txt.
+     * 
+ * + * repeated .cc.arduino.cli.commands.Board Boards = 8; + */ + int getBoardsCount(); + /** + *
+     * List of boards provided by the platform. If the platform is installed,
+     * this is the boards listed in the platform's boards.txt. If the platform is
+     * not installed, this is an arbitrary list of board names provided by the
+     * platform author for display and may not match boards.txt.
+     * 
+ * + * repeated .cc.arduino.cli.commands.Board Boards = 8; + */ + java.util.List + getBoardsOrBuilderList(); + /** + *
+     * List of boards provided by the platform. If the platform is installed,
+     * this is the boards listed in the platform's boards.txt. If the platform is
+     * not installed, this is an arbitrary list of board names provided by the
+     * platform author for display and may not match boards.txt.
+     * 
+ * + * repeated .cc.arduino.cli.commands.Board Boards = 8; + */ + cc.arduino.cli.commands.Core.BoardOrBuilder getBoardsOrBuilder( + int index); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.Platform} + */ + public static final class Platform extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.Platform) + PlatformOrBuilder { + private static final long serialVersionUID = 0L; + // Use Platform.newBuilder() to construct. + private Platform(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Platform() { + iD_ = ""; + installed_ = ""; + latest_ = ""; + name_ = ""; + maintainer_ = ""; + website_ = ""; + email_ = ""; + boards_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Platform(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Platform( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + iD_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + installed_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + latest_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + maintainer_ = s; + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + website_ = s; + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + + email_ = s; + break; + } + case 66: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + boards_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + boards_.add( + input.readMessage(cc.arduino.cli.commands.Core.Board.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + boards_ = java.util.Collections.unmodifiableList(boards_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_Platform_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_Platform_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Core.Platform.class, cc.arduino.cli.commands.Core.Platform.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 1; + private volatile java.lang.Object iD_; + /** + *
+     * Platform ID (e.g., `arduino:avr`).
+     * 
+ * + * string ID = 1; + * @return The iD. + */ + public java.lang.String getID() { + java.lang.Object ref = iD_; + 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(); + iD_ = s; + return s; + } + } + /** + *
+     * Platform ID (e.g., `arduino:avr`).
+     * 
+ * + * string ID = 1; + * @return The bytes for iD. + */ + public com.google.protobuf.ByteString + getIDBytes() { + java.lang.Object ref = iD_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + iD_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INSTALLED_FIELD_NUMBER = 2; + private volatile java.lang.Object installed_; + /** + *
+     * Version of the platform.
+     * 
+ * + * string Installed = 2; + * @return The installed. + */ + public java.lang.String getInstalled() { + java.lang.Object ref = installed_; + 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(); + installed_ = s; + return s; + } + } + /** + *
+     * Version of the platform.
+     * 
+ * + * string Installed = 2; + * @return The bytes for installed. + */ + public com.google.protobuf.ByteString + getInstalledBytes() { + java.lang.Object ref = installed_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + installed_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LATEST_FIELD_NUMBER = 3; + private volatile java.lang.Object latest_; + /** + *
+     * Newest available version of the platform.
+     * 
+ * + * string Latest = 3; + * @return The latest. + */ + public java.lang.String getLatest() { + java.lang.Object ref = latest_; + 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(); + latest_ = s; + return s; + } + } + /** + *
+     * Newest available version of the platform.
+     * 
+ * + * string Latest = 3; + * @return The bytes for latest. + */ + public com.google.protobuf.ByteString + getLatestBytes() { + java.lang.Object ref = latest_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + latest_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 4; + private volatile java.lang.Object name_; + /** + *
+     * Name used to identify the platform to humans (e.g., "Arduino AVR Boards").
+     * 
+ * + * string Name = 4; + * @return The name. + */ + 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; + } + } + /** + *
+     * Name used to identify the platform to humans (e.g., "Arduino AVR Boards").
+     * 
+ * + * string Name = 4; + * @return The bytes for name. + */ + 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 MAINTAINER_FIELD_NUMBER = 5; + private volatile java.lang.Object maintainer_; + /** + *
+     * Maintainer of the platform's package.
+     * 
+ * + * string Maintainer = 5; + * @return The maintainer. + */ + public java.lang.String getMaintainer() { + java.lang.Object ref = maintainer_; + 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(); + maintainer_ = s; + return s; + } + } + /** + *
+     * Maintainer of the platform's package.
+     * 
+ * + * string Maintainer = 5; + * @return The bytes for maintainer. + */ + public com.google.protobuf.ByteString + getMaintainerBytes() { + java.lang.Object ref = maintainer_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + maintainer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int WEBSITE_FIELD_NUMBER = 6; + private volatile java.lang.Object website_; + /** + *
+     * A URL provided by the author of the platform's package, intended to point
+     * to their website.
+     * 
+ * + * string Website = 6; + * @return The website. + */ + public java.lang.String getWebsite() { + java.lang.Object ref = website_; + 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(); + website_ = s; + return s; + } + } + /** + *
+     * A URL provided by the author of the platform's package, intended to point
+     * to their website.
+     * 
+ * + * string Website = 6; + * @return The bytes for website. + */ + public com.google.protobuf.ByteString + getWebsiteBytes() { + java.lang.Object ref = website_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + website_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EMAIL_FIELD_NUMBER = 7; + private volatile java.lang.Object email_; + /** + *
+     * Email of the maintainer of the platform's package.
+     * 
+ * + * string Email = 7; + * @return The email. + */ + public java.lang.String getEmail() { + java.lang.Object ref = email_; + 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(); + email_ = s; + return s; + } + } + /** + *
+     * Email of the maintainer of the platform's package.
+     * 
+ * + * string Email = 7; + * @return The bytes for email. + */ + public com.google.protobuf.ByteString + getEmailBytes() { + java.lang.Object ref = email_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + email_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int BOARDS_FIELD_NUMBER = 8; + private java.util.List boards_; + /** + *
+     * List of boards provided by the platform. If the platform is installed,
+     * this is the boards listed in the platform's boards.txt. If the platform is
+     * not installed, this is an arbitrary list of board names provided by the
+     * platform author for display and may not match boards.txt.
+     * 
+ * + * repeated .cc.arduino.cli.commands.Board Boards = 8; + */ + public java.util.List getBoardsList() { + return boards_; + } + /** + *
+     * List of boards provided by the platform. If the platform is installed,
+     * this is the boards listed in the platform's boards.txt. If the platform is
+     * not installed, this is an arbitrary list of board names provided by the
+     * platform author for display and may not match boards.txt.
+     * 
+ * + * repeated .cc.arduino.cli.commands.Board Boards = 8; + */ + public java.util.List + getBoardsOrBuilderList() { + return boards_; + } + /** + *
+     * List of boards provided by the platform. If the platform is installed,
+     * this is the boards listed in the platform's boards.txt. If the platform is
+     * not installed, this is an arbitrary list of board names provided by the
+     * platform author for display and may not match boards.txt.
+     * 
+ * + * repeated .cc.arduino.cli.commands.Board Boards = 8; + */ + public int getBoardsCount() { + return boards_.size(); + } + /** + *
+     * List of boards provided by the platform. If the platform is installed,
+     * this is the boards listed in the platform's boards.txt. If the platform is
+     * not installed, this is an arbitrary list of board names provided by the
+     * platform author for display and may not match boards.txt.
+     * 
+ * + * repeated .cc.arduino.cli.commands.Board Boards = 8; + */ + public cc.arduino.cli.commands.Core.Board getBoards(int index) { + return boards_.get(index); + } + /** + *
+     * List of boards provided by the platform. If the platform is installed,
+     * this is the boards listed in the platform's boards.txt. If the platform is
+     * not installed, this is an arbitrary list of board names provided by the
+     * platform author for display and may not match boards.txt.
+     * 
+ * + * repeated .cc.arduino.cli.commands.Board Boards = 8; + */ + public cc.arduino.cli.commands.Core.BoardOrBuilder getBoardsOrBuilder( + int index) { + return boards_.get(index); + } + + 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 (!getIDBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, iD_); + } + if (!getInstalledBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, installed_); + } + if (!getLatestBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, latest_); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, name_); + } + if (!getMaintainerBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, maintainer_); + } + if (!getWebsiteBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, website_); + } + if (!getEmailBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, email_); + } + for (int i = 0; i < boards_.size(); i++) { + output.writeMessage(8, boards_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getIDBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, iD_); + } + if (!getInstalledBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, installed_); + } + if (!getLatestBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, latest_); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, name_); + } + if (!getMaintainerBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, maintainer_); + } + if (!getWebsiteBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, website_); + } + if (!getEmailBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, email_); + } + for (int i = 0; i < boards_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, boards_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Core.Platform)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Core.Platform other = (cc.arduino.cli.commands.Core.Platform) obj; + + if (!getID() + .equals(other.getID())) return false; + if (!getInstalled() + .equals(other.getInstalled())) return false; + if (!getLatest() + .equals(other.getLatest())) return false; + if (!getName() + .equals(other.getName())) return false; + if (!getMaintainer() + .equals(other.getMaintainer())) return false; + if (!getWebsite() + .equals(other.getWebsite())) return false; + if (!getEmail() + .equals(other.getEmail())) return false; + if (!getBoardsList() + .equals(other.getBoardsList())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + ID_FIELD_NUMBER; + hash = (53 * hash) + getID().hashCode(); + hash = (37 * hash) + INSTALLED_FIELD_NUMBER; + hash = (53 * hash) + getInstalled().hashCode(); + hash = (37 * hash) + LATEST_FIELD_NUMBER; + hash = (53 * hash) + getLatest().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + MAINTAINER_FIELD_NUMBER; + hash = (53 * hash) + getMaintainer().hashCode(); + hash = (37 * hash) + WEBSITE_FIELD_NUMBER; + hash = (53 * hash) + getWebsite().hashCode(); + hash = (37 * hash) + EMAIL_FIELD_NUMBER; + hash = (53 * hash) + getEmail().hashCode(); + if (getBoardsCount() > 0) { + hash = (37 * hash) + BOARDS_FIELD_NUMBER; + hash = (53 * hash) + getBoardsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Core.Platform parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Core.Platform parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.Platform parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Core.Platform parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.Platform parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Core.Platform parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.Platform parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Core.Platform parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.Platform parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Core.Platform parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.Platform parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Core.Platform parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Core.Platform 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.Platform} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.Platform) + cc.arduino.cli.commands.Core.PlatformOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_Platform_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_Platform_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Core.Platform.class, cc.arduino.cli.commands.Core.Platform.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Core.Platform.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getBoardsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + iD_ = ""; + + installed_ = ""; + + latest_ = ""; + + name_ = ""; + + maintainer_ = ""; + + website_ = ""; + + email_ = ""; + + if (boardsBuilder_ == null) { + boards_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + boardsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_Platform_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.Platform getDefaultInstanceForType() { + return cc.arduino.cli.commands.Core.Platform.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.Platform build() { + cc.arduino.cli.commands.Core.Platform result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.Platform buildPartial() { + cc.arduino.cli.commands.Core.Platform result = new cc.arduino.cli.commands.Core.Platform(this); + int from_bitField0_ = bitField0_; + result.iD_ = iD_; + result.installed_ = installed_; + result.latest_ = latest_; + result.name_ = name_; + result.maintainer_ = maintainer_; + result.website_ = website_; + result.email_ = email_; + if (boardsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + boards_ = java.util.Collections.unmodifiableList(boards_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.boards_ = boards_; + } else { + result.boards_ = boardsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Core.Platform) { + return mergeFrom((cc.arduino.cli.commands.Core.Platform)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Core.Platform other) { + if (other == cc.arduino.cli.commands.Core.Platform.getDefaultInstance()) return this; + if (!other.getID().isEmpty()) { + iD_ = other.iD_; + onChanged(); + } + if (!other.getInstalled().isEmpty()) { + installed_ = other.installed_; + onChanged(); + } + if (!other.getLatest().isEmpty()) { + latest_ = other.latest_; + onChanged(); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getMaintainer().isEmpty()) { + maintainer_ = other.maintainer_; + onChanged(); + } + if (!other.getWebsite().isEmpty()) { + website_ = other.website_; + onChanged(); + } + if (!other.getEmail().isEmpty()) { + email_ = other.email_; + onChanged(); + } + if (boardsBuilder_ == null) { + if (!other.boards_.isEmpty()) { + if (boards_.isEmpty()) { + boards_ = other.boards_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBoardsIsMutable(); + boards_.addAll(other.boards_); + } + onChanged(); + } + } else { + if (!other.boards_.isEmpty()) { + if (boardsBuilder_.isEmpty()) { + boardsBuilder_.dispose(); + boardsBuilder_ = null; + boards_ = other.boards_; + bitField0_ = (bitField0_ & ~0x00000001); + boardsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getBoardsFieldBuilder() : null; + } else { + boardsBuilder_.addAllMessages(other.boards_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Core.Platform parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Core.Platform) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object iD_ = ""; + /** + *
+       * Platform ID (e.g., `arduino:avr`).
+       * 
+ * + * string ID = 1; + * @return The iD. + */ + public java.lang.String getID() { + java.lang.Object ref = iD_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + iD_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Platform ID (e.g., `arduino:avr`).
+       * 
+ * + * string ID = 1; + * @return The bytes for iD. + */ + public com.google.protobuf.ByteString + getIDBytes() { + java.lang.Object ref = iD_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + iD_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Platform ID (e.g., `arduino:avr`).
+       * 
+ * + * string ID = 1; + * @param value The iD to set. + * @return This builder for chaining. + */ + public Builder setID( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + iD_ = value; + onChanged(); + return this; + } + /** + *
+       * Platform ID (e.g., `arduino:avr`).
+       * 
+ * + * string ID = 1; + * @return This builder for chaining. + */ + public Builder clearID() { + + iD_ = getDefaultInstance().getID(); + onChanged(); + return this; + } + /** + *
+       * Platform ID (e.g., `arduino:avr`).
+       * 
+ * + * string ID = 1; + * @param value The bytes for iD to set. + * @return This builder for chaining. + */ + public Builder setIDBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + iD_ = value; + onChanged(); + return this; + } + + private java.lang.Object installed_ = ""; + /** + *
+       * Version of the platform.
+       * 
+ * + * string Installed = 2; + * @return The installed. + */ + public java.lang.String getInstalled() { + java.lang.Object ref = installed_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + installed_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Version of the platform.
+       * 
+ * + * string Installed = 2; + * @return The bytes for installed. + */ + public com.google.protobuf.ByteString + getInstalledBytes() { + java.lang.Object ref = installed_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + installed_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Version of the platform.
+       * 
+ * + * string Installed = 2; + * @param value The installed to set. + * @return This builder for chaining. + */ + public Builder setInstalled( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + installed_ = value; + onChanged(); + return this; + } + /** + *
+       * Version of the platform.
+       * 
+ * + * string Installed = 2; + * @return This builder for chaining. + */ + public Builder clearInstalled() { + + installed_ = getDefaultInstance().getInstalled(); + onChanged(); + return this; + } + /** + *
+       * Version of the platform.
+       * 
+ * + * string Installed = 2; + * @param value The bytes for installed to set. + * @return This builder for chaining. + */ + public Builder setInstalledBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + installed_ = value; + onChanged(); + return this; + } + + private java.lang.Object latest_ = ""; + /** + *
+       * Newest available version of the platform.
+       * 
+ * + * string Latest = 3; + * @return The latest. + */ + public java.lang.String getLatest() { + java.lang.Object ref = latest_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + latest_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Newest available version of the platform.
+       * 
+ * + * string Latest = 3; + * @return The bytes for latest. + */ + public com.google.protobuf.ByteString + getLatestBytes() { + java.lang.Object ref = latest_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + latest_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Newest available version of the platform.
+       * 
+ * + * string Latest = 3; + * @param value The latest to set. + * @return This builder for chaining. + */ + public Builder setLatest( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + latest_ = value; + onChanged(); + return this; + } + /** + *
+       * Newest available version of the platform.
+       * 
+ * + * string Latest = 3; + * @return This builder for chaining. + */ + public Builder clearLatest() { + + latest_ = getDefaultInstance().getLatest(); + onChanged(); + return this; + } + /** + *
+       * Newest available version of the platform.
+       * 
+ * + * string Latest = 3; + * @param value The bytes for latest to set. + * @return This builder for chaining. + */ + public Builder setLatestBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + latest_ = value; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+       * Name used to identify the platform to humans (e.g., "Arduino AVR Boards").
+       * 
+ * + * string Name = 4; + * @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; + } + } + /** + *
+       * Name used to identify the platform to humans (e.g., "Arduino AVR Boards").
+       * 
+ * + * string Name = 4; + * @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; + } + } + /** + *
+       * Name used to identify the platform to humans (e.g., "Arduino AVR Boards").
+       * 
+ * + * string Name = 4; + * @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; + onChanged(); + return this; + } + /** + *
+       * Name used to identify the platform to humans (e.g., "Arduino AVR Boards").
+       * 
+ * + * string Name = 4; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+       * Name used to identify the platform to humans (e.g., "Arduino AVR Boards").
+       * 
+ * + * string Name = 4; + * @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; + onChanged(); + return this; + } + + private java.lang.Object maintainer_ = ""; + /** + *
+       * Maintainer of the platform's package.
+       * 
+ * + * string Maintainer = 5; + * @return The maintainer. + */ + public java.lang.String getMaintainer() { + java.lang.Object ref = maintainer_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + maintainer_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Maintainer of the platform's package.
+       * 
+ * + * string Maintainer = 5; + * @return The bytes for maintainer. + */ + public com.google.protobuf.ByteString + getMaintainerBytes() { + java.lang.Object ref = maintainer_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + maintainer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Maintainer of the platform's package.
+       * 
+ * + * string Maintainer = 5; + * @param value The maintainer to set. + * @return This builder for chaining. + */ + public Builder setMaintainer( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + maintainer_ = value; + onChanged(); + return this; + } + /** + *
+       * Maintainer of the platform's package.
+       * 
+ * + * string Maintainer = 5; + * @return This builder for chaining. + */ + public Builder clearMaintainer() { + + maintainer_ = getDefaultInstance().getMaintainer(); + onChanged(); + return this; + } + /** + *
+       * Maintainer of the platform's package.
+       * 
+ * + * string Maintainer = 5; + * @param value The bytes for maintainer to set. + * @return This builder for chaining. + */ + public Builder setMaintainerBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + maintainer_ = value; + onChanged(); + return this; + } + + private java.lang.Object website_ = ""; + /** + *
+       * A URL provided by the author of the platform's package, intended to point
+       * to their website.
+       * 
+ * + * string Website = 6; + * @return The website. + */ + public java.lang.String getWebsite() { + java.lang.Object ref = website_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + website_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * A URL provided by the author of the platform's package, intended to point
+       * to their website.
+       * 
+ * + * string Website = 6; + * @return The bytes for website. + */ + public com.google.protobuf.ByteString + getWebsiteBytes() { + java.lang.Object ref = website_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + website_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * A URL provided by the author of the platform's package, intended to point
+       * to their website.
+       * 
+ * + * string Website = 6; + * @param value The website to set. + * @return This builder for chaining. + */ + public Builder setWebsite( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + website_ = value; + onChanged(); + return this; + } + /** + *
+       * A URL provided by the author of the platform's package, intended to point
+       * to their website.
+       * 
+ * + * string Website = 6; + * @return This builder for chaining. + */ + public Builder clearWebsite() { + + website_ = getDefaultInstance().getWebsite(); + onChanged(); + return this; + } + /** + *
+       * A URL provided by the author of the platform's package, intended to point
+       * to their website.
+       * 
+ * + * string Website = 6; + * @param value The bytes for website to set. + * @return This builder for chaining. + */ + public Builder setWebsiteBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + website_ = value; + onChanged(); + return this; + } + + private java.lang.Object email_ = ""; + /** + *
+       * Email of the maintainer of the platform's package.
+       * 
+ * + * string Email = 7; + * @return The email. + */ + public java.lang.String getEmail() { + java.lang.Object ref = email_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + email_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Email of the maintainer of the platform's package.
+       * 
+ * + * string Email = 7; + * @return The bytes for email. + */ + public com.google.protobuf.ByteString + getEmailBytes() { + java.lang.Object ref = email_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + email_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Email of the maintainer of the platform's package.
+       * 
+ * + * string Email = 7; + * @param value The email to set. + * @return This builder for chaining. + */ + public Builder setEmail( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + email_ = value; + onChanged(); + return this; + } + /** + *
+       * Email of the maintainer of the platform's package.
+       * 
+ * + * string Email = 7; + * @return This builder for chaining. + */ + public Builder clearEmail() { + + email_ = getDefaultInstance().getEmail(); + onChanged(); + return this; + } + /** + *
+       * Email of the maintainer of the platform's package.
+       * 
+ * + * string Email = 7; + * @param value The bytes for email to set. + * @return This builder for chaining. + */ + public Builder setEmailBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + email_ = value; + onChanged(); + return this; + } + + private java.util.List boards_ = + java.util.Collections.emptyList(); + private void ensureBoardsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + boards_ = new java.util.ArrayList(boards_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Core.Board, cc.arduino.cli.commands.Core.Board.Builder, cc.arduino.cli.commands.Core.BoardOrBuilder> boardsBuilder_; + + /** + *
+       * List of boards provided by the platform. If the platform is installed,
+       * this is the boards listed in the platform's boards.txt. If the platform is
+       * not installed, this is an arbitrary list of board names provided by the
+       * platform author for display and may not match boards.txt.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Board Boards = 8; + */ + public java.util.List getBoardsList() { + if (boardsBuilder_ == null) { + return java.util.Collections.unmodifiableList(boards_); + } else { + return boardsBuilder_.getMessageList(); + } + } + /** + *
+       * List of boards provided by the platform. If the platform is installed,
+       * this is the boards listed in the platform's boards.txt. If the platform is
+       * not installed, this is an arbitrary list of board names provided by the
+       * platform author for display and may not match boards.txt.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Board Boards = 8; + */ + public int getBoardsCount() { + if (boardsBuilder_ == null) { + return boards_.size(); + } else { + return boardsBuilder_.getCount(); + } + } + /** + *
+       * List of boards provided by the platform. If the platform is installed,
+       * this is the boards listed in the platform's boards.txt. If the platform is
+       * not installed, this is an arbitrary list of board names provided by the
+       * platform author for display and may not match boards.txt.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Board Boards = 8; + */ + public cc.arduino.cli.commands.Core.Board getBoards(int index) { + if (boardsBuilder_ == null) { + return boards_.get(index); + } else { + return boardsBuilder_.getMessage(index); + } + } + /** + *
+       * List of boards provided by the platform. If the platform is installed,
+       * this is the boards listed in the platform's boards.txt. If the platform is
+       * not installed, this is an arbitrary list of board names provided by the
+       * platform author for display and may not match boards.txt.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Board Boards = 8; + */ + public Builder setBoards( + int index, cc.arduino.cli.commands.Core.Board value) { + if (boardsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBoardsIsMutable(); + boards_.set(index, value); + onChanged(); + } else { + boardsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * List of boards provided by the platform. If the platform is installed,
+       * this is the boards listed in the platform's boards.txt. If the platform is
+       * not installed, this is an arbitrary list of board names provided by the
+       * platform author for display and may not match boards.txt.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Board Boards = 8; + */ + public Builder setBoards( + int index, cc.arduino.cli.commands.Core.Board.Builder builderForValue) { + if (boardsBuilder_ == null) { + ensureBoardsIsMutable(); + boards_.set(index, builderForValue.build()); + onChanged(); + } else { + boardsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * List of boards provided by the platform. If the platform is installed,
+       * this is the boards listed in the platform's boards.txt. If the platform is
+       * not installed, this is an arbitrary list of board names provided by the
+       * platform author for display and may not match boards.txt.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Board Boards = 8; + */ + public Builder addBoards(cc.arduino.cli.commands.Core.Board value) { + if (boardsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBoardsIsMutable(); + boards_.add(value); + onChanged(); + } else { + boardsBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * List of boards provided by the platform. If the platform is installed,
+       * this is the boards listed in the platform's boards.txt. If the platform is
+       * not installed, this is an arbitrary list of board names provided by the
+       * platform author for display and may not match boards.txt.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Board Boards = 8; + */ + public Builder addBoards( + int index, cc.arduino.cli.commands.Core.Board value) { + if (boardsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBoardsIsMutable(); + boards_.add(index, value); + onChanged(); + } else { + boardsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * List of boards provided by the platform. If the platform is installed,
+       * this is the boards listed in the platform's boards.txt. If the platform is
+       * not installed, this is an arbitrary list of board names provided by the
+       * platform author for display and may not match boards.txt.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Board Boards = 8; + */ + public Builder addBoards( + cc.arduino.cli.commands.Core.Board.Builder builderForValue) { + if (boardsBuilder_ == null) { + ensureBoardsIsMutable(); + boards_.add(builderForValue.build()); + onChanged(); + } else { + boardsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * List of boards provided by the platform. If the platform is installed,
+       * this is the boards listed in the platform's boards.txt. If the platform is
+       * not installed, this is an arbitrary list of board names provided by the
+       * platform author for display and may not match boards.txt.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Board Boards = 8; + */ + public Builder addBoards( + int index, cc.arduino.cli.commands.Core.Board.Builder builderForValue) { + if (boardsBuilder_ == null) { + ensureBoardsIsMutable(); + boards_.add(index, builderForValue.build()); + onChanged(); + } else { + boardsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * List of boards provided by the platform. If the platform is installed,
+       * this is the boards listed in the platform's boards.txt. If the platform is
+       * not installed, this is an arbitrary list of board names provided by the
+       * platform author for display and may not match boards.txt.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Board Boards = 8; + */ + public Builder addAllBoards( + java.lang.Iterable values) { + if (boardsBuilder_ == null) { + ensureBoardsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, boards_); + onChanged(); + } else { + boardsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * List of boards provided by the platform. If the platform is installed,
+       * this is the boards listed in the platform's boards.txt. If the platform is
+       * not installed, this is an arbitrary list of board names provided by the
+       * platform author for display and may not match boards.txt.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Board Boards = 8; + */ + public Builder clearBoards() { + if (boardsBuilder_ == null) { + boards_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + boardsBuilder_.clear(); + } + return this; + } + /** + *
+       * List of boards provided by the platform. If the platform is installed,
+       * this is the boards listed in the platform's boards.txt. If the platform is
+       * not installed, this is an arbitrary list of board names provided by the
+       * platform author for display and may not match boards.txt.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Board Boards = 8; + */ + public Builder removeBoards(int index) { + if (boardsBuilder_ == null) { + ensureBoardsIsMutable(); + boards_.remove(index); + onChanged(); + } else { + boardsBuilder_.remove(index); + } + return this; + } + /** + *
+       * List of boards provided by the platform. If the platform is installed,
+       * this is the boards listed in the platform's boards.txt. If the platform is
+       * not installed, this is an arbitrary list of board names provided by the
+       * platform author for display and may not match boards.txt.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Board Boards = 8; + */ + public cc.arduino.cli.commands.Core.Board.Builder getBoardsBuilder( + int index) { + return getBoardsFieldBuilder().getBuilder(index); + } + /** + *
+       * List of boards provided by the platform. If the platform is installed,
+       * this is the boards listed in the platform's boards.txt. If the platform is
+       * not installed, this is an arbitrary list of board names provided by the
+       * platform author for display and may not match boards.txt.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Board Boards = 8; + */ + public cc.arduino.cli.commands.Core.BoardOrBuilder getBoardsOrBuilder( + int index) { + if (boardsBuilder_ == null) { + return boards_.get(index); } else { + return boardsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * List of boards provided by the platform. If the platform is installed,
+       * this is the boards listed in the platform's boards.txt. If the platform is
+       * not installed, this is an arbitrary list of board names provided by the
+       * platform author for display and may not match boards.txt.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Board Boards = 8; + */ + public java.util.List + getBoardsOrBuilderList() { + if (boardsBuilder_ != null) { + return boardsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(boards_); + } + } + /** + *
+       * List of boards provided by the platform. If the platform is installed,
+       * this is the boards listed in the platform's boards.txt. If the platform is
+       * not installed, this is an arbitrary list of board names provided by the
+       * platform author for display and may not match boards.txt.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Board Boards = 8; + */ + public cc.arduino.cli.commands.Core.Board.Builder addBoardsBuilder() { + return getBoardsFieldBuilder().addBuilder( + cc.arduino.cli.commands.Core.Board.getDefaultInstance()); + } + /** + *
+       * List of boards provided by the platform. If the platform is installed,
+       * this is the boards listed in the platform's boards.txt. If the platform is
+       * not installed, this is an arbitrary list of board names provided by the
+       * platform author for display and may not match boards.txt.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Board Boards = 8; + */ + public cc.arduino.cli.commands.Core.Board.Builder addBoardsBuilder( + int index) { + return getBoardsFieldBuilder().addBuilder( + index, cc.arduino.cli.commands.Core.Board.getDefaultInstance()); + } + /** + *
+       * List of boards provided by the platform. If the platform is installed,
+       * this is the boards listed in the platform's boards.txt. If the platform is
+       * not installed, this is an arbitrary list of board names provided by the
+       * platform author for display and may not match boards.txt.
+       * 
+ * + * repeated .cc.arduino.cli.commands.Board Boards = 8; + */ + public java.util.List + getBoardsBuilderList() { + return getBoardsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Core.Board, cc.arduino.cli.commands.Core.Board.Builder, cc.arduino.cli.commands.Core.BoardOrBuilder> + getBoardsFieldBuilder() { + if (boardsBuilder_ == null) { + boardsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Core.Board, cc.arduino.cli.commands.Core.Board.Builder, cc.arduino.cli.commands.Core.BoardOrBuilder>( + boards_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + boards_ = null; + } + return boardsBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.Platform) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.Platform) + private static final cc.arduino.cli.commands.Core.Platform DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Core.Platform(); + } + + public static cc.arduino.cli.commands.Core.Platform getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Platform parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Platform(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.Platform getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface BoardOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.Board) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Name used to identify the board to humans.
+     * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+     * Name used to identify the board to humans.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+     * Fully qualified board name used to identify the board to machines. The FQBN
+     * is only available for installed boards.
+     * 
+ * + * string fqbn = 2; + * @return The fqbn. + */ + java.lang.String getFqbn(); + /** + *
+     * Fully qualified board name used to identify the board to machines. The FQBN
+     * is only available for installed boards.
+     * 
+ * + * string fqbn = 2; + * @return The bytes for fqbn. + */ + com.google.protobuf.ByteString + getFqbnBytes(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.Board} + */ + public static final class Board extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.Board) + BoardOrBuilder { + private static final long serialVersionUID = 0L; + // Use Board.newBuilder() to construct. + private Board(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Board() { + name_ = ""; + fqbn_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Board(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Board( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + fqbn_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_Board_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_Board_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Core.Board.class, cc.arduino.cli.commands.Core.Board.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+     * Name used to identify the board to humans.
+     * 
+ * + * string name = 1; + * @return The name. + */ + 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; + } + } + /** + *
+     * Name used to identify the board to humans.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + 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 FQBN_FIELD_NUMBER = 2; + private volatile java.lang.Object fqbn_; + /** + *
+     * Fully qualified board name used to identify the board to machines. The FQBN
+     * is only available for installed boards.
+     * 
+ * + * string fqbn = 2; + * @return The fqbn. + */ + public java.lang.String getFqbn() { + java.lang.Object ref = fqbn_; + 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(); + fqbn_ = s; + return s; + } + } + /** + *
+     * Fully qualified board name used to identify the board to machines. The FQBN
+     * is only available for installed boards.
+     * 
+ * + * string fqbn = 2; + * @return The bytes for fqbn. + */ + public com.google.protobuf.ByteString + getFqbnBytes() { + java.lang.Object ref = fqbn_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fqbn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getFqbnBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, fqbn_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getFqbnBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, fqbn_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Core.Board)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Core.Board other = (cc.arduino.cli.commands.Core.Board) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getFqbn() + .equals(other.getFqbn())) return false; + if (!unknownFields.equals(other.unknownFields)) 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(); + hash = (37 * hash) + FQBN_FIELD_NUMBER; + hash = (53 * hash) + getFqbn().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Core.Board parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Core.Board parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.Board parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Core.Board parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.Board parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Core.Board parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.Board parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Core.Board parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.Board parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Core.Board parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Core.Board parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Core.Board parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Core.Board 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.Board} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.Board) + cc.arduino.cli.commands.Core.BoardOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_Board_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_Board_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Core.Board.class, cc.arduino.cli.commands.Core.Board.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Core.Board.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + fqbn_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Core.internal_static_cc_arduino_cli_commands_Board_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.Board getDefaultInstanceForType() { + return cc.arduino.cli.commands.Core.Board.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.Board build() { + cc.arduino.cli.commands.Core.Board result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.Board buildPartial() { + cc.arduino.cli.commands.Core.Board result = new cc.arduino.cli.commands.Core.Board(this); + result.name_ = name_; + result.fqbn_ = fqbn_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Core.Board) { + return mergeFrom((cc.arduino.cli.commands.Core.Board)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Core.Board other) { + if (other == cc.arduino.cli.commands.Core.Board.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getFqbn().isEmpty()) { + fqbn_ = other.fqbn_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Core.Board parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Core.Board) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+       * Name used to identify the board to humans.
+       * 
+ * + * 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; + } + } + /** + *
+       * Name used to identify the board to humans.
+       * 
+ * + * 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; + } + } + /** + *
+       * Name used to identify the board to humans.
+       * 
+ * + * 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; + onChanged(); + return this; + } + /** + *
+       * Name used to identify the board to humans.
+       * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+       * Name used to identify the board to humans.
+       * 
+ * + * 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; + onChanged(); + return this; + } + + private java.lang.Object fqbn_ = ""; + /** + *
+       * Fully qualified board name used to identify the board to machines. The FQBN
+       * is only available for installed boards.
+       * 
+ * + * string fqbn = 2; + * @return The fqbn. + */ + public java.lang.String getFqbn() { + java.lang.Object ref = fqbn_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fqbn_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Fully qualified board name used to identify the board to machines. The FQBN
+       * is only available for installed boards.
+       * 
+ * + * string fqbn = 2; + * @return The bytes for fqbn. + */ + public com.google.protobuf.ByteString + getFqbnBytes() { + java.lang.Object ref = fqbn_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fqbn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Fully qualified board name used to identify the board to machines. The FQBN
+       * is only available for installed boards.
+       * 
+ * + * string fqbn = 2; + * @param value The fqbn to set. + * @return This builder for chaining. + */ + public Builder setFqbn( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + fqbn_ = value; + onChanged(); + return this; + } + /** + *
+       * Fully qualified board name used to identify the board to machines. The FQBN
+       * is only available for installed boards.
+       * 
+ * + * string fqbn = 2; + * @return This builder for chaining. + */ + public Builder clearFqbn() { + + fqbn_ = getDefaultInstance().getFqbn(); + onChanged(); + return this; + } + /** + *
+       * Fully qualified board name used to identify the board to machines. The FQBN
+       * is only available for installed boards.
+       * 
+ * + * string fqbn = 2; + * @param value The bytes for fqbn to set. + * @return This builder for chaining. + */ + public Builder setFqbnBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + fqbn_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.Board) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.Board) + private static final cc.arduino.cli.commands.Core.Board DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Core.Board(); + } + + public static cc.arduino.cli.commands.Core.Board getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Board parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Board(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Core.Board getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_PlatformInstallReq_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_PlatformInstallReq_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_PlatformInstallResp_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_PlatformInstallResp_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_PlatformDownloadReq_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_PlatformDownloadReq_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_PlatformDownloadResp_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_PlatformDownloadResp_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_PlatformUninstallReq_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_PlatformUninstallReq_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_PlatformUninstallResp_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_PlatformUninstallResp_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_PlatformUpgradeReq_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_PlatformUpgradeReq_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_PlatformUpgradeResp_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_PlatformUpgradeResp_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_PlatformSearchReq_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_PlatformSearchReq_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_PlatformSearchResp_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_PlatformSearchResp_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_PlatformListReq_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_PlatformListReq_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_PlatformListResp_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_PlatformListResp_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_Platform_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_Platform_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_Board_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_Board_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\023commands/core.proto\022\027cc.arduino.cli.co" + + "mmands\032\025commands/common.proto\"\212\001\n\022Platfo" + + "rmInstallReq\0223\n\010instance\030\001 \001(\0132!.cc.ardu" + + "ino.cli.commands.Instance\022\030\n\020platform_pa" + + "ckage\030\002 \001(\t\022\024\n\014architecture\030\003 \001(\t\022\017\n\007ver" + + "sion\030\004 \001(\t\"\220\001\n\023PlatformInstallResp\022;\n\010pr" + + "ogress\030\001 \001(\0132).cc.arduino.cli.commands.D" + + "ownloadProgress\022<\n\rtask_progress\030\002 \001(\0132%" + + ".cc.arduino.cli.commands.TaskProgress\"\213\001" + + "\n\023PlatformDownloadReq\0223\n\010instance\030\001 \001(\0132" + + "!.cc.arduino.cli.commands.Instance\022\030\n\020pl" + + "atform_package\030\002 \001(\t\022\024\n\014architecture\030\003 \001" + + "(\t\022\017\n\007version\030\004 \001(\t\"S\n\024PlatformDownloadR" + + "esp\022;\n\010progress\030\001 \001(\0132).cc.arduino.cli.c" + + "ommands.DownloadProgress\"{\n\024PlatformUnin" + + "stallReq\0223\n\010instance\030\001 \001(\0132!.cc.arduino." + + "cli.commands.Instance\022\030\n\020platform_packag" + + "e\030\002 \001(\t\022\024\n\014architecture\030\003 \001(\t\"U\n\025Platfor" + + "mUninstallResp\022<\n\rtask_progress\030\001 \001(\0132%." + + "cc.arduino.cli.commands.TaskProgress\"y\n\022" + + "PlatformUpgradeReq\0223\n\010instance\030\001 \001(\0132!.c" + + "c.arduino.cli.commands.Instance\022\030\n\020platf" + + "orm_package\030\002 \001(\t\022\024\n\014architecture\030\003 \001(\t\"" + + "\220\001\n\023PlatformUpgradeResp\022;\n\010progress\030\001 \001(" + + "\0132).cc.arduino.cli.commands.DownloadProg" + + "ress\022<\n\rtask_progress\030\002 \001(\0132%.cc.arduino" + + ".cli.commands.TaskProgress\"s\n\021PlatformSe" + + "archReq\0223\n\010instance\030\001 \001(\0132!.cc.arduino.c" + + "li.commands.Instance\022\023\n\013search_args\030\002 \001(" + + "\t\022\024\n\014all_versions\030\003 \001(\010\"N\n\022PlatformSearc" + + "hResp\0228\n\rsearch_output\030\001 \003(\0132!.cc.arduin" + + "o.cli.commands.Platform\"^\n\017PlatformListR" + + "eq\0223\n\010instance\030\001 \001(\0132!.cc.arduino.cli.co" + + "mmands.Instance\022\026\n\016updatable_only\030\002 \001(\010\"" + + "Q\n\020PlatformListResp\022=\n\022installed_platfor" + + "m\030\001 \003(\0132!.cc.arduino.cli.commands.Platfo" + + "rm\"\253\001\n\010Platform\022\n\n\002ID\030\001 \001(\t\022\021\n\tInstalled" + + "\030\002 \001(\t\022\016\n\006Latest\030\003 \001(\t\022\014\n\004Name\030\004 \001(\t\022\022\n\n" + + "Maintainer\030\005 \001(\t\022\017\n\007Website\030\006 \001(\t\022\r\n\005Ema" + + "il\030\007 \001(\t\022.\n\006Boards\030\010 \003(\0132\036.cc.arduino.cl" + + "i.commands.Board\"#\n\005Board\022\014\n\004name\030\001 \001(\t\022" + + "\014\n\004fqbn\030\002 \001(\tB-Z+github.com/arduino/ardu" + + "ino-cli/rpc/commandsb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + cc.arduino.cli.commands.Common.getDescriptor(), + }); + internal_static_cc_arduino_cli_commands_PlatformInstallReq_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_cc_arduino_cli_commands_PlatformInstallReq_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_PlatformInstallReq_descriptor, + new java.lang.String[] { "Instance", "PlatformPackage", "Architecture", "Version", }); + internal_static_cc_arduino_cli_commands_PlatformInstallResp_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_cc_arduino_cli_commands_PlatformInstallResp_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_PlatformInstallResp_descriptor, + new java.lang.String[] { "Progress", "TaskProgress", }); + internal_static_cc_arduino_cli_commands_PlatformDownloadReq_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_cc_arduino_cli_commands_PlatformDownloadReq_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_PlatformDownloadReq_descriptor, + new java.lang.String[] { "Instance", "PlatformPackage", "Architecture", "Version", }); + internal_static_cc_arduino_cli_commands_PlatformDownloadResp_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_cc_arduino_cli_commands_PlatformDownloadResp_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_PlatformDownloadResp_descriptor, + new java.lang.String[] { "Progress", }); + internal_static_cc_arduino_cli_commands_PlatformUninstallReq_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_cc_arduino_cli_commands_PlatformUninstallReq_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_PlatformUninstallReq_descriptor, + new java.lang.String[] { "Instance", "PlatformPackage", "Architecture", }); + internal_static_cc_arduino_cli_commands_PlatformUninstallResp_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_cc_arduino_cli_commands_PlatformUninstallResp_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_PlatformUninstallResp_descriptor, + new java.lang.String[] { "TaskProgress", }); + internal_static_cc_arduino_cli_commands_PlatformUpgradeReq_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_cc_arduino_cli_commands_PlatformUpgradeReq_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_PlatformUpgradeReq_descriptor, + new java.lang.String[] { "Instance", "PlatformPackage", "Architecture", }); + internal_static_cc_arduino_cli_commands_PlatformUpgradeResp_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_cc_arduino_cli_commands_PlatformUpgradeResp_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_PlatformUpgradeResp_descriptor, + new java.lang.String[] { "Progress", "TaskProgress", }); + internal_static_cc_arduino_cli_commands_PlatformSearchReq_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_cc_arduino_cli_commands_PlatformSearchReq_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_PlatformSearchReq_descriptor, + new java.lang.String[] { "Instance", "SearchArgs", "AllVersions", }); + internal_static_cc_arduino_cli_commands_PlatformSearchResp_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_cc_arduino_cli_commands_PlatformSearchResp_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_PlatformSearchResp_descriptor, + new java.lang.String[] { "SearchOutput", }); + internal_static_cc_arduino_cli_commands_PlatformListReq_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_cc_arduino_cli_commands_PlatformListReq_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_PlatformListReq_descriptor, + new java.lang.String[] { "Instance", "UpdatableOnly", }); + internal_static_cc_arduino_cli_commands_PlatformListResp_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_cc_arduino_cli_commands_PlatformListResp_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_PlatformListResp_descriptor, + new java.lang.String[] { "InstalledPlatform", }); + internal_static_cc_arduino_cli_commands_Platform_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_cc_arduino_cli_commands_Platform_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_Platform_descriptor, + new java.lang.String[] { "ID", "Installed", "Latest", "Name", "Maintainer", "Website", "Email", "Boards", }); + internal_static_cc_arduino_cli_commands_Board_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_cc_arduino_cli_commands_Board_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_Board_descriptor, + new java.lang.String[] { "Name", "Fqbn", }); + cc.arduino.cli.commands.Common.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/arduino-core/src/cc/arduino/cli/commands/Lib.java b/arduino-core/src/cc/arduino/cli/commands/Lib.java new file mode 100644 index 00000000000..c9019e6ed58 --- /dev/null +++ b/arduino-core/src/cc/arduino/cli/commands/Lib.java @@ -0,0 +1,26945 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: commands/lib.proto + +package cc.arduino.cli.commands; + +public final class Lib { + private Lib() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + /** + * Protobuf enum {@code cc.arduino.cli.commands.LibrarySearchStatus} + */ + public enum LibrarySearchStatus + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * No search results were found.
+     * 
+ * + * failed = 0; + */ + failed(0), + /** + *
+     * Search results were found.
+     * 
+ * + * success = 1; + */ + success(1), + UNRECOGNIZED(-1), + ; + + /** + *
+     * No search results were found.
+     * 
+ * + * failed = 0; + */ + public static final int failed_VALUE = 0; + /** + *
+     * Search results were found.
+     * 
+ * + * 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} + */ + public enum LibraryLayout + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Library is in the 1.0 Arduino library format.
+     * 
+ * + * flat_layout = 0; + */ + flat_layout(0), + /** + *
+     * Library is in the 1.5 Arduino library format.
+     * 
+ * + * recursive_layout = 1; + */ + recursive_layout(1), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Library is in the 1.0 Arduino library format.
+     * 
+ * + * flat_layout = 0; + */ + public static final int flat_layout_VALUE = 0; + /** + *
+     * Library is in the 1.5 Arduino library format.
+     * 
+ * + * recursive_layout = 1; + */ + public static final int recursive_layout_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 LibraryLayout 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 LibraryLayout forNumber(int value) { + switch (value) { + case 0: return flat_layout; + case 1: return recursive_layout; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + LibraryLayout> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public LibraryLayout findValueByNumber(int number) { + return LibraryLayout.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(1); + } + + private static final LibraryLayout[] VALUES = values(); + + public static LibraryLayout 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 LibraryLayout(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:cc.arduino.cli.commands.LibraryLayout) + } + + /** + * Protobuf enum {@code cc.arduino.cli.commands.LibraryLocation} + */ + public enum LibraryLocation + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * In the `libraries` subdirectory of the Arduino IDE installation.
+     * 
+ * + * ide_builtin = 0; + */ + ide_builtin(0), + /** + *
+     * In the `libraries` subdirectory of the user directory (sketchbook).
+     * 
+ * + * user = 1; + */ + user(1), + /** + *
+     * In the `libraries` subdirectory of a platform.
+     * 
+ * + * platform_builtin = 2; + */ + platform_builtin(2), + /** + *
+     * When `LibraryLocation` is used in a context where a board is specified, 
+     * this indicates the library is in the `libraries` subdirectory of a
+     * platform referenced by the board's platform.
+     * 
+ * + * referenced_platform_builtin = 3; + */ + referenced_platform_builtin(3), + UNRECOGNIZED(-1), + ; + + /** + *
+     * In the `libraries` subdirectory of the Arduino IDE installation.
+     * 
+ * + * ide_builtin = 0; + */ + public static final int ide_builtin_VALUE = 0; + /** + *
+     * In the `libraries` subdirectory of the user directory (sketchbook).
+     * 
+ * + * user = 1; + */ + public static final int user_VALUE = 1; + /** + *
+     * In the `libraries` subdirectory of a platform.
+     * 
+ * + * platform_builtin = 2; + */ + public static final int platform_builtin_VALUE = 2; + /** + *
+     * When `LibraryLocation` is used in a context where a board is specified, 
+     * this indicates the library is in the `libraries` subdirectory of a
+     * platform referenced by the board's platform.
+     * 
+ * + * referenced_platform_builtin = 3; + */ + public static final int referenced_platform_builtin_VALUE = 3; + + + 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 LibraryLocation 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 LibraryLocation forNumber(int value) { + switch (value) { + case 0: return ide_builtin; + case 1: return user; + case 2: return platform_builtin; + case 3: return referenced_platform_builtin; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + LibraryLocation> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public LibraryLocation findValueByNumber(int number) { + return LibraryLocation.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(2); + } + + private static final LibraryLocation[] VALUES = values(); + + public static LibraryLocation 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 LibraryLocation(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:cc.arduino.cli.commands.LibraryLocation) + } + + public interface LibraryDownloadReqOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.LibraryDownloadReq) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + boolean hasInstance(); + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + cc.arduino.cli.commands.Common.Instance getInstance(); + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder(); + + /** + *
+     * Name of the library.
+     * 
+ * + * string name = 2; + * @return The name. + */ + java.lang.String getName(); + /** + *
+     * Name of the library.
+     * 
+ * + * string name = 2; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+     * The version of the library to download.
+     * 
+ * + * string version = 3; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+     * The version of the library to download.
+     * 
+ * + * string version = 3; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.LibraryDownloadReq} + */ + public static final class LibraryDownloadReq extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.LibraryDownloadReq) + LibraryDownloadReqOrBuilder { + private static final long serialVersionUID = 0L; + // Use LibraryDownloadReq.newBuilder() to construct. + private LibraryDownloadReq(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LibraryDownloadReq() { + name_ = ""; + version_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LibraryDownloadReq(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LibraryDownloadReq( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cc.arduino.cli.commands.Common.Instance.Builder subBuilder = null; + if (instance_ != null) { + subBuilder = instance_.toBuilder(); + } + instance_ = input.readMessage(cc.arduino.cli.commands.Common.Instance.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instance_); + instance_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + version_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryDownloadReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryDownloadReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Lib.LibraryDownloadReq.class, cc.arduino.cli.commands.Lib.LibraryDownloadReq.Builder.class); + } + + public static final int INSTANCE_FIELD_NUMBER = 1; + private cc.arduino.cli.commands.Common.Instance instance_; + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instance_ != null; + } + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + return getInstance(); + } + + public static final int NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object name_; + /** + *
+     * Name of the library.
+     * 
+ * + * string name = 2; + * @return The name. + */ + 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; + } + } + /** + *
+     * Name of the library.
+     * 
+ * + * string name = 2; + * @return The bytes for name. + */ + 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 VERSION_FIELD_NUMBER = 3; + private volatile java.lang.Object version_; + /** + *
+     * The version of the library to download.
+     * 
+ * + * string version = 3; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + 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(); + version_ = s; + return s; + } + } + /** + *
+     * The version of the library to download.
+     * 
+ * + * string version = 3; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (instance_ != null) { + output.writeMessage(1, getInstance()); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + if (!getVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, version_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (instance_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInstance()); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + if (!getVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, version_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Lib.LibraryDownloadReq)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Lib.LibraryDownloadReq other = (cc.arduino.cli.commands.Lib.LibraryDownloadReq) obj; + + if (hasInstance() != other.hasInstance()) return false; + if (hasInstance()) { + if (!getInstance() + .equals(other.getInstance())) return false; + } + if (!getName() + .equals(other.getName())) return false; + if (!getVersion() + .equals(other.getVersion())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInstance()) { + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + } + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Lib.LibraryDownloadReq parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryDownloadReq parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryDownloadReq parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryDownloadReq parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryDownloadReq parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryDownloadReq parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryDownloadReq parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryDownloadReq parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryDownloadReq parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryDownloadReq parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryDownloadReq parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryDownloadReq parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Lib.LibraryDownloadReq 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.LibraryDownloadReq} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.LibraryDownloadReq) + cc.arduino.cli.commands.Lib.LibraryDownloadReqOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryDownloadReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryDownloadReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Lib.LibraryDownloadReq.class, cc.arduino.cli.commands.Lib.LibraryDownloadReq.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Lib.LibraryDownloadReq.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (instanceBuilder_ == null) { + instance_ = null; + } else { + instance_ = null; + instanceBuilder_ = null; + } + name_ = ""; + + version_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryDownloadReq_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryDownloadReq getDefaultInstanceForType() { + return cc.arduino.cli.commands.Lib.LibraryDownloadReq.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryDownloadReq build() { + cc.arduino.cli.commands.Lib.LibraryDownloadReq result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryDownloadReq buildPartial() { + cc.arduino.cli.commands.Lib.LibraryDownloadReq result = new cc.arduino.cli.commands.Lib.LibraryDownloadReq(this); + if (instanceBuilder_ == null) { + result.instance_ = instance_; + } else { + result.instance_ = instanceBuilder_.build(); + } + result.name_ = name_; + result.version_ = version_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Lib.LibraryDownloadReq) { + return mergeFrom((cc.arduino.cli.commands.Lib.LibraryDownloadReq)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Lib.LibraryDownloadReq other) { + if (other == cc.arduino.cli.commands.Lib.LibraryDownloadReq.getDefaultInstance()) return this; + if (other.hasInstance()) { + mergeInstance(other.getInstance()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Lib.LibraryDownloadReq parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Lib.LibraryDownloadReq) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private cc.arduino.cli.commands.Common.Instance instance_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> instanceBuilder_; + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instanceBuilder_ != null || instance_ != null; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + if (instanceBuilder_ == null) { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } else { + return instanceBuilder_.getMessage(); + } + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + onChanged(); + } else { + instanceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance( + cc.arduino.cli.commands.Common.Instance.Builder builderForValue) { + if (instanceBuilder_ == null) { + instance_ = builderForValue.build(); + onChanged(); + } else { + instanceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder mergeInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (instance_ != null) { + instance_ = + cc.arduino.cli.commands.Common.Instance.newBuilder(instance_).mergeFrom(value).buildPartial(); + } else { + instance_ = value; + } + onChanged(); + } else { + instanceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder clearInstance() { + if (instanceBuilder_ == null) { + instance_ = null; + onChanged(); + } else { + instance_ = null; + instanceBuilder_ = null; + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.Instance.Builder getInstanceBuilder() { + + onChanged(); + return getInstanceFieldBuilder().getBuilder(); + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + if (instanceBuilder_ != null) { + return instanceBuilder_.getMessageOrBuilder(); + } else { + return instance_ == null ? + cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> + getInstanceFieldBuilder() { + if (instanceBuilder_ == null) { + instanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder>( + getInstance(), + getParentForChildren(), + isClean()); + instance_ = null; + } + return instanceBuilder_; + } + + private java.lang.Object name_ = ""; + /** + *
+       * Name of the library.
+       * 
+ * + * string name = 2; + * @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; + } + } + /** + *
+       * Name of the library.
+       * 
+ * + * string name = 2; + * @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; + } + } + /** + *
+       * Name of the library.
+       * 
+ * + * string name = 2; + * @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; + onChanged(); + return this; + } + /** + *
+       * Name of the library.
+       * 
+ * + * string name = 2; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+       * Name of the library.
+       * 
+ * + * string name = 2; + * @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; + onChanged(); + return this; + } + + private java.lang.Object version_ = ""; + /** + *
+       * The version of the library to download.
+       * 
+ * + * string version = 3; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The version of the library to download.
+       * 
+ * + * string version = 3; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The version of the library to download.
+       * 
+ * + * string version = 3; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + *
+       * The version of the library to download.
+       * 
+ * + * string version = 3; + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + *
+       * The version of the library to download.
+       * 
+ * + * string version = 3; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.LibraryDownloadReq) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.LibraryDownloadReq) + private static final cc.arduino.cli.commands.Lib.LibraryDownloadReq DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Lib.LibraryDownloadReq(); + } + + public static cc.arduino.cli.commands.Lib.LibraryDownloadReq getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LibraryDownloadReq parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LibraryDownloadReq(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryDownloadReq getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface LibraryDownloadRespOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.LibraryDownloadResp) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Progress of the library download.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + * @return Whether the progress field is set. + */ + boolean hasProgress(); + /** + *
+     * Progress of the library download.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + * @return The progress. + */ + cc.arduino.cli.commands.Common.DownloadProgress getProgress(); + /** + *
+     * Progress of the library download.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + cc.arduino.cli.commands.Common.DownloadProgressOrBuilder getProgressOrBuilder(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.LibraryDownloadResp} + */ + public static final class LibraryDownloadResp extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.LibraryDownloadResp) + LibraryDownloadRespOrBuilder { + private static final long serialVersionUID = 0L; + // Use LibraryDownloadResp.newBuilder() to construct. + private LibraryDownloadResp(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LibraryDownloadResp() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LibraryDownloadResp(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LibraryDownloadResp( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cc.arduino.cli.commands.Common.DownloadProgress.Builder subBuilder = null; + if (progress_ != null) { + subBuilder = progress_.toBuilder(); + } + progress_ = input.readMessage(cc.arduino.cli.commands.Common.DownloadProgress.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(progress_); + progress_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryDownloadResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryDownloadResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Lib.LibraryDownloadResp.class, cc.arduino.cli.commands.Lib.LibraryDownloadResp.Builder.class); + } + + public static final int PROGRESS_FIELD_NUMBER = 1; + private cc.arduino.cli.commands.Common.DownloadProgress progress_; + /** + *
+     * Progress of the library download.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + * @return Whether the progress field is set. + */ + public boolean hasProgress() { + return progress_ != null; + } + /** + *
+     * Progress of the library download.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + * @return The progress. + */ + public cc.arduino.cli.commands.Common.DownloadProgress getProgress() { + return progress_ == null ? cc.arduino.cli.commands.Common.DownloadProgress.getDefaultInstance() : progress_; + } + /** + *
+     * Progress of the library download.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + public cc.arduino.cli.commands.Common.DownloadProgressOrBuilder getProgressOrBuilder() { + return getProgress(); + } + + 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 (progress_ != null) { + output.writeMessage(1, getProgress()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (progress_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProgress()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Lib.LibraryDownloadResp)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Lib.LibraryDownloadResp other = (cc.arduino.cli.commands.Lib.LibraryDownloadResp) obj; + + if (hasProgress() != other.hasProgress()) return false; + if (hasProgress()) { + if (!getProgress() + .equals(other.getProgress())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProgress()) { + hash = (37 * hash) + PROGRESS_FIELD_NUMBER; + hash = (53 * hash) + getProgress().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Lib.LibraryDownloadResp parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryDownloadResp parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryDownloadResp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryDownloadResp parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryDownloadResp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryDownloadResp parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryDownloadResp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryDownloadResp parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryDownloadResp parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryDownloadResp parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryDownloadResp parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryDownloadResp parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Lib.LibraryDownloadResp 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.LibraryDownloadResp} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.LibraryDownloadResp) + cc.arduino.cli.commands.Lib.LibraryDownloadRespOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryDownloadResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryDownloadResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Lib.LibraryDownloadResp.class, cc.arduino.cli.commands.Lib.LibraryDownloadResp.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Lib.LibraryDownloadResp.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (progressBuilder_ == null) { + progress_ = null; + } else { + progress_ = null; + progressBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryDownloadResp_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryDownloadResp getDefaultInstanceForType() { + return cc.arduino.cli.commands.Lib.LibraryDownloadResp.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryDownloadResp build() { + cc.arduino.cli.commands.Lib.LibraryDownloadResp result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryDownloadResp buildPartial() { + cc.arduino.cli.commands.Lib.LibraryDownloadResp result = new cc.arduino.cli.commands.Lib.LibraryDownloadResp(this); + if (progressBuilder_ == null) { + result.progress_ = progress_; + } else { + result.progress_ = progressBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Lib.LibraryDownloadResp) { + return mergeFrom((cc.arduino.cli.commands.Lib.LibraryDownloadResp)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Lib.LibraryDownloadResp other) { + if (other == cc.arduino.cli.commands.Lib.LibraryDownloadResp.getDefaultInstance()) return this; + if (other.hasProgress()) { + mergeProgress(other.getProgress()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Lib.LibraryDownloadResp parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Lib.LibraryDownloadResp) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private cc.arduino.cli.commands.Common.DownloadProgress progress_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.DownloadProgress, cc.arduino.cli.commands.Common.DownloadProgress.Builder, cc.arduino.cli.commands.Common.DownloadProgressOrBuilder> progressBuilder_; + /** + *
+       * Progress of the library download.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + * @return Whether the progress field is set. + */ + public boolean hasProgress() { + return progressBuilder_ != null || progress_ != null; + } + /** + *
+       * Progress of the library download.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + * @return The progress. + */ + public cc.arduino.cli.commands.Common.DownloadProgress getProgress() { + if (progressBuilder_ == null) { + return progress_ == null ? cc.arduino.cli.commands.Common.DownloadProgress.getDefaultInstance() : progress_; + } else { + return progressBuilder_.getMessage(); + } + } + /** + *
+       * Progress of the library download.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + public Builder setProgress(cc.arduino.cli.commands.Common.DownloadProgress value) { + if (progressBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + progress_ = value; + onChanged(); + } else { + progressBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Progress of the library download.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + public Builder setProgress( + cc.arduino.cli.commands.Common.DownloadProgress.Builder builderForValue) { + if (progressBuilder_ == null) { + progress_ = builderForValue.build(); + onChanged(); + } else { + progressBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Progress of the library download.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + public Builder mergeProgress(cc.arduino.cli.commands.Common.DownloadProgress value) { + if (progressBuilder_ == null) { + if (progress_ != null) { + progress_ = + cc.arduino.cli.commands.Common.DownloadProgress.newBuilder(progress_).mergeFrom(value).buildPartial(); + } else { + progress_ = value; + } + onChanged(); + } else { + progressBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Progress of the library download.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + public Builder clearProgress() { + if (progressBuilder_ == null) { + progress_ = null; + onChanged(); + } else { + progress_ = null; + progressBuilder_ = null; + } + + return this; + } + /** + *
+       * Progress of the library download.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + public cc.arduino.cli.commands.Common.DownloadProgress.Builder getProgressBuilder() { + + onChanged(); + return getProgressFieldBuilder().getBuilder(); + } + /** + *
+       * Progress of the library download.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + public cc.arduino.cli.commands.Common.DownloadProgressOrBuilder getProgressOrBuilder() { + if (progressBuilder_ != null) { + return progressBuilder_.getMessageOrBuilder(); + } else { + return progress_ == null ? + cc.arduino.cli.commands.Common.DownloadProgress.getDefaultInstance() : progress_; + } + } + /** + *
+       * Progress of the library download.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.DownloadProgress, cc.arduino.cli.commands.Common.DownloadProgress.Builder, cc.arduino.cli.commands.Common.DownloadProgressOrBuilder> + getProgressFieldBuilder() { + if (progressBuilder_ == null) { + progressBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.DownloadProgress, cc.arduino.cli.commands.Common.DownloadProgress.Builder, cc.arduino.cli.commands.Common.DownloadProgressOrBuilder>( + getProgress(), + getParentForChildren(), + isClean()); + progress_ = null; + } + return progressBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.LibraryDownloadResp) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.LibraryDownloadResp) + private static final cc.arduino.cli.commands.Lib.LibraryDownloadResp DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Lib.LibraryDownloadResp(); + } + + public static cc.arduino.cli.commands.Lib.LibraryDownloadResp getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LibraryDownloadResp parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LibraryDownloadResp(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryDownloadResp getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface LibraryInstallReqOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.LibraryInstallReq) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + boolean hasInstance(); + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + cc.arduino.cli.commands.Common.Instance getInstance(); + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder(); + + /** + *
+     * Name of the library.
+     * 
+ * + * string name = 2; + * @return The name. + */ + java.lang.String getName(); + /** + *
+     * Name of the library.
+     * 
+ * + * string name = 2; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+     * The version of the library to install.
+     * 
+ * + * string version = 3; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+     * The version of the library to install.
+     * 
+ * + * string version = 3; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.LibraryInstallReq} + */ + public static final class LibraryInstallReq extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.LibraryInstallReq) + LibraryInstallReqOrBuilder { + private static final long serialVersionUID = 0L; + // Use LibraryInstallReq.newBuilder() to construct. + private LibraryInstallReq(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LibraryInstallReq() { + name_ = ""; + version_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LibraryInstallReq(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LibraryInstallReq( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cc.arduino.cli.commands.Common.Instance.Builder subBuilder = null; + if (instance_ != null) { + subBuilder = instance_.toBuilder(); + } + instance_ = input.readMessage(cc.arduino.cli.commands.Common.Instance.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instance_); + instance_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + version_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryInstallReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryInstallReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Lib.LibraryInstallReq.class, cc.arduino.cli.commands.Lib.LibraryInstallReq.Builder.class); + } + + public static final int INSTANCE_FIELD_NUMBER = 1; + private cc.arduino.cli.commands.Common.Instance instance_; + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instance_ != null; + } + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + return getInstance(); + } + + public static final int NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object name_; + /** + *
+     * Name of the library.
+     * 
+ * + * string name = 2; + * @return The name. + */ + 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; + } + } + /** + *
+     * Name of the library.
+     * 
+ * + * string name = 2; + * @return The bytes for name. + */ + 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 VERSION_FIELD_NUMBER = 3; + private volatile java.lang.Object version_; + /** + *
+     * The version of the library to install.
+     * 
+ * + * string version = 3; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + 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(); + version_ = s; + return s; + } + } + /** + *
+     * The version of the library to install.
+     * 
+ * + * string version = 3; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (instance_ != null) { + output.writeMessage(1, getInstance()); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + if (!getVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, version_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (instance_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInstance()); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + if (!getVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, version_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Lib.LibraryInstallReq)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Lib.LibraryInstallReq other = (cc.arduino.cli.commands.Lib.LibraryInstallReq) obj; + + if (hasInstance() != other.hasInstance()) return false; + if (hasInstance()) { + if (!getInstance() + .equals(other.getInstance())) return false; + } + if (!getName() + .equals(other.getName())) return false; + if (!getVersion() + .equals(other.getVersion())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInstance()) { + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + } + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Lib.LibraryInstallReq parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryInstallReq parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryInstallReq parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryInstallReq parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryInstallReq parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryInstallReq parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryInstallReq parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryInstallReq parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryInstallReq parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryInstallReq parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryInstallReq parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryInstallReq parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Lib.LibraryInstallReq 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.LibraryInstallReq} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.LibraryInstallReq) + cc.arduino.cli.commands.Lib.LibraryInstallReqOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryInstallReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryInstallReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Lib.LibraryInstallReq.class, cc.arduino.cli.commands.Lib.LibraryInstallReq.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Lib.LibraryInstallReq.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (instanceBuilder_ == null) { + instance_ = null; + } else { + instance_ = null; + instanceBuilder_ = null; + } + name_ = ""; + + version_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryInstallReq_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryInstallReq getDefaultInstanceForType() { + return cc.arduino.cli.commands.Lib.LibraryInstallReq.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryInstallReq build() { + cc.arduino.cli.commands.Lib.LibraryInstallReq result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryInstallReq buildPartial() { + cc.arduino.cli.commands.Lib.LibraryInstallReq result = new cc.arduino.cli.commands.Lib.LibraryInstallReq(this); + if (instanceBuilder_ == null) { + result.instance_ = instance_; + } else { + result.instance_ = instanceBuilder_.build(); + } + result.name_ = name_; + result.version_ = version_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Lib.LibraryInstallReq) { + return mergeFrom((cc.arduino.cli.commands.Lib.LibraryInstallReq)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Lib.LibraryInstallReq other) { + if (other == cc.arduino.cli.commands.Lib.LibraryInstallReq.getDefaultInstance()) return this; + if (other.hasInstance()) { + mergeInstance(other.getInstance()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Lib.LibraryInstallReq parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Lib.LibraryInstallReq) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private cc.arduino.cli.commands.Common.Instance instance_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> instanceBuilder_; + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instanceBuilder_ != null || instance_ != null; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + if (instanceBuilder_ == null) { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } else { + return instanceBuilder_.getMessage(); + } + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + onChanged(); + } else { + instanceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance( + cc.arduino.cli.commands.Common.Instance.Builder builderForValue) { + if (instanceBuilder_ == null) { + instance_ = builderForValue.build(); + onChanged(); + } else { + instanceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder mergeInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (instance_ != null) { + instance_ = + cc.arduino.cli.commands.Common.Instance.newBuilder(instance_).mergeFrom(value).buildPartial(); + } else { + instance_ = value; + } + onChanged(); + } else { + instanceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder clearInstance() { + if (instanceBuilder_ == null) { + instance_ = null; + onChanged(); + } else { + instance_ = null; + instanceBuilder_ = null; + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.Instance.Builder getInstanceBuilder() { + + onChanged(); + return getInstanceFieldBuilder().getBuilder(); + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + if (instanceBuilder_ != null) { + return instanceBuilder_.getMessageOrBuilder(); + } else { + return instance_ == null ? + cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> + getInstanceFieldBuilder() { + if (instanceBuilder_ == null) { + instanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder>( + getInstance(), + getParentForChildren(), + isClean()); + instance_ = null; + } + return instanceBuilder_; + } + + private java.lang.Object name_ = ""; + /** + *
+       * Name of the library.
+       * 
+ * + * string name = 2; + * @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; + } + } + /** + *
+       * Name of the library.
+       * 
+ * + * string name = 2; + * @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; + } + } + /** + *
+       * Name of the library.
+       * 
+ * + * string name = 2; + * @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; + onChanged(); + return this; + } + /** + *
+       * Name of the library.
+       * 
+ * + * string name = 2; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+       * Name of the library.
+       * 
+ * + * string name = 2; + * @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; + onChanged(); + return this; + } + + private java.lang.Object version_ = ""; + /** + *
+       * The version of the library to install.
+       * 
+ * + * string version = 3; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The version of the library to install.
+       * 
+ * + * string version = 3; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The version of the library to install.
+       * 
+ * + * string version = 3; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + *
+       * The version of the library to install.
+       * 
+ * + * string version = 3; + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + *
+       * The version of the library to install.
+       * 
+ * + * string version = 3; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.LibraryInstallReq) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.LibraryInstallReq) + private static final cc.arduino.cli.commands.Lib.LibraryInstallReq DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Lib.LibraryInstallReq(); + } + + public static cc.arduino.cli.commands.Lib.LibraryInstallReq getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LibraryInstallReq parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LibraryInstallReq(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryInstallReq getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface LibraryInstallRespOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.LibraryInstallResp) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Progress of the library download.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + * @return Whether the progress field is set. + */ + boolean hasProgress(); + /** + *
+     * Progress of the library download.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + * @return The progress. + */ + cc.arduino.cli.commands.Common.DownloadProgress getProgress(); + /** + *
+     * Progress of the library download.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + cc.arduino.cli.commands.Common.DownloadProgressOrBuilder getProgressOrBuilder(); + + /** + *
+     * Description of the current stage of the installation.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + * @return Whether the taskProgress field is set. + */ + boolean hasTaskProgress(); + /** + *
+     * Description of the current stage of the installation.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + * @return The taskProgress. + */ + cc.arduino.cli.commands.Common.TaskProgress getTaskProgress(); + /** + *
+     * Description of the current stage of the installation.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + */ + cc.arduino.cli.commands.Common.TaskProgressOrBuilder getTaskProgressOrBuilder(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.LibraryInstallResp} + */ + public static final class LibraryInstallResp extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.LibraryInstallResp) + LibraryInstallRespOrBuilder { + private static final long serialVersionUID = 0L; + // Use LibraryInstallResp.newBuilder() to construct. + private LibraryInstallResp(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LibraryInstallResp() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LibraryInstallResp(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LibraryInstallResp( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cc.arduino.cli.commands.Common.DownloadProgress.Builder subBuilder = null; + if (progress_ != null) { + subBuilder = progress_.toBuilder(); + } + progress_ = input.readMessage(cc.arduino.cli.commands.Common.DownloadProgress.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(progress_); + progress_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + 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; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryInstallResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryInstallResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Lib.LibraryInstallResp.class, cc.arduino.cli.commands.Lib.LibraryInstallResp.Builder.class); + } + + public static final int PROGRESS_FIELD_NUMBER = 1; + private cc.arduino.cli.commands.Common.DownloadProgress progress_; + /** + *
+     * Progress of the library download.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + * @return Whether the progress field is set. + */ + public boolean hasProgress() { + return progress_ != null; + } + /** + *
+     * Progress of the library download.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + * @return The progress. + */ + public cc.arduino.cli.commands.Common.DownloadProgress getProgress() { + return progress_ == null ? cc.arduino.cli.commands.Common.DownloadProgress.getDefaultInstance() : progress_; + } + /** + *
+     * Progress of the library download.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + public cc.arduino.cli.commands.Common.DownloadProgressOrBuilder getProgressOrBuilder() { + return getProgress(); + } + + public static final int TASK_PROGRESS_FIELD_NUMBER = 2; + private cc.arduino.cli.commands.Common.TaskProgress taskProgress_; + /** + *
+     * Description of the current stage of the installation.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + * @return Whether the taskProgress field is set. + */ + public boolean hasTaskProgress() { + return taskProgress_ != null; + } + /** + *
+     * Description of the current stage of the installation.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + * @return The taskProgress. + */ + public cc.arduino.cli.commands.Common.TaskProgress getTaskProgress() { + return taskProgress_ == null ? cc.arduino.cli.commands.Common.TaskProgress.getDefaultInstance() : taskProgress_; + } + /** + *
+     * Description of the current stage of the installation.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + */ + public cc.arduino.cli.commands.Common.TaskProgressOrBuilder getTaskProgressOrBuilder() { + return getTaskProgress(); + } + + 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 (progress_ != null) { + output.writeMessage(1, getProgress()); + } + if (taskProgress_ != null) { + output.writeMessage(2, getTaskProgress()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (progress_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProgress()); + } + if (taskProgress_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getTaskProgress()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Lib.LibraryInstallResp)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Lib.LibraryInstallResp other = (cc.arduino.cli.commands.Lib.LibraryInstallResp) obj; + + if (hasProgress() != other.hasProgress()) return false; + if (hasProgress()) { + if (!getProgress() + .equals(other.getProgress())) return false; + } + if (hasTaskProgress() != other.hasTaskProgress()) return false; + if (hasTaskProgress()) { + if (!getTaskProgress() + .equals(other.getTaskProgress())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProgress()) { + hash = (37 * hash) + PROGRESS_FIELD_NUMBER; + hash = (53 * hash) + getProgress().hashCode(); + } + if (hasTaskProgress()) { + hash = (37 * hash) + TASK_PROGRESS_FIELD_NUMBER; + hash = (53 * hash) + getTaskProgress().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Lib.LibraryInstallResp parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryInstallResp parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryInstallResp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryInstallResp parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryInstallResp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryInstallResp parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryInstallResp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryInstallResp parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryInstallResp parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryInstallResp parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryInstallResp parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryInstallResp parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Lib.LibraryInstallResp 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.LibraryInstallResp} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.LibraryInstallResp) + cc.arduino.cli.commands.Lib.LibraryInstallRespOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryInstallResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryInstallResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Lib.LibraryInstallResp.class, cc.arduino.cli.commands.Lib.LibraryInstallResp.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Lib.LibraryInstallResp.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (progressBuilder_ == null) { + progress_ = null; + } else { + progress_ = null; + progressBuilder_ = null; + } + if (taskProgressBuilder_ == null) { + taskProgress_ = null; + } else { + taskProgress_ = null; + taskProgressBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryInstallResp_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryInstallResp getDefaultInstanceForType() { + return cc.arduino.cli.commands.Lib.LibraryInstallResp.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryInstallResp build() { + cc.arduino.cli.commands.Lib.LibraryInstallResp result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryInstallResp buildPartial() { + cc.arduino.cli.commands.Lib.LibraryInstallResp result = new cc.arduino.cli.commands.Lib.LibraryInstallResp(this); + if (progressBuilder_ == null) { + result.progress_ = progress_; + } else { + result.progress_ = progressBuilder_.build(); + } + if (taskProgressBuilder_ == null) { + result.taskProgress_ = taskProgress_; + } else { + result.taskProgress_ = taskProgressBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Lib.LibraryInstallResp) { + return mergeFrom((cc.arduino.cli.commands.Lib.LibraryInstallResp)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Lib.LibraryInstallResp other) { + if (other == cc.arduino.cli.commands.Lib.LibraryInstallResp.getDefaultInstance()) return this; + if (other.hasProgress()) { + mergeProgress(other.getProgress()); + } + if (other.hasTaskProgress()) { + mergeTaskProgress(other.getTaskProgress()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Lib.LibraryInstallResp parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Lib.LibraryInstallResp) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private cc.arduino.cli.commands.Common.DownloadProgress progress_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.DownloadProgress, cc.arduino.cli.commands.Common.DownloadProgress.Builder, cc.arduino.cli.commands.Common.DownloadProgressOrBuilder> progressBuilder_; + /** + *
+       * Progress of the library download.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + * @return Whether the progress field is set. + */ + public boolean hasProgress() { + return progressBuilder_ != null || progress_ != null; + } + /** + *
+       * Progress of the library download.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + * @return The progress. + */ + public cc.arduino.cli.commands.Common.DownloadProgress getProgress() { + if (progressBuilder_ == null) { + return progress_ == null ? cc.arduino.cli.commands.Common.DownloadProgress.getDefaultInstance() : progress_; + } else { + return progressBuilder_.getMessage(); + } + } + /** + *
+       * Progress of the library download.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + public Builder setProgress(cc.arduino.cli.commands.Common.DownloadProgress value) { + if (progressBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + progress_ = value; + onChanged(); + } else { + progressBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Progress of the library download.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + public Builder setProgress( + cc.arduino.cli.commands.Common.DownloadProgress.Builder builderForValue) { + if (progressBuilder_ == null) { + progress_ = builderForValue.build(); + onChanged(); + } else { + progressBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Progress of the library download.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + public Builder mergeProgress(cc.arduino.cli.commands.Common.DownloadProgress value) { + if (progressBuilder_ == null) { + if (progress_ != null) { + progress_ = + cc.arduino.cli.commands.Common.DownloadProgress.newBuilder(progress_).mergeFrom(value).buildPartial(); + } else { + progress_ = value; + } + onChanged(); + } else { + progressBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Progress of the library download.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + public Builder clearProgress() { + if (progressBuilder_ == null) { + progress_ = null; + onChanged(); + } else { + progress_ = null; + progressBuilder_ = null; + } + + return this; + } + /** + *
+       * Progress of the library download.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + public cc.arduino.cli.commands.Common.DownloadProgress.Builder getProgressBuilder() { + + onChanged(); + return getProgressFieldBuilder().getBuilder(); + } + /** + *
+       * Progress of the library download.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + public cc.arduino.cli.commands.Common.DownloadProgressOrBuilder getProgressOrBuilder() { + if (progressBuilder_ != null) { + return progressBuilder_.getMessageOrBuilder(); + } else { + return progress_ == null ? + cc.arduino.cli.commands.Common.DownloadProgress.getDefaultInstance() : progress_; + } + } + /** + *
+       * Progress of the library download.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.DownloadProgress, cc.arduino.cli.commands.Common.DownloadProgress.Builder, cc.arduino.cli.commands.Common.DownloadProgressOrBuilder> + getProgressFieldBuilder() { + if (progressBuilder_ == null) { + progressBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.DownloadProgress, cc.arduino.cli.commands.Common.DownloadProgress.Builder, cc.arduino.cli.commands.Common.DownloadProgressOrBuilder>( + getProgress(), + getParentForChildren(), + isClean()); + progress_ = null; + } + return progressBuilder_; + } + + 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_; + /** + *
+       * Description of the current stage of the installation.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + * @return Whether the taskProgress field is set. + */ + public boolean hasTaskProgress() { + return taskProgressBuilder_ != null || taskProgress_ != null; + } + /** + *
+       * Description of the current stage of the installation.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + * @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(); + } + } + /** + *
+       * Description of the current stage of the installation.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + */ + 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; + } + /** + *
+       * Description of the current stage of the installation.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + */ + 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; + } + /** + *
+       * Description of the current stage of the installation.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + */ + 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; + } + /** + *
+       * Description of the current stage of the installation.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + */ + public Builder clearTaskProgress() { + if (taskProgressBuilder_ == null) { + taskProgress_ = null; + onChanged(); + } else { + taskProgress_ = null; + taskProgressBuilder_ = null; + } + + return this; + } + /** + *
+       * Description of the current stage of the installation.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + */ + public cc.arduino.cli.commands.Common.TaskProgress.Builder getTaskProgressBuilder() { + + onChanged(); + return getTaskProgressFieldBuilder().getBuilder(); + } + /** + *
+       * Description of the current stage of the installation.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + */ + 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_; + } + } + /** + *
+       * Description of the current stage of the installation.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + */ + 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_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.LibraryInstallResp) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.LibraryInstallResp) + private static final cc.arduino.cli.commands.Lib.LibraryInstallResp DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Lib.LibraryInstallResp(); + } + + public static cc.arduino.cli.commands.Lib.LibraryInstallResp getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LibraryInstallResp parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LibraryInstallResp(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryInstallResp getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface LibraryUninstallReqOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.LibraryUninstallReq) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + boolean hasInstance(); + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + cc.arduino.cli.commands.Common.Instance getInstance(); + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder(); + + /** + *
+     * Name of the library.
+     * 
+ * + * string name = 2; + * @return The name. + */ + java.lang.String getName(); + /** + *
+     * Name of the library.
+     * 
+ * + * string name = 2; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+     * The version of the library to uninstall.
+     * 
+ * + * string version = 3; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+     * The version of the library to uninstall.
+     * 
+ * + * string version = 3; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.LibraryUninstallReq} + */ + public static final class LibraryUninstallReq extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.LibraryUninstallReq) + LibraryUninstallReqOrBuilder { + private static final long serialVersionUID = 0L; + // Use LibraryUninstallReq.newBuilder() to construct. + private LibraryUninstallReq(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LibraryUninstallReq() { + name_ = ""; + version_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LibraryUninstallReq(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LibraryUninstallReq( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cc.arduino.cli.commands.Common.Instance.Builder subBuilder = null; + if (instance_ != null) { + subBuilder = instance_.toBuilder(); + } + instance_ = input.readMessage(cc.arduino.cli.commands.Common.Instance.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instance_); + instance_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + version_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryUninstallReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryUninstallReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Lib.LibraryUninstallReq.class, cc.arduino.cli.commands.Lib.LibraryUninstallReq.Builder.class); + } + + public static final int INSTANCE_FIELD_NUMBER = 1; + private cc.arduino.cli.commands.Common.Instance instance_; + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instance_ != null; + } + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + return getInstance(); + } + + public static final int NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object name_; + /** + *
+     * Name of the library.
+     * 
+ * + * string name = 2; + * @return The name. + */ + 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; + } + } + /** + *
+     * Name of the library.
+     * 
+ * + * string name = 2; + * @return The bytes for name. + */ + 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 VERSION_FIELD_NUMBER = 3; + private volatile java.lang.Object version_; + /** + *
+     * The version of the library to uninstall.
+     * 
+ * + * string version = 3; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + 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(); + version_ = s; + return s; + } + } + /** + *
+     * The version of the library to uninstall.
+     * 
+ * + * string version = 3; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (instance_ != null) { + output.writeMessage(1, getInstance()); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + if (!getVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, version_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (instance_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInstance()); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + if (!getVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, version_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Lib.LibraryUninstallReq)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Lib.LibraryUninstallReq other = (cc.arduino.cli.commands.Lib.LibraryUninstallReq) obj; + + if (hasInstance() != other.hasInstance()) return false; + if (hasInstance()) { + if (!getInstance() + .equals(other.getInstance())) return false; + } + if (!getName() + .equals(other.getName())) return false; + if (!getVersion() + .equals(other.getVersion())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInstance()) { + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + } + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Lib.LibraryUninstallReq parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryUninstallReq parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryUninstallReq parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryUninstallReq parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryUninstallReq parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryUninstallReq parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryUninstallReq parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryUninstallReq parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryUninstallReq parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryUninstallReq parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryUninstallReq parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryUninstallReq parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Lib.LibraryUninstallReq 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.LibraryUninstallReq} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.LibraryUninstallReq) + cc.arduino.cli.commands.Lib.LibraryUninstallReqOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryUninstallReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryUninstallReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Lib.LibraryUninstallReq.class, cc.arduino.cli.commands.Lib.LibraryUninstallReq.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Lib.LibraryUninstallReq.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (instanceBuilder_ == null) { + instance_ = null; + } else { + instance_ = null; + instanceBuilder_ = null; + } + name_ = ""; + + version_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryUninstallReq_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryUninstallReq getDefaultInstanceForType() { + return cc.arduino.cli.commands.Lib.LibraryUninstallReq.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryUninstallReq build() { + cc.arduino.cli.commands.Lib.LibraryUninstallReq result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryUninstallReq buildPartial() { + cc.arduino.cli.commands.Lib.LibraryUninstallReq result = new cc.arduino.cli.commands.Lib.LibraryUninstallReq(this); + if (instanceBuilder_ == null) { + result.instance_ = instance_; + } else { + result.instance_ = instanceBuilder_.build(); + } + result.name_ = name_; + result.version_ = version_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Lib.LibraryUninstallReq) { + return mergeFrom((cc.arduino.cli.commands.Lib.LibraryUninstallReq)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Lib.LibraryUninstallReq other) { + if (other == cc.arduino.cli.commands.Lib.LibraryUninstallReq.getDefaultInstance()) return this; + if (other.hasInstance()) { + mergeInstance(other.getInstance()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Lib.LibraryUninstallReq parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Lib.LibraryUninstallReq) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private cc.arduino.cli.commands.Common.Instance instance_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> instanceBuilder_; + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instanceBuilder_ != null || instance_ != null; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + if (instanceBuilder_ == null) { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } else { + return instanceBuilder_.getMessage(); + } + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + onChanged(); + } else { + instanceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance( + cc.arduino.cli.commands.Common.Instance.Builder builderForValue) { + if (instanceBuilder_ == null) { + instance_ = builderForValue.build(); + onChanged(); + } else { + instanceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder mergeInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (instance_ != null) { + instance_ = + cc.arduino.cli.commands.Common.Instance.newBuilder(instance_).mergeFrom(value).buildPartial(); + } else { + instance_ = value; + } + onChanged(); + } else { + instanceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder clearInstance() { + if (instanceBuilder_ == null) { + instance_ = null; + onChanged(); + } else { + instance_ = null; + instanceBuilder_ = null; + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.Instance.Builder getInstanceBuilder() { + + onChanged(); + return getInstanceFieldBuilder().getBuilder(); + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + if (instanceBuilder_ != null) { + return instanceBuilder_.getMessageOrBuilder(); + } else { + return instance_ == null ? + cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> + getInstanceFieldBuilder() { + if (instanceBuilder_ == null) { + instanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder>( + getInstance(), + getParentForChildren(), + isClean()); + instance_ = null; + } + return instanceBuilder_; + } + + private java.lang.Object name_ = ""; + /** + *
+       * Name of the library.
+       * 
+ * + * string name = 2; + * @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; + } + } + /** + *
+       * Name of the library.
+       * 
+ * + * string name = 2; + * @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; + } + } + /** + *
+       * Name of the library.
+       * 
+ * + * string name = 2; + * @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; + onChanged(); + return this; + } + /** + *
+       * Name of the library.
+       * 
+ * + * string name = 2; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+       * Name of the library.
+       * 
+ * + * string name = 2; + * @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; + onChanged(); + return this; + } + + private java.lang.Object version_ = ""; + /** + *
+       * The version of the library to uninstall.
+       * 
+ * + * string version = 3; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The version of the library to uninstall.
+       * 
+ * + * string version = 3; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The version of the library to uninstall.
+       * 
+ * + * string version = 3; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + *
+       * The version of the library to uninstall.
+       * 
+ * + * string version = 3; + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + *
+       * The version of the library to uninstall.
+       * 
+ * + * string version = 3; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.LibraryUninstallReq) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.LibraryUninstallReq) + private static final cc.arduino.cli.commands.Lib.LibraryUninstallReq DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Lib.LibraryUninstallReq(); + } + + public static cc.arduino.cli.commands.Lib.LibraryUninstallReq getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LibraryUninstallReq parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LibraryUninstallReq(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryUninstallReq getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface LibraryUninstallRespOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.LibraryUninstallResp) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Description of the current stage of the uninstallation.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + * @return Whether the taskProgress field is set. + */ + boolean hasTaskProgress(); + /** + *
+     * Description of the current stage of the uninstallation.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + * @return The taskProgress. + */ + cc.arduino.cli.commands.Common.TaskProgress getTaskProgress(); + /** + *
+     * Description of the current stage of the uninstallation.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + */ + cc.arduino.cli.commands.Common.TaskProgressOrBuilder getTaskProgressOrBuilder(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.LibraryUninstallResp} + */ + public static final class LibraryUninstallResp extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.LibraryUninstallResp) + LibraryUninstallRespOrBuilder { + private static final long serialVersionUID = 0L; + // Use LibraryUninstallResp.newBuilder() to construct. + private LibraryUninstallResp(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LibraryUninstallResp() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LibraryUninstallResp(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LibraryUninstallResp( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + 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; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryUninstallResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryUninstallResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Lib.LibraryUninstallResp.class, cc.arduino.cli.commands.Lib.LibraryUninstallResp.Builder.class); + } + + public static final int TASK_PROGRESS_FIELD_NUMBER = 1; + private cc.arduino.cli.commands.Common.TaskProgress taskProgress_; + /** + *
+     * Description of the current stage of the uninstallation.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + * @return Whether the taskProgress field is set. + */ + public boolean hasTaskProgress() { + return taskProgress_ != null; + } + /** + *
+     * Description of the current stage of the uninstallation.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + * @return The taskProgress. + */ + public cc.arduino.cli.commands.Common.TaskProgress getTaskProgress() { + return taskProgress_ == null ? cc.arduino.cli.commands.Common.TaskProgress.getDefaultInstance() : taskProgress_; + } + /** + *
+     * Description of the current stage of the uninstallation.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + */ + public cc.arduino.cli.commands.Common.TaskProgressOrBuilder getTaskProgressOrBuilder() { + return getTaskProgress(); + } + + 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 (taskProgress_ != null) { + output.writeMessage(1, getTaskProgress()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (taskProgress_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getTaskProgress()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Lib.LibraryUninstallResp)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Lib.LibraryUninstallResp other = (cc.arduino.cli.commands.Lib.LibraryUninstallResp) obj; + + if (hasTaskProgress() != other.hasTaskProgress()) return false; + if (hasTaskProgress()) { + if (!getTaskProgress() + .equals(other.getTaskProgress())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTaskProgress()) { + hash = (37 * hash) + TASK_PROGRESS_FIELD_NUMBER; + hash = (53 * hash) + getTaskProgress().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Lib.LibraryUninstallResp parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryUninstallResp parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryUninstallResp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryUninstallResp parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryUninstallResp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryUninstallResp parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryUninstallResp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryUninstallResp parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryUninstallResp parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryUninstallResp parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryUninstallResp parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryUninstallResp parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Lib.LibraryUninstallResp 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.LibraryUninstallResp} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.LibraryUninstallResp) + cc.arduino.cli.commands.Lib.LibraryUninstallRespOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryUninstallResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryUninstallResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Lib.LibraryUninstallResp.class, cc.arduino.cli.commands.Lib.LibraryUninstallResp.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Lib.LibraryUninstallResp.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (taskProgressBuilder_ == null) { + taskProgress_ = null; + } else { + taskProgress_ = null; + taskProgressBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryUninstallResp_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryUninstallResp getDefaultInstanceForType() { + return cc.arduino.cli.commands.Lib.LibraryUninstallResp.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryUninstallResp build() { + cc.arduino.cli.commands.Lib.LibraryUninstallResp result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryUninstallResp buildPartial() { + cc.arduino.cli.commands.Lib.LibraryUninstallResp result = new cc.arduino.cli.commands.Lib.LibraryUninstallResp(this); + if (taskProgressBuilder_ == null) { + result.taskProgress_ = taskProgress_; + } else { + result.taskProgress_ = taskProgressBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Lib.LibraryUninstallResp) { + return mergeFrom((cc.arduino.cli.commands.Lib.LibraryUninstallResp)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Lib.LibraryUninstallResp other) { + if (other == cc.arduino.cli.commands.Lib.LibraryUninstallResp.getDefaultInstance()) return this; + if (other.hasTaskProgress()) { + mergeTaskProgress(other.getTaskProgress()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Lib.LibraryUninstallResp parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Lib.LibraryUninstallResp) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + 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_; + /** + *
+       * Description of the current stage of the uninstallation.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + * @return Whether the taskProgress field is set. + */ + public boolean hasTaskProgress() { + return taskProgressBuilder_ != null || taskProgress_ != null; + } + /** + *
+       * Description of the current stage of the uninstallation.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + * @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(); + } + } + /** + *
+       * Description of the current stage of the uninstallation.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + */ + 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; + } + /** + *
+       * Description of the current stage of the uninstallation.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + */ + 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; + } + /** + *
+       * Description of the current stage of the uninstallation.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + */ + 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; + } + /** + *
+       * Description of the current stage of the uninstallation.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + */ + public Builder clearTaskProgress() { + if (taskProgressBuilder_ == null) { + taskProgress_ = null; + onChanged(); + } else { + taskProgress_ = null; + taskProgressBuilder_ = null; + } + + return this; + } + /** + *
+       * Description of the current stage of the uninstallation.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + */ + public cc.arduino.cli.commands.Common.TaskProgress.Builder getTaskProgressBuilder() { + + onChanged(); + return getTaskProgressFieldBuilder().getBuilder(); + } + /** + *
+       * Description of the current stage of the uninstallation.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + */ + 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_; + } + } + /** + *
+       * Description of the current stage of the uninstallation.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 1; + */ + 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_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.LibraryUninstallResp) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.LibraryUninstallResp) + private static final cc.arduino.cli.commands.Lib.LibraryUninstallResp DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Lib.LibraryUninstallResp(); + } + + public static cc.arduino.cli.commands.Lib.LibraryUninstallResp getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LibraryUninstallResp parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LibraryUninstallResp(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryUninstallResp getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface LibraryUpgradeAllReqOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.LibraryUpgradeAllReq) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + boolean hasInstance(); + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + cc.arduino.cli.commands.Common.Instance getInstance(); + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.LibraryUpgradeAllReq} + */ + public static final class LibraryUpgradeAllReq extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.LibraryUpgradeAllReq) + LibraryUpgradeAllReqOrBuilder { + private static final long serialVersionUID = 0L; + // Use LibraryUpgradeAllReq.newBuilder() to construct. + private LibraryUpgradeAllReq(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LibraryUpgradeAllReq() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LibraryUpgradeAllReq(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LibraryUpgradeAllReq( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cc.arduino.cli.commands.Common.Instance.Builder subBuilder = null; + if (instance_ != null) { + subBuilder = instance_.toBuilder(); + } + instance_ = input.readMessage(cc.arduino.cli.commands.Common.Instance.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instance_); + instance_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryUpgradeAllReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryUpgradeAllReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq.class, cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq.Builder.class); + } + + public static final int INSTANCE_FIELD_NUMBER = 1; + private cc.arduino.cli.commands.Common.Instance instance_; + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instance_ != null; + } + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + return getInstance(); + } + + 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 (instance_ != null) { + output.writeMessage(1, getInstance()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (instance_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInstance()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq other = (cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq) obj; + + if (hasInstance() != other.hasInstance()) return false; + if (hasInstance()) { + if (!getInstance() + .equals(other.getInstance())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInstance()) { + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.LibraryUpgradeAllReq} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.LibraryUpgradeAllReq) + cc.arduino.cli.commands.Lib.LibraryUpgradeAllReqOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryUpgradeAllReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryUpgradeAllReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq.class, cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (instanceBuilder_ == null) { + instance_ = null; + } else { + instance_ = null; + instanceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryUpgradeAllReq_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq getDefaultInstanceForType() { + return cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq build() { + cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq buildPartial() { + cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq result = new cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq(this); + if (instanceBuilder_ == null) { + result.instance_ = instance_; + } else { + result.instance_ = instanceBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq) { + return mergeFrom((cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq other) { + if (other == cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq.getDefaultInstance()) return this; + if (other.hasInstance()) { + mergeInstance(other.getInstance()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private cc.arduino.cli.commands.Common.Instance instance_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> instanceBuilder_; + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instanceBuilder_ != null || instance_ != null; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + if (instanceBuilder_ == null) { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } else { + return instanceBuilder_.getMessage(); + } + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + onChanged(); + } else { + instanceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance( + cc.arduino.cli.commands.Common.Instance.Builder builderForValue) { + if (instanceBuilder_ == null) { + instance_ = builderForValue.build(); + onChanged(); + } else { + instanceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder mergeInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (instance_ != null) { + instance_ = + cc.arduino.cli.commands.Common.Instance.newBuilder(instance_).mergeFrom(value).buildPartial(); + } else { + instance_ = value; + } + onChanged(); + } else { + instanceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder clearInstance() { + if (instanceBuilder_ == null) { + instance_ = null; + onChanged(); + } else { + instance_ = null; + instanceBuilder_ = null; + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.Instance.Builder getInstanceBuilder() { + + onChanged(); + return getInstanceFieldBuilder().getBuilder(); + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + if (instanceBuilder_ != null) { + return instanceBuilder_.getMessageOrBuilder(); + } else { + return instance_ == null ? + cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> + getInstanceFieldBuilder() { + if (instanceBuilder_ == null) { + instanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder>( + getInstance(), + getParentForChildren(), + isClean()); + instance_ = null; + } + return instanceBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.LibraryUpgradeAllReq) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.LibraryUpgradeAllReq) + private static final cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq(); + } + + public static cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LibraryUpgradeAllReq parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LibraryUpgradeAllReq(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryUpgradeAllReq getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface LibraryUpgradeAllRespOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.LibraryUpgradeAllResp) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Progress of the downloads of files needed for the upgrades.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + * @return Whether the progress field is set. + */ + boolean hasProgress(); + /** + *
+     * Progress of the downloads of files needed for the upgrades.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + * @return The progress. + */ + cc.arduino.cli.commands.Common.DownloadProgress getProgress(); + /** + *
+     * Progress of the downloads of files needed for the upgrades.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + cc.arduino.cli.commands.Common.DownloadProgressOrBuilder getProgressOrBuilder(); + + /** + *
+     * Description of the current stage of the upgrade.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + * @return Whether the taskProgress field is set. + */ + boolean hasTaskProgress(); + /** + *
+     * Description of the current stage of the upgrade.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + * @return The taskProgress. + */ + cc.arduino.cli.commands.Common.TaskProgress getTaskProgress(); + /** + *
+     * Description of the current stage of the upgrade.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + */ + cc.arduino.cli.commands.Common.TaskProgressOrBuilder getTaskProgressOrBuilder(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.LibraryUpgradeAllResp} + */ + public static final class LibraryUpgradeAllResp extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.LibraryUpgradeAllResp) + LibraryUpgradeAllRespOrBuilder { + private static final long serialVersionUID = 0L; + // Use LibraryUpgradeAllResp.newBuilder() to construct. + private LibraryUpgradeAllResp(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LibraryUpgradeAllResp() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LibraryUpgradeAllResp(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LibraryUpgradeAllResp( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cc.arduino.cli.commands.Common.DownloadProgress.Builder subBuilder = null; + if (progress_ != null) { + subBuilder = progress_.toBuilder(); + } + progress_ = input.readMessage(cc.arduino.cli.commands.Common.DownloadProgress.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(progress_); + progress_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + 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; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryUpgradeAllResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryUpgradeAllResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Lib.LibraryUpgradeAllResp.class, cc.arduino.cli.commands.Lib.LibraryUpgradeAllResp.Builder.class); + } + + public static final int PROGRESS_FIELD_NUMBER = 1; + private cc.arduino.cli.commands.Common.DownloadProgress progress_; + /** + *
+     * Progress of the downloads of files needed for the upgrades.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + * @return Whether the progress field is set. + */ + public boolean hasProgress() { + return progress_ != null; + } + /** + *
+     * Progress of the downloads of files needed for the upgrades.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + * @return The progress. + */ + public cc.arduino.cli.commands.Common.DownloadProgress getProgress() { + return progress_ == null ? cc.arduino.cli.commands.Common.DownloadProgress.getDefaultInstance() : progress_; + } + /** + *
+     * Progress of the downloads of files needed for the upgrades.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + public cc.arduino.cli.commands.Common.DownloadProgressOrBuilder getProgressOrBuilder() { + return getProgress(); + } + + public static final int TASK_PROGRESS_FIELD_NUMBER = 2; + private cc.arduino.cli.commands.Common.TaskProgress taskProgress_; + /** + *
+     * Description of the current stage of the upgrade.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + * @return Whether the taskProgress field is set. + */ + public boolean hasTaskProgress() { + return taskProgress_ != null; + } + /** + *
+     * Description of the current stage of the upgrade.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + * @return The taskProgress. + */ + public cc.arduino.cli.commands.Common.TaskProgress getTaskProgress() { + return taskProgress_ == null ? cc.arduino.cli.commands.Common.TaskProgress.getDefaultInstance() : taskProgress_; + } + /** + *
+     * Description of the current stage of the upgrade.
+     * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + */ + public cc.arduino.cli.commands.Common.TaskProgressOrBuilder getTaskProgressOrBuilder() { + return getTaskProgress(); + } + + 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 (progress_ != null) { + output.writeMessage(1, getProgress()); + } + if (taskProgress_ != null) { + output.writeMessage(2, getTaskProgress()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (progress_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getProgress()); + } + if (taskProgress_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getTaskProgress()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Lib.LibraryUpgradeAllResp)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Lib.LibraryUpgradeAllResp other = (cc.arduino.cli.commands.Lib.LibraryUpgradeAllResp) obj; + + if (hasProgress() != other.hasProgress()) return false; + if (hasProgress()) { + if (!getProgress() + .equals(other.getProgress())) return false; + } + if (hasTaskProgress() != other.hasTaskProgress()) return false; + if (hasTaskProgress()) { + if (!getTaskProgress() + .equals(other.getTaskProgress())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasProgress()) { + hash = (37 * hash) + PROGRESS_FIELD_NUMBER; + hash = (53 * hash) + getProgress().hashCode(); + } + if (hasTaskProgress()) { + hash = (37 * hash) + TASK_PROGRESS_FIELD_NUMBER; + hash = (53 * hash) + getTaskProgress().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Lib.LibraryUpgradeAllResp parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryUpgradeAllResp parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryUpgradeAllResp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryUpgradeAllResp parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryUpgradeAllResp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryUpgradeAllResp parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryUpgradeAllResp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryUpgradeAllResp parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryUpgradeAllResp parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryUpgradeAllResp parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryUpgradeAllResp parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryUpgradeAllResp parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Lib.LibraryUpgradeAllResp 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.LibraryUpgradeAllResp} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.LibraryUpgradeAllResp) + cc.arduino.cli.commands.Lib.LibraryUpgradeAllRespOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryUpgradeAllResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryUpgradeAllResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Lib.LibraryUpgradeAllResp.class, cc.arduino.cli.commands.Lib.LibraryUpgradeAllResp.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Lib.LibraryUpgradeAllResp.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (progressBuilder_ == null) { + progress_ = null; + } else { + progress_ = null; + progressBuilder_ = null; + } + if (taskProgressBuilder_ == null) { + taskProgress_ = null; + } else { + taskProgress_ = null; + taskProgressBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryUpgradeAllResp_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryUpgradeAllResp getDefaultInstanceForType() { + return cc.arduino.cli.commands.Lib.LibraryUpgradeAllResp.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryUpgradeAllResp build() { + cc.arduino.cli.commands.Lib.LibraryUpgradeAllResp result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryUpgradeAllResp buildPartial() { + cc.arduino.cli.commands.Lib.LibraryUpgradeAllResp result = new cc.arduino.cli.commands.Lib.LibraryUpgradeAllResp(this); + if (progressBuilder_ == null) { + result.progress_ = progress_; + } else { + result.progress_ = progressBuilder_.build(); + } + if (taskProgressBuilder_ == null) { + result.taskProgress_ = taskProgress_; + } else { + result.taskProgress_ = taskProgressBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Lib.LibraryUpgradeAllResp) { + return mergeFrom((cc.arduino.cli.commands.Lib.LibraryUpgradeAllResp)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Lib.LibraryUpgradeAllResp other) { + if (other == cc.arduino.cli.commands.Lib.LibraryUpgradeAllResp.getDefaultInstance()) return this; + if (other.hasProgress()) { + mergeProgress(other.getProgress()); + } + if (other.hasTaskProgress()) { + mergeTaskProgress(other.getTaskProgress()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Lib.LibraryUpgradeAllResp parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Lib.LibraryUpgradeAllResp) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private cc.arduino.cli.commands.Common.DownloadProgress progress_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.DownloadProgress, cc.arduino.cli.commands.Common.DownloadProgress.Builder, cc.arduino.cli.commands.Common.DownloadProgressOrBuilder> progressBuilder_; + /** + *
+       * Progress of the downloads of files needed for the upgrades.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + * @return Whether the progress field is set. + */ + public boolean hasProgress() { + return progressBuilder_ != null || progress_ != null; + } + /** + *
+       * Progress of the downloads of files needed for the upgrades.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + * @return The progress. + */ + public cc.arduino.cli.commands.Common.DownloadProgress getProgress() { + if (progressBuilder_ == null) { + return progress_ == null ? cc.arduino.cli.commands.Common.DownloadProgress.getDefaultInstance() : progress_; + } else { + return progressBuilder_.getMessage(); + } + } + /** + *
+       * Progress of the downloads of files needed for the upgrades.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + public Builder setProgress(cc.arduino.cli.commands.Common.DownloadProgress value) { + if (progressBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + progress_ = value; + onChanged(); + } else { + progressBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Progress of the downloads of files needed for the upgrades.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + public Builder setProgress( + cc.arduino.cli.commands.Common.DownloadProgress.Builder builderForValue) { + if (progressBuilder_ == null) { + progress_ = builderForValue.build(); + onChanged(); + } else { + progressBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Progress of the downloads of files needed for the upgrades.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + public Builder mergeProgress(cc.arduino.cli.commands.Common.DownloadProgress value) { + if (progressBuilder_ == null) { + if (progress_ != null) { + progress_ = + cc.arduino.cli.commands.Common.DownloadProgress.newBuilder(progress_).mergeFrom(value).buildPartial(); + } else { + progress_ = value; + } + onChanged(); + } else { + progressBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Progress of the downloads of files needed for the upgrades.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + public Builder clearProgress() { + if (progressBuilder_ == null) { + progress_ = null; + onChanged(); + } else { + progress_ = null; + progressBuilder_ = null; + } + + return this; + } + /** + *
+       * Progress of the downloads of files needed for the upgrades.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + public cc.arduino.cli.commands.Common.DownloadProgress.Builder getProgressBuilder() { + + onChanged(); + return getProgressFieldBuilder().getBuilder(); + } + /** + *
+       * Progress of the downloads of files needed for the upgrades.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + public cc.arduino.cli.commands.Common.DownloadProgressOrBuilder getProgressOrBuilder() { + if (progressBuilder_ != null) { + return progressBuilder_.getMessageOrBuilder(); + } else { + return progress_ == null ? + cc.arduino.cli.commands.Common.DownloadProgress.getDefaultInstance() : progress_; + } + } + /** + *
+       * Progress of the downloads of files needed for the upgrades.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadProgress progress = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.DownloadProgress, cc.arduino.cli.commands.Common.DownloadProgress.Builder, cc.arduino.cli.commands.Common.DownloadProgressOrBuilder> + getProgressFieldBuilder() { + if (progressBuilder_ == null) { + progressBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.DownloadProgress, cc.arduino.cli.commands.Common.DownloadProgress.Builder, cc.arduino.cli.commands.Common.DownloadProgressOrBuilder>( + getProgress(), + getParentForChildren(), + isClean()); + progress_ = null; + } + return progressBuilder_; + } + + 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_; + /** + *
+       * Description of the current stage of the upgrade.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + * @return Whether the taskProgress field is set. + */ + public boolean hasTaskProgress() { + return taskProgressBuilder_ != null || taskProgress_ != null; + } + /** + *
+       * Description of the current stage of the upgrade.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + * @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(); + } + } + /** + *
+       * Description of the current stage of the upgrade.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + */ + 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; + } + /** + *
+       * Description of the current stage of the upgrade.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + */ + 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; + } + /** + *
+       * Description of the current stage of the upgrade.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + */ + 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; + } + /** + *
+       * Description of the current stage of the upgrade.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + */ + public Builder clearTaskProgress() { + if (taskProgressBuilder_ == null) { + taskProgress_ = null; + onChanged(); + } else { + taskProgress_ = null; + taskProgressBuilder_ = null; + } + + return this; + } + /** + *
+       * Description of the current stage of the upgrade.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + */ + public cc.arduino.cli.commands.Common.TaskProgress.Builder getTaskProgressBuilder() { + + onChanged(); + return getTaskProgressFieldBuilder().getBuilder(); + } + /** + *
+       * Description of the current stage of the upgrade.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + */ + 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_; + } + } + /** + *
+       * Description of the current stage of the upgrade.
+       * 
+ * + * .cc.arduino.cli.commands.TaskProgress task_progress = 2; + */ + 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_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.LibraryUpgradeAllResp) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.LibraryUpgradeAllResp) + private static final cc.arduino.cli.commands.Lib.LibraryUpgradeAllResp DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Lib.LibraryUpgradeAllResp(); + } + + public static cc.arduino.cli.commands.Lib.LibraryUpgradeAllResp getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LibraryUpgradeAllResp parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LibraryUpgradeAllResp(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryUpgradeAllResp getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface LibraryResolveDependenciesReqOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.LibraryResolveDependenciesReq) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + boolean hasInstance(); + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + cc.arduino.cli.commands.Common.Instance getInstance(); + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder(); + + /** + *
+     * Name of the library.
+     * 
+ * + * string name = 2; + * @return The name. + */ + java.lang.String getName(); + /** + *
+     * Name of the library.
+     * 
+ * + * string name = 2; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+     * The version of the library to check dependencies of. If no version is
+     * specified, dependencies of the newest version will be listed.
+     * 
+ * + * string version = 3; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+     * The version of the library to check dependencies of. If no version is
+     * specified, dependencies of the newest version will be listed.
+     * 
+ * + * string version = 3; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.LibraryResolveDependenciesReq} + */ + public static final class LibraryResolveDependenciesReq extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.LibraryResolveDependenciesReq) + LibraryResolveDependenciesReqOrBuilder { + private static final long serialVersionUID = 0L; + // Use LibraryResolveDependenciesReq.newBuilder() to construct. + private LibraryResolveDependenciesReq(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LibraryResolveDependenciesReq() { + name_ = ""; + version_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LibraryResolveDependenciesReq(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LibraryResolveDependenciesReq( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cc.arduino.cli.commands.Common.Instance.Builder subBuilder = null; + if (instance_ != null) { + subBuilder = instance_.toBuilder(); + } + instance_ = input.readMessage(cc.arduino.cli.commands.Common.Instance.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instance_); + instance_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + version_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryResolveDependenciesReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryResolveDependenciesReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq.class, cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq.Builder.class); + } + + public static final int INSTANCE_FIELD_NUMBER = 1; + private cc.arduino.cli.commands.Common.Instance instance_; + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instance_ != null; + } + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + return getInstance(); + } + + public static final int NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object name_; + /** + *
+     * Name of the library.
+     * 
+ * + * string name = 2; + * @return The name. + */ + 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; + } + } + /** + *
+     * Name of the library.
+     * 
+ * + * string name = 2; + * @return The bytes for name. + */ + 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 VERSION_FIELD_NUMBER = 3; + private volatile java.lang.Object version_; + /** + *
+     * The version of the library to check dependencies of. If no version is
+     * specified, dependencies of the newest version will be listed.
+     * 
+ * + * string version = 3; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + 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(); + version_ = s; + return s; + } + } + /** + *
+     * The version of the library to check dependencies of. If no version is
+     * specified, dependencies of the newest version will be listed.
+     * 
+ * + * string version = 3; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (instance_ != null) { + output.writeMessage(1, getInstance()); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + if (!getVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, version_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (instance_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInstance()); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + if (!getVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, version_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq other = (cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq) obj; + + if (hasInstance() != other.hasInstance()) return false; + if (hasInstance()) { + if (!getInstance() + .equals(other.getInstance())) return false; + } + if (!getName() + .equals(other.getName())) return false; + if (!getVersion() + .equals(other.getVersion())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInstance()) { + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + } + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.LibraryResolveDependenciesReq} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.LibraryResolveDependenciesReq) + cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReqOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryResolveDependenciesReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryResolveDependenciesReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq.class, cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (instanceBuilder_ == null) { + instance_ = null; + } else { + instance_ = null; + instanceBuilder_ = null; + } + name_ = ""; + + version_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryResolveDependenciesReq_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq getDefaultInstanceForType() { + return cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq build() { + cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq buildPartial() { + cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq result = new cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq(this); + if (instanceBuilder_ == null) { + result.instance_ = instance_; + } else { + result.instance_ = instanceBuilder_.build(); + } + result.name_ = name_; + result.version_ = version_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq) { + return mergeFrom((cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq other) { + if (other == cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq.getDefaultInstance()) return this; + if (other.hasInstance()) { + mergeInstance(other.getInstance()); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private cc.arduino.cli.commands.Common.Instance instance_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> instanceBuilder_; + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instanceBuilder_ != null || instance_ != null; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + if (instanceBuilder_ == null) { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } else { + return instanceBuilder_.getMessage(); + } + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + onChanged(); + } else { + instanceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance( + cc.arduino.cli.commands.Common.Instance.Builder builderForValue) { + if (instanceBuilder_ == null) { + instance_ = builderForValue.build(); + onChanged(); + } else { + instanceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder mergeInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (instance_ != null) { + instance_ = + cc.arduino.cli.commands.Common.Instance.newBuilder(instance_).mergeFrom(value).buildPartial(); + } else { + instance_ = value; + } + onChanged(); + } else { + instanceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder clearInstance() { + if (instanceBuilder_ == null) { + instance_ = null; + onChanged(); + } else { + instance_ = null; + instanceBuilder_ = null; + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.Instance.Builder getInstanceBuilder() { + + onChanged(); + return getInstanceFieldBuilder().getBuilder(); + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + if (instanceBuilder_ != null) { + return instanceBuilder_.getMessageOrBuilder(); + } else { + return instance_ == null ? + cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> + getInstanceFieldBuilder() { + if (instanceBuilder_ == null) { + instanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder>( + getInstance(), + getParentForChildren(), + isClean()); + instance_ = null; + } + return instanceBuilder_; + } + + private java.lang.Object name_ = ""; + /** + *
+       * Name of the library.
+       * 
+ * + * string name = 2; + * @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; + } + } + /** + *
+       * Name of the library.
+       * 
+ * + * string name = 2; + * @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; + } + } + /** + *
+       * Name of the library.
+       * 
+ * + * string name = 2; + * @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; + onChanged(); + return this; + } + /** + *
+       * Name of the library.
+       * 
+ * + * string name = 2; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+       * Name of the library.
+       * 
+ * + * string name = 2; + * @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; + onChanged(); + return this; + } + + private java.lang.Object version_ = ""; + /** + *
+       * The version of the library to check dependencies of. If no version is
+       * specified, dependencies of the newest version will be listed.
+       * 
+ * + * string version = 3; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The version of the library to check dependencies of. If no version is
+       * specified, dependencies of the newest version will be listed.
+       * 
+ * + * string version = 3; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The version of the library to check dependencies of. If no version is
+       * specified, dependencies of the newest version will be listed.
+       * 
+ * + * string version = 3; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + *
+       * The version of the library to check dependencies of. If no version is
+       * specified, dependencies of the newest version will be listed.
+       * 
+ * + * string version = 3; + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + *
+       * The version of the library to check dependencies of. If no version is
+       * specified, dependencies of the newest version will be listed.
+       * 
+ * + * string version = 3; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.LibraryResolveDependenciesReq) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.LibraryResolveDependenciesReq) + private static final cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq(); + } + + public static cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LibraryResolveDependenciesReq parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LibraryResolveDependenciesReq(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryResolveDependenciesReq getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface LibraryResolveDependenciesRespOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.LibraryResolveDependenciesResp) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Dependencies of the library.
+     * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependencyStatus dependencies = 1; + */ + java.util.List + getDependenciesList(); + /** + *
+     * Dependencies of the library.
+     * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependencyStatus dependencies = 1; + */ + cc.arduino.cli.commands.Lib.LibraryDependencyStatus getDependencies(int index); + /** + *
+     * Dependencies of the library.
+     * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependencyStatus dependencies = 1; + */ + int getDependenciesCount(); + /** + *
+     * Dependencies of the library.
+     * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependencyStatus dependencies = 1; + */ + java.util.List + getDependenciesOrBuilderList(); + /** + *
+     * Dependencies of the library.
+     * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependencyStatus dependencies = 1; + */ + cc.arduino.cli.commands.Lib.LibraryDependencyStatusOrBuilder getDependenciesOrBuilder( + int index); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.LibraryResolveDependenciesResp} + */ + public static final class LibraryResolveDependenciesResp extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.LibraryResolveDependenciesResp) + LibraryResolveDependenciesRespOrBuilder { + private static final long serialVersionUID = 0L; + // Use LibraryResolveDependenciesResp.newBuilder() to construct. + private LibraryResolveDependenciesResp(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LibraryResolveDependenciesResp() { + dependencies_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LibraryResolveDependenciesResp(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LibraryResolveDependenciesResp( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + dependencies_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + dependencies_.add( + input.readMessage(cc.arduino.cli.commands.Lib.LibraryDependencyStatus.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + dependencies_ = java.util.Collections.unmodifiableList(dependencies_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryResolveDependenciesResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryResolveDependenciesResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Lib.LibraryResolveDependenciesResp.class, cc.arduino.cli.commands.Lib.LibraryResolveDependenciesResp.Builder.class); + } + + public static final int DEPENDENCIES_FIELD_NUMBER = 1; + private java.util.List dependencies_; + /** + *
+     * Dependencies of the library.
+     * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependencyStatus dependencies = 1; + */ + public java.util.List getDependenciesList() { + return dependencies_; + } + /** + *
+     * Dependencies of the library.
+     * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependencyStatus dependencies = 1; + */ + public java.util.List + getDependenciesOrBuilderList() { + return dependencies_; + } + /** + *
+     * Dependencies of the library.
+     * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependencyStatus dependencies = 1; + */ + public int getDependenciesCount() { + return dependencies_.size(); + } + /** + *
+     * Dependencies of the library.
+     * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependencyStatus dependencies = 1; + */ + public cc.arduino.cli.commands.Lib.LibraryDependencyStatus getDependencies(int index) { + return dependencies_.get(index); + } + /** + *
+     * Dependencies of the library.
+     * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependencyStatus dependencies = 1; + */ + public cc.arduino.cli.commands.Lib.LibraryDependencyStatusOrBuilder getDependenciesOrBuilder( + int index) { + return dependencies_.get(index); + } + + 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 < dependencies_.size(); i++) { + output.writeMessage(1, dependencies_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < dependencies_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, dependencies_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Lib.LibraryResolveDependenciesResp)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Lib.LibraryResolveDependenciesResp other = (cc.arduino.cli.commands.Lib.LibraryResolveDependenciesResp) obj; + + if (!getDependenciesList() + .equals(other.getDependenciesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDependenciesCount() > 0) { + hash = (37 * hash) + DEPENDENCIES_FIELD_NUMBER; + hash = (53 * hash) + getDependenciesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Lib.LibraryResolveDependenciesResp parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryResolveDependenciesResp parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryResolveDependenciesResp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryResolveDependenciesResp parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryResolveDependenciesResp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryResolveDependenciesResp parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryResolveDependenciesResp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryResolveDependenciesResp parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryResolveDependenciesResp parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryResolveDependenciesResp parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryResolveDependenciesResp parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryResolveDependenciesResp parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Lib.LibraryResolveDependenciesResp 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.LibraryResolveDependenciesResp} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.LibraryResolveDependenciesResp) + cc.arduino.cli.commands.Lib.LibraryResolveDependenciesRespOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryResolveDependenciesResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryResolveDependenciesResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Lib.LibraryResolveDependenciesResp.class, cc.arduino.cli.commands.Lib.LibraryResolveDependenciesResp.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Lib.LibraryResolveDependenciesResp.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getDependenciesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (dependenciesBuilder_ == null) { + dependencies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + dependenciesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryResolveDependenciesResp_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryResolveDependenciesResp getDefaultInstanceForType() { + return cc.arduino.cli.commands.Lib.LibraryResolveDependenciesResp.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryResolveDependenciesResp build() { + cc.arduino.cli.commands.Lib.LibraryResolveDependenciesResp result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryResolveDependenciesResp buildPartial() { + cc.arduino.cli.commands.Lib.LibraryResolveDependenciesResp result = new cc.arduino.cli.commands.Lib.LibraryResolveDependenciesResp(this); + int from_bitField0_ = bitField0_; + if (dependenciesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + dependencies_ = java.util.Collections.unmodifiableList(dependencies_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.dependencies_ = dependencies_; + } else { + result.dependencies_ = dependenciesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Lib.LibraryResolveDependenciesResp) { + return mergeFrom((cc.arduino.cli.commands.Lib.LibraryResolveDependenciesResp)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Lib.LibraryResolveDependenciesResp other) { + if (other == cc.arduino.cli.commands.Lib.LibraryResolveDependenciesResp.getDefaultInstance()) return this; + if (dependenciesBuilder_ == null) { + if (!other.dependencies_.isEmpty()) { + if (dependencies_.isEmpty()) { + dependencies_ = other.dependencies_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDependenciesIsMutable(); + dependencies_.addAll(other.dependencies_); + } + onChanged(); + } + } else { + if (!other.dependencies_.isEmpty()) { + if (dependenciesBuilder_.isEmpty()) { + dependenciesBuilder_.dispose(); + dependenciesBuilder_ = null; + dependencies_ = other.dependencies_; + bitField0_ = (bitField0_ & ~0x00000001); + dependenciesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getDependenciesFieldBuilder() : null; + } else { + dependenciesBuilder_.addAllMessages(other.dependencies_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Lib.LibraryResolveDependenciesResp parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Lib.LibraryResolveDependenciesResp) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List dependencies_ = + java.util.Collections.emptyList(); + private void ensureDependenciesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + dependencies_ = new java.util.ArrayList(dependencies_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Lib.LibraryDependencyStatus, cc.arduino.cli.commands.Lib.LibraryDependencyStatus.Builder, cc.arduino.cli.commands.Lib.LibraryDependencyStatusOrBuilder> dependenciesBuilder_; + + /** + *
+       * Dependencies of the library.
+       * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependencyStatus dependencies = 1; + */ + public java.util.List getDependenciesList() { + if (dependenciesBuilder_ == null) { + return java.util.Collections.unmodifiableList(dependencies_); + } else { + return dependenciesBuilder_.getMessageList(); + } + } + /** + *
+       * Dependencies of the library.
+       * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependencyStatus dependencies = 1; + */ + public int getDependenciesCount() { + if (dependenciesBuilder_ == null) { + return dependencies_.size(); + } else { + return dependenciesBuilder_.getCount(); + } + } + /** + *
+       * Dependencies of the library.
+       * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependencyStatus dependencies = 1; + */ + public cc.arduino.cli.commands.Lib.LibraryDependencyStatus getDependencies(int index) { + if (dependenciesBuilder_ == null) { + return dependencies_.get(index); + } else { + return dependenciesBuilder_.getMessage(index); + } + } + /** + *
+       * Dependencies of the library.
+       * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependencyStatus dependencies = 1; + */ + public Builder setDependencies( + int index, cc.arduino.cli.commands.Lib.LibraryDependencyStatus value) { + if (dependenciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDependenciesIsMutable(); + dependencies_.set(index, value); + onChanged(); + } else { + dependenciesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Dependencies of the library.
+       * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependencyStatus dependencies = 1; + */ + public Builder setDependencies( + int index, cc.arduino.cli.commands.Lib.LibraryDependencyStatus.Builder builderForValue) { + if (dependenciesBuilder_ == null) { + ensureDependenciesIsMutable(); + dependencies_.set(index, builderForValue.build()); + onChanged(); + } else { + dependenciesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Dependencies of the library.
+       * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependencyStatus dependencies = 1; + */ + public Builder addDependencies(cc.arduino.cli.commands.Lib.LibraryDependencyStatus value) { + if (dependenciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDependenciesIsMutable(); + dependencies_.add(value); + onChanged(); + } else { + dependenciesBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Dependencies of the library.
+       * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependencyStatus dependencies = 1; + */ + public Builder addDependencies( + int index, cc.arduino.cli.commands.Lib.LibraryDependencyStatus value) { + if (dependenciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDependenciesIsMutable(); + dependencies_.add(index, value); + onChanged(); + } else { + dependenciesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Dependencies of the library.
+       * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependencyStatus dependencies = 1; + */ + public Builder addDependencies( + cc.arduino.cli.commands.Lib.LibraryDependencyStatus.Builder builderForValue) { + if (dependenciesBuilder_ == null) { + ensureDependenciesIsMutable(); + dependencies_.add(builderForValue.build()); + onChanged(); + } else { + dependenciesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Dependencies of the library.
+       * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependencyStatus dependencies = 1; + */ + public Builder addDependencies( + int index, cc.arduino.cli.commands.Lib.LibraryDependencyStatus.Builder builderForValue) { + if (dependenciesBuilder_ == null) { + ensureDependenciesIsMutable(); + dependencies_.add(index, builderForValue.build()); + onChanged(); + } else { + dependenciesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Dependencies of the library.
+       * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependencyStatus dependencies = 1; + */ + public Builder addAllDependencies( + java.lang.Iterable values) { + if (dependenciesBuilder_ == null) { + ensureDependenciesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, dependencies_); + onChanged(); + } else { + dependenciesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Dependencies of the library.
+       * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependencyStatus dependencies = 1; + */ + public Builder clearDependencies() { + if (dependenciesBuilder_ == null) { + dependencies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + dependenciesBuilder_.clear(); + } + return this; + } + /** + *
+       * Dependencies of the library.
+       * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependencyStatus dependencies = 1; + */ + public Builder removeDependencies(int index) { + if (dependenciesBuilder_ == null) { + ensureDependenciesIsMutable(); + dependencies_.remove(index); + onChanged(); + } else { + dependenciesBuilder_.remove(index); + } + return this; + } + /** + *
+       * Dependencies of the library.
+       * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependencyStatus dependencies = 1; + */ + public cc.arduino.cli.commands.Lib.LibraryDependencyStatus.Builder getDependenciesBuilder( + int index) { + return getDependenciesFieldBuilder().getBuilder(index); + } + /** + *
+       * Dependencies of the library.
+       * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependencyStatus dependencies = 1; + */ + public cc.arduino.cli.commands.Lib.LibraryDependencyStatusOrBuilder getDependenciesOrBuilder( + int index) { + if (dependenciesBuilder_ == null) { + return dependencies_.get(index); } else { + return dependenciesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Dependencies of the library.
+       * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependencyStatus dependencies = 1; + */ + public java.util.List + getDependenciesOrBuilderList() { + if (dependenciesBuilder_ != null) { + return dependenciesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dependencies_); + } + } + /** + *
+       * Dependencies of the library.
+       * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependencyStatus dependencies = 1; + */ + public cc.arduino.cli.commands.Lib.LibraryDependencyStatus.Builder addDependenciesBuilder() { + return getDependenciesFieldBuilder().addBuilder( + cc.arduino.cli.commands.Lib.LibraryDependencyStatus.getDefaultInstance()); + } + /** + *
+       * Dependencies of the library.
+       * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependencyStatus dependencies = 1; + */ + public cc.arduino.cli.commands.Lib.LibraryDependencyStatus.Builder addDependenciesBuilder( + int index) { + return getDependenciesFieldBuilder().addBuilder( + index, cc.arduino.cli.commands.Lib.LibraryDependencyStatus.getDefaultInstance()); + } + /** + *
+       * Dependencies of the library.
+       * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependencyStatus dependencies = 1; + */ + public java.util.List + getDependenciesBuilderList() { + return getDependenciesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Lib.LibraryDependencyStatus, cc.arduino.cli.commands.Lib.LibraryDependencyStatus.Builder, cc.arduino.cli.commands.Lib.LibraryDependencyStatusOrBuilder> + getDependenciesFieldBuilder() { + if (dependenciesBuilder_ == null) { + dependenciesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Lib.LibraryDependencyStatus, cc.arduino.cli.commands.Lib.LibraryDependencyStatus.Builder, cc.arduino.cli.commands.Lib.LibraryDependencyStatusOrBuilder>( + dependencies_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + dependencies_ = null; + } + return dependenciesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.LibraryResolveDependenciesResp) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.LibraryResolveDependenciesResp) + private static final cc.arduino.cli.commands.Lib.LibraryResolveDependenciesResp DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Lib.LibraryResolveDependenciesResp(); + } + + public static cc.arduino.cli.commands.Lib.LibraryResolveDependenciesResp getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LibraryResolveDependenciesResp parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LibraryResolveDependenciesResp(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryResolveDependenciesResp getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface LibraryDependencyStatusOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.LibraryDependencyStatus) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The name of the library dependency.
+     * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+     * The name of the library dependency.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+     * The required version of the library dependency.
+     * 
+ * + * string versionRequired = 2; + * @return The versionRequired. + */ + java.lang.String getVersionRequired(); + /** + *
+     * The required version of the library dependency.
+     * 
+ * + * string versionRequired = 2; + * @return The bytes for versionRequired. + */ + com.google.protobuf.ByteString + getVersionRequiredBytes(); + + /** + *
+     * Version of the library dependency currently installed.
+     * 
+ * + * string versionInstalled = 3; + * @return The versionInstalled. + */ + java.lang.String getVersionInstalled(); + /** + *
+     * Version of the library dependency currently installed.
+     * 
+ * + * string versionInstalled = 3; + * @return The bytes for versionInstalled. + */ + com.google.protobuf.ByteString + getVersionInstalledBytes(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.LibraryDependencyStatus} + */ + public static final class LibraryDependencyStatus extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.LibraryDependencyStatus) + LibraryDependencyStatusOrBuilder { + private static final long serialVersionUID = 0L; + // Use LibraryDependencyStatus.newBuilder() to construct. + private LibraryDependencyStatus(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LibraryDependencyStatus() { + name_ = ""; + versionRequired_ = ""; + versionInstalled_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LibraryDependencyStatus(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LibraryDependencyStatus( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + versionRequired_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + versionInstalled_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryDependencyStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryDependencyStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Lib.LibraryDependencyStatus.class, cc.arduino.cli.commands.Lib.LibraryDependencyStatus.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+     * The name of the library dependency.
+     * 
+ * + * string name = 1; + * @return The name. + */ + 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; + } + } + /** + *
+     * The name of the library dependency.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + 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 VERSIONREQUIRED_FIELD_NUMBER = 2; + private volatile java.lang.Object versionRequired_; + /** + *
+     * The required version of the library dependency.
+     * 
+ * + * string versionRequired = 2; + * @return The versionRequired. + */ + public java.lang.String getVersionRequired() { + java.lang.Object ref = versionRequired_; + 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(); + versionRequired_ = s; + return s; + } + } + /** + *
+     * The required version of the library dependency.
+     * 
+ * + * string versionRequired = 2; + * @return The bytes for versionRequired. + */ + public com.google.protobuf.ByteString + getVersionRequiredBytes() { + java.lang.Object ref = versionRequired_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + versionRequired_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSIONINSTALLED_FIELD_NUMBER = 3; + private volatile java.lang.Object versionInstalled_; + /** + *
+     * Version of the library dependency currently installed.
+     * 
+ * + * string versionInstalled = 3; + * @return The versionInstalled. + */ + public java.lang.String getVersionInstalled() { + java.lang.Object ref = versionInstalled_; + 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(); + versionInstalled_ = s; + return s; + } + } + /** + *
+     * Version of the library dependency currently installed.
+     * 
+ * + * string versionInstalled = 3; + * @return The bytes for versionInstalled. + */ + public com.google.protobuf.ByteString + getVersionInstalledBytes() { + java.lang.Object ref = versionInstalled_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + versionInstalled_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getVersionRequiredBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, versionRequired_); + } + if (!getVersionInstalledBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, versionInstalled_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getVersionRequiredBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, versionRequired_); + } + if (!getVersionInstalledBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, versionInstalled_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Lib.LibraryDependencyStatus)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Lib.LibraryDependencyStatus other = (cc.arduino.cli.commands.Lib.LibraryDependencyStatus) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getVersionRequired() + .equals(other.getVersionRequired())) return false; + if (!getVersionInstalled() + .equals(other.getVersionInstalled())) return false; + if (!unknownFields.equals(other.unknownFields)) 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(); + hash = (37 * hash) + VERSIONREQUIRED_FIELD_NUMBER; + hash = (53 * hash) + getVersionRequired().hashCode(); + hash = (37 * hash) + VERSIONINSTALLED_FIELD_NUMBER; + hash = (53 * hash) + getVersionInstalled().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Lib.LibraryDependencyStatus parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryDependencyStatus parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryDependencyStatus parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryDependencyStatus parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryDependencyStatus parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryDependencyStatus parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryDependencyStatus parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryDependencyStatus parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryDependencyStatus parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryDependencyStatus parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryDependencyStatus parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryDependencyStatus parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Lib.LibraryDependencyStatus 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.LibraryDependencyStatus} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.LibraryDependencyStatus) + cc.arduino.cli.commands.Lib.LibraryDependencyStatusOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryDependencyStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryDependencyStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Lib.LibraryDependencyStatus.class, cc.arduino.cli.commands.Lib.LibraryDependencyStatus.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Lib.LibraryDependencyStatus.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + versionRequired_ = ""; + + versionInstalled_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryDependencyStatus_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryDependencyStatus getDefaultInstanceForType() { + return cc.arduino.cli.commands.Lib.LibraryDependencyStatus.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryDependencyStatus build() { + cc.arduino.cli.commands.Lib.LibraryDependencyStatus result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryDependencyStatus buildPartial() { + cc.arduino.cli.commands.Lib.LibraryDependencyStatus result = new cc.arduino.cli.commands.Lib.LibraryDependencyStatus(this); + result.name_ = name_; + result.versionRequired_ = versionRequired_; + result.versionInstalled_ = versionInstalled_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Lib.LibraryDependencyStatus) { + return mergeFrom((cc.arduino.cli.commands.Lib.LibraryDependencyStatus)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Lib.LibraryDependencyStatus other) { + if (other == cc.arduino.cli.commands.Lib.LibraryDependencyStatus.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getVersionRequired().isEmpty()) { + versionRequired_ = other.versionRequired_; + onChanged(); + } + if (!other.getVersionInstalled().isEmpty()) { + versionInstalled_ = other.versionInstalled_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Lib.LibraryDependencyStatus parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Lib.LibraryDependencyStatus) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+       * The name of the library dependency.
+       * 
+ * + * 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; + } + } + /** + *
+       * The name of the library dependency.
+       * 
+ * + * 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; + } + } + /** + *
+       * The name of the library dependency.
+       * 
+ * + * 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; + onChanged(); + return this; + } + /** + *
+       * The name of the library dependency.
+       * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+       * The name of the library dependency.
+       * 
+ * + * 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; + onChanged(); + return this; + } + + private java.lang.Object versionRequired_ = ""; + /** + *
+       * The required version of the library dependency.
+       * 
+ * + * string versionRequired = 2; + * @return The versionRequired. + */ + public java.lang.String getVersionRequired() { + java.lang.Object ref = versionRequired_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + versionRequired_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The required version of the library dependency.
+       * 
+ * + * string versionRequired = 2; + * @return The bytes for versionRequired. + */ + public com.google.protobuf.ByteString + getVersionRequiredBytes() { + java.lang.Object ref = versionRequired_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + versionRequired_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The required version of the library dependency.
+       * 
+ * + * string versionRequired = 2; + * @param value The versionRequired to set. + * @return This builder for chaining. + */ + public Builder setVersionRequired( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + versionRequired_ = value; + onChanged(); + return this; + } + /** + *
+       * The required version of the library dependency.
+       * 
+ * + * string versionRequired = 2; + * @return This builder for chaining. + */ + public Builder clearVersionRequired() { + + versionRequired_ = getDefaultInstance().getVersionRequired(); + onChanged(); + return this; + } + /** + *
+       * The required version of the library dependency.
+       * 
+ * + * string versionRequired = 2; + * @param value The bytes for versionRequired to set. + * @return This builder for chaining. + */ + public Builder setVersionRequiredBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + versionRequired_ = value; + onChanged(); + return this; + } + + private java.lang.Object versionInstalled_ = ""; + /** + *
+       * Version of the library dependency currently installed.
+       * 
+ * + * string versionInstalled = 3; + * @return The versionInstalled. + */ + public java.lang.String getVersionInstalled() { + java.lang.Object ref = versionInstalled_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + versionInstalled_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Version of the library dependency currently installed.
+       * 
+ * + * string versionInstalled = 3; + * @return The bytes for versionInstalled. + */ + public com.google.protobuf.ByteString + getVersionInstalledBytes() { + java.lang.Object ref = versionInstalled_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + versionInstalled_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Version of the library dependency currently installed.
+       * 
+ * + * string versionInstalled = 3; + * @param value The versionInstalled to set. + * @return This builder for chaining. + */ + public Builder setVersionInstalled( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + versionInstalled_ = value; + onChanged(); + return this; + } + /** + *
+       * Version of the library dependency currently installed.
+       * 
+ * + * string versionInstalled = 3; + * @return This builder for chaining. + */ + public Builder clearVersionInstalled() { + + versionInstalled_ = getDefaultInstance().getVersionInstalled(); + onChanged(); + return this; + } + /** + *
+       * Version of the library dependency currently installed.
+       * 
+ * + * string versionInstalled = 3; + * @param value The bytes for versionInstalled to set. + * @return This builder for chaining. + */ + public Builder setVersionInstalledBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + versionInstalled_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.LibraryDependencyStatus) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.LibraryDependencyStatus) + private static final cc.arduino.cli.commands.Lib.LibraryDependencyStatus DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Lib.LibraryDependencyStatus(); + } + + public static cc.arduino.cli.commands.Lib.LibraryDependencyStatus getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LibraryDependencyStatus parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LibraryDependencyStatus(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryDependencyStatus getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface LibrarySearchReqOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.LibrarySearchReq) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + boolean hasInstance(); + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + cc.arduino.cli.commands.Common.Instance getInstance(); + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder(); + + /** + *
+     * The search query.
+     * 
+ * + * string query = 2; + * @return The query. + */ + java.lang.String getQuery(); + /** + *
+     * The search query.
+     * 
+ * + * string query = 2; + * @return The bytes for query. + */ + com.google.protobuf.ByteString + getQueryBytes(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.LibrarySearchReq} + */ + public static final class LibrarySearchReq extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.LibrarySearchReq) + LibrarySearchReqOrBuilder { + private static final long serialVersionUID = 0L; + // Use LibrarySearchReq.newBuilder() to construct. + private LibrarySearchReq(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LibrarySearchReq() { + query_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LibrarySearchReq(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LibrarySearchReq( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cc.arduino.cli.commands.Common.Instance.Builder subBuilder = null; + if (instance_ != null) { + subBuilder = instance_.toBuilder(); + } + instance_ = input.readMessage(cc.arduino.cli.commands.Common.Instance.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instance_); + instance_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + query_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibrarySearchReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibrarySearchReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Lib.LibrarySearchReq.class, cc.arduino.cli.commands.Lib.LibrarySearchReq.Builder.class); + } + + public static final int INSTANCE_FIELD_NUMBER = 1; + private cc.arduino.cli.commands.Common.Instance instance_; + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instance_ != null; + } + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + return getInstance(); + } + + public static final int QUERY_FIELD_NUMBER = 2; + private volatile java.lang.Object query_; + /** + *
+     * The search query.
+     * 
+ * + * string query = 2; + * @return The query. + */ + public java.lang.String getQuery() { + java.lang.Object ref = query_; + 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(); + query_ = s; + return s; + } + } + /** + *
+     * The search query.
+     * 
+ * + * string query = 2; + * @return The bytes for query. + */ + public com.google.protobuf.ByteString + getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (instance_ != null) { + output.writeMessage(1, getInstance()); + } + if (!getQueryBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, query_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (instance_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInstance()); + } + if (!getQueryBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, query_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Lib.LibrarySearchReq)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Lib.LibrarySearchReq other = (cc.arduino.cli.commands.Lib.LibrarySearchReq) obj; + + if (hasInstance() != other.hasInstance()) return false; + if (hasInstance()) { + if (!getInstance() + .equals(other.getInstance())) return false; + } + if (!getQuery() + .equals(other.getQuery())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInstance()) { + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + } + hash = (37 * hash) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Lib.LibrarySearchReq parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibrarySearchReq parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibrarySearchReq parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibrarySearchReq parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibrarySearchReq parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibrarySearchReq parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibrarySearchReq parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibrarySearchReq parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibrarySearchReq parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibrarySearchReq parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibrarySearchReq parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibrarySearchReq parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Lib.LibrarySearchReq 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.LibrarySearchReq} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.LibrarySearchReq) + cc.arduino.cli.commands.Lib.LibrarySearchReqOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibrarySearchReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibrarySearchReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Lib.LibrarySearchReq.class, cc.arduino.cli.commands.Lib.LibrarySearchReq.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Lib.LibrarySearchReq.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (instanceBuilder_ == null) { + instance_ = null; + } else { + instance_ = null; + instanceBuilder_ = null; + } + query_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibrarySearchReq_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibrarySearchReq getDefaultInstanceForType() { + return cc.arduino.cli.commands.Lib.LibrarySearchReq.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibrarySearchReq build() { + cc.arduino.cli.commands.Lib.LibrarySearchReq result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibrarySearchReq buildPartial() { + cc.arduino.cli.commands.Lib.LibrarySearchReq result = new cc.arduino.cli.commands.Lib.LibrarySearchReq(this); + if (instanceBuilder_ == null) { + result.instance_ = instance_; + } else { + result.instance_ = instanceBuilder_.build(); + } + result.query_ = query_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Lib.LibrarySearchReq) { + return mergeFrom((cc.arduino.cli.commands.Lib.LibrarySearchReq)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Lib.LibrarySearchReq other) { + if (other == cc.arduino.cli.commands.Lib.LibrarySearchReq.getDefaultInstance()) return this; + if (other.hasInstance()) { + mergeInstance(other.getInstance()); + } + if (!other.getQuery().isEmpty()) { + query_ = other.query_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Lib.LibrarySearchReq parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Lib.LibrarySearchReq) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private cc.arduino.cli.commands.Common.Instance instance_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> instanceBuilder_; + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instanceBuilder_ != null || instance_ != null; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + if (instanceBuilder_ == null) { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } else { + return instanceBuilder_.getMessage(); + } + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + onChanged(); + } else { + instanceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance( + cc.arduino.cli.commands.Common.Instance.Builder builderForValue) { + if (instanceBuilder_ == null) { + instance_ = builderForValue.build(); + onChanged(); + } else { + instanceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder mergeInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (instance_ != null) { + instance_ = + cc.arduino.cli.commands.Common.Instance.newBuilder(instance_).mergeFrom(value).buildPartial(); + } else { + instance_ = value; + } + onChanged(); + } else { + instanceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder clearInstance() { + if (instanceBuilder_ == null) { + instance_ = null; + onChanged(); + } else { + instance_ = null; + instanceBuilder_ = null; + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.Instance.Builder getInstanceBuilder() { + + onChanged(); + return getInstanceFieldBuilder().getBuilder(); + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + if (instanceBuilder_ != null) { + return instanceBuilder_.getMessageOrBuilder(); + } else { + return instance_ == null ? + cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> + getInstanceFieldBuilder() { + if (instanceBuilder_ == null) { + instanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder>( + getInstance(), + getParentForChildren(), + isClean()); + instance_ = null; + } + return instanceBuilder_; + } + + private java.lang.Object query_ = ""; + /** + *
+       * The search query.
+       * 
+ * + * string query = 2; + * @return The query. + */ + public java.lang.String getQuery() { + java.lang.Object ref = query_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + query_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The search query.
+       * 
+ * + * string query = 2; + * @return The bytes for query. + */ + public com.google.protobuf.ByteString + getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The search query.
+       * 
+ * + * string query = 2; + * @param value The query to set. + * @return This builder for chaining. + */ + public Builder setQuery( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + query_ = value; + onChanged(); + return this; + } + /** + *
+       * The search query.
+       * 
+ * + * string query = 2; + * @return This builder for chaining. + */ + public Builder clearQuery() { + + query_ = getDefaultInstance().getQuery(); + onChanged(); + return this; + } + /** + *
+       * The search query.
+       * 
+ * + * string query = 2; + * @param value The bytes for query to set. + * @return This builder for chaining. + */ + public Builder setQueryBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + query_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.LibrarySearchReq) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.LibrarySearchReq) + private static final cc.arduino.cli.commands.Lib.LibrarySearchReq DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Lib.LibrarySearchReq(); + } + + public static cc.arduino.cli.commands.Lib.LibrarySearchReq getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LibrarySearchReq parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LibrarySearchReq(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibrarySearchReq getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface LibrarySearchRespOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.LibrarySearchResp) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The results of the search.
+     * 
+ * + * repeated .cc.arduino.cli.commands.SearchedLibrary libraries = 1; + */ + java.util.List + getLibrariesList(); + /** + *
+     * The results of the search.
+     * 
+ * + * repeated .cc.arduino.cli.commands.SearchedLibrary libraries = 1; + */ + cc.arduino.cli.commands.Lib.SearchedLibrary getLibraries(int index); + /** + *
+     * The results of the search.
+     * 
+ * + * repeated .cc.arduino.cli.commands.SearchedLibrary libraries = 1; + */ + int getLibrariesCount(); + /** + *
+     * The results of the search.
+     * 
+ * + * repeated .cc.arduino.cli.commands.SearchedLibrary libraries = 1; + */ + java.util.List + getLibrariesOrBuilderList(); + /** + *
+     * The results of the search.
+     * 
+ * + * repeated .cc.arduino.cli.commands.SearchedLibrary libraries = 1; + */ + cc.arduino.cli.commands.Lib.SearchedLibraryOrBuilder getLibrariesOrBuilder( + int index); + + /** + *
+     * Whether the search yielded results.
+     * 
+ * + * .cc.arduino.cli.commands.LibrarySearchStatus status = 2; + * @return The enum numeric value on the wire for status. + */ + int getStatusValue(); + /** + *
+     * Whether the search yielded results.
+     * 
+ * + * .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} + */ + public static final class LibrarySearchResp extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.LibrarySearchResp) + LibrarySearchRespOrBuilder { + private static final long serialVersionUID = 0L; + // Use LibrarySearchResp.newBuilder() to construct. + private LibrarySearchResp(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LibrarySearchResp() { + libraries_ = java.util.Collections.emptyList(); + status_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LibrarySearchResp(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LibrarySearchResp( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + libraries_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + libraries_.add( + 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)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + libraries_ = java.util.Collections.unmodifiableList(libraries_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibrarySearchResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibrarySearchResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Lib.LibrarySearchResp.class, cc.arduino.cli.commands.Lib.LibrarySearchResp.Builder.class); + } + + public static final int LIBRARIES_FIELD_NUMBER = 1; + private java.util.List libraries_; + /** + *
+     * The results of the search.
+     * 
+ * + * repeated .cc.arduino.cli.commands.SearchedLibrary libraries = 1; + */ + public java.util.List getLibrariesList() { + return libraries_; + } + /** + *
+     * The results of the search.
+     * 
+ * + * repeated .cc.arduino.cli.commands.SearchedLibrary libraries = 1; + */ + public java.util.List + getLibrariesOrBuilderList() { + return libraries_; + } + /** + *
+     * The results of the search.
+     * 
+ * + * repeated .cc.arduino.cli.commands.SearchedLibrary libraries = 1; + */ + public int getLibrariesCount() { + return libraries_.size(); + } + /** + *
+     * The results of the search.
+     * 
+ * + * repeated .cc.arduino.cli.commands.SearchedLibrary libraries = 1; + */ + public cc.arduino.cli.commands.Lib.SearchedLibrary getLibraries(int index) { + return libraries_.get(index); + } + /** + *
+     * The results of the search.
+     * 
+ * + * repeated .cc.arduino.cli.commands.SearchedLibrary libraries = 1; + */ + public cc.arduino.cli.commands.Lib.SearchedLibraryOrBuilder getLibrariesOrBuilder( + int index) { + return libraries_.get(index); + } + + public static final int STATUS_FIELD_NUMBER = 2; + private int status_; + /** + *
+     * Whether the search yielded results.
+     * 
+ * + * .cc.arduino.cli.commands.LibrarySearchStatus status = 2; + * @return The enum numeric value on the wire for status. + */ + public int getStatusValue() { + return status_; + } + /** + *
+     * Whether the search yielded results.
+     * 
+ * + * .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() { + 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 < 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); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < libraries_.size(); i++) { + 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; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Lib.LibrarySearchResp)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Lib.LibrarySearchResp other = (cc.arduino.cli.commands.Lib.LibrarySearchResp) obj; + + if (!getLibrariesList() + .equals(other.getLibrariesList())) return false; + if (status_ != other.status_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getLibrariesCount() > 0) { + 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; + } + + public static cc.arduino.cli.commands.Lib.LibrarySearchResp parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibrarySearchResp parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibrarySearchResp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibrarySearchResp parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibrarySearchResp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibrarySearchResp parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibrarySearchResp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibrarySearchResp parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibrarySearchResp parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibrarySearchResp parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibrarySearchResp parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibrarySearchResp parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Lib.LibrarySearchResp 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.LibrarySearchResp} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.LibrarySearchResp) + cc.arduino.cli.commands.Lib.LibrarySearchRespOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibrarySearchResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibrarySearchResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Lib.LibrarySearchResp.class, cc.arduino.cli.commands.Lib.LibrarySearchResp.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Lib.LibrarySearchResp.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getLibrariesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (librariesBuilder_ == null) { + libraries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + librariesBuilder_.clear(); + } + status_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibrarySearchResp_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibrarySearchResp getDefaultInstanceForType() { + return cc.arduino.cli.commands.Lib.LibrarySearchResp.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibrarySearchResp build() { + cc.arduino.cli.commands.Lib.LibrarySearchResp result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibrarySearchResp buildPartial() { + cc.arduino.cli.commands.Lib.LibrarySearchResp result = new cc.arduino.cli.commands.Lib.LibrarySearchResp(this); + int from_bitField0_ = bitField0_; + if (librariesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + libraries_ = java.util.Collections.unmodifiableList(libraries_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.libraries_ = libraries_; + } else { + result.libraries_ = librariesBuilder_.build(); + } + result.status_ = status_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Lib.LibrarySearchResp) { + return mergeFrom((cc.arduino.cli.commands.Lib.LibrarySearchResp)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Lib.LibrarySearchResp other) { + if (other == cc.arduino.cli.commands.Lib.LibrarySearchResp.getDefaultInstance()) return this; + if (librariesBuilder_ == null) { + if (!other.libraries_.isEmpty()) { + if (libraries_.isEmpty()) { + libraries_ = other.libraries_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLibrariesIsMutable(); + libraries_.addAll(other.libraries_); + } + onChanged(); + } + } else { + if (!other.libraries_.isEmpty()) { + if (librariesBuilder_.isEmpty()) { + librariesBuilder_.dispose(); + librariesBuilder_ = null; + libraries_ = other.libraries_; + bitField0_ = (bitField0_ & ~0x00000001); + librariesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getLibrariesFieldBuilder() : null; + } else { + librariesBuilder_.addAllMessages(other.libraries_); + } + } + } + if (other.status_ != 0) { + setStatusValue(other.getStatusValue()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Lib.LibrarySearchResp parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Lib.LibrarySearchResp) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List libraries_ = + java.util.Collections.emptyList(); + private void ensureLibrariesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + libraries_ = new java.util.ArrayList(libraries_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Lib.SearchedLibrary, cc.arduino.cli.commands.Lib.SearchedLibrary.Builder, cc.arduino.cli.commands.Lib.SearchedLibraryOrBuilder> librariesBuilder_; + + /** + *
+       * The results of the search.
+       * 
+ * + * repeated .cc.arduino.cli.commands.SearchedLibrary libraries = 1; + */ + public java.util.List getLibrariesList() { + if (librariesBuilder_ == null) { + return java.util.Collections.unmodifiableList(libraries_); + } else { + return librariesBuilder_.getMessageList(); + } + } + /** + *
+       * The results of the search.
+       * 
+ * + * repeated .cc.arduino.cli.commands.SearchedLibrary libraries = 1; + */ + public int getLibrariesCount() { + if (librariesBuilder_ == null) { + return libraries_.size(); + } else { + return librariesBuilder_.getCount(); + } + } + /** + *
+       * The results of the search.
+       * 
+ * + * repeated .cc.arduino.cli.commands.SearchedLibrary libraries = 1; + */ + public cc.arduino.cli.commands.Lib.SearchedLibrary getLibraries(int index) { + if (librariesBuilder_ == null) { + return libraries_.get(index); + } else { + return librariesBuilder_.getMessage(index); + } + } + /** + *
+       * The results of the search.
+       * 
+ * + * repeated .cc.arduino.cli.commands.SearchedLibrary libraries = 1; + */ + public Builder setLibraries( + int index, cc.arduino.cli.commands.Lib.SearchedLibrary value) { + if (librariesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLibrariesIsMutable(); + libraries_.set(index, value); + onChanged(); + } else { + librariesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * The results of the search.
+       * 
+ * + * repeated .cc.arduino.cli.commands.SearchedLibrary libraries = 1; + */ + public Builder setLibraries( + int index, cc.arduino.cli.commands.Lib.SearchedLibrary.Builder builderForValue) { + if (librariesBuilder_ == null) { + ensureLibrariesIsMutable(); + libraries_.set(index, builderForValue.build()); + onChanged(); + } else { + librariesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * The results of the search.
+       * 
+ * + * repeated .cc.arduino.cli.commands.SearchedLibrary libraries = 1; + */ + public Builder addLibraries(cc.arduino.cli.commands.Lib.SearchedLibrary value) { + if (librariesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLibrariesIsMutable(); + libraries_.add(value); + onChanged(); + } else { + librariesBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * The results of the search.
+       * 
+ * + * repeated .cc.arduino.cli.commands.SearchedLibrary libraries = 1; + */ + public Builder addLibraries( + int index, cc.arduino.cli.commands.Lib.SearchedLibrary value) { + if (librariesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLibrariesIsMutable(); + libraries_.add(index, value); + onChanged(); + } else { + librariesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * The results of the search.
+       * 
+ * + * repeated .cc.arduino.cli.commands.SearchedLibrary libraries = 1; + */ + public Builder addLibraries( + cc.arduino.cli.commands.Lib.SearchedLibrary.Builder builderForValue) { + if (librariesBuilder_ == null) { + ensureLibrariesIsMutable(); + libraries_.add(builderForValue.build()); + onChanged(); + } else { + librariesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * The results of the search.
+       * 
+ * + * repeated .cc.arduino.cli.commands.SearchedLibrary libraries = 1; + */ + public Builder addLibraries( + int index, cc.arduino.cli.commands.Lib.SearchedLibrary.Builder builderForValue) { + if (librariesBuilder_ == null) { + ensureLibrariesIsMutable(); + libraries_.add(index, builderForValue.build()); + onChanged(); + } else { + librariesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * The results of the search.
+       * 
+ * + * repeated .cc.arduino.cli.commands.SearchedLibrary libraries = 1; + */ + public Builder addAllLibraries( + java.lang.Iterable values) { + if (librariesBuilder_ == null) { + ensureLibrariesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, libraries_); + onChanged(); + } else { + librariesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * The results of the search.
+       * 
+ * + * repeated .cc.arduino.cli.commands.SearchedLibrary libraries = 1; + */ + public Builder clearLibraries() { + if (librariesBuilder_ == null) { + libraries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + librariesBuilder_.clear(); + } + return this; + } + /** + *
+       * The results of the search.
+       * 
+ * + * repeated .cc.arduino.cli.commands.SearchedLibrary libraries = 1; + */ + public Builder removeLibraries(int index) { + if (librariesBuilder_ == null) { + ensureLibrariesIsMutable(); + libraries_.remove(index); + onChanged(); + } else { + librariesBuilder_.remove(index); + } + return this; + } + /** + *
+       * The results of the search.
+       * 
+ * + * repeated .cc.arduino.cli.commands.SearchedLibrary libraries = 1; + */ + public cc.arduino.cli.commands.Lib.SearchedLibrary.Builder getLibrariesBuilder( + int index) { + return getLibrariesFieldBuilder().getBuilder(index); + } + /** + *
+       * The results of the search.
+       * 
+ * + * repeated .cc.arduino.cli.commands.SearchedLibrary libraries = 1; + */ + public cc.arduino.cli.commands.Lib.SearchedLibraryOrBuilder getLibrariesOrBuilder( + int index) { + if (librariesBuilder_ == null) { + return libraries_.get(index); } else { + return librariesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * The results of the search.
+       * 
+ * + * repeated .cc.arduino.cli.commands.SearchedLibrary libraries = 1; + */ + public java.util.List + getLibrariesOrBuilderList() { + if (librariesBuilder_ != null) { + return librariesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(libraries_); + } + } + /** + *
+       * The results of the search.
+       * 
+ * + * repeated .cc.arduino.cli.commands.SearchedLibrary libraries = 1; + */ + public cc.arduino.cli.commands.Lib.SearchedLibrary.Builder addLibrariesBuilder() { + return getLibrariesFieldBuilder().addBuilder( + cc.arduino.cli.commands.Lib.SearchedLibrary.getDefaultInstance()); + } + /** + *
+       * The results of the search.
+       * 
+ * + * repeated .cc.arduino.cli.commands.SearchedLibrary libraries = 1; + */ + public cc.arduino.cli.commands.Lib.SearchedLibrary.Builder addLibrariesBuilder( + int index) { + return getLibrariesFieldBuilder().addBuilder( + index, cc.arduino.cli.commands.Lib.SearchedLibrary.getDefaultInstance()); + } + /** + *
+       * The results of the search.
+       * 
+ * + * repeated .cc.arduino.cli.commands.SearchedLibrary libraries = 1; + */ + public java.util.List + getLibrariesBuilderList() { + return getLibrariesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Lib.SearchedLibrary, cc.arduino.cli.commands.Lib.SearchedLibrary.Builder, cc.arduino.cli.commands.Lib.SearchedLibraryOrBuilder> + getLibrariesFieldBuilder() { + if (librariesBuilder_ == null) { + librariesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Lib.SearchedLibrary, cc.arduino.cli.commands.Lib.SearchedLibrary.Builder, cc.arduino.cli.commands.Lib.SearchedLibraryOrBuilder>( + libraries_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + libraries_ = null; + } + return librariesBuilder_; + } + + private int status_ = 0; + /** + *
+       * Whether the search yielded results.
+       * 
+ * + * .cc.arduino.cli.commands.LibrarySearchStatus status = 2; + * @return The enum numeric value on the wire for status. + */ + public int getStatusValue() { + return status_; + } + /** + *
+       * Whether the search yielded results.
+       * 
+ * + * .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; + } + /** + *
+       * Whether the search yielded results.
+       * 
+ * + * .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; + } + /** + *
+       * Whether the search yielded results.
+       * 
+ * + * .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; + } + /** + *
+       * Whether the search yielded results.
+       * 
+ * + * .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) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.LibrarySearchResp) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.LibrarySearchResp) + private static final cc.arduino.cli.commands.Lib.LibrarySearchResp DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Lib.LibrarySearchResp(); + } + + public static cc.arduino.cli.commands.Lib.LibrarySearchResp getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LibrarySearchResp parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LibrarySearchResp(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibrarySearchResp getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SearchedLibraryOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.SearchedLibrary) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Library name.
+     * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+     * Library name.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+     * The index data for the available versions of the library. The key of the
+     * map is the library version.
+     * 
+ * + * map<string, .cc.arduino.cli.commands.LibraryRelease> releases = 2; + */ + int getReleasesCount(); + /** + *
+     * The index data for the available versions of the library. The key of the
+     * map is the library version.
+     * 
+ * + * map<string, .cc.arduino.cli.commands.LibraryRelease> releases = 2; + */ + boolean containsReleases( + java.lang.String key); + /** + * Use {@link #getReleasesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getReleases(); + /** + *
+     * The index data for the available versions of the library. The key of the
+     * map is the library version.
+     * 
+ * + * map<string, .cc.arduino.cli.commands.LibraryRelease> releases = 2; + */ + java.util.Map + getReleasesMap(); + /** + *
+     * The index data for the available versions of the library. The key of the
+     * map is the library version.
+     * 
+ * + * map<string, .cc.arduino.cli.commands.LibraryRelease> releases = 2; + */ + + cc.arduino.cli.commands.Lib.LibraryRelease getReleasesOrDefault( + java.lang.String key, + cc.arduino.cli.commands.Lib.LibraryRelease defaultValue); + /** + *
+     * The index data for the available versions of the library. The key of the
+     * map is the library version.
+     * 
+ * + * map<string, .cc.arduino.cli.commands.LibraryRelease> releases = 2; + */ + + cc.arduino.cli.commands.Lib.LibraryRelease getReleasesOrThrow( + java.lang.String key); + + /** + *
+     * The index data for the latest version of the library.
+     * 
+ * + * .cc.arduino.cli.commands.LibraryRelease latest = 3; + * @return Whether the latest field is set. + */ + boolean hasLatest(); + /** + *
+     * The index data for the latest version of the library.
+     * 
+ * + * .cc.arduino.cli.commands.LibraryRelease latest = 3; + * @return The latest. + */ + cc.arduino.cli.commands.Lib.LibraryRelease getLatest(); + /** + *
+     * The index data for the latest version of the library.
+     * 
+ * + * .cc.arduino.cli.commands.LibraryRelease latest = 3; + */ + cc.arduino.cli.commands.Lib.LibraryReleaseOrBuilder getLatestOrBuilder(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.SearchedLibrary} + */ + public static final class SearchedLibrary extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.SearchedLibrary) + SearchedLibraryOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchedLibrary.newBuilder() to construct. + private SearchedLibrary(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SearchedLibrary() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SearchedLibrary(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SearchedLibrary( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + releases_ = com.google.protobuf.MapField.newMapField( + ReleasesDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + releases__ = input.readMessage( + ReleasesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + releases_.getMutableMap().put( + releases__.getKey(), releases__.getValue()); + break; + } + case 26: { + cc.arduino.cli.commands.Lib.LibraryRelease.Builder subBuilder = null; + if (latest_ != null) { + subBuilder = latest_.toBuilder(); + } + latest_ = input.readMessage(cc.arduino.cli.commands.Lib.LibraryRelease.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(latest_); + latest_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_SearchedLibrary_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetReleases(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_SearchedLibrary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Lib.SearchedLibrary.class, cc.arduino.cli.commands.Lib.SearchedLibrary.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+     * Library name.
+     * 
+ * + * string name = 1; + * @return The name. + */ + 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; + } + } + /** + *
+     * Library name.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + 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 RELEASES_FIELD_NUMBER = 2; + private static final class ReleasesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, cc.arduino.cli.commands.Lib.LibraryRelease> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_SearchedLibrary_ReleasesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + cc.arduino.cli.commands.Lib.LibraryRelease.getDefaultInstance()); + } + private com.google.protobuf.MapField< + java.lang.String, cc.arduino.cli.commands.Lib.LibraryRelease> releases_; + private com.google.protobuf.MapField + internalGetReleases() { + if (releases_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ReleasesDefaultEntryHolder.defaultEntry); + } + return releases_; + } + + public int getReleasesCount() { + return internalGetReleases().getMap().size(); + } + /** + *
+     * The index data for the available versions of the library. The key of the
+     * map is the library version.
+     * 
+ * + * map<string, .cc.arduino.cli.commands.LibraryRelease> releases = 2; + */ + + public boolean containsReleases( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetReleases().getMap().containsKey(key); + } + /** + * Use {@link #getReleasesMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getReleases() { + return getReleasesMap(); + } + /** + *
+     * The index data for the available versions of the library. The key of the
+     * map is the library version.
+     * 
+ * + * map<string, .cc.arduino.cli.commands.LibraryRelease> releases = 2; + */ + + public java.util.Map getReleasesMap() { + return internalGetReleases().getMap(); + } + /** + *
+     * The index data for the available versions of the library. The key of the
+     * map is the library version.
+     * 
+ * + * map<string, .cc.arduino.cli.commands.LibraryRelease> releases = 2; + */ + + public cc.arduino.cli.commands.Lib.LibraryRelease getReleasesOrDefault( + java.lang.String key, + cc.arduino.cli.commands.Lib.LibraryRelease defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetReleases().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * The index data for the available versions of the library. The key of the
+     * map is the library version.
+     * 
+ * + * map<string, .cc.arduino.cli.commands.LibraryRelease> releases = 2; + */ + + public cc.arduino.cli.commands.Lib.LibraryRelease getReleasesOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetReleases().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int LATEST_FIELD_NUMBER = 3; + private cc.arduino.cli.commands.Lib.LibraryRelease latest_; + /** + *
+     * The index data for the latest version of the library.
+     * 
+ * + * .cc.arduino.cli.commands.LibraryRelease latest = 3; + * @return Whether the latest field is set. + */ + public boolean hasLatest() { + return latest_ != null; + } + /** + *
+     * The index data for the latest version of the library.
+     * 
+ * + * .cc.arduino.cli.commands.LibraryRelease latest = 3; + * @return The latest. + */ + public cc.arduino.cli.commands.Lib.LibraryRelease getLatest() { + return latest_ == null ? cc.arduino.cli.commands.Lib.LibraryRelease.getDefaultInstance() : latest_; + } + /** + *
+     * The index data for the latest version of the library.
+     * 
+ * + * .cc.arduino.cli.commands.LibraryRelease latest = 3; + */ + public cc.arduino.cli.commands.Lib.LibraryReleaseOrBuilder getLatestOrBuilder() { + return getLatest(); + } + + 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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetReleases(), + ReleasesDefaultEntryHolder.defaultEntry, + 2); + if (latest_ != null) { + output.writeMessage(3, getLatest()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + for (java.util.Map.Entry entry + : internalGetReleases().getMap().entrySet()) { + com.google.protobuf.MapEntry + releases__ = ReleasesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, releases__); + } + if (latest_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getLatest()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Lib.SearchedLibrary)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Lib.SearchedLibrary other = (cc.arduino.cli.commands.Lib.SearchedLibrary) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!internalGetReleases().equals( + other.internalGetReleases())) return false; + if (hasLatest() != other.hasLatest()) return false; + if (hasLatest()) { + if (!getLatest() + .equals(other.getLatest())) return false; + } + if (!unknownFields.equals(other.unknownFields)) 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 (!internalGetReleases().getMap().isEmpty()) { + hash = (37 * hash) + RELEASES_FIELD_NUMBER; + hash = (53 * hash) + internalGetReleases().hashCode(); + } + if (hasLatest()) { + hash = (37 * hash) + LATEST_FIELD_NUMBER; + hash = (53 * hash) + getLatest().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Lib.SearchedLibrary parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.SearchedLibrary parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.SearchedLibrary parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.SearchedLibrary parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.SearchedLibrary parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.SearchedLibrary parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.SearchedLibrary parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.SearchedLibrary parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.SearchedLibrary parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.SearchedLibrary parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.SearchedLibrary parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.SearchedLibrary parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Lib.SearchedLibrary 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.SearchedLibrary} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.SearchedLibrary) + cc.arduino.cli.commands.Lib.SearchedLibraryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_SearchedLibrary_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 2: + return internalGetReleases(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 2: + return internalGetMutableReleases(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_SearchedLibrary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Lib.SearchedLibrary.class, cc.arduino.cli.commands.Lib.SearchedLibrary.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Lib.SearchedLibrary.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + internalGetMutableReleases().clear(); + if (latestBuilder_ == null) { + latest_ = null; + } else { + latest_ = null; + latestBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_SearchedLibrary_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.SearchedLibrary getDefaultInstanceForType() { + return cc.arduino.cli.commands.Lib.SearchedLibrary.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.SearchedLibrary build() { + cc.arduino.cli.commands.Lib.SearchedLibrary result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.SearchedLibrary buildPartial() { + cc.arduino.cli.commands.Lib.SearchedLibrary result = new cc.arduino.cli.commands.Lib.SearchedLibrary(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.releases_ = internalGetReleases(); + result.releases_.makeImmutable(); + if (latestBuilder_ == null) { + result.latest_ = latest_; + } else { + result.latest_ = latestBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Lib.SearchedLibrary) { + return mergeFrom((cc.arduino.cli.commands.Lib.SearchedLibrary)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Lib.SearchedLibrary other) { + if (other == cc.arduino.cli.commands.Lib.SearchedLibrary.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + internalGetMutableReleases().mergeFrom( + other.internalGetReleases()); + if (other.hasLatest()) { + mergeLatest(other.getLatest()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Lib.SearchedLibrary parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Lib.SearchedLibrary) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+       * Library 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; + } + } + /** + *
+       * Library name.
+       * 
+ * + * 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; + } + } + /** + *
+       * Library name.
+       * 
+ * + * 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; + onChanged(); + return this; + } + /** + *
+       * Library name.
+       * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+       * Library name.
+       * 
+ * + * 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; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, cc.arduino.cli.commands.Lib.LibraryRelease> releases_; + private com.google.protobuf.MapField + internalGetReleases() { + if (releases_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ReleasesDefaultEntryHolder.defaultEntry); + } + return releases_; + } + private com.google.protobuf.MapField + internalGetMutableReleases() { + onChanged();; + if (releases_ == null) { + releases_ = com.google.protobuf.MapField.newMapField( + ReleasesDefaultEntryHolder.defaultEntry); + } + if (!releases_.isMutable()) { + releases_ = releases_.copy(); + } + return releases_; + } + + public int getReleasesCount() { + return internalGetReleases().getMap().size(); + } + /** + *
+       * The index data for the available versions of the library. The key of the
+       * map is the library version.
+       * 
+ * + * map<string, .cc.arduino.cli.commands.LibraryRelease> releases = 2; + */ + + public boolean containsReleases( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetReleases().getMap().containsKey(key); + } + /** + * Use {@link #getReleasesMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getReleases() { + return getReleasesMap(); + } + /** + *
+       * The index data for the available versions of the library. The key of the
+       * map is the library version.
+       * 
+ * + * map<string, .cc.arduino.cli.commands.LibraryRelease> releases = 2; + */ + + public java.util.Map getReleasesMap() { + return internalGetReleases().getMap(); + } + /** + *
+       * The index data for the available versions of the library. The key of the
+       * map is the library version.
+       * 
+ * + * map<string, .cc.arduino.cli.commands.LibraryRelease> releases = 2; + */ + + public cc.arduino.cli.commands.Lib.LibraryRelease getReleasesOrDefault( + java.lang.String key, + cc.arduino.cli.commands.Lib.LibraryRelease defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetReleases().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+       * The index data for the available versions of the library. The key of the
+       * map is the library version.
+       * 
+ * + * map<string, .cc.arduino.cli.commands.LibraryRelease> releases = 2; + */ + + public cc.arduino.cli.commands.Lib.LibraryRelease getReleasesOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetReleases().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearReleases() { + internalGetMutableReleases().getMutableMap() + .clear(); + return this; + } + /** + *
+       * The index data for the available versions of the library. The key of the
+       * map is the library version.
+       * 
+ * + * map<string, .cc.arduino.cli.commands.LibraryRelease> releases = 2; + */ + + public Builder removeReleases( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableReleases().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableReleases() { + return internalGetMutableReleases().getMutableMap(); + } + /** + *
+       * The index data for the available versions of the library. The key of the
+       * map is the library version.
+       * 
+ * + * map<string, .cc.arduino.cli.commands.LibraryRelease> releases = 2; + */ + public Builder putReleases( + java.lang.String key, + cc.arduino.cli.commands.Lib.LibraryRelease value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableReleases().getMutableMap() + .put(key, value); + return this; + } + /** + *
+       * The index data for the available versions of the library. The key of the
+       * map is the library version.
+       * 
+ * + * map<string, .cc.arduino.cli.commands.LibraryRelease> releases = 2; + */ + + public Builder putAllReleases( + java.util.Map values) { + internalGetMutableReleases().getMutableMap() + .putAll(values); + return this; + } + + private cc.arduino.cli.commands.Lib.LibraryRelease latest_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Lib.LibraryRelease, cc.arduino.cli.commands.Lib.LibraryRelease.Builder, cc.arduino.cli.commands.Lib.LibraryReleaseOrBuilder> latestBuilder_; + /** + *
+       * The index data for the latest version of the library.
+       * 
+ * + * .cc.arduino.cli.commands.LibraryRelease latest = 3; + * @return Whether the latest field is set. + */ + public boolean hasLatest() { + return latestBuilder_ != null || latest_ != null; + } + /** + *
+       * The index data for the latest version of the library.
+       * 
+ * + * .cc.arduino.cli.commands.LibraryRelease latest = 3; + * @return The latest. + */ + public cc.arduino.cli.commands.Lib.LibraryRelease getLatest() { + if (latestBuilder_ == null) { + return latest_ == null ? cc.arduino.cli.commands.Lib.LibraryRelease.getDefaultInstance() : latest_; + } else { + return latestBuilder_.getMessage(); + } + } + /** + *
+       * The index data for the latest version of the library.
+       * 
+ * + * .cc.arduino.cli.commands.LibraryRelease latest = 3; + */ + public Builder setLatest(cc.arduino.cli.commands.Lib.LibraryRelease value) { + if (latestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + latest_ = value; + onChanged(); + } else { + latestBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * The index data for the latest version of the library.
+       * 
+ * + * .cc.arduino.cli.commands.LibraryRelease latest = 3; + */ + public Builder setLatest( + cc.arduino.cli.commands.Lib.LibraryRelease.Builder builderForValue) { + if (latestBuilder_ == null) { + latest_ = builderForValue.build(); + onChanged(); + } else { + latestBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * The index data for the latest version of the library.
+       * 
+ * + * .cc.arduino.cli.commands.LibraryRelease latest = 3; + */ + public Builder mergeLatest(cc.arduino.cli.commands.Lib.LibraryRelease value) { + if (latestBuilder_ == null) { + if (latest_ != null) { + latest_ = + cc.arduino.cli.commands.Lib.LibraryRelease.newBuilder(latest_).mergeFrom(value).buildPartial(); + } else { + latest_ = value; + } + onChanged(); + } else { + latestBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * The index data for the latest version of the library.
+       * 
+ * + * .cc.arduino.cli.commands.LibraryRelease latest = 3; + */ + public Builder clearLatest() { + if (latestBuilder_ == null) { + latest_ = null; + onChanged(); + } else { + latest_ = null; + latestBuilder_ = null; + } + + return this; + } + /** + *
+       * The index data for the latest version of the library.
+       * 
+ * + * .cc.arduino.cli.commands.LibraryRelease latest = 3; + */ + public cc.arduino.cli.commands.Lib.LibraryRelease.Builder getLatestBuilder() { + + onChanged(); + return getLatestFieldBuilder().getBuilder(); + } + /** + *
+       * The index data for the latest version of the library.
+       * 
+ * + * .cc.arduino.cli.commands.LibraryRelease latest = 3; + */ + public cc.arduino.cli.commands.Lib.LibraryReleaseOrBuilder getLatestOrBuilder() { + if (latestBuilder_ != null) { + return latestBuilder_.getMessageOrBuilder(); + } else { + return latest_ == null ? + cc.arduino.cli.commands.Lib.LibraryRelease.getDefaultInstance() : latest_; + } + } + /** + *
+       * The index data for the latest version of the library.
+       * 
+ * + * .cc.arduino.cli.commands.LibraryRelease latest = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Lib.LibraryRelease, cc.arduino.cli.commands.Lib.LibraryRelease.Builder, cc.arduino.cli.commands.Lib.LibraryReleaseOrBuilder> + getLatestFieldBuilder() { + if (latestBuilder_ == null) { + latestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Lib.LibraryRelease, cc.arduino.cli.commands.Lib.LibraryRelease.Builder, cc.arduino.cli.commands.Lib.LibraryReleaseOrBuilder>( + getLatest(), + getParentForChildren(), + isClean()); + latest_ = null; + } + return latestBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.SearchedLibrary) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.SearchedLibrary) + private static final cc.arduino.cli.commands.Lib.SearchedLibrary DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Lib.SearchedLibrary(); + } + + public static cc.arduino.cli.commands.Lib.SearchedLibrary getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SearchedLibrary parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SearchedLibrary(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.SearchedLibrary getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface LibraryReleaseOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.LibraryRelease) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Value of the `author` field in library.properties.
+     * 
+ * + * string author = 1; + * @return The author. + */ + java.lang.String getAuthor(); + /** + *
+     * Value of the `author` field in library.properties.
+     * 
+ * + * string author = 1; + * @return The bytes for author. + */ + com.google.protobuf.ByteString + getAuthorBytes(); + + /** + *
+     * Value of the `version` field in library.properties.
+     * 
+ * + * string version = 2; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+     * Value of the `version` field in library.properties.
+     * 
+ * + * string version = 2; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); + + /** + *
+     * Value of the `maintainer` field in library.properties.
+     * 
+ * + * string maintainer = 3; + * @return The maintainer. + */ + java.lang.String getMaintainer(); + /** + *
+     * Value of the `maintainer` field in library.properties.
+     * 
+ * + * string maintainer = 3; + * @return The bytes for maintainer. + */ + com.google.protobuf.ByteString + getMaintainerBytes(); + + /** + *
+     * Value of the `sentence` field in library.properties.
+     * 
+ * + * string sentence = 4; + * @return The sentence. + */ + java.lang.String getSentence(); + /** + *
+     * Value of the `sentence` field in library.properties.
+     * 
+ * + * string sentence = 4; + * @return The bytes for sentence. + */ + com.google.protobuf.ByteString + getSentenceBytes(); + + /** + *
+     * Value of the `paragraph` field in library.properties.
+     * 
+ * + * string paragraph = 5; + * @return The paragraph. + */ + java.lang.String getParagraph(); + /** + *
+     * Value of the `paragraph` field in library.properties.
+     * 
+ * + * string paragraph = 5; + * @return The bytes for paragraph. + */ + com.google.protobuf.ByteString + getParagraphBytes(); + + /** + *
+     * Value of the `url` field in library.properties.
+     * 
+ * + * string website = 6; + * @return The website. + */ + java.lang.String getWebsite(); + /** + *
+     * Value of the `url` field in library.properties.
+     * 
+ * + * string website = 6; + * @return The bytes for website. + */ + com.google.protobuf.ByteString + getWebsiteBytes(); + + /** + *
+     * Value of the `category` field in library.properties.
+     * 
+ * + * string category = 7; + * @return The category. + */ + java.lang.String getCategory(); + /** + *
+     * Value of the `category` field in library.properties.
+     * 
+ * + * string category = 7; + * @return The bytes for category. + */ + com.google.protobuf.ByteString + getCategoryBytes(); + + /** + *
+     * Value of the `architectures` field in library.properties.
+     * 
+ * + * repeated string architectures = 8; + * @return A list containing the architectures. + */ + java.util.List + getArchitecturesList(); + /** + *
+     * Value of the `architectures` field in library.properties.
+     * 
+ * + * repeated string architectures = 8; + * @return The count of architectures. + */ + int getArchitecturesCount(); + /** + *
+     * Value of the `architectures` field in library.properties.
+     * 
+ * + * repeated string architectures = 8; + * @param index The index of the element to return. + * @return The architectures at the given index. + */ + java.lang.String getArchitectures(int index); + /** + *
+     * Value of the `architectures` field in library.properties.
+     * 
+ * + * repeated string architectures = 8; + * @param index The index of the value to return. + * @return The bytes of the architectures at the given index. + */ + com.google.protobuf.ByteString + getArchitecturesBytes(int index); + + /** + *
+     * The type categories of the library, as defined in the libraries index.
+     * Possible values: `Arduino`, `Partner`, `Recommended`, `Contributed`,
+     * `Retired`.
+     * 
+ * + * repeated string types = 9; + * @return A list containing the types. + */ + java.util.List + getTypesList(); + /** + *
+     * The type categories of the library, as defined in the libraries index.
+     * Possible values: `Arduino`, `Partner`, `Recommended`, `Contributed`,
+     * `Retired`.
+     * 
+ * + * repeated string types = 9; + * @return The count of types. + */ + int getTypesCount(); + /** + *
+     * The type categories of the library, as defined in the libraries index.
+     * Possible values: `Arduino`, `Partner`, `Recommended`, `Contributed`,
+     * `Retired`.
+     * 
+ * + * repeated string types = 9; + * @param index The index of the element to return. + * @return The types at the given index. + */ + java.lang.String getTypes(int index); + /** + *
+     * The type categories of the library, as defined in the libraries index.
+     * Possible values: `Arduino`, `Partner`, `Recommended`, `Contributed`,
+     * `Retired`.
+     * 
+ * + * repeated string types = 9; + * @param index The index of the value to return. + * @return The bytes of the types at the given index. + */ + com.google.protobuf.ByteString + getTypesBytes(int index); + + /** + *
+     * Information about the library archive file.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadResource resources = 10; + * @return Whether the resources field is set. + */ + boolean hasResources(); + /** + *
+     * Information about the library archive file.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadResource resources = 10; + * @return The resources. + */ + cc.arduino.cli.commands.Lib.DownloadResource getResources(); + /** + *
+     * Information about the library archive file.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadResource resources = 10; + */ + cc.arduino.cli.commands.Lib.DownloadResourceOrBuilder getResourcesOrBuilder(); + + /** + *
+     * Value of the `license` field in library.properties.
+     * 
+ * + * string license = 11; + * @return The license. + */ + java.lang.String getLicense(); + /** + *
+     * Value of the `license` field in library.properties.
+     * 
+ * + * string license = 11; + * @return The bytes for license. + */ + com.google.protobuf.ByteString + getLicenseBytes(); + + /** + *
+     * Value of the `includes` field in library.properties.
+     * 
+ * + * repeated string provides_includes = 12; + * @return A list containing the providesIncludes. + */ + java.util.List + getProvidesIncludesList(); + /** + *
+     * Value of the `includes` field in library.properties.
+     * 
+ * + * repeated string provides_includes = 12; + * @return The count of providesIncludes. + */ + int getProvidesIncludesCount(); + /** + *
+     * Value of the `includes` field in library.properties.
+     * 
+ * + * repeated string provides_includes = 12; + * @param index The index of the element to return. + * @return The providesIncludes at the given index. + */ + java.lang.String getProvidesIncludes(int index); + /** + *
+     * Value of the `includes` field in library.properties.
+     * 
+ * + * repeated string provides_includes = 12; + * @param index The index of the value to return. + * @return The bytes of the providesIncludes at the given index. + */ + com.google.protobuf.ByteString + getProvidesIncludesBytes(int index); + + /** + *
+     * The names of the library's dependencies, as defined by the 'depends'
+     * field of library.properties.
+     * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependency dependencies = 13; + */ + java.util.List + getDependenciesList(); + /** + *
+     * The names of the library's dependencies, as defined by the 'depends'
+     * field of library.properties.
+     * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependency dependencies = 13; + */ + cc.arduino.cli.commands.Lib.LibraryDependency getDependencies(int index); + /** + *
+     * The names of the library's dependencies, as defined by the 'depends'
+     * field of library.properties.
+     * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependency dependencies = 13; + */ + int getDependenciesCount(); + /** + *
+     * The names of the library's dependencies, as defined by the 'depends'
+     * field of library.properties.
+     * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependency dependencies = 13; + */ + java.util.List + getDependenciesOrBuilderList(); + /** + *
+     * The names of the library's dependencies, as defined by the 'depends'
+     * field of library.properties.
+     * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependency dependencies = 13; + */ + cc.arduino.cli.commands.Lib.LibraryDependencyOrBuilder getDependenciesOrBuilder( + int index); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.LibraryRelease} + */ + public static final class LibraryRelease extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.LibraryRelease) + LibraryReleaseOrBuilder { + private static final long serialVersionUID = 0L; + // Use LibraryRelease.newBuilder() to construct. + private LibraryRelease(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LibraryRelease() { + author_ = ""; + version_ = ""; + maintainer_ = ""; + sentence_ = ""; + paragraph_ = ""; + website_ = ""; + category_ = ""; + architectures_ = com.google.protobuf.LazyStringArrayList.EMPTY; + types_ = com.google.protobuf.LazyStringArrayList.EMPTY; + license_ = ""; + providesIncludes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + dependencies_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LibraryRelease(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LibraryRelease( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + author_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + version_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + maintainer_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + sentence_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + paragraph_ = s; + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + website_ = s; + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + + category_ = s; + break; + } + case 66: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + architectures_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + architectures_.add(s); + break; + } + case 74: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + types_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + types_.add(s); + break; + } + case 82: { + cc.arduino.cli.commands.Lib.DownloadResource.Builder subBuilder = null; + if (resources_ != null) { + subBuilder = resources_.toBuilder(); + } + resources_ = input.readMessage(cc.arduino.cli.commands.Lib.DownloadResource.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(resources_); + resources_ = subBuilder.buildPartial(); + } + + break; + } + case 90: { + java.lang.String s = input.readStringRequireUtf8(); + + license_ = s; + break; + } + case 98: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + providesIncludes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000004; + } + providesIncludes_.add(s); + break; + } + case 106: { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + dependencies_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + dependencies_.add( + input.readMessage(cc.arduino.cli.commands.Lib.LibraryDependency.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + architectures_ = architectures_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + types_ = types_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + providesIncludes_ = providesIncludes_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + dependencies_ = java.util.Collections.unmodifiableList(dependencies_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryRelease_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryRelease_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Lib.LibraryRelease.class, cc.arduino.cli.commands.Lib.LibraryRelease.Builder.class); + } + + public static final int AUTHOR_FIELD_NUMBER = 1; + private volatile java.lang.Object author_; + /** + *
+     * Value of the `author` field in library.properties.
+     * 
+ * + * string author = 1; + * @return The author. + */ + public java.lang.String getAuthor() { + java.lang.Object ref = author_; + 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(); + author_ = s; + return s; + } + } + /** + *
+     * Value of the `author` field in library.properties.
+     * 
+ * + * string author = 1; + * @return The bytes for author. + */ + public com.google.protobuf.ByteString + getAuthorBytes() { + java.lang.Object ref = author_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + author_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_FIELD_NUMBER = 2; + private volatile java.lang.Object version_; + /** + *
+     * Value of the `version` field in library.properties.
+     * 
+ * + * string version = 2; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + 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(); + version_ = s; + return s; + } + } + /** + *
+     * Value of the `version` field in library.properties.
+     * 
+ * + * string version = 2; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MAINTAINER_FIELD_NUMBER = 3; + private volatile java.lang.Object maintainer_; + /** + *
+     * Value of the `maintainer` field in library.properties.
+     * 
+ * + * string maintainer = 3; + * @return The maintainer. + */ + public java.lang.String getMaintainer() { + java.lang.Object ref = maintainer_; + 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(); + maintainer_ = s; + return s; + } + } + /** + *
+     * Value of the `maintainer` field in library.properties.
+     * 
+ * + * string maintainer = 3; + * @return The bytes for maintainer. + */ + public com.google.protobuf.ByteString + getMaintainerBytes() { + java.lang.Object ref = maintainer_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + maintainer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SENTENCE_FIELD_NUMBER = 4; + private volatile java.lang.Object sentence_; + /** + *
+     * Value of the `sentence` field in library.properties.
+     * 
+ * + * string sentence = 4; + * @return The sentence. + */ + public java.lang.String getSentence() { + java.lang.Object ref = sentence_; + 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(); + sentence_ = s; + return s; + } + } + /** + *
+     * Value of the `sentence` field in library.properties.
+     * 
+ * + * string sentence = 4; + * @return The bytes for sentence. + */ + public com.google.protobuf.ByteString + getSentenceBytes() { + java.lang.Object ref = sentence_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sentence_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARAGRAPH_FIELD_NUMBER = 5; + private volatile java.lang.Object paragraph_; + /** + *
+     * Value of the `paragraph` field in library.properties.
+     * 
+ * + * string paragraph = 5; + * @return The paragraph. + */ + public java.lang.String getParagraph() { + java.lang.Object ref = paragraph_; + 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(); + paragraph_ = s; + return s; + } + } + /** + *
+     * Value of the `paragraph` field in library.properties.
+     * 
+ * + * string paragraph = 5; + * @return The bytes for paragraph. + */ + public com.google.protobuf.ByteString + getParagraphBytes() { + java.lang.Object ref = paragraph_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + paragraph_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int WEBSITE_FIELD_NUMBER = 6; + private volatile java.lang.Object website_; + /** + *
+     * Value of the `url` field in library.properties.
+     * 
+ * + * string website = 6; + * @return The website. + */ + public java.lang.String getWebsite() { + java.lang.Object ref = website_; + 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(); + website_ = s; + return s; + } + } + /** + *
+     * Value of the `url` field in library.properties.
+     * 
+ * + * string website = 6; + * @return The bytes for website. + */ + public com.google.protobuf.ByteString + getWebsiteBytes() { + java.lang.Object ref = website_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + website_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CATEGORY_FIELD_NUMBER = 7; + private volatile java.lang.Object category_; + /** + *
+     * Value of the `category` field in library.properties.
+     * 
+ * + * string category = 7; + * @return The category. + */ + public java.lang.String getCategory() { + java.lang.Object ref = category_; + 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(); + category_ = s; + return s; + } + } + /** + *
+     * Value of the `category` field in library.properties.
+     * 
+ * + * string category = 7; + * @return The bytes for category. + */ + public com.google.protobuf.ByteString + getCategoryBytes() { + java.lang.Object ref = category_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + category_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ARCHITECTURES_FIELD_NUMBER = 8; + private com.google.protobuf.LazyStringList architectures_; + /** + *
+     * Value of the `architectures` field in library.properties.
+     * 
+ * + * repeated string architectures = 8; + * @return A list containing the architectures. + */ + public com.google.protobuf.ProtocolStringList + getArchitecturesList() { + return architectures_; + } + /** + *
+     * Value of the `architectures` field in library.properties.
+     * 
+ * + * repeated string architectures = 8; + * @return The count of architectures. + */ + public int getArchitecturesCount() { + return architectures_.size(); + } + /** + *
+     * Value of the `architectures` field in library.properties.
+     * 
+ * + * repeated string architectures = 8; + * @param index The index of the element to return. + * @return The architectures at the given index. + */ + public java.lang.String getArchitectures(int index) { + return architectures_.get(index); + } + /** + *
+     * Value of the `architectures` field in library.properties.
+     * 
+ * + * repeated string architectures = 8; + * @param index The index of the value to return. + * @return The bytes of the architectures at the given index. + */ + public com.google.protobuf.ByteString + getArchitecturesBytes(int index) { + return architectures_.getByteString(index); + } + + public static final int TYPES_FIELD_NUMBER = 9; + private com.google.protobuf.LazyStringList types_; + /** + *
+     * The type categories of the library, as defined in the libraries index.
+     * Possible values: `Arduino`, `Partner`, `Recommended`, `Contributed`,
+     * `Retired`.
+     * 
+ * + * repeated string types = 9; + * @return A list containing the types. + */ + public com.google.protobuf.ProtocolStringList + getTypesList() { + return types_; + } + /** + *
+     * The type categories of the library, as defined in the libraries index.
+     * Possible values: `Arduino`, `Partner`, `Recommended`, `Contributed`,
+     * `Retired`.
+     * 
+ * + * repeated string types = 9; + * @return The count of types. + */ + public int getTypesCount() { + return types_.size(); + } + /** + *
+     * The type categories of the library, as defined in the libraries index.
+     * Possible values: `Arduino`, `Partner`, `Recommended`, `Contributed`,
+     * `Retired`.
+     * 
+ * + * repeated string types = 9; + * @param index The index of the element to return. + * @return The types at the given index. + */ + public java.lang.String getTypes(int index) { + return types_.get(index); + } + /** + *
+     * The type categories of the library, as defined in the libraries index.
+     * Possible values: `Arduino`, `Partner`, `Recommended`, `Contributed`,
+     * `Retired`.
+     * 
+ * + * repeated string types = 9; + * @param index The index of the value to return. + * @return The bytes of the types at the given index. + */ + public com.google.protobuf.ByteString + getTypesBytes(int index) { + return types_.getByteString(index); + } + + public static final int RESOURCES_FIELD_NUMBER = 10; + private cc.arduino.cli.commands.Lib.DownloadResource resources_; + /** + *
+     * Information about the library archive file.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadResource resources = 10; + * @return Whether the resources field is set. + */ + public boolean hasResources() { + return resources_ != null; + } + /** + *
+     * Information about the library archive file.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadResource resources = 10; + * @return The resources. + */ + public cc.arduino.cli.commands.Lib.DownloadResource getResources() { + return resources_ == null ? cc.arduino.cli.commands.Lib.DownloadResource.getDefaultInstance() : resources_; + } + /** + *
+     * Information about the library archive file.
+     * 
+ * + * .cc.arduino.cli.commands.DownloadResource resources = 10; + */ + public cc.arduino.cli.commands.Lib.DownloadResourceOrBuilder getResourcesOrBuilder() { + return getResources(); + } + + public static final int LICENSE_FIELD_NUMBER = 11; + private volatile java.lang.Object license_; + /** + *
+     * Value of the `license` field in library.properties.
+     * 
+ * + * string license = 11; + * @return The license. + */ + public java.lang.String getLicense() { + java.lang.Object ref = license_; + 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(); + license_ = s; + return s; + } + } + /** + *
+     * Value of the `license` field in library.properties.
+     * 
+ * + * string license = 11; + * @return The bytes for license. + */ + public com.google.protobuf.ByteString + getLicenseBytes() { + java.lang.Object ref = license_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + license_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROVIDES_INCLUDES_FIELD_NUMBER = 12; + private com.google.protobuf.LazyStringList providesIncludes_; + /** + *
+     * Value of the `includes` field in library.properties.
+     * 
+ * + * repeated string provides_includes = 12; + * @return A list containing the providesIncludes. + */ + public com.google.protobuf.ProtocolStringList + getProvidesIncludesList() { + return providesIncludes_; + } + /** + *
+     * Value of the `includes` field in library.properties.
+     * 
+ * + * repeated string provides_includes = 12; + * @return The count of providesIncludes. + */ + public int getProvidesIncludesCount() { + return providesIncludes_.size(); + } + /** + *
+     * Value of the `includes` field in library.properties.
+     * 
+ * + * repeated string provides_includes = 12; + * @param index The index of the element to return. + * @return The providesIncludes at the given index. + */ + public java.lang.String getProvidesIncludes(int index) { + return providesIncludes_.get(index); + } + /** + *
+     * Value of the `includes` field in library.properties.
+     * 
+ * + * repeated string provides_includes = 12; + * @param index The index of the value to return. + * @return The bytes of the providesIncludes at the given index. + */ + public com.google.protobuf.ByteString + getProvidesIncludesBytes(int index) { + return providesIncludes_.getByteString(index); + } + + public static final int DEPENDENCIES_FIELD_NUMBER = 13; + private java.util.List dependencies_; + /** + *
+     * The names of the library's dependencies, as defined by the 'depends'
+     * field of library.properties.
+     * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependency dependencies = 13; + */ + public java.util.List getDependenciesList() { + return dependencies_; + } + /** + *
+     * The names of the library's dependencies, as defined by the 'depends'
+     * field of library.properties.
+     * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependency dependencies = 13; + */ + public java.util.List + getDependenciesOrBuilderList() { + return dependencies_; + } + /** + *
+     * The names of the library's dependencies, as defined by the 'depends'
+     * field of library.properties.
+     * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependency dependencies = 13; + */ + public int getDependenciesCount() { + return dependencies_.size(); + } + /** + *
+     * The names of the library's dependencies, as defined by the 'depends'
+     * field of library.properties.
+     * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependency dependencies = 13; + */ + public cc.arduino.cli.commands.Lib.LibraryDependency getDependencies(int index) { + return dependencies_.get(index); + } + /** + *
+     * The names of the library's dependencies, as defined by the 'depends'
+     * field of library.properties.
+     * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependency dependencies = 13; + */ + public cc.arduino.cli.commands.Lib.LibraryDependencyOrBuilder getDependenciesOrBuilder( + int index) { + return dependencies_.get(index); + } + + 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 (!getAuthorBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, author_); + } + if (!getVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, version_); + } + if (!getMaintainerBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, maintainer_); + } + if (!getSentenceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, sentence_); + } + if (!getParagraphBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, paragraph_); + } + if (!getWebsiteBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, website_); + } + if (!getCategoryBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, category_); + } + for (int i = 0; i < architectures_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, architectures_.getRaw(i)); + } + for (int i = 0; i < types_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, types_.getRaw(i)); + } + if (resources_ != null) { + output.writeMessage(10, getResources()); + } + if (!getLicenseBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, license_); + } + for (int i = 0; i < providesIncludes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, providesIncludes_.getRaw(i)); + } + for (int i = 0; i < dependencies_.size(); i++) { + output.writeMessage(13, dependencies_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getAuthorBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, author_); + } + if (!getVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, version_); + } + if (!getMaintainerBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, maintainer_); + } + if (!getSentenceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, sentence_); + } + if (!getParagraphBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, paragraph_); + } + if (!getWebsiteBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, website_); + } + if (!getCategoryBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, category_); + } + { + int dataSize = 0; + for (int i = 0; i < architectures_.size(); i++) { + dataSize += computeStringSizeNoTag(architectures_.getRaw(i)); + } + size += dataSize; + size += 1 * getArchitecturesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < types_.size(); i++) { + dataSize += computeStringSizeNoTag(types_.getRaw(i)); + } + size += dataSize; + size += 1 * getTypesList().size(); + } + if (resources_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, getResources()); + } + if (!getLicenseBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, license_); + } + { + int dataSize = 0; + for (int i = 0; i < providesIncludes_.size(); i++) { + dataSize += computeStringSizeNoTag(providesIncludes_.getRaw(i)); + } + size += dataSize; + size += 1 * getProvidesIncludesList().size(); + } + for (int i = 0; i < dependencies_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(13, dependencies_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Lib.LibraryRelease)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Lib.LibraryRelease other = (cc.arduino.cli.commands.Lib.LibraryRelease) obj; + + if (!getAuthor() + .equals(other.getAuthor())) return false; + if (!getVersion() + .equals(other.getVersion())) return false; + if (!getMaintainer() + .equals(other.getMaintainer())) return false; + if (!getSentence() + .equals(other.getSentence())) return false; + if (!getParagraph() + .equals(other.getParagraph())) return false; + if (!getWebsite() + .equals(other.getWebsite())) return false; + if (!getCategory() + .equals(other.getCategory())) return false; + if (!getArchitecturesList() + .equals(other.getArchitecturesList())) return false; + if (!getTypesList() + .equals(other.getTypesList())) return false; + if (hasResources() != other.hasResources()) return false; + if (hasResources()) { + if (!getResources() + .equals(other.getResources())) return false; + } + if (!getLicense() + .equals(other.getLicense())) return false; + if (!getProvidesIncludesList() + .equals(other.getProvidesIncludesList())) return false; + if (!getDependenciesList() + .equals(other.getDependenciesList())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + AUTHOR_FIELD_NUMBER; + hash = (53 * hash) + getAuthor().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (37 * hash) + MAINTAINER_FIELD_NUMBER; + hash = (53 * hash) + getMaintainer().hashCode(); + hash = (37 * hash) + SENTENCE_FIELD_NUMBER; + hash = (53 * hash) + getSentence().hashCode(); + hash = (37 * hash) + PARAGRAPH_FIELD_NUMBER; + hash = (53 * hash) + getParagraph().hashCode(); + hash = (37 * hash) + WEBSITE_FIELD_NUMBER; + hash = (53 * hash) + getWebsite().hashCode(); + hash = (37 * hash) + CATEGORY_FIELD_NUMBER; + hash = (53 * hash) + getCategory().hashCode(); + if (getArchitecturesCount() > 0) { + hash = (37 * hash) + ARCHITECTURES_FIELD_NUMBER; + hash = (53 * hash) + getArchitecturesList().hashCode(); + } + if (getTypesCount() > 0) { + hash = (37 * hash) + TYPES_FIELD_NUMBER; + hash = (53 * hash) + getTypesList().hashCode(); + } + if (hasResources()) { + hash = (37 * hash) + RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getResources().hashCode(); + } + hash = (37 * hash) + LICENSE_FIELD_NUMBER; + hash = (53 * hash) + getLicense().hashCode(); + if (getProvidesIncludesCount() > 0) { + hash = (37 * hash) + PROVIDES_INCLUDES_FIELD_NUMBER; + hash = (53 * hash) + getProvidesIncludesList().hashCode(); + } + if (getDependenciesCount() > 0) { + hash = (37 * hash) + DEPENDENCIES_FIELD_NUMBER; + hash = (53 * hash) + getDependenciesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Lib.LibraryRelease parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryRelease parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryRelease parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryRelease parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryRelease parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryRelease parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryRelease parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryRelease parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryRelease parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryRelease parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryRelease parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryRelease parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Lib.LibraryRelease 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.LibraryRelease} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.LibraryRelease) + cc.arduino.cli.commands.Lib.LibraryReleaseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryRelease_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryRelease_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Lib.LibraryRelease.class, cc.arduino.cli.commands.Lib.LibraryRelease.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Lib.LibraryRelease.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getDependenciesFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + author_ = ""; + + version_ = ""; + + maintainer_ = ""; + + sentence_ = ""; + + paragraph_ = ""; + + website_ = ""; + + category_ = ""; + + architectures_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + types_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + if (resourcesBuilder_ == null) { + resources_ = null; + } else { + resources_ = null; + resourcesBuilder_ = null; + } + license_ = ""; + + providesIncludes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + if (dependenciesBuilder_ == null) { + dependencies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + dependenciesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryRelease_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryRelease getDefaultInstanceForType() { + return cc.arduino.cli.commands.Lib.LibraryRelease.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryRelease build() { + cc.arduino.cli.commands.Lib.LibraryRelease result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryRelease buildPartial() { + cc.arduino.cli.commands.Lib.LibraryRelease result = new cc.arduino.cli.commands.Lib.LibraryRelease(this); + int from_bitField0_ = bitField0_; + result.author_ = author_; + result.version_ = version_; + result.maintainer_ = maintainer_; + result.sentence_ = sentence_; + result.paragraph_ = paragraph_; + result.website_ = website_; + result.category_ = category_; + if (((bitField0_ & 0x00000001) != 0)) { + architectures_ = architectures_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.architectures_ = architectures_; + if (((bitField0_ & 0x00000002) != 0)) { + types_ = types_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.types_ = types_; + if (resourcesBuilder_ == null) { + result.resources_ = resources_; + } else { + result.resources_ = resourcesBuilder_.build(); + } + result.license_ = license_; + if (((bitField0_ & 0x00000004) != 0)) { + providesIncludes_ = providesIncludes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.providesIncludes_ = providesIncludes_; + if (dependenciesBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + dependencies_ = java.util.Collections.unmodifiableList(dependencies_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.dependencies_ = dependencies_; + } else { + result.dependencies_ = dependenciesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Lib.LibraryRelease) { + return mergeFrom((cc.arduino.cli.commands.Lib.LibraryRelease)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Lib.LibraryRelease other) { + if (other == cc.arduino.cli.commands.Lib.LibraryRelease.getDefaultInstance()) return this; + if (!other.getAuthor().isEmpty()) { + author_ = other.author_; + onChanged(); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + if (!other.getMaintainer().isEmpty()) { + maintainer_ = other.maintainer_; + onChanged(); + } + if (!other.getSentence().isEmpty()) { + sentence_ = other.sentence_; + onChanged(); + } + if (!other.getParagraph().isEmpty()) { + paragraph_ = other.paragraph_; + onChanged(); + } + if (!other.getWebsite().isEmpty()) { + website_ = other.website_; + onChanged(); + } + if (!other.getCategory().isEmpty()) { + category_ = other.category_; + onChanged(); + } + if (!other.architectures_.isEmpty()) { + if (architectures_.isEmpty()) { + architectures_ = other.architectures_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureArchitecturesIsMutable(); + architectures_.addAll(other.architectures_); + } + onChanged(); + } + if (!other.types_.isEmpty()) { + if (types_.isEmpty()) { + types_ = other.types_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureTypesIsMutable(); + types_.addAll(other.types_); + } + onChanged(); + } + if (other.hasResources()) { + mergeResources(other.getResources()); + } + if (!other.getLicense().isEmpty()) { + license_ = other.license_; + onChanged(); + } + if (!other.providesIncludes_.isEmpty()) { + if (providesIncludes_.isEmpty()) { + providesIncludes_ = other.providesIncludes_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureProvidesIncludesIsMutable(); + providesIncludes_.addAll(other.providesIncludes_); + } + onChanged(); + } + if (dependenciesBuilder_ == null) { + if (!other.dependencies_.isEmpty()) { + if (dependencies_.isEmpty()) { + dependencies_ = other.dependencies_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureDependenciesIsMutable(); + dependencies_.addAll(other.dependencies_); + } + onChanged(); + } + } else { + if (!other.dependencies_.isEmpty()) { + if (dependenciesBuilder_.isEmpty()) { + dependenciesBuilder_.dispose(); + dependenciesBuilder_ = null; + dependencies_ = other.dependencies_; + bitField0_ = (bitField0_ & ~0x00000008); + dependenciesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getDependenciesFieldBuilder() : null; + } else { + dependenciesBuilder_.addAllMessages(other.dependencies_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Lib.LibraryRelease parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Lib.LibraryRelease) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object author_ = ""; + /** + *
+       * Value of the `author` field in library.properties.
+       * 
+ * + * string author = 1; + * @return The author. + */ + public java.lang.String getAuthor() { + java.lang.Object ref = author_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + author_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Value of the `author` field in library.properties.
+       * 
+ * + * string author = 1; + * @return The bytes for author. + */ + public com.google.protobuf.ByteString + getAuthorBytes() { + java.lang.Object ref = author_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + author_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Value of the `author` field in library.properties.
+       * 
+ * + * string author = 1; + * @param value The author to set. + * @return This builder for chaining. + */ + public Builder setAuthor( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + author_ = value; + onChanged(); + return this; + } + /** + *
+       * Value of the `author` field in library.properties.
+       * 
+ * + * string author = 1; + * @return This builder for chaining. + */ + public Builder clearAuthor() { + + author_ = getDefaultInstance().getAuthor(); + onChanged(); + return this; + } + /** + *
+       * Value of the `author` field in library.properties.
+       * 
+ * + * string author = 1; + * @param value The bytes for author to set. + * @return This builder for chaining. + */ + public Builder setAuthorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + author_ = value; + onChanged(); + return this; + } + + private java.lang.Object version_ = ""; + /** + *
+       * Value of the `version` field in library.properties.
+       * 
+ * + * string version = 2; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Value of the `version` field in library.properties.
+       * 
+ * + * string version = 2; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Value of the `version` field in library.properties.
+       * 
+ * + * string version = 2; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + *
+       * Value of the `version` field in library.properties.
+       * 
+ * + * string version = 2; + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + *
+       * Value of the `version` field in library.properties.
+       * 
+ * + * string version = 2; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = value; + onChanged(); + return this; + } + + private java.lang.Object maintainer_ = ""; + /** + *
+       * Value of the `maintainer` field in library.properties.
+       * 
+ * + * string maintainer = 3; + * @return The maintainer. + */ + public java.lang.String getMaintainer() { + java.lang.Object ref = maintainer_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + maintainer_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Value of the `maintainer` field in library.properties.
+       * 
+ * + * string maintainer = 3; + * @return The bytes for maintainer. + */ + public com.google.protobuf.ByteString + getMaintainerBytes() { + java.lang.Object ref = maintainer_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + maintainer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Value of the `maintainer` field in library.properties.
+       * 
+ * + * string maintainer = 3; + * @param value The maintainer to set. + * @return This builder for chaining. + */ + public Builder setMaintainer( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + maintainer_ = value; + onChanged(); + return this; + } + /** + *
+       * Value of the `maintainer` field in library.properties.
+       * 
+ * + * string maintainer = 3; + * @return This builder for chaining. + */ + public Builder clearMaintainer() { + + maintainer_ = getDefaultInstance().getMaintainer(); + onChanged(); + return this; + } + /** + *
+       * Value of the `maintainer` field in library.properties.
+       * 
+ * + * string maintainer = 3; + * @param value The bytes for maintainer to set. + * @return This builder for chaining. + */ + public Builder setMaintainerBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + maintainer_ = value; + onChanged(); + return this; + } + + private java.lang.Object sentence_ = ""; + /** + *
+       * Value of the `sentence` field in library.properties.
+       * 
+ * + * string sentence = 4; + * @return The sentence. + */ + public java.lang.String getSentence() { + java.lang.Object ref = sentence_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sentence_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Value of the `sentence` field in library.properties.
+       * 
+ * + * string sentence = 4; + * @return The bytes for sentence. + */ + public com.google.protobuf.ByteString + getSentenceBytes() { + java.lang.Object ref = sentence_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sentence_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Value of the `sentence` field in library.properties.
+       * 
+ * + * string sentence = 4; + * @param value The sentence to set. + * @return This builder for chaining. + */ + public Builder setSentence( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sentence_ = value; + onChanged(); + return this; + } + /** + *
+       * Value of the `sentence` field in library.properties.
+       * 
+ * + * string sentence = 4; + * @return This builder for chaining. + */ + public Builder clearSentence() { + + sentence_ = getDefaultInstance().getSentence(); + onChanged(); + return this; + } + /** + *
+       * Value of the `sentence` field in library.properties.
+       * 
+ * + * string sentence = 4; + * @param value The bytes for sentence to set. + * @return This builder for chaining. + */ + public Builder setSentenceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sentence_ = value; + onChanged(); + return this; + } + + private java.lang.Object paragraph_ = ""; + /** + *
+       * Value of the `paragraph` field in library.properties.
+       * 
+ * + * string paragraph = 5; + * @return The paragraph. + */ + public java.lang.String getParagraph() { + java.lang.Object ref = paragraph_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + paragraph_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Value of the `paragraph` field in library.properties.
+       * 
+ * + * string paragraph = 5; + * @return The bytes for paragraph. + */ + public com.google.protobuf.ByteString + getParagraphBytes() { + java.lang.Object ref = paragraph_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + paragraph_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Value of the `paragraph` field in library.properties.
+       * 
+ * + * string paragraph = 5; + * @param value The paragraph to set. + * @return This builder for chaining. + */ + public Builder setParagraph( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + paragraph_ = value; + onChanged(); + return this; + } + /** + *
+       * Value of the `paragraph` field in library.properties.
+       * 
+ * + * string paragraph = 5; + * @return This builder for chaining. + */ + public Builder clearParagraph() { + + paragraph_ = getDefaultInstance().getParagraph(); + onChanged(); + return this; + } + /** + *
+       * Value of the `paragraph` field in library.properties.
+       * 
+ * + * string paragraph = 5; + * @param value The bytes for paragraph to set. + * @return This builder for chaining. + */ + public Builder setParagraphBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + paragraph_ = value; + onChanged(); + return this; + } + + private java.lang.Object website_ = ""; + /** + *
+       * Value of the `url` field in library.properties.
+       * 
+ * + * string website = 6; + * @return The website. + */ + public java.lang.String getWebsite() { + java.lang.Object ref = website_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + website_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Value of the `url` field in library.properties.
+       * 
+ * + * string website = 6; + * @return The bytes for website. + */ + public com.google.protobuf.ByteString + getWebsiteBytes() { + java.lang.Object ref = website_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + website_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Value of the `url` field in library.properties.
+       * 
+ * + * string website = 6; + * @param value The website to set. + * @return This builder for chaining. + */ + public Builder setWebsite( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + website_ = value; + onChanged(); + return this; + } + /** + *
+       * Value of the `url` field in library.properties.
+       * 
+ * + * string website = 6; + * @return This builder for chaining. + */ + public Builder clearWebsite() { + + website_ = getDefaultInstance().getWebsite(); + onChanged(); + return this; + } + /** + *
+       * Value of the `url` field in library.properties.
+       * 
+ * + * string website = 6; + * @param value The bytes for website to set. + * @return This builder for chaining. + */ + public Builder setWebsiteBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + website_ = value; + onChanged(); + return this; + } + + private java.lang.Object category_ = ""; + /** + *
+       * Value of the `category` field in library.properties.
+       * 
+ * + * string category = 7; + * @return The category. + */ + public java.lang.String getCategory() { + java.lang.Object ref = category_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + category_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Value of the `category` field in library.properties.
+       * 
+ * + * string category = 7; + * @return The bytes for category. + */ + public com.google.protobuf.ByteString + getCategoryBytes() { + java.lang.Object ref = category_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + category_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Value of the `category` field in library.properties.
+       * 
+ * + * string category = 7; + * @param value The category to set. + * @return This builder for chaining. + */ + public Builder setCategory( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + category_ = value; + onChanged(); + return this; + } + /** + *
+       * Value of the `category` field in library.properties.
+       * 
+ * + * string category = 7; + * @return This builder for chaining. + */ + public Builder clearCategory() { + + category_ = getDefaultInstance().getCategory(); + onChanged(); + return this; + } + /** + *
+       * Value of the `category` field in library.properties.
+       * 
+ * + * string category = 7; + * @param value The bytes for category to set. + * @return This builder for chaining. + */ + public Builder setCategoryBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + category_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList architectures_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureArchitecturesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + architectures_ = new com.google.protobuf.LazyStringArrayList(architectures_); + bitField0_ |= 0x00000001; + } + } + /** + *
+       * Value of the `architectures` field in library.properties.
+       * 
+ * + * repeated string architectures = 8; + * @return A list containing the architectures. + */ + public com.google.protobuf.ProtocolStringList + getArchitecturesList() { + return architectures_.getUnmodifiableView(); + } + /** + *
+       * Value of the `architectures` field in library.properties.
+       * 
+ * + * repeated string architectures = 8; + * @return The count of architectures. + */ + public int getArchitecturesCount() { + return architectures_.size(); + } + /** + *
+       * Value of the `architectures` field in library.properties.
+       * 
+ * + * repeated string architectures = 8; + * @param index The index of the element to return. + * @return The architectures at the given index. + */ + public java.lang.String getArchitectures(int index) { + return architectures_.get(index); + } + /** + *
+       * Value of the `architectures` field in library.properties.
+       * 
+ * + * repeated string architectures = 8; + * @param index The index of the value to return. + * @return The bytes of the architectures at the given index. + */ + public com.google.protobuf.ByteString + getArchitecturesBytes(int index) { + return architectures_.getByteString(index); + } + /** + *
+       * Value of the `architectures` field in library.properties.
+       * 
+ * + * repeated string architectures = 8; + * @param index The index to set the value at. + * @param value The architectures to set. + * @return This builder for chaining. + */ + public Builder setArchitectures( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureArchitecturesIsMutable(); + architectures_.set(index, value); + onChanged(); + return this; + } + /** + *
+       * Value of the `architectures` field in library.properties.
+       * 
+ * + * repeated string architectures = 8; + * @param value The architectures to add. + * @return This builder for chaining. + */ + public Builder addArchitectures( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureArchitecturesIsMutable(); + architectures_.add(value); + onChanged(); + return this; + } + /** + *
+       * Value of the `architectures` field in library.properties.
+       * 
+ * + * repeated string architectures = 8; + * @param values The architectures to add. + * @return This builder for chaining. + */ + public Builder addAllArchitectures( + java.lang.Iterable values) { + ensureArchitecturesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, architectures_); + onChanged(); + return this; + } + /** + *
+       * Value of the `architectures` field in library.properties.
+       * 
+ * + * repeated string architectures = 8; + * @return This builder for chaining. + */ + public Builder clearArchitectures() { + architectures_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * Value of the `architectures` field in library.properties.
+       * 
+ * + * repeated string architectures = 8; + * @param value The bytes of the architectures to add. + * @return This builder for chaining. + */ + public Builder addArchitecturesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureArchitecturesIsMutable(); + architectures_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList types_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureTypesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + types_ = new com.google.protobuf.LazyStringArrayList(types_); + bitField0_ |= 0x00000002; + } + } + /** + *
+       * The type categories of the library, as defined in the libraries index.
+       * Possible values: `Arduino`, `Partner`, `Recommended`, `Contributed`,
+       * `Retired`.
+       * 
+ * + * repeated string types = 9; + * @return A list containing the types. + */ + public com.google.protobuf.ProtocolStringList + getTypesList() { + return types_.getUnmodifiableView(); + } + /** + *
+       * The type categories of the library, as defined in the libraries index.
+       * Possible values: `Arduino`, `Partner`, `Recommended`, `Contributed`,
+       * `Retired`.
+       * 
+ * + * repeated string types = 9; + * @return The count of types. + */ + public int getTypesCount() { + return types_.size(); + } + /** + *
+       * The type categories of the library, as defined in the libraries index.
+       * Possible values: `Arduino`, `Partner`, `Recommended`, `Contributed`,
+       * `Retired`.
+       * 
+ * + * repeated string types = 9; + * @param index The index of the element to return. + * @return The types at the given index. + */ + public java.lang.String getTypes(int index) { + return types_.get(index); + } + /** + *
+       * The type categories of the library, as defined in the libraries index.
+       * Possible values: `Arduino`, `Partner`, `Recommended`, `Contributed`,
+       * `Retired`.
+       * 
+ * + * repeated string types = 9; + * @param index The index of the value to return. + * @return The bytes of the types at the given index. + */ + public com.google.protobuf.ByteString + getTypesBytes(int index) { + return types_.getByteString(index); + } + /** + *
+       * The type categories of the library, as defined in the libraries index.
+       * Possible values: `Arduino`, `Partner`, `Recommended`, `Contributed`,
+       * `Retired`.
+       * 
+ * + * repeated string types = 9; + * @param index The index to set the value at. + * @param value The types to set. + * @return This builder for chaining. + */ + public Builder setTypes( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypesIsMutable(); + types_.set(index, value); + onChanged(); + return this; + } + /** + *
+       * The type categories of the library, as defined in the libraries index.
+       * Possible values: `Arduino`, `Partner`, `Recommended`, `Contributed`,
+       * `Retired`.
+       * 
+ * + * repeated string types = 9; + * @param value The types to add. + * @return This builder for chaining. + */ + public Builder addTypes( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypesIsMutable(); + types_.add(value); + onChanged(); + return this; + } + /** + *
+       * The type categories of the library, as defined in the libraries index.
+       * Possible values: `Arduino`, `Partner`, `Recommended`, `Contributed`,
+       * `Retired`.
+       * 
+ * + * repeated string types = 9; + * @param values The types to add. + * @return This builder for chaining. + */ + public Builder addAllTypes( + java.lang.Iterable values) { + ensureTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, types_); + onChanged(); + return this; + } + /** + *
+       * The type categories of the library, as defined in the libraries index.
+       * Possible values: `Arduino`, `Partner`, `Recommended`, `Contributed`,
+       * `Retired`.
+       * 
+ * + * repeated string types = 9; + * @return This builder for chaining. + */ + public Builder clearTypes() { + types_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+       * The type categories of the library, as defined in the libraries index.
+       * Possible values: `Arduino`, `Partner`, `Recommended`, `Contributed`,
+       * `Retired`.
+       * 
+ * + * repeated string types = 9; + * @param value The bytes of the types to add. + * @return This builder for chaining. + */ + public Builder addTypesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTypesIsMutable(); + types_.add(value); + onChanged(); + return this; + } + + private cc.arduino.cli.commands.Lib.DownloadResource resources_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Lib.DownloadResource, cc.arduino.cli.commands.Lib.DownloadResource.Builder, cc.arduino.cli.commands.Lib.DownloadResourceOrBuilder> resourcesBuilder_; + /** + *
+       * Information about the library archive file.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadResource resources = 10; + * @return Whether the resources field is set. + */ + public boolean hasResources() { + return resourcesBuilder_ != null || resources_ != null; + } + /** + *
+       * Information about the library archive file.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadResource resources = 10; + * @return The resources. + */ + public cc.arduino.cli.commands.Lib.DownloadResource getResources() { + if (resourcesBuilder_ == null) { + return resources_ == null ? cc.arduino.cli.commands.Lib.DownloadResource.getDefaultInstance() : resources_; + } else { + return resourcesBuilder_.getMessage(); + } + } + /** + *
+       * Information about the library archive file.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadResource resources = 10; + */ + public Builder setResources(cc.arduino.cli.commands.Lib.DownloadResource value) { + if (resourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resources_ = value; + onChanged(); + } else { + resourcesBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Information about the library archive file.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadResource resources = 10; + */ + public Builder setResources( + cc.arduino.cli.commands.Lib.DownloadResource.Builder builderForValue) { + if (resourcesBuilder_ == null) { + resources_ = builderForValue.build(); + onChanged(); + } else { + resourcesBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Information about the library archive file.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadResource resources = 10; + */ + public Builder mergeResources(cc.arduino.cli.commands.Lib.DownloadResource value) { + if (resourcesBuilder_ == null) { + if (resources_ != null) { + resources_ = + cc.arduino.cli.commands.Lib.DownloadResource.newBuilder(resources_).mergeFrom(value).buildPartial(); + } else { + resources_ = value; + } + onChanged(); + } else { + resourcesBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Information about the library archive file.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadResource resources = 10; + */ + public Builder clearResources() { + if (resourcesBuilder_ == null) { + resources_ = null; + onChanged(); + } else { + resources_ = null; + resourcesBuilder_ = null; + } + + return this; + } + /** + *
+       * Information about the library archive file.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadResource resources = 10; + */ + public cc.arduino.cli.commands.Lib.DownloadResource.Builder getResourcesBuilder() { + + onChanged(); + return getResourcesFieldBuilder().getBuilder(); + } + /** + *
+       * Information about the library archive file.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadResource resources = 10; + */ + public cc.arduino.cli.commands.Lib.DownloadResourceOrBuilder getResourcesOrBuilder() { + if (resourcesBuilder_ != null) { + return resourcesBuilder_.getMessageOrBuilder(); + } else { + return resources_ == null ? + cc.arduino.cli.commands.Lib.DownloadResource.getDefaultInstance() : resources_; + } + } + /** + *
+       * Information about the library archive file.
+       * 
+ * + * .cc.arduino.cli.commands.DownloadResource resources = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Lib.DownloadResource, cc.arduino.cli.commands.Lib.DownloadResource.Builder, cc.arduino.cli.commands.Lib.DownloadResourceOrBuilder> + getResourcesFieldBuilder() { + if (resourcesBuilder_ == null) { + resourcesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Lib.DownloadResource, cc.arduino.cli.commands.Lib.DownloadResource.Builder, cc.arduino.cli.commands.Lib.DownloadResourceOrBuilder>( + getResources(), + getParentForChildren(), + isClean()); + resources_ = null; + } + return resourcesBuilder_; + } + + private java.lang.Object license_ = ""; + /** + *
+       * Value of the `license` field in library.properties.
+       * 
+ * + * string license = 11; + * @return The license. + */ + public java.lang.String getLicense() { + java.lang.Object ref = license_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + license_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Value of the `license` field in library.properties.
+       * 
+ * + * string license = 11; + * @return The bytes for license. + */ + public com.google.protobuf.ByteString + getLicenseBytes() { + java.lang.Object ref = license_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + license_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Value of the `license` field in library.properties.
+       * 
+ * + * string license = 11; + * @param value The license to set. + * @return This builder for chaining. + */ + public Builder setLicense( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + license_ = value; + onChanged(); + return this; + } + /** + *
+       * Value of the `license` field in library.properties.
+       * 
+ * + * string license = 11; + * @return This builder for chaining. + */ + public Builder clearLicense() { + + license_ = getDefaultInstance().getLicense(); + onChanged(); + return this; + } + /** + *
+       * Value of the `license` field in library.properties.
+       * 
+ * + * string license = 11; + * @param value The bytes for license to set. + * @return This builder for chaining. + */ + public Builder setLicenseBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + license_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList providesIncludes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureProvidesIncludesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + providesIncludes_ = new com.google.protobuf.LazyStringArrayList(providesIncludes_); + bitField0_ |= 0x00000004; + } + } + /** + *
+       * Value of the `includes` field in library.properties.
+       * 
+ * + * repeated string provides_includes = 12; + * @return A list containing the providesIncludes. + */ + public com.google.protobuf.ProtocolStringList + getProvidesIncludesList() { + return providesIncludes_.getUnmodifiableView(); + } + /** + *
+       * Value of the `includes` field in library.properties.
+       * 
+ * + * repeated string provides_includes = 12; + * @return The count of providesIncludes. + */ + public int getProvidesIncludesCount() { + return providesIncludes_.size(); + } + /** + *
+       * Value of the `includes` field in library.properties.
+       * 
+ * + * repeated string provides_includes = 12; + * @param index The index of the element to return. + * @return The providesIncludes at the given index. + */ + public java.lang.String getProvidesIncludes(int index) { + return providesIncludes_.get(index); + } + /** + *
+       * Value of the `includes` field in library.properties.
+       * 
+ * + * repeated string provides_includes = 12; + * @param index The index of the value to return. + * @return The bytes of the providesIncludes at the given index. + */ + public com.google.protobuf.ByteString + getProvidesIncludesBytes(int index) { + return providesIncludes_.getByteString(index); + } + /** + *
+       * Value of the `includes` field in library.properties.
+       * 
+ * + * repeated string provides_includes = 12; + * @param index The index to set the value at. + * @param value The providesIncludes to set. + * @return This builder for chaining. + */ + public Builder setProvidesIncludes( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProvidesIncludesIsMutable(); + providesIncludes_.set(index, value); + onChanged(); + return this; + } + /** + *
+       * Value of the `includes` field in library.properties.
+       * 
+ * + * repeated string provides_includes = 12; + * @param value The providesIncludes to add. + * @return This builder for chaining. + */ + public Builder addProvidesIncludes( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProvidesIncludesIsMutable(); + providesIncludes_.add(value); + onChanged(); + return this; + } + /** + *
+       * Value of the `includes` field in library.properties.
+       * 
+ * + * repeated string provides_includes = 12; + * @param values The providesIncludes to add. + * @return This builder for chaining. + */ + public Builder addAllProvidesIncludes( + java.lang.Iterable values) { + ensureProvidesIncludesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, providesIncludes_); + onChanged(); + return this; + } + /** + *
+       * Value of the `includes` field in library.properties.
+       * 
+ * + * repeated string provides_includes = 12; + * @return This builder for chaining. + */ + public Builder clearProvidesIncludes() { + providesIncludes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+       * Value of the `includes` field in library.properties.
+       * 
+ * + * repeated string provides_includes = 12; + * @param value The bytes of the providesIncludes to add. + * @return This builder for chaining. + */ + public Builder addProvidesIncludesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureProvidesIncludesIsMutable(); + providesIncludes_.add(value); + onChanged(); + return this; + } + + private java.util.List dependencies_ = + java.util.Collections.emptyList(); + private void ensureDependenciesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + dependencies_ = new java.util.ArrayList(dependencies_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Lib.LibraryDependency, cc.arduino.cli.commands.Lib.LibraryDependency.Builder, cc.arduino.cli.commands.Lib.LibraryDependencyOrBuilder> dependenciesBuilder_; + + /** + *
+       * The names of the library's dependencies, as defined by the 'depends'
+       * field of library.properties.
+       * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependency dependencies = 13; + */ + public java.util.List getDependenciesList() { + if (dependenciesBuilder_ == null) { + return java.util.Collections.unmodifiableList(dependencies_); + } else { + return dependenciesBuilder_.getMessageList(); + } + } + /** + *
+       * The names of the library's dependencies, as defined by the 'depends'
+       * field of library.properties.
+       * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependency dependencies = 13; + */ + public int getDependenciesCount() { + if (dependenciesBuilder_ == null) { + return dependencies_.size(); + } else { + return dependenciesBuilder_.getCount(); + } + } + /** + *
+       * The names of the library's dependencies, as defined by the 'depends'
+       * field of library.properties.
+       * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependency dependencies = 13; + */ + public cc.arduino.cli.commands.Lib.LibraryDependency getDependencies(int index) { + if (dependenciesBuilder_ == null) { + return dependencies_.get(index); + } else { + return dependenciesBuilder_.getMessage(index); + } + } + /** + *
+       * The names of the library's dependencies, as defined by the 'depends'
+       * field of library.properties.
+       * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependency dependencies = 13; + */ + public Builder setDependencies( + int index, cc.arduino.cli.commands.Lib.LibraryDependency value) { + if (dependenciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDependenciesIsMutable(); + dependencies_.set(index, value); + onChanged(); + } else { + dependenciesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * The names of the library's dependencies, as defined by the 'depends'
+       * field of library.properties.
+       * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependency dependencies = 13; + */ + public Builder setDependencies( + int index, cc.arduino.cli.commands.Lib.LibraryDependency.Builder builderForValue) { + if (dependenciesBuilder_ == null) { + ensureDependenciesIsMutable(); + dependencies_.set(index, builderForValue.build()); + onChanged(); + } else { + dependenciesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * The names of the library's dependencies, as defined by the 'depends'
+       * field of library.properties.
+       * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependency dependencies = 13; + */ + public Builder addDependencies(cc.arduino.cli.commands.Lib.LibraryDependency value) { + if (dependenciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDependenciesIsMutable(); + dependencies_.add(value); + onChanged(); + } else { + dependenciesBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * The names of the library's dependencies, as defined by the 'depends'
+       * field of library.properties.
+       * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependency dependencies = 13; + */ + public Builder addDependencies( + int index, cc.arduino.cli.commands.Lib.LibraryDependency value) { + if (dependenciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDependenciesIsMutable(); + dependencies_.add(index, value); + onChanged(); + } else { + dependenciesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * The names of the library's dependencies, as defined by the 'depends'
+       * field of library.properties.
+       * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependency dependencies = 13; + */ + public Builder addDependencies( + cc.arduino.cli.commands.Lib.LibraryDependency.Builder builderForValue) { + if (dependenciesBuilder_ == null) { + ensureDependenciesIsMutable(); + dependencies_.add(builderForValue.build()); + onChanged(); + } else { + dependenciesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * The names of the library's dependencies, as defined by the 'depends'
+       * field of library.properties.
+       * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependency dependencies = 13; + */ + public Builder addDependencies( + int index, cc.arduino.cli.commands.Lib.LibraryDependency.Builder builderForValue) { + if (dependenciesBuilder_ == null) { + ensureDependenciesIsMutable(); + dependencies_.add(index, builderForValue.build()); + onChanged(); + } else { + dependenciesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * The names of the library's dependencies, as defined by the 'depends'
+       * field of library.properties.
+       * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependency dependencies = 13; + */ + public Builder addAllDependencies( + java.lang.Iterable values) { + if (dependenciesBuilder_ == null) { + ensureDependenciesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, dependencies_); + onChanged(); + } else { + dependenciesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * The names of the library's dependencies, as defined by the 'depends'
+       * field of library.properties.
+       * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependency dependencies = 13; + */ + public Builder clearDependencies() { + if (dependenciesBuilder_ == null) { + dependencies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + dependenciesBuilder_.clear(); + } + return this; + } + /** + *
+       * The names of the library's dependencies, as defined by the 'depends'
+       * field of library.properties.
+       * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependency dependencies = 13; + */ + public Builder removeDependencies(int index) { + if (dependenciesBuilder_ == null) { + ensureDependenciesIsMutable(); + dependencies_.remove(index); + onChanged(); + } else { + dependenciesBuilder_.remove(index); + } + return this; + } + /** + *
+       * The names of the library's dependencies, as defined by the 'depends'
+       * field of library.properties.
+       * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependency dependencies = 13; + */ + public cc.arduino.cli.commands.Lib.LibraryDependency.Builder getDependenciesBuilder( + int index) { + return getDependenciesFieldBuilder().getBuilder(index); + } + /** + *
+       * The names of the library's dependencies, as defined by the 'depends'
+       * field of library.properties.
+       * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependency dependencies = 13; + */ + public cc.arduino.cli.commands.Lib.LibraryDependencyOrBuilder getDependenciesOrBuilder( + int index) { + if (dependenciesBuilder_ == null) { + return dependencies_.get(index); } else { + return dependenciesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * The names of the library's dependencies, as defined by the 'depends'
+       * field of library.properties.
+       * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependency dependencies = 13; + */ + public java.util.List + getDependenciesOrBuilderList() { + if (dependenciesBuilder_ != null) { + return dependenciesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dependencies_); + } + } + /** + *
+       * The names of the library's dependencies, as defined by the 'depends'
+       * field of library.properties.
+       * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependency dependencies = 13; + */ + public cc.arduino.cli.commands.Lib.LibraryDependency.Builder addDependenciesBuilder() { + return getDependenciesFieldBuilder().addBuilder( + cc.arduino.cli.commands.Lib.LibraryDependency.getDefaultInstance()); + } + /** + *
+       * The names of the library's dependencies, as defined by the 'depends'
+       * field of library.properties.
+       * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependency dependencies = 13; + */ + public cc.arduino.cli.commands.Lib.LibraryDependency.Builder addDependenciesBuilder( + int index) { + return getDependenciesFieldBuilder().addBuilder( + index, cc.arduino.cli.commands.Lib.LibraryDependency.getDefaultInstance()); + } + /** + *
+       * The names of the library's dependencies, as defined by the 'depends'
+       * field of library.properties.
+       * 
+ * + * repeated .cc.arduino.cli.commands.LibraryDependency dependencies = 13; + */ + public java.util.List + getDependenciesBuilderList() { + return getDependenciesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Lib.LibraryDependency, cc.arduino.cli.commands.Lib.LibraryDependency.Builder, cc.arduino.cli.commands.Lib.LibraryDependencyOrBuilder> + getDependenciesFieldBuilder() { + if (dependenciesBuilder_ == null) { + dependenciesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Lib.LibraryDependency, cc.arduino.cli.commands.Lib.LibraryDependency.Builder, cc.arduino.cli.commands.Lib.LibraryDependencyOrBuilder>( + dependencies_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + dependencies_ = null; + } + return dependenciesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.LibraryRelease) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.LibraryRelease) + private static final cc.arduino.cli.commands.Lib.LibraryRelease DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Lib.LibraryRelease(); + } + + public static cc.arduino.cli.commands.Lib.LibraryRelease getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LibraryRelease parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LibraryRelease(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryRelease getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface LibraryDependencyOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.LibraryDependency) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Library name of the dependency.
+     * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+     * Library name of the dependency.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+     * Version constraint of the dependency.
+     * 
+ * + * string version_constraint = 2; + * @return The versionConstraint. + */ + java.lang.String getVersionConstraint(); + /** + *
+     * Version constraint of the dependency.
+     * 
+ * + * string version_constraint = 2; + * @return The bytes for versionConstraint. + */ + com.google.protobuf.ByteString + getVersionConstraintBytes(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.LibraryDependency} + */ + public static final class LibraryDependency extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.LibraryDependency) + LibraryDependencyOrBuilder { + private static final long serialVersionUID = 0L; + // Use LibraryDependency.newBuilder() to construct. + private LibraryDependency(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LibraryDependency() { + name_ = ""; + versionConstraint_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LibraryDependency(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LibraryDependency( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + versionConstraint_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryDependency_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryDependency_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Lib.LibraryDependency.class, cc.arduino.cli.commands.Lib.LibraryDependency.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+     * Library name of the dependency.
+     * 
+ * + * string name = 1; + * @return The name. + */ + 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; + } + } + /** + *
+     * Library name of the dependency.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + 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 VERSION_CONSTRAINT_FIELD_NUMBER = 2; + private volatile java.lang.Object versionConstraint_; + /** + *
+     * Version constraint of the dependency.
+     * 
+ * + * string version_constraint = 2; + * @return The versionConstraint. + */ + public java.lang.String getVersionConstraint() { + java.lang.Object ref = versionConstraint_; + 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(); + versionConstraint_ = s; + return s; + } + } + /** + *
+     * Version constraint of the dependency.
+     * 
+ * + * string version_constraint = 2; + * @return The bytes for versionConstraint. + */ + public com.google.protobuf.ByteString + getVersionConstraintBytes() { + java.lang.Object ref = versionConstraint_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + versionConstraint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getVersionConstraintBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, versionConstraint_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getVersionConstraintBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, versionConstraint_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Lib.LibraryDependency)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Lib.LibraryDependency other = (cc.arduino.cli.commands.Lib.LibraryDependency) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getVersionConstraint() + .equals(other.getVersionConstraint())) return false; + if (!unknownFields.equals(other.unknownFields)) 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(); + hash = (37 * hash) + VERSION_CONSTRAINT_FIELD_NUMBER; + hash = (53 * hash) + getVersionConstraint().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Lib.LibraryDependency parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryDependency parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryDependency parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryDependency parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryDependency parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryDependency parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryDependency parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryDependency parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryDependency parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryDependency parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryDependency parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryDependency parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Lib.LibraryDependency 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.LibraryDependency} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.LibraryDependency) + cc.arduino.cli.commands.Lib.LibraryDependencyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryDependency_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryDependency_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Lib.LibraryDependency.class, cc.arduino.cli.commands.Lib.LibraryDependency.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Lib.LibraryDependency.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + versionConstraint_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryDependency_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryDependency getDefaultInstanceForType() { + return cc.arduino.cli.commands.Lib.LibraryDependency.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryDependency build() { + cc.arduino.cli.commands.Lib.LibraryDependency result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryDependency buildPartial() { + cc.arduino.cli.commands.Lib.LibraryDependency result = new cc.arduino.cli.commands.Lib.LibraryDependency(this); + result.name_ = name_; + result.versionConstraint_ = versionConstraint_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Lib.LibraryDependency) { + return mergeFrom((cc.arduino.cli.commands.Lib.LibraryDependency)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Lib.LibraryDependency other) { + if (other == cc.arduino.cli.commands.Lib.LibraryDependency.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getVersionConstraint().isEmpty()) { + versionConstraint_ = other.versionConstraint_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Lib.LibraryDependency parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Lib.LibraryDependency) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+       * Library name of the dependency.
+       * 
+ * + * 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; + } + } + /** + *
+       * Library name of the dependency.
+       * 
+ * + * 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; + } + } + /** + *
+       * Library name of the dependency.
+       * 
+ * + * 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; + onChanged(); + return this; + } + /** + *
+       * Library name of the dependency.
+       * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+       * Library name of the dependency.
+       * 
+ * + * 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; + onChanged(); + return this; + } + + private java.lang.Object versionConstraint_ = ""; + /** + *
+       * Version constraint of the dependency.
+       * 
+ * + * string version_constraint = 2; + * @return The versionConstraint. + */ + public java.lang.String getVersionConstraint() { + java.lang.Object ref = versionConstraint_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + versionConstraint_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Version constraint of the dependency.
+       * 
+ * + * string version_constraint = 2; + * @return The bytes for versionConstraint. + */ + public com.google.protobuf.ByteString + getVersionConstraintBytes() { + java.lang.Object ref = versionConstraint_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + versionConstraint_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Version constraint of the dependency.
+       * 
+ * + * string version_constraint = 2; + * @param value The versionConstraint to set. + * @return This builder for chaining. + */ + public Builder setVersionConstraint( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + versionConstraint_ = value; + onChanged(); + return this; + } + /** + *
+       * Version constraint of the dependency.
+       * 
+ * + * string version_constraint = 2; + * @return This builder for chaining. + */ + public Builder clearVersionConstraint() { + + versionConstraint_ = getDefaultInstance().getVersionConstraint(); + onChanged(); + return this; + } + /** + *
+       * Version constraint of the dependency.
+       * 
+ * + * string version_constraint = 2; + * @param value The bytes for versionConstraint to set. + * @return This builder for chaining. + */ + public Builder setVersionConstraintBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + versionConstraint_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.LibraryDependency) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.LibraryDependency) + private static final cc.arduino.cli.commands.Lib.LibraryDependency DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Lib.LibraryDependency(); + } + + public static cc.arduino.cli.commands.Lib.LibraryDependency getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LibraryDependency parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LibraryDependency(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryDependency getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DownloadResourceOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.DownloadResource) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Download URL of the library archive.
+     * 
+ * + * string url = 1; + * @return The url. + */ + java.lang.String getUrl(); + /** + *
+     * Download URL of the library archive.
+     * 
+ * + * string url = 1; + * @return The bytes for url. + */ + com.google.protobuf.ByteString + getUrlBytes(); + + /** + *
+     * Filename of the library archive.
+     * 
+ * + * string archivefilename = 2; + * @return The archivefilename. + */ + java.lang.String getArchivefilename(); + /** + *
+     * Filename of the library archive.
+     * 
+ * + * string archivefilename = 2; + * @return The bytes for archivefilename. + */ + com.google.protobuf.ByteString + getArchivefilenameBytes(); + + /** + *
+     * Checksum of the library archive.
+     * 
+ * + * string checksum = 3; + * @return The checksum. + */ + java.lang.String getChecksum(); + /** + *
+     * Checksum of the library archive.
+     * 
+ * + * string checksum = 3; + * @return The bytes for checksum. + */ + com.google.protobuf.ByteString + getChecksumBytes(); + + /** + *
+     * File size of the library archive.
+     * 
+ * + * int64 size = 4; + * @return The size. + */ + long getSize(); + + /** + *
+     * The directory under the staging subdirectory of the data directory the
+     * library archive file will be downloaded to.
+     * 
+ * + * string cachepath = 5; + * @return The cachepath. + */ + java.lang.String getCachepath(); + /** + *
+     * The directory under the staging subdirectory of the data directory the
+     * library archive file will be downloaded to.
+     * 
+ * + * string cachepath = 5; + * @return The bytes for cachepath. + */ + com.google.protobuf.ByteString + getCachepathBytes(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.DownloadResource} + */ + public static final class DownloadResource extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.DownloadResource) + DownloadResourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use DownloadResource.newBuilder() to construct. + private DownloadResource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DownloadResource() { + url_ = ""; + archivefilename_ = ""; + checksum_ = ""; + cachepath_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DownloadResource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DownloadResource( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + url_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + archivefilename_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + checksum_ = s; + break; + } + case 32: { + + size_ = input.readInt64(); + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + cachepath_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_DownloadResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_DownloadResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Lib.DownloadResource.class, cc.arduino.cli.commands.Lib.DownloadResource.Builder.class); + } + + public static final int URL_FIELD_NUMBER = 1; + private volatile java.lang.Object url_; + /** + *
+     * Download URL of the library archive.
+     * 
+ * + * string url = 1; + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + 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(); + url_ = s; + return s; + } + } + /** + *
+     * Download URL of the library archive.
+     * 
+ * + * string url = 1; + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ARCHIVEFILENAME_FIELD_NUMBER = 2; + private volatile java.lang.Object archivefilename_; + /** + *
+     * Filename of the library archive.
+     * 
+ * + * string archivefilename = 2; + * @return The archivefilename. + */ + public java.lang.String getArchivefilename() { + java.lang.Object ref = archivefilename_; + 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(); + archivefilename_ = s; + return s; + } + } + /** + *
+     * Filename of the library archive.
+     * 
+ * + * string archivefilename = 2; + * @return The bytes for archivefilename. + */ + public com.google.protobuf.ByteString + getArchivefilenameBytes() { + java.lang.Object ref = archivefilename_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + archivefilename_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CHECKSUM_FIELD_NUMBER = 3; + private volatile java.lang.Object checksum_; + /** + *
+     * Checksum of the library archive.
+     * 
+ * + * string checksum = 3; + * @return The checksum. + */ + public java.lang.String getChecksum() { + java.lang.Object ref = checksum_; + 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(); + checksum_ = s; + return s; + } + } + /** + *
+     * Checksum of the library archive.
+     * 
+ * + * string checksum = 3; + * @return The bytes for checksum. + */ + public com.google.protobuf.ByteString + getChecksumBytes() { + java.lang.Object ref = checksum_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + checksum_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SIZE_FIELD_NUMBER = 4; + private long size_; + /** + *
+     * File size of the library archive.
+     * 
+ * + * int64 size = 4; + * @return The size. + */ + public long getSize() { + return size_; + } + + public static final int CACHEPATH_FIELD_NUMBER = 5; + private volatile java.lang.Object cachepath_; + /** + *
+     * The directory under the staging subdirectory of the data directory the
+     * library archive file will be downloaded to.
+     * 
+ * + * string cachepath = 5; + * @return The cachepath. + */ + public java.lang.String getCachepath() { + java.lang.Object ref = cachepath_; + 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(); + cachepath_ = s; + return s; + } + } + /** + *
+     * The directory under the staging subdirectory of the data directory the
+     * library archive file will be downloaded to.
+     * 
+ * + * string cachepath = 5; + * @return The bytes for cachepath. + */ + public com.google.protobuf.ByteString + getCachepathBytes() { + java.lang.Object ref = cachepath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cachepath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (!getUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); + } + if (!getArchivefilenameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, archivefilename_); + } + if (!getChecksumBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, checksum_); + } + if (size_ != 0L) { + output.writeInt64(4, size_); + } + if (!getCachepathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, cachepath_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); + } + if (!getArchivefilenameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, archivefilename_); + } + if (!getChecksumBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, checksum_); + } + if (size_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, size_); + } + if (!getCachepathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, cachepath_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Lib.DownloadResource)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Lib.DownloadResource other = (cc.arduino.cli.commands.Lib.DownloadResource) obj; + + if (!getUrl() + .equals(other.getUrl())) return false; + if (!getArchivefilename() + .equals(other.getArchivefilename())) return false; + if (!getChecksum() + .equals(other.getChecksum())) return false; + if (getSize() + != other.getSize()) return false; + if (!getCachepath() + .equals(other.getCachepath())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + hash = (37 * hash) + ARCHIVEFILENAME_FIELD_NUMBER; + hash = (53 * hash) + getArchivefilename().hashCode(); + hash = (37 * hash) + CHECKSUM_FIELD_NUMBER; + hash = (53 * hash) + getChecksum().hashCode(); + hash = (37 * hash) + SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getSize()); + hash = (37 * hash) + CACHEPATH_FIELD_NUMBER; + hash = (53 * hash) + getCachepath().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Lib.DownloadResource parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.DownloadResource parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.DownloadResource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.DownloadResource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.DownloadResource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.DownloadResource parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.DownloadResource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.DownloadResource parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.DownloadResource parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.DownloadResource parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.DownloadResource parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.DownloadResource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Lib.DownloadResource 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.DownloadResource} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.DownloadResource) + cc.arduino.cli.commands.Lib.DownloadResourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_DownloadResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_DownloadResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Lib.DownloadResource.class, cc.arduino.cli.commands.Lib.DownloadResource.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Lib.DownloadResource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + url_ = ""; + + archivefilename_ = ""; + + checksum_ = ""; + + size_ = 0L; + + cachepath_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_DownloadResource_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.DownloadResource getDefaultInstanceForType() { + return cc.arduino.cli.commands.Lib.DownloadResource.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.DownloadResource build() { + cc.arduino.cli.commands.Lib.DownloadResource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.DownloadResource buildPartial() { + cc.arduino.cli.commands.Lib.DownloadResource result = new cc.arduino.cli.commands.Lib.DownloadResource(this); + result.url_ = url_; + result.archivefilename_ = archivefilename_; + result.checksum_ = checksum_; + result.size_ = size_; + result.cachepath_ = cachepath_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Lib.DownloadResource) { + return mergeFrom((cc.arduino.cli.commands.Lib.DownloadResource)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Lib.DownloadResource other) { + if (other == cc.arduino.cli.commands.Lib.DownloadResource.getDefaultInstance()) return this; + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + onChanged(); + } + if (!other.getArchivefilename().isEmpty()) { + archivefilename_ = other.archivefilename_; + onChanged(); + } + if (!other.getChecksum().isEmpty()) { + checksum_ = other.checksum_; + onChanged(); + } + if (other.getSize() != 0L) { + setSize(other.getSize()); + } + if (!other.getCachepath().isEmpty()) { + cachepath_ = other.cachepath_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Lib.DownloadResource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Lib.DownloadResource) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object url_ = ""; + /** + *
+       * Download URL of the library archive.
+       * 
+ * + * string url = 1; + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Download URL of the library archive.
+       * 
+ * + * string url = 1; + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Download URL of the library archive.
+       * 
+ * + * string url = 1; + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + url_ = value; + onChanged(); + return this; + } + /** + *
+       * Download URL of the library archive.
+       * 
+ * + * string url = 1; + * @return This builder for chaining. + */ + public Builder clearUrl() { + + url_ = getDefaultInstance().getUrl(); + onChanged(); + return this; + } + /** + *
+       * Download URL of the library archive.
+       * 
+ * + * string url = 1; + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + url_ = value; + onChanged(); + return this; + } + + private java.lang.Object archivefilename_ = ""; + /** + *
+       * Filename of the library archive.
+       * 
+ * + * string archivefilename = 2; + * @return The archivefilename. + */ + public java.lang.String getArchivefilename() { + java.lang.Object ref = archivefilename_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + archivefilename_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Filename of the library archive.
+       * 
+ * + * string archivefilename = 2; + * @return The bytes for archivefilename. + */ + public com.google.protobuf.ByteString + getArchivefilenameBytes() { + java.lang.Object ref = archivefilename_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + archivefilename_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Filename of the library archive.
+       * 
+ * + * string archivefilename = 2; + * @param value The archivefilename to set. + * @return This builder for chaining. + */ + public Builder setArchivefilename( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + archivefilename_ = value; + onChanged(); + return this; + } + /** + *
+       * Filename of the library archive.
+       * 
+ * + * string archivefilename = 2; + * @return This builder for chaining. + */ + public Builder clearArchivefilename() { + + archivefilename_ = getDefaultInstance().getArchivefilename(); + onChanged(); + return this; + } + /** + *
+       * Filename of the library archive.
+       * 
+ * + * string archivefilename = 2; + * @param value The bytes for archivefilename to set. + * @return This builder for chaining. + */ + public Builder setArchivefilenameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + archivefilename_ = value; + onChanged(); + return this; + } + + private java.lang.Object checksum_ = ""; + /** + *
+       * Checksum of the library archive.
+       * 
+ * + * string checksum = 3; + * @return The checksum. + */ + public java.lang.String getChecksum() { + java.lang.Object ref = checksum_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + checksum_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Checksum of the library archive.
+       * 
+ * + * string checksum = 3; + * @return The bytes for checksum. + */ + public com.google.protobuf.ByteString + getChecksumBytes() { + java.lang.Object ref = checksum_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + checksum_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Checksum of the library archive.
+       * 
+ * + * string checksum = 3; + * @param value The checksum to set. + * @return This builder for chaining. + */ + public Builder setChecksum( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + checksum_ = value; + onChanged(); + return this; + } + /** + *
+       * Checksum of the library archive.
+       * 
+ * + * string checksum = 3; + * @return This builder for chaining. + */ + public Builder clearChecksum() { + + checksum_ = getDefaultInstance().getChecksum(); + onChanged(); + return this; + } + /** + *
+       * Checksum of the library archive.
+       * 
+ * + * string checksum = 3; + * @param value The bytes for checksum to set. + * @return This builder for chaining. + */ + public Builder setChecksumBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + checksum_ = value; + onChanged(); + return this; + } + + private long size_ ; + /** + *
+       * File size of the library archive.
+       * 
+ * + * int64 size = 4; + * @return The size. + */ + public long getSize() { + return size_; + } + /** + *
+       * File size of the library archive.
+       * 
+ * + * int64 size = 4; + * @param value The size to set. + * @return This builder for chaining. + */ + public Builder setSize(long value) { + + size_ = value; + onChanged(); + return this; + } + /** + *
+       * File size of the library archive.
+       * 
+ * + * int64 size = 4; + * @return This builder for chaining. + */ + public Builder clearSize() { + + size_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object cachepath_ = ""; + /** + *
+       * The directory under the staging subdirectory of the data directory the
+       * library archive file will be downloaded to.
+       * 
+ * + * string cachepath = 5; + * @return The cachepath. + */ + public java.lang.String getCachepath() { + java.lang.Object ref = cachepath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cachepath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The directory under the staging subdirectory of the data directory the
+       * library archive file will be downloaded to.
+       * 
+ * + * string cachepath = 5; + * @return The bytes for cachepath. + */ + public com.google.protobuf.ByteString + getCachepathBytes() { + java.lang.Object ref = cachepath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + cachepath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The directory under the staging subdirectory of the data directory the
+       * library archive file will be downloaded to.
+       * 
+ * + * string cachepath = 5; + * @param value The cachepath to set. + * @return This builder for chaining. + */ + public Builder setCachepath( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + cachepath_ = value; + onChanged(); + return this; + } + /** + *
+       * The directory under the staging subdirectory of the data directory the
+       * library archive file will be downloaded to.
+       * 
+ * + * string cachepath = 5; + * @return This builder for chaining. + */ + public Builder clearCachepath() { + + cachepath_ = getDefaultInstance().getCachepath(); + onChanged(); + return this; + } + /** + *
+       * The directory under the staging subdirectory of the data directory the
+       * library archive file will be downloaded to.
+       * 
+ * + * string cachepath = 5; + * @param value The bytes for cachepath to set. + * @return This builder for chaining. + */ + public Builder setCachepathBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + cachepath_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.DownloadResource) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.DownloadResource) + private static final cc.arduino.cli.commands.Lib.DownloadResource DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Lib.DownloadResource(); + } + + public static cc.arduino.cli.commands.Lib.DownloadResource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DownloadResource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DownloadResource(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.DownloadResource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface LibraryListReqOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.LibraryListReq) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + boolean hasInstance(); + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + cc.arduino.cli.commands.Common.Instance getInstance(); + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder(); + + /** + *
+     * Whether to include built-in libraries (from platforms and the Arduino
+     * IDE) in the listing.
+     * 
+ * + * bool all = 2; + * @return The all. + */ + boolean getAll(); + + /** + *
+     * Whether to list only libraries for which there is a newer version than
+     * the installed version available in the libraries index.
+     * 
+ * + * bool updatable = 3; + * @return The updatable. + */ + boolean getUpdatable(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.LibraryListReq} + */ + public static final class LibraryListReq extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.LibraryListReq) + LibraryListReqOrBuilder { + private static final long serialVersionUID = 0L; + // Use LibraryListReq.newBuilder() to construct. + private LibraryListReq(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LibraryListReq() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LibraryListReq(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LibraryListReq( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cc.arduino.cli.commands.Common.Instance.Builder subBuilder = null; + if (instance_ != null) { + subBuilder = instance_.toBuilder(); + } + instance_ = input.readMessage(cc.arduino.cli.commands.Common.Instance.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instance_); + instance_ = subBuilder.buildPartial(); + } + + break; + } + case 16: { + + all_ = input.readBool(); + break; + } + case 24: { + + updatable_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryListReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryListReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Lib.LibraryListReq.class, cc.arduino.cli.commands.Lib.LibraryListReq.Builder.class); + } + + public static final int INSTANCE_FIELD_NUMBER = 1; + private cc.arduino.cli.commands.Common.Instance instance_; + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instance_ != null; + } + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + return getInstance(); + } + + public static final int ALL_FIELD_NUMBER = 2; + private boolean all_; + /** + *
+     * Whether to include built-in libraries (from platforms and the Arduino
+     * IDE) in the listing.
+     * 
+ * + * bool all = 2; + * @return The all. + */ + public boolean getAll() { + return all_; + } + + public static final int UPDATABLE_FIELD_NUMBER = 3; + private boolean updatable_; + /** + *
+     * Whether to list only libraries for which there is a newer version than
+     * the installed version available in the libraries index.
+     * 
+ * + * bool updatable = 3; + * @return The updatable. + */ + public boolean getUpdatable() { + return updatable_; + } + + 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 (instance_ != null) { + output.writeMessage(1, getInstance()); + } + if (all_ != false) { + output.writeBool(2, all_); + } + if (updatable_ != false) { + output.writeBool(3, updatable_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (instance_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInstance()); + } + if (all_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, all_); + } + if (updatable_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, updatable_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Lib.LibraryListReq)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Lib.LibraryListReq other = (cc.arduino.cli.commands.Lib.LibraryListReq) obj; + + if (hasInstance() != other.hasInstance()) return false; + if (hasInstance()) { + if (!getInstance() + .equals(other.getInstance())) return false; + } + if (getAll() + != other.getAll()) return false; + if (getUpdatable() + != other.getUpdatable()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInstance()) { + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + } + hash = (37 * hash) + ALL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getAll()); + hash = (37 * hash) + UPDATABLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getUpdatable()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Lib.LibraryListReq parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryListReq parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryListReq parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryListReq parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryListReq parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryListReq parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryListReq parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryListReq parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryListReq parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryListReq parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryListReq parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryListReq parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Lib.LibraryListReq 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.LibraryListReq} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.LibraryListReq) + cc.arduino.cli.commands.Lib.LibraryListReqOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryListReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryListReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Lib.LibraryListReq.class, cc.arduino.cli.commands.Lib.LibraryListReq.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Lib.LibraryListReq.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (instanceBuilder_ == null) { + instance_ = null; + } else { + instance_ = null; + instanceBuilder_ = null; + } + all_ = false; + + updatable_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryListReq_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryListReq getDefaultInstanceForType() { + return cc.arduino.cli.commands.Lib.LibraryListReq.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryListReq build() { + cc.arduino.cli.commands.Lib.LibraryListReq result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryListReq buildPartial() { + cc.arduino.cli.commands.Lib.LibraryListReq result = new cc.arduino.cli.commands.Lib.LibraryListReq(this); + if (instanceBuilder_ == null) { + result.instance_ = instance_; + } else { + result.instance_ = instanceBuilder_.build(); + } + result.all_ = all_; + result.updatable_ = updatable_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Lib.LibraryListReq) { + return mergeFrom((cc.arduino.cli.commands.Lib.LibraryListReq)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Lib.LibraryListReq other) { + if (other == cc.arduino.cli.commands.Lib.LibraryListReq.getDefaultInstance()) return this; + if (other.hasInstance()) { + mergeInstance(other.getInstance()); + } + if (other.getAll() != false) { + setAll(other.getAll()); + } + if (other.getUpdatable() != false) { + setUpdatable(other.getUpdatable()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Lib.LibraryListReq parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Lib.LibraryListReq) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private cc.arduino.cli.commands.Common.Instance instance_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> instanceBuilder_; + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instanceBuilder_ != null || instance_ != null; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + if (instanceBuilder_ == null) { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } else { + return instanceBuilder_.getMessage(); + } + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + onChanged(); + } else { + instanceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance( + cc.arduino.cli.commands.Common.Instance.Builder builderForValue) { + if (instanceBuilder_ == null) { + instance_ = builderForValue.build(); + onChanged(); + } else { + instanceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder mergeInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (instance_ != null) { + instance_ = + cc.arduino.cli.commands.Common.Instance.newBuilder(instance_).mergeFrom(value).buildPartial(); + } else { + instance_ = value; + } + onChanged(); + } else { + instanceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder clearInstance() { + if (instanceBuilder_ == null) { + instance_ = null; + onChanged(); + } else { + instance_ = null; + instanceBuilder_ = null; + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.Instance.Builder getInstanceBuilder() { + + onChanged(); + return getInstanceFieldBuilder().getBuilder(); + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + if (instanceBuilder_ != null) { + return instanceBuilder_.getMessageOrBuilder(); + } else { + return instance_ == null ? + cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> + getInstanceFieldBuilder() { + if (instanceBuilder_ == null) { + instanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder>( + getInstance(), + getParentForChildren(), + isClean()); + instance_ = null; + } + return instanceBuilder_; + } + + private boolean all_ ; + /** + *
+       * Whether to include built-in libraries (from platforms and the Arduino
+       * IDE) in the listing.
+       * 
+ * + * bool all = 2; + * @return The all. + */ + public boolean getAll() { + return all_; + } + /** + *
+       * Whether to include built-in libraries (from platforms and the Arduino
+       * IDE) in the listing.
+       * 
+ * + * bool all = 2; + * @param value The all to set. + * @return This builder for chaining. + */ + public Builder setAll(boolean value) { + + all_ = value; + onChanged(); + return this; + } + /** + *
+       * Whether to include built-in libraries (from platforms and the Arduino
+       * IDE) in the listing.
+       * 
+ * + * bool all = 2; + * @return This builder for chaining. + */ + public Builder clearAll() { + + all_ = false; + onChanged(); + return this; + } + + private boolean updatable_ ; + /** + *
+       * Whether to list only libraries for which there is a newer version than
+       * the installed version available in the libraries index.
+       * 
+ * + * bool updatable = 3; + * @return The updatable. + */ + public boolean getUpdatable() { + return updatable_; + } + /** + *
+       * Whether to list only libraries for which there is a newer version than
+       * the installed version available in the libraries index.
+       * 
+ * + * bool updatable = 3; + * @param value The updatable to set. + * @return This builder for chaining. + */ + public Builder setUpdatable(boolean value) { + + updatable_ = value; + onChanged(); + return this; + } + /** + *
+       * Whether to list only libraries for which there is a newer version than
+       * the installed version available in the libraries index.
+       * 
+ * + * bool updatable = 3; + * @return This builder for chaining. + */ + public Builder clearUpdatable() { + + updatable_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.LibraryListReq) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.LibraryListReq) + private static final cc.arduino.cli.commands.Lib.LibraryListReq DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Lib.LibraryListReq(); + } + + public static cc.arduino.cli.commands.Lib.LibraryListReq getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LibraryListReq parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LibraryListReq(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryListReq getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface LibraryListRespOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.LibraryListResp) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * List of installed libraries.
+     * 
+ * + * repeated .cc.arduino.cli.commands.InstalledLibrary installed_library = 1; + */ + java.util.List + getInstalledLibraryList(); + /** + *
+     * List of installed libraries.
+     * 
+ * + * repeated .cc.arduino.cli.commands.InstalledLibrary installed_library = 1; + */ + cc.arduino.cli.commands.Lib.InstalledLibrary getInstalledLibrary(int index); + /** + *
+     * List of installed libraries.
+     * 
+ * + * repeated .cc.arduino.cli.commands.InstalledLibrary installed_library = 1; + */ + int getInstalledLibraryCount(); + /** + *
+     * List of installed libraries.
+     * 
+ * + * repeated .cc.arduino.cli.commands.InstalledLibrary installed_library = 1; + */ + java.util.List + getInstalledLibraryOrBuilderList(); + /** + *
+     * List of installed libraries.
+     * 
+ * + * repeated .cc.arduino.cli.commands.InstalledLibrary installed_library = 1; + */ + cc.arduino.cli.commands.Lib.InstalledLibraryOrBuilder getInstalledLibraryOrBuilder( + int index); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.LibraryListResp} + */ + public static final class LibraryListResp extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.LibraryListResp) + LibraryListRespOrBuilder { + private static final long serialVersionUID = 0L; + // Use LibraryListResp.newBuilder() to construct. + private LibraryListResp(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LibraryListResp() { + installedLibrary_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LibraryListResp(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LibraryListResp( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + installedLibrary_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + installedLibrary_.add( + input.readMessage(cc.arduino.cli.commands.Lib.InstalledLibrary.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + installedLibrary_ = java.util.Collections.unmodifiableList(installedLibrary_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryListResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryListResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Lib.LibraryListResp.class, cc.arduino.cli.commands.Lib.LibraryListResp.Builder.class); + } + + public static final int INSTALLED_LIBRARY_FIELD_NUMBER = 1; + private java.util.List installedLibrary_; + /** + *
+     * List of installed libraries.
+     * 
+ * + * repeated .cc.arduino.cli.commands.InstalledLibrary installed_library = 1; + */ + public java.util.List getInstalledLibraryList() { + return installedLibrary_; + } + /** + *
+     * List of installed libraries.
+     * 
+ * + * repeated .cc.arduino.cli.commands.InstalledLibrary installed_library = 1; + */ + public java.util.List + getInstalledLibraryOrBuilderList() { + return installedLibrary_; + } + /** + *
+     * List of installed libraries.
+     * 
+ * + * repeated .cc.arduino.cli.commands.InstalledLibrary installed_library = 1; + */ + public int getInstalledLibraryCount() { + return installedLibrary_.size(); + } + /** + *
+     * List of installed libraries.
+     * 
+ * + * repeated .cc.arduino.cli.commands.InstalledLibrary installed_library = 1; + */ + public cc.arduino.cli.commands.Lib.InstalledLibrary getInstalledLibrary(int index) { + return installedLibrary_.get(index); + } + /** + *
+     * List of installed libraries.
+     * 
+ * + * repeated .cc.arduino.cli.commands.InstalledLibrary installed_library = 1; + */ + public cc.arduino.cli.commands.Lib.InstalledLibraryOrBuilder getInstalledLibraryOrBuilder( + int index) { + return installedLibrary_.get(index); + } + + 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 < installedLibrary_.size(); i++) { + output.writeMessage(1, installedLibrary_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < installedLibrary_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, installedLibrary_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Lib.LibraryListResp)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Lib.LibraryListResp other = (cc.arduino.cli.commands.Lib.LibraryListResp) obj; + + if (!getInstalledLibraryList() + .equals(other.getInstalledLibraryList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getInstalledLibraryCount() > 0) { + hash = (37 * hash) + INSTALLED_LIBRARY_FIELD_NUMBER; + hash = (53 * hash) + getInstalledLibraryList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Lib.LibraryListResp parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryListResp parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryListResp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryListResp parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryListResp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.LibraryListResp parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryListResp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryListResp parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryListResp parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryListResp parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.LibraryListResp parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.LibraryListResp parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Lib.LibraryListResp 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.LibraryListResp} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.LibraryListResp) + cc.arduino.cli.commands.Lib.LibraryListRespOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryListResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryListResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Lib.LibraryListResp.class, cc.arduino.cli.commands.Lib.LibraryListResp.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Lib.LibraryListResp.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getInstalledLibraryFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (installedLibraryBuilder_ == null) { + installedLibrary_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + installedLibraryBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_LibraryListResp_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryListResp getDefaultInstanceForType() { + return cc.arduino.cli.commands.Lib.LibraryListResp.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryListResp build() { + cc.arduino.cli.commands.Lib.LibraryListResp result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryListResp buildPartial() { + cc.arduino.cli.commands.Lib.LibraryListResp result = new cc.arduino.cli.commands.Lib.LibraryListResp(this); + int from_bitField0_ = bitField0_; + if (installedLibraryBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + installedLibrary_ = java.util.Collections.unmodifiableList(installedLibrary_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.installedLibrary_ = installedLibrary_; + } else { + result.installedLibrary_ = installedLibraryBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Lib.LibraryListResp) { + return mergeFrom((cc.arduino.cli.commands.Lib.LibraryListResp)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Lib.LibraryListResp other) { + if (other == cc.arduino.cli.commands.Lib.LibraryListResp.getDefaultInstance()) return this; + if (installedLibraryBuilder_ == null) { + if (!other.installedLibrary_.isEmpty()) { + if (installedLibrary_.isEmpty()) { + installedLibrary_ = other.installedLibrary_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureInstalledLibraryIsMutable(); + installedLibrary_.addAll(other.installedLibrary_); + } + onChanged(); + } + } else { + if (!other.installedLibrary_.isEmpty()) { + if (installedLibraryBuilder_.isEmpty()) { + installedLibraryBuilder_.dispose(); + installedLibraryBuilder_ = null; + installedLibrary_ = other.installedLibrary_; + bitField0_ = (bitField0_ & ~0x00000001); + installedLibraryBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getInstalledLibraryFieldBuilder() : null; + } else { + installedLibraryBuilder_.addAllMessages(other.installedLibrary_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Lib.LibraryListResp parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Lib.LibraryListResp) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List installedLibrary_ = + java.util.Collections.emptyList(); + private void ensureInstalledLibraryIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + installedLibrary_ = new java.util.ArrayList(installedLibrary_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Lib.InstalledLibrary, cc.arduino.cli.commands.Lib.InstalledLibrary.Builder, cc.arduino.cli.commands.Lib.InstalledLibraryOrBuilder> installedLibraryBuilder_; + + /** + *
+       * List of installed libraries.
+       * 
+ * + * repeated .cc.arduino.cli.commands.InstalledLibrary installed_library = 1; + */ + public java.util.List getInstalledLibraryList() { + if (installedLibraryBuilder_ == null) { + return java.util.Collections.unmodifiableList(installedLibrary_); + } else { + return installedLibraryBuilder_.getMessageList(); + } + } + /** + *
+       * List of installed libraries.
+       * 
+ * + * repeated .cc.arduino.cli.commands.InstalledLibrary installed_library = 1; + */ + public int getInstalledLibraryCount() { + if (installedLibraryBuilder_ == null) { + return installedLibrary_.size(); + } else { + return installedLibraryBuilder_.getCount(); + } + } + /** + *
+       * List of installed libraries.
+       * 
+ * + * repeated .cc.arduino.cli.commands.InstalledLibrary installed_library = 1; + */ + public cc.arduino.cli.commands.Lib.InstalledLibrary getInstalledLibrary(int index) { + if (installedLibraryBuilder_ == null) { + return installedLibrary_.get(index); + } else { + return installedLibraryBuilder_.getMessage(index); + } + } + /** + *
+       * List of installed libraries.
+       * 
+ * + * repeated .cc.arduino.cli.commands.InstalledLibrary installed_library = 1; + */ + public Builder setInstalledLibrary( + int index, cc.arduino.cli.commands.Lib.InstalledLibrary value) { + if (installedLibraryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstalledLibraryIsMutable(); + installedLibrary_.set(index, value); + onChanged(); + } else { + installedLibraryBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * List of installed libraries.
+       * 
+ * + * repeated .cc.arduino.cli.commands.InstalledLibrary installed_library = 1; + */ + public Builder setInstalledLibrary( + int index, cc.arduino.cli.commands.Lib.InstalledLibrary.Builder builderForValue) { + if (installedLibraryBuilder_ == null) { + ensureInstalledLibraryIsMutable(); + installedLibrary_.set(index, builderForValue.build()); + onChanged(); + } else { + installedLibraryBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * List of installed libraries.
+       * 
+ * + * repeated .cc.arduino.cli.commands.InstalledLibrary installed_library = 1; + */ + public Builder addInstalledLibrary(cc.arduino.cli.commands.Lib.InstalledLibrary value) { + if (installedLibraryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstalledLibraryIsMutable(); + installedLibrary_.add(value); + onChanged(); + } else { + installedLibraryBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * List of installed libraries.
+       * 
+ * + * repeated .cc.arduino.cli.commands.InstalledLibrary installed_library = 1; + */ + public Builder addInstalledLibrary( + int index, cc.arduino.cli.commands.Lib.InstalledLibrary value) { + if (installedLibraryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInstalledLibraryIsMutable(); + installedLibrary_.add(index, value); + onChanged(); + } else { + installedLibraryBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * List of installed libraries.
+       * 
+ * + * repeated .cc.arduino.cli.commands.InstalledLibrary installed_library = 1; + */ + public Builder addInstalledLibrary( + cc.arduino.cli.commands.Lib.InstalledLibrary.Builder builderForValue) { + if (installedLibraryBuilder_ == null) { + ensureInstalledLibraryIsMutable(); + installedLibrary_.add(builderForValue.build()); + onChanged(); + } else { + installedLibraryBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * List of installed libraries.
+       * 
+ * + * repeated .cc.arduino.cli.commands.InstalledLibrary installed_library = 1; + */ + public Builder addInstalledLibrary( + int index, cc.arduino.cli.commands.Lib.InstalledLibrary.Builder builderForValue) { + if (installedLibraryBuilder_ == null) { + ensureInstalledLibraryIsMutable(); + installedLibrary_.add(index, builderForValue.build()); + onChanged(); + } else { + installedLibraryBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * List of installed libraries.
+       * 
+ * + * repeated .cc.arduino.cli.commands.InstalledLibrary installed_library = 1; + */ + public Builder addAllInstalledLibrary( + java.lang.Iterable values) { + if (installedLibraryBuilder_ == null) { + ensureInstalledLibraryIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, installedLibrary_); + onChanged(); + } else { + installedLibraryBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * List of installed libraries.
+       * 
+ * + * repeated .cc.arduino.cli.commands.InstalledLibrary installed_library = 1; + */ + public Builder clearInstalledLibrary() { + if (installedLibraryBuilder_ == null) { + installedLibrary_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + installedLibraryBuilder_.clear(); + } + return this; + } + /** + *
+       * List of installed libraries.
+       * 
+ * + * repeated .cc.arduino.cli.commands.InstalledLibrary installed_library = 1; + */ + public Builder removeInstalledLibrary(int index) { + if (installedLibraryBuilder_ == null) { + ensureInstalledLibraryIsMutable(); + installedLibrary_.remove(index); + onChanged(); + } else { + installedLibraryBuilder_.remove(index); + } + return this; + } + /** + *
+       * List of installed libraries.
+       * 
+ * + * repeated .cc.arduino.cli.commands.InstalledLibrary installed_library = 1; + */ + public cc.arduino.cli.commands.Lib.InstalledLibrary.Builder getInstalledLibraryBuilder( + int index) { + return getInstalledLibraryFieldBuilder().getBuilder(index); + } + /** + *
+       * List of installed libraries.
+       * 
+ * + * repeated .cc.arduino.cli.commands.InstalledLibrary installed_library = 1; + */ + public cc.arduino.cli.commands.Lib.InstalledLibraryOrBuilder getInstalledLibraryOrBuilder( + int index) { + if (installedLibraryBuilder_ == null) { + return installedLibrary_.get(index); } else { + return installedLibraryBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * List of installed libraries.
+       * 
+ * + * repeated .cc.arduino.cli.commands.InstalledLibrary installed_library = 1; + */ + public java.util.List + getInstalledLibraryOrBuilderList() { + if (installedLibraryBuilder_ != null) { + return installedLibraryBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(installedLibrary_); + } + } + /** + *
+       * List of installed libraries.
+       * 
+ * + * repeated .cc.arduino.cli.commands.InstalledLibrary installed_library = 1; + */ + public cc.arduino.cli.commands.Lib.InstalledLibrary.Builder addInstalledLibraryBuilder() { + return getInstalledLibraryFieldBuilder().addBuilder( + cc.arduino.cli.commands.Lib.InstalledLibrary.getDefaultInstance()); + } + /** + *
+       * List of installed libraries.
+       * 
+ * + * repeated .cc.arduino.cli.commands.InstalledLibrary installed_library = 1; + */ + public cc.arduino.cli.commands.Lib.InstalledLibrary.Builder addInstalledLibraryBuilder( + int index) { + return getInstalledLibraryFieldBuilder().addBuilder( + index, cc.arduino.cli.commands.Lib.InstalledLibrary.getDefaultInstance()); + } + /** + *
+       * List of installed libraries.
+       * 
+ * + * repeated .cc.arduino.cli.commands.InstalledLibrary installed_library = 1; + */ + public java.util.List + getInstalledLibraryBuilderList() { + return getInstalledLibraryFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Lib.InstalledLibrary, cc.arduino.cli.commands.Lib.InstalledLibrary.Builder, cc.arduino.cli.commands.Lib.InstalledLibraryOrBuilder> + getInstalledLibraryFieldBuilder() { + if (installedLibraryBuilder_ == null) { + installedLibraryBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Lib.InstalledLibrary, cc.arduino.cli.commands.Lib.InstalledLibrary.Builder, cc.arduino.cli.commands.Lib.InstalledLibraryOrBuilder>( + installedLibrary_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + installedLibrary_ = null; + } + return installedLibraryBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.LibraryListResp) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.LibraryListResp) + private static final cc.arduino.cli.commands.Lib.LibraryListResp DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Lib.LibraryListResp(); + } + + public static cc.arduino.cli.commands.Lib.LibraryListResp getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LibraryListResp parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LibraryListResp(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.LibraryListResp getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface InstalledLibraryOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.InstalledLibrary) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Information about the library.
+     * 
+ * + * .cc.arduino.cli.commands.Library library = 1; + * @return Whether the library field is set. + */ + boolean hasLibrary(); + /** + *
+     * Information about the library.
+     * 
+ * + * .cc.arduino.cli.commands.Library library = 1; + * @return The library. + */ + cc.arduino.cli.commands.Lib.Library getLibrary(); + /** + *
+     * Information about the library.
+     * 
+ * + * .cc.arduino.cli.commands.Library library = 1; + */ + cc.arduino.cli.commands.Lib.LibraryOrBuilder getLibraryOrBuilder(); + + /** + *
+     * When the `updatable` field of the `LibraryList` request is set to `true`,
+     * this will contain information on the latest version of the library in the
+     * libraries index.
+     * 
+ * + * .cc.arduino.cli.commands.LibraryRelease release = 2; + * @return Whether the release field is set. + */ + boolean hasRelease(); + /** + *
+     * When the `updatable` field of the `LibraryList` request is set to `true`,
+     * this will contain information on the latest version of the library in the
+     * libraries index.
+     * 
+ * + * .cc.arduino.cli.commands.LibraryRelease release = 2; + * @return The release. + */ + cc.arduino.cli.commands.Lib.LibraryRelease getRelease(); + /** + *
+     * When the `updatable` field of the `LibraryList` request is set to `true`,
+     * this will contain information on the latest version of the library in the
+     * libraries index.
+     * 
+ * + * .cc.arduino.cli.commands.LibraryRelease release = 2; + */ + cc.arduino.cli.commands.Lib.LibraryReleaseOrBuilder getReleaseOrBuilder(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.InstalledLibrary} + */ + public static final class InstalledLibrary extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.InstalledLibrary) + InstalledLibraryOrBuilder { + private static final long serialVersionUID = 0L; + // Use InstalledLibrary.newBuilder() to construct. + private InstalledLibrary(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private InstalledLibrary() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new InstalledLibrary(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private InstalledLibrary( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cc.arduino.cli.commands.Lib.Library.Builder subBuilder = null; + if (library_ != null) { + subBuilder = library_.toBuilder(); + } + library_ = input.readMessage(cc.arduino.cli.commands.Lib.Library.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(library_); + library_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + cc.arduino.cli.commands.Lib.LibraryRelease.Builder subBuilder = null; + if (release_ != null) { + subBuilder = release_.toBuilder(); + } + release_ = input.readMessage(cc.arduino.cli.commands.Lib.LibraryRelease.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(release_); + release_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_InstalledLibrary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_InstalledLibrary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Lib.InstalledLibrary.class, cc.arduino.cli.commands.Lib.InstalledLibrary.Builder.class); + } + + public static final int LIBRARY_FIELD_NUMBER = 1; + private cc.arduino.cli.commands.Lib.Library library_; + /** + *
+     * Information about the library.
+     * 
+ * + * .cc.arduino.cli.commands.Library library = 1; + * @return Whether the library field is set. + */ + public boolean hasLibrary() { + return library_ != null; + } + /** + *
+     * Information about the library.
+     * 
+ * + * .cc.arduino.cli.commands.Library library = 1; + * @return The library. + */ + public cc.arduino.cli.commands.Lib.Library getLibrary() { + return library_ == null ? cc.arduino.cli.commands.Lib.Library.getDefaultInstance() : library_; + } + /** + *
+     * Information about the library.
+     * 
+ * + * .cc.arduino.cli.commands.Library library = 1; + */ + public cc.arduino.cli.commands.Lib.LibraryOrBuilder getLibraryOrBuilder() { + return getLibrary(); + } + + public static final int RELEASE_FIELD_NUMBER = 2; + private cc.arduino.cli.commands.Lib.LibraryRelease release_; + /** + *
+     * When the `updatable` field of the `LibraryList` request is set to `true`,
+     * this will contain information on the latest version of the library in the
+     * libraries index.
+     * 
+ * + * .cc.arduino.cli.commands.LibraryRelease release = 2; + * @return Whether the release field is set. + */ + public boolean hasRelease() { + return release_ != null; + } + /** + *
+     * When the `updatable` field of the `LibraryList` request is set to `true`,
+     * this will contain information on the latest version of the library in the
+     * libraries index.
+     * 
+ * + * .cc.arduino.cli.commands.LibraryRelease release = 2; + * @return The release. + */ + public cc.arduino.cli.commands.Lib.LibraryRelease getRelease() { + return release_ == null ? cc.arduino.cli.commands.Lib.LibraryRelease.getDefaultInstance() : release_; + } + /** + *
+     * When the `updatable` field of the `LibraryList` request is set to `true`,
+     * this will contain information on the latest version of the library in the
+     * libraries index.
+     * 
+ * + * .cc.arduino.cli.commands.LibraryRelease release = 2; + */ + public cc.arduino.cli.commands.Lib.LibraryReleaseOrBuilder getReleaseOrBuilder() { + return getRelease(); + } + + 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 (library_ != null) { + output.writeMessage(1, getLibrary()); + } + if (release_ != null) { + output.writeMessage(2, getRelease()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (library_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getLibrary()); + } + if (release_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getRelease()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Lib.InstalledLibrary)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Lib.InstalledLibrary other = (cc.arduino.cli.commands.Lib.InstalledLibrary) obj; + + if (hasLibrary() != other.hasLibrary()) return false; + if (hasLibrary()) { + if (!getLibrary() + .equals(other.getLibrary())) return false; + } + if (hasRelease() != other.hasRelease()) return false; + if (hasRelease()) { + if (!getRelease() + .equals(other.getRelease())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasLibrary()) { + hash = (37 * hash) + LIBRARY_FIELD_NUMBER; + hash = (53 * hash) + getLibrary().hashCode(); + } + if (hasRelease()) { + hash = (37 * hash) + RELEASE_FIELD_NUMBER; + hash = (53 * hash) + getRelease().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Lib.InstalledLibrary parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.InstalledLibrary parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.InstalledLibrary parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.InstalledLibrary parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.InstalledLibrary parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.InstalledLibrary parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.InstalledLibrary parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.InstalledLibrary parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.InstalledLibrary parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.InstalledLibrary parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.InstalledLibrary parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.InstalledLibrary parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Lib.InstalledLibrary 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.InstalledLibrary} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.InstalledLibrary) + cc.arduino.cli.commands.Lib.InstalledLibraryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_InstalledLibrary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_InstalledLibrary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Lib.InstalledLibrary.class, cc.arduino.cli.commands.Lib.InstalledLibrary.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Lib.InstalledLibrary.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (libraryBuilder_ == null) { + library_ = null; + } else { + library_ = null; + libraryBuilder_ = null; + } + if (releaseBuilder_ == null) { + release_ = null; + } else { + release_ = null; + releaseBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_InstalledLibrary_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.InstalledLibrary getDefaultInstanceForType() { + return cc.arduino.cli.commands.Lib.InstalledLibrary.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.InstalledLibrary build() { + cc.arduino.cli.commands.Lib.InstalledLibrary result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.InstalledLibrary buildPartial() { + cc.arduino.cli.commands.Lib.InstalledLibrary result = new cc.arduino.cli.commands.Lib.InstalledLibrary(this); + if (libraryBuilder_ == null) { + result.library_ = library_; + } else { + result.library_ = libraryBuilder_.build(); + } + if (releaseBuilder_ == null) { + result.release_ = release_; + } else { + result.release_ = releaseBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Lib.InstalledLibrary) { + return mergeFrom((cc.arduino.cli.commands.Lib.InstalledLibrary)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Lib.InstalledLibrary other) { + if (other == cc.arduino.cli.commands.Lib.InstalledLibrary.getDefaultInstance()) return this; + if (other.hasLibrary()) { + mergeLibrary(other.getLibrary()); + } + if (other.hasRelease()) { + mergeRelease(other.getRelease()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Lib.InstalledLibrary parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Lib.InstalledLibrary) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private cc.arduino.cli.commands.Lib.Library library_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Lib.Library, cc.arduino.cli.commands.Lib.Library.Builder, cc.arduino.cli.commands.Lib.LibraryOrBuilder> libraryBuilder_; + /** + *
+       * Information about the library.
+       * 
+ * + * .cc.arduino.cli.commands.Library library = 1; + * @return Whether the library field is set. + */ + public boolean hasLibrary() { + return libraryBuilder_ != null || library_ != null; + } + /** + *
+       * Information about the library.
+       * 
+ * + * .cc.arduino.cli.commands.Library library = 1; + * @return The library. + */ + public cc.arduino.cli.commands.Lib.Library getLibrary() { + if (libraryBuilder_ == null) { + return library_ == null ? cc.arduino.cli.commands.Lib.Library.getDefaultInstance() : library_; + } else { + return libraryBuilder_.getMessage(); + } + } + /** + *
+       * Information about the library.
+       * 
+ * + * .cc.arduino.cli.commands.Library library = 1; + */ + public Builder setLibrary(cc.arduino.cli.commands.Lib.Library value) { + if (libraryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + library_ = value; + onChanged(); + } else { + libraryBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Information about the library.
+       * 
+ * + * .cc.arduino.cli.commands.Library library = 1; + */ + public Builder setLibrary( + cc.arduino.cli.commands.Lib.Library.Builder builderForValue) { + if (libraryBuilder_ == null) { + library_ = builderForValue.build(); + onChanged(); + } else { + libraryBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Information about the library.
+       * 
+ * + * .cc.arduino.cli.commands.Library library = 1; + */ + public Builder mergeLibrary(cc.arduino.cli.commands.Lib.Library value) { + if (libraryBuilder_ == null) { + if (library_ != null) { + library_ = + cc.arduino.cli.commands.Lib.Library.newBuilder(library_).mergeFrom(value).buildPartial(); + } else { + library_ = value; + } + onChanged(); + } else { + libraryBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Information about the library.
+       * 
+ * + * .cc.arduino.cli.commands.Library library = 1; + */ + public Builder clearLibrary() { + if (libraryBuilder_ == null) { + library_ = null; + onChanged(); + } else { + library_ = null; + libraryBuilder_ = null; + } + + return this; + } + /** + *
+       * Information about the library.
+       * 
+ * + * .cc.arduino.cli.commands.Library library = 1; + */ + public cc.arduino.cli.commands.Lib.Library.Builder getLibraryBuilder() { + + onChanged(); + return getLibraryFieldBuilder().getBuilder(); + } + /** + *
+       * Information about the library.
+       * 
+ * + * .cc.arduino.cli.commands.Library library = 1; + */ + public cc.arduino.cli.commands.Lib.LibraryOrBuilder getLibraryOrBuilder() { + if (libraryBuilder_ != null) { + return libraryBuilder_.getMessageOrBuilder(); + } else { + return library_ == null ? + cc.arduino.cli.commands.Lib.Library.getDefaultInstance() : library_; + } + } + /** + *
+       * Information about the library.
+       * 
+ * + * .cc.arduino.cli.commands.Library library = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Lib.Library, cc.arduino.cli.commands.Lib.Library.Builder, cc.arduino.cli.commands.Lib.LibraryOrBuilder> + getLibraryFieldBuilder() { + if (libraryBuilder_ == null) { + libraryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Lib.Library, cc.arduino.cli.commands.Lib.Library.Builder, cc.arduino.cli.commands.Lib.LibraryOrBuilder>( + getLibrary(), + getParentForChildren(), + isClean()); + library_ = null; + } + return libraryBuilder_; + } + + private cc.arduino.cli.commands.Lib.LibraryRelease release_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Lib.LibraryRelease, cc.arduino.cli.commands.Lib.LibraryRelease.Builder, cc.arduino.cli.commands.Lib.LibraryReleaseOrBuilder> releaseBuilder_; + /** + *
+       * When the `updatable` field of the `LibraryList` request is set to `true`,
+       * this will contain information on the latest version of the library in the
+       * libraries index.
+       * 
+ * + * .cc.arduino.cli.commands.LibraryRelease release = 2; + * @return Whether the release field is set. + */ + public boolean hasRelease() { + return releaseBuilder_ != null || release_ != null; + } + /** + *
+       * When the `updatable` field of the `LibraryList` request is set to `true`,
+       * this will contain information on the latest version of the library in the
+       * libraries index.
+       * 
+ * + * .cc.arduino.cli.commands.LibraryRelease release = 2; + * @return The release. + */ + public cc.arduino.cli.commands.Lib.LibraryRelease getRelease() { + if (releaseBuilder_ == null) { + return release_ == null ? cc.arduino.cli.commands.Lib.LibraryRelease.getDefaultInstance() : release_; + } else { + return releaseBuilder_.getMessage(); + } + } + /** + *
+       * When the `updatable` field of the `LibraryList` request is set to `true`,
+       * this will contain information on the latest version of the library in the
+       * libraries index.
+       * 
+ * + * .cc.arduino.cli.commands.LibraryRelease release = 2; + */ + public Builder setRelease(cc.arduino.cli.commands.Lib.LibraryRelease value) { + if (releaseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + release_ = value; + onChanged(); + } else { + releaseBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * When the `updatable` field of the `LibraryList` request is set to `true`,
+       * this will contain information on the latest version of the library in the
+       * libraries index.
+       * 
+ * + * .cc.arduino.cli.commands.LibraryRelease release = 2; + */ + public Builder setRelease( + cc.arduino.cli.commands.Lib.LibraryRelease.Builder builderForValue) { + if (releaseBuilder_ == null) { + release_ = builderForValue.build(); + onChanged(); + } else { + releaseBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * When the `updatable` field of the `LibraryList` request is set to `true`,
+       * this will contain information on the latest version of the library in the
+       * libraries index.
+       * 
+ * + * .cc.arduino.cli.commands.LibraryRelease release = 2; + */ + public Builder mergeRelease(cc.arduino.cli.commands.Lib.LibraryRelease value) { + if (releaseBuilder_ == null) { + if (release_ != null) { + release_ = + cc.arduino.cli.commands.Lib.LibraryRelease.newBuilder(release_).mergeFrom(value).buildPartial(); + } else { + release_ = value; + } + onChanged(); + } else { + releaseBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * When the `updatable` field of the `LibraryList` request is set to `true`,
+       * this will contain information on the latest version of the library in the
+       * libraries index.
+       * 
+ * + * .cc.arduino.cli.commands.LibraryRelease release = 2; + */ + public Builder clearRelease() { + if (releaseBuilder_ == null) { + release_ = null; + onChanged(); + } else { + release_ = null; + releaseBuilder_ = null; + } + + return this; + } + /** + *
+       * When the `updatable` field of the `LibraryList` request is set to `true`,
+       * this will contain information on the latest version of the library in the
+       * libraries index.
+       * 
+ * + * .cc.arduino.cli.commands.LibraryRelease release = 2; + */ + public cc.arduino.cli.commands.Lib.LibraryRelease.Builder getReleaseBuilder() { + + onChanged(); + return getReleaseFieldBuilder().getBuilder(); + } + /** + *
+       * When the `updatable` field of the `LibraryList` request is set to `true`,
+       * this will contain information on the latest version of the library in the
+       * libraries index.
+       * 
+ * + * .cc.arduino.cli.commands.LibraryRelease release = 2; + */ + public cc.arduino.cli.commands.Lib.LibraryReleaseOrBuilder getReleaseOrBuilder() { + if (releaseBuilder_ != null) { + return releaseBuilder_.getMessageOrBuilder(); + } else { + return release_ == null ? + cc.arduino.cli.commands.Lib.LibraryRelease.getDefaultInstance() : release_; + } + } + /** + *
+       * When the `updatable` field of the `LibraryList` request is set to `true`,
+       * this will contain information on the latest version of the library in the
+       * libraries index.
+       * 
+ * + * .cc.arduino.cli.commands.LibraryRelease release = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Lib.LibraryRelease, cc.arduino.cli.commands.Lib.LibraryRelease.Builder, cc.arduino.cli.commands.Lib.LibraryReleaseOrBuilder> + getReleaseFieldBuilder() { + if (releaseBuilder_ == null) { + releaseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Lib.LibraryRelease, cc.arduino.cli.commands.Lib.LibraryRelease.Builder, cc.arduino.cli.commands.Lib.LibraryReleaseOrBuilder>( + getRelease(), + getParentForChildren(), + isClean()); + release_ = null; + } + return releaseBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.InstalledLibrary) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.InstalledLibrary) + private static final cc.arduino.cli.commands.Lib.InstalledLibrary DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Lib.InstalledLibrary(); + } + + public static cc.arduino.cli.commands.Lib.InstalledLibrary getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InstalledLibrary parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new InstalledLibrary(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.InstalledLibrary getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface LibraryOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.Library) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The library's directory name.
+     * 
+ * + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + *
+     * The library's directory name.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+     * Value of the `author` field in library.properties.
+     * 
+ * + * string author = 2; + * @return The author. + */ + java.lang.String getAuthor(); + /** + *
+     * Value of the `author` field in library.properties.
+     * 
+ * + * string author = 2; + * @return The bytes for author. + */ + com.google.protobuf.ByteString + getAuthorBytes(); + + /** + *
+     * Value of the `maintainer` field in library.properties.
+     * 
+ * + * string maintainer = 3; + * @return The maintainer. + */ + java.lang.String getMaintainer(); + /** + *
+     * Value of the `maintainer` field in library.properties.
+     * 
+ * + * string maintainer = 3; + * @return The bytes for maintainer. + */ + com.google.protobuf.ByteString + getMaintainerBytes(); + + /** + *
+     * Value of the `sentence` field in library.properties.
+     * 
+ * + * string sentence = 4; + * @return The sentence. + */ + java.lang.String getSentence(); + /** + *
+     * Value of the `sentence` field in library.properties.
+     * 
+ * + * string sentence = 4; + * @return The bytes for sentence. + */ + com.google.protobuf.ByteString + getSentenceBytes(); + + /** + *
+     * Value of the `paragraph` field in library.properties.
+     * 
+ * + * string paragraph = 5; + * @return The paragraph. + */ + java.lang.String getParagraph(); + /** + *
+     * Value of the `paragraph` field in library.properties.
+     * 
+ * + * string paragraph = 5; + * @return The bytes for paragraph. + */ + com.google.protobuf.ByteString + getParagraphBytes(); + + /** + *
+     * Value of the `url` field in library.properties.
+     * 
+ * + * string website = 6; + * @return The website. + */ + java.lang.String getWebsite(); + /** + *
+     * Value of the `url` field in library.properties.
+     * 
+ * + * string website = 6; + * @return The bytes for website. + */ + com.google.protobuf.ByteString + getWebsiteBytes(); + + /** + *
+     * Value of the `category` field in library.properties.
+     * 
+ * + * string category = 7; + * @return The category. + */ + java.lang.String getCategory(); + /** + *
+     * Value of the `category` field in library.properties.
+     * 
+ * + * string category = 7; + * @return The bytes for category. + */ + com.google.protobuf.ByteString + getCategoryBytes(); + + /** + *
+     * Value of the `architectures` field in library.properties.
+     * 
+ * + * repeated string architectures = 8; + * @return A list containing the architectures. + */ + java.util.List + getArchitecturesList(); + /** + *
+     * Value of the `architectures` field in library.properties.
+     * 
+ * + * repeated string architectures = 8; + * @return The count of architectures. + */ + int getArchitecturesCount(); + /** + *
+     * Value of the `architectures` field in library.properties.
+     * 
+ * + * repeated string architectures = 8; + * @param index The index of the element to return. + * @return The architectures at the given index. + */ + java.lang.String getArchitectures(int index); + /** + *
+     * Value of the `architectures` field in library.properties.
+     * 
+ * + * repeated string architectures = 8; + * @param index The index of the value to return. + * @return The bytes of the architectures at the given index. + */ + com.google.protobuf.ByteString + getArchitecturesBytes(int index); + + /** + *
+     * The type categories of the library. Possible values: `Arduino`,
+     * `Partner`, `Recommended`, `Contributed`, `Retired`.
+     * 
+ * + * repeated string types = 9; + * @return A list containing the types. + */ + java.util.List + getTypesList(); + /** + *
+     * The type categories of the library. Possible values: `Arduino`,
+     * `Partner`, `Recommended`, `Contributed`, `Retired`.
+     * 
+ * + * repeated string types = 9; + * @return The count of types. + */ + int getTypesCount(); + /** + *
+     * The type categories of the library. Possible values: `Arduino`,
+     * `Partner`, `Recommended`, `Contributed`, `Retired`.
+     * 
+ * + * repeated string types = 9; + * @param index The index of the element to return. + * @return The types at the given index. + */ + java.lang.String getTypes(int index); + /** + *
+     * The type categories of the library. Possible values: `Arduino`,
+     * `Partner`, `Recommended`, `Contributed`, `Retired`.
+     * 
+ * + * repeated string types = 9; + * @param index The index of the value to return. + * @return The bytes of the types at the given index. + */ + com.google.protobuf.ByteString + getTypesBytes(int index); + + /** + *
+     * The path of the library directory.
+     * 
+ * + * string install_dir = 10; + * @return The installDir. + */ + java.lang.String getInstallDir(); + /** + *
+     * The path of the library directory.
+     * 
+ * + * string install_dir = 10; + * @return The bytes for installDir. + */ + com.google.protobuf.ByteString + getInstallDirBytes(); + + /** + *
+     * The location of the library's source files.
+     * 
+ * + * string source_dir = 11; + * @return The sourceDir. + */ + java.lang.String getSourceDir(); + /** + *
+     * The location of the library's source files.
+     * 
+ * + * string source_dir = 11; + * @return The bytes for sourceDir. + */ + com.google.protobuf.ByteString + getSourceDirBytes(); + + /** + *
+     * The location of the library's `utility` directory.
+     * 
+ * + * string utility_dir = 12; + * @return The utilityDir. + */ + java.lang.String getUtilityDir(); + /** + *
+     * The location of the library's `utility` directory.
+     * 
+ * + * string utility_dir = 12; + * @return The bytes for utilityDir. + */ + com.google.protobuf.ByteString + getUtilityDirBytes(); + + /** + *
+     * If `location` is `platform_builtin` or `referenced_platform_builtin`, the
+     * identifying string for the platform containing the library
+     * (e.g., `arduino:avr@1.8.2`).
+     * 
+ * + * string container_platform = 14; + * @return The containerPlatform. + */ + java.lang.String getContainerPlatform(); + /** + *
+     * If `location` is `platform_builtin` or `referenced_platform_builtin`, the
+     * identifying string for the platform containing the library
+     * (e.g., `arduino:avr@1.8.2`).
+     * 
+ * + * string container_platform = 14; + * @return The bytes for containerPlatform. + */ + com.google.protobuf.ByteString + getContainerPlatformBytes(); + + /** + *
+     * Value of the `name` field in library.properties.
+     * 
+ * + * string real_name = 16; + * @return The realName. + */ + java.lang.String getRealName(); + /** + *
+     * Value of the `name` field in library.properties.
+     * 
+ * + * string real_name = 16; + * @return The bytes for realName. + */ + com.google.protobuf.ByteString + getRealNameBytes(); + + /** + *
+     * Value of the `dot_a_linkage` field in library.properties.
+     * 
+ * + * bool dot_a_linkage = 17; + * @return The dotALinkage. + */ + boolean getDotALinkage(); + + /** + *
+     * Value of the `precompiled` field in library.properties.
+     * 
+ * + * bool precompiled = 18; + * @return The precompiled. + */ + boolean getPrecompiled(); + + /** + *
+     * Value of the `ldflags` field in library.properties.
+     * 
+ * + * string ld_flags = 19; + * @return The ldFlags. + */ + java.lang.String getLdFlags(); + /** + *
+     * Value of the `ldflags` field in library.properties.
+     * 
+ * + * string ld_flags = 19; + * @return The bytes for ldFlags. + */ + com.google.protobuf.ByteString + getLdFlagsBytes(); + + /** + *
+     * A library.properties file is not present in the library's root directory.
+     * 
+ * + * bool is_legacy = 20; + * @return The isLegacy. + */ + boolean getIsLegacy(); + + /** + *
+     * Value of the `version` field in library.properties.
+     * 
+ * + * string version = 21; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+     * Value of the `version` field in library.properties.
+     * 
+ * + * string version = 21; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); + + /** + *
+     * Value of the `license` field in library.properties.
+     * 
+ * + * string license = 22; + * @return The license. + */ + java.lang.String getLicense(); + /** + *
+     * Value of the `license` field in library.properties.
+     * 
+ * + * string license = 22; + * @return The bytes for license. + */ + com.google.protobuf.ByteString + getLicenseBytes(); + + /** + *
+     * The data from the library's library.properties file, including unused
+     * fields.
+     * 
+ * + * map<string, string> properties = 23; + */ + int getPropertiesCount(); + /** + *
+     * The data from the library's library.properties file, including unused
+     * fields.
+     * 
+ * + * map<string, string> properties = 23; + */ + boolean containsProperties( + java.lang.String key); + /** + * Use {@link #getPropertiesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getProperties(); + /** + *
+     * The data from the library's library.properties file, including unused
+     * fields.
+     * 
+ * + * map<string, string> properties = 23; + */ + java.util.Map + getPropertiesMap(); + /** + *
+     * The data from the library's library.properties file, including unused
+     * fields.
+     * 
+ * + * map<string, string> properties = 23; + */ + + java.lang.String getPropertiesOrDefault( + java.lang.String key, + java.lang.String defaultValue); + /** + *
+     * The data from the library's library.properties file, including unused
+     * fields.
+     * 
+ * + * map<string, string> properties = 23; + */ + + java.lang.String getPropertiesOrThrow( + java.lang.String key); + + /** + *
+     * The location type of the library installation.
+     * 
+ * + * .cc.arduino.cli.commands.LibraryLocation location = 24; + * @return The enum numeric value on the wire for location. + */ + int getLocationValue(); + /** + *
+     * The location type of the library installation.
+     * 
+ * + * .cc.arduino.cli.commands.LibraryLocation location = 24; + * @return The location. + */ + cc.arduino.cli.commands.Lib.LibraryLocation getLocation(); + + /** + *
+     * The library format type.
+     * 
+ * + * .cc.arduino.cli.commands.LibraryLayout layout = 25; + * @return The enum numeric value on the wire for layout. + */ + int getLayoutValue(); + /** + *
+     * The library format type.
+     * 
+ * + * .cc.arduino.cli.commands.LibraryLayout layout = 25; + * @return The layout. + */ + cc.arduino.cli.commands.Lib.LibraryLayout getLayout(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.Library} + */ + public static final class Library extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.Library) + LibraryOrBuilder { + private static final long serialVersionUID = 0L; + // Use Library.newBuilder() to construct. + private Library(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Library() { + name_ = ""; + author_ = ""; + maintainer_ = ""; + sentence_ = ""; + paragraph_ = ""; + website_ = ""; + category_ = ""; + architectures_ = com.google.protobuf.LazyStringArrayList.EMPTY; + types_ = com.google.protobuf.LazyStringArrayList.EMPTY; + installDir_ = ""; + sourceDir_ = ""; + utilityDir_ = ""; + containerPlatform_ = ""; + realName_ = ""; + ldFlags_ = ""; + version_ = ""; + license_ = ""; + location_ = 0; + layout_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Library(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Library( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + author_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + maintainer_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + sentence_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + paragraph_ = s; + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + website_ = s; + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + + category_ = s; + break; + } + case 66: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + architectures_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + architectures_.add(s); + break; + } + case 74: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + types_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + types_.add(s); + break; + } + case 82: { + java.lang.String s = input.readStringRequireUtf8(); + + installDir_ = s; + break; + } + case 90: { + java.lang.String s = input.readStringRequireUtf8(); + + sourceDir_ = s; + break; + } + case 98: { + java.lang.String s = input.readStringRequireUtf8(); + + utilityDir_ = s; + break; + } + case 114: { + java.lang.String s = input.readStringRequireUtf8(); + + containerPlatform_ = s; + break; + } + case 130: { + java.lang.String s = input.readStringRequireUtf8(); + + realName_ = s; + break; + } + case 136: { + + dotALinkage_ = input.readBool(); + break; + } + case 144: { + + precompiled_ = input.readBool(); + break; + } + case 154: { + java.lang.String s = input.readStringRequireUtf8(); + + ldFlags_ = s; + break; + } + case 160: { + + isLegacy_ = input.readBool(); + break; + } + case 170: { + java.lang.String s = input.readStringRequireUtf8(); + + version_ = s; + break; + } + case 178: { + java.lang.String s = input.readStringRequireUtf8(); + + license_ = s; + break; + } + case 186: { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + properties_ = com.google.protobuf.MapField.newMapField( + PropertiesDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000004; + } + com.google.protobuf.MapEntry + properties__ = input.readMessage( + PropertiesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + properties_.getMutableMap().put( + properties__.getKey(), properties__.getValue()); + break; + } + case 192: { + int rawValue = input.readEnum(); + + location_ = rawValue; + break; + } + case 200: { + int rawValue = input.readEnum(); + + layout_ = rawValue; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + architectures_ = architectures_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + types_ = types_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_Library_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 23: + return internalGetProperties(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_Library_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Lib.Library.class, cc.arduino.cli.commands.Lib.Library.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+     * The library's directory name.
+     * 
+ * + * string name = 1; + * @return The name. + */ + 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; + } + } + /** + *
+     * The library's directory name.
+     * 
+ * + * string name = 1; + * @return The bytes for name. + */ + 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 AUTHOR_FIELD_NUMBER = 2; + private volatile java.lang.Object author_; + /** + *
+     * Value of the `author` field in library.properties.
+     * 
+ * + * string author = 2; + * @return The author. + */ + public java.lang.String getAuthor() { + java.lang.Object ref = author_; + 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(); + author_ = s; + return s; + } + } + /** + *
+     * Value of the `author` field in library.properties.
+     * 
+ * + * string author = 2; + * @return The bytes for author. + */ + public com.google.protobuf.ByteString + getAuthorBytes() { + java.lang.Object ref = author_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + author_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MAINTAINER_FIELD_NUMBER = 3; + private volatile java.lang.Object maintainer_; + /** + *
+     * Value of the `maintainer` field in library.properties.
+     * 
+ * + * string maintainer = 3; + * @return The maintainer. + */ + public java.lang.String getMaintainer() { + java.lang.Object ref = maintainer_; + 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(); + maintainer_ = s; + return s; + } + } + /** + *
+     * Value of the `maintainer` field in library.properties.
+     * 
+ * + * string maintainer = 3; + * @return The bytes for maintainer. + */ + public com.google.protobuf.ByteString + getMaintainerBytes() { + java.lang.Object ref = maintainer_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + maintainer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SENTENCE_FIELD_NUMBER = 4; + private volatile java.lang.Object sentence_; + /** + *
+     * Value of the `sentence` field in library.properties.
+     * 
+ * + * string sentence = 4; + * @return The sentence. + */ + public java.lang.String getSentence() { + java.lang.Object ref = sentence_; + 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(); + sentence_ = s; + return s; + } + } + /** + *
+     * Value of the `sentence` field in library.properties.
+     * 
+ * + * string sentence = 4; + * @return The bytes for sentence. + */ + public com.google.protobuf.ByteString + getSentenceBytes() { + java.lang.Object ref = sentence_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sentence_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARAGRAPH_FIELD_NUMBER = 5; + private volatile java.lang.Object paragraph_; + /** + *
+     * Value of the `paragraph` field in library.properties.
+     * 
+ * + * string paragraph = 5; + * @return The paragraph. + */ + public java.lang.String getParagraph() { + java.lang.Object ref = paragraph_; + 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(); + paragraph_ = s; + return s; + } + } + /** + *
+     * Value of the `paragraph` field in library.properties.
+     * 
+ * + * string paragraph = 5; + * @return The bytes for paragraph. + */ + public com.google.protobuf.ByteString + getParagraphBytes() { + java.lang.Object ref = paragraph_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + paragraph_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int WEBSITE_FIELD_NUMBER = 6; + private volatile java.lang.Object website_; + /** + *
+     * Value of the `url` field in library.properties.
+     * 
+ * + * string website = 6; + * @return The website. + */ + public java.lang.String getWebsite() { + java.lang.Object ref = website_; + 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(); + website_ = s; + return s; + } + } + /** + *
+     * Value of the `url` field in library.properties.
+     * 
+ * + * string website = 6; + * @return The bytes for website. + */ + public com.google.protobuf.ByteString + getWebsiteBytes() { + java.lang.Object ref = website_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + website_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CATEGORY_FIELD_NUMBER = 7; + private volatile java.lang.Object category_; + /** + *
+     * Value of the `category` field in library.properties.
+     * 
+ * + * string category = 7; + * @return The category. + */ + public java.lang.String getCategory() { + java.lang.Object ref = category_; + 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(); + category_ = s; + return s; + } + } + /** + *
+     * Value of the `category` field in library.properties.
+     * 
+ * + * string category = 7; + * @return The bytes for category. + */ + public com.google.protobuf.ByteString + getCategoryBytes() { + java.lang.Object ref = category_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + category_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ARCHITECTURES_FIELD_NUMBER = 8; + private com.google.protobuf.LazyStringList architectures_; + /** + *
+     * Value of the `architectures` field in library.properties.
+     * 
+ * + * repeated string architectures = 8; + * @return A list containing the architectures. + */ + public com.google.protobuf.ProtocolStringList + getArchitecturesList() { + return architectures_; + } + /** + *
+     * Value of the `architectures` field in library.properties.
+     * 
+ * + * repeated string architectures = 8; + * @return The count of architectures. + */ + public int getArchitecturesCount() { + return architectures_.size(); + } + /** + *
+     * Value of the `architectures` field in library.properties.
+     * 
+ * + * repeated string architectures = 8; + * @param index The index of the element to return. + * @return The architectures at the given index. + */ + public java.lang.String getArchitectures(int index) { + return architectures_.get(index); + } + /** + *
+     * Value of the `architectures` field in library.properties.
+     * 
+ * + * repeated string architectures = 8; + * @param index The index of the value to return. + * @return The bytes of the architectures at the given index. + */ + public com.google.protobuf.ByteString + getArchitecturesBytes(int index) { + return architectures_.getByteString(index); + } + + public static final int TYPES_FIELD_NUMBER = 9; + private com.google.protobuf.LazyStringList types_; + /** + *
+     * The type categories of the library. Possible values: `Arduino`,
+     * `Partner`, `Recommended`, `Contributed`, `Retired`.
+     * 
+ * + * repeated string types = 9; + * @return A list containing the types. + */ + public com.google.protobuf.ProtocolStringList + getTypesList() { + return types_; + } + /** + *
+     * The type categories of the library. Possible values: `Arduino`,
+     * `Partner`, `Recommended`, `Contributed`, `Retired`.
+     * 
+ * + * repeated string types = 9; + * @return The count of types. + */ + public int getTypesCount() { + return types_.size(); + } + /** + *
+     * The type categories of the library. Possible values: `Arduino`,
+     * `Partner`, `Recommended`, `Contributed`, `Retired`.
+     * 
+ * + * repeated string types = 9; + * @param index The index of the element to return. + * @return The types at the given index. + */ + public java.lang.String getTypes(int index) { + return types_.get(index); + } + /** + *
+     * The type categories of the library. Possible values: `Arduino`,
+     * `Partner`, `Recommended`, `Contributed`, `Retired`.
+     * 
+ * + * repeated string types = 9; + * @param index The index of the value to return. + * @return The bytes of the types at the given index. + */ + public com.google.protobuf.ByteString + getTypesBytes(int index) { + return types_.getByteString(index); + } + + public static final int INSTALL_DIR_FIELD_NUMBER = 10; + private volatile java.lang.Object installDir_; + /** + *
+     * The path of the library directory.
+     * 
+ * + * string install_dir = 10; + * @return The installDir. + */ + public java.lang.String getInstallDir() { + java.lang.Object ref = installDir_; + 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(); + installDir_ = s; + return s; + } + } + /** + *
+     * The path of the library directory.
+     * 
+ * + * string install_dir = 10; + * @return The bytes for installDir. + */ + public com.google.protobuf.ByteString + getInstallDirBytes() { + java.lang.Object ref = installDir_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + installDir_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_DIR_FIELD_NUMBER = 11; + private volatile java.lang.Object sourceDir_; + /** + *
+     * The location of the library's source files.
+     * 
+ * + * string source_dir = 11; + * @return The sourceDir. + */ + public java.lang.String getSourceDir() { + java.lang.Object ref = sourceDir_; + 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(); + sourceDir_ = s; + return s; + } + } + /** + *
+     * The location of the library's source files.
+     * 
+ * + * string source_dir = 11; + * @return The bytes for sourceDir. + */ + public com.google.protobuf.ByteString + getSourceDirBytes() { + java.lang.Object ref = sourceDir_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sourceDir_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UTILITY_DIR_FIELD_NUMBER = 12; + private volatile java.lang.Object utilityDir_; + /** + *
+     * The location of the library's `utility` directory.
+     * 
+ * + * string utility_dir = 12; + * @return The utilityDir. + */ + public java.lang.String getUtilityDir() { + java.lang.Object ref = utilityDir_; + 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(); + utilityDir_ = s; + return s; + } + } + /** + *
+     * The location of the library's `utility` directory.
+     * 
+ * + * string utility_dir = 12; + * @return The bytes for utilityDir. + */ + public com.google.protobuf.ByteString + getUtilityDirBytes() { + java.lang.Object ref = utilityDir_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + utilityDir_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTAINER_PLATFORM_FIELD_NUMBER = 14; + private volatile java.lang.Object containerPlatform_; + /** + *
+     * If `location` is `platform_builtin` or `referenced_platform_builtin`, the
+     * identifying string for the platform containing the library
+     * (e.g., `arduino:avr@1.8.2`).
+     * 
+ * + * string container_platform = 14; + * @return The containerPlatform. + */ + public java.lang.String getContainerPlatform() { + java.lang.Object ref = containerPlatform_; + 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(); + containerPlatform_ = s; + return s; + } + } + /** + *
+     * If `location` is `platform_builtin` or `referenced_platform_builtin`, the
+     * identifying string for the platform containing the library
+     * (e.g., `arduino:avr@1.8.2`).
+     * 
+ * + * string container_platform = 14; + * @return The bytes for containerPlatform. + */ + public com.google.protobuf.ByteString + getContainerPlatformBytes() { + java.lang.Object ref = containerPlatform_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerPlatform_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REAL_NAME_FIELD_NUMBER = 16; + private volatile java.lang.Object realName_; + /** + *
+     * Value of the `name` field in library.properties.
+     * 
+ * + * string real_name = 16; + * @return The realName. + */ + public java.lang.String getRealName() { + java.lang.Object ref = realName_; + 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(); + realName_ = s; + return s; + } + } + /** + *
+     * Value of the `name` field in library.properties.
+     * 
+ * + * string real_name = 16; + * @return The bytes for realName. + */ + public com.google.protobuf.ByteString + getRealNameBytes() { + java.lang.Object ref = realName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + realName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DOT_A_LINKAGE_FIELD_NUMBER = 17; + private boolean dotALinkage_; + /** + *
+     * Value of the `dot_a_linkage` field in library.properties.
+     * 
+ * + * bool dot_a_linkage = 17; + * @return The dotALinkage. + */ + public boolean getDotALinkage() { + return dotALinkage_; + } + + public static final int PRECOMPILED_FIELD_NUMBER = 18; + private boolean precompiled_; + /** + *
+     * Value of the `precompiled` field in library.properties.
+     * 
+ * + * bool precompiled = 18; + * @return The precompiled. + */ + public boolean getPrecompiled() { + return precompiled_; + } + + public static final int LD_FLAGS_FIELD_NUMBER = 19; + private volatile java.lang.Object ldFlags_; + /** + *
+     * Value of the `ldflags` field in library.properties.
+     * 
+ * + * string ld_flags = 19; + * @return The ldFlags. + */ + public java.lang.String getLdFlags() { + java.lang.Object ref = ldFlags_; + 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(); + ldFlags_ = s; + return s; + } + } + /** + *
+     * Value of the `ldflags` field in library.properties.
+     * 
+ * + * string ld_flags = 19; + * @return The bytes for ldFlags. + */ + public com.google.protobuf.ByteString + getLdFlagsBytes() { + java.lang.Object ref = ldFlags_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ldFlags_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IS_LEGACY_FIELD_NUMBER = 20; + private boolean isLegacy_; + /** + *
+     * A library.properties file is not present in the library's root directory.
+     * 
+ * + * bool is_legacy = 20; + * @return The isLegacy. + */ + public boolean getIsLegacy() { + return isLegacy_; + } + + public static final int VERSION_FIELD_NUMBER = 21; + private volatile java.lang.Object version_; + /** + *
+     * Value of the `version` field in library.properties.
+     * 
+ * + * string version = 21; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + 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(); + version_ = s; + return s; + } + } + /** + *
+     * Value of the `version` field in library.properties.
+     * 
+ * + * string version = 21; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LICENSE_FIELD_NUMBER = 22; + private volatile java.lang.Object license_; + /** + *
+     * Value of the `license` field in library.properties.
+     * 
+ * + * string license = 22; + * @return The license. + */ + public java.lang.String getLicense() { + java.lang.Object ref = license_; + 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(); + license_ = s; + return s; + } + } + /** + *
+     * Value of the `license` field in library.properties.
+     * 
+ * + * string license = 22; + * @return The bytes for license. + */ + public com.google.protobuf.ByteString + getLicenseBytes() { + java.lang.Object ref = license_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + license_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROPERTIES_FIELD_NUMBER = 23; + private static final class PropertiesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_Library_PropertiesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> properties_; + private com.google.protobuf.MapField + internalGetProperties() { + if (properties_ == null) { + return com.google.protobuf.MapField.emptyMapField( + PropertiesDefaultEntryHolder.defaultEntry); + } + return properties_; + } + + public int getPropertiesCount() { + return internalGetProperties().getMap().size(); + } + /** + *
+     * The data from the library's library.properties file, including unused
+     * fields.
+     * 
+ * + * map<string, string> properties = 23; + */ + + public boolean containsProperties( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetProperties().getMap().containsKey(key); + } + /** + * Use {@link #getPropertiesMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getProperties() { + return getPropertiesMap(); + } + /** + *
+     * The data from the library's library.properties file, including unused
+     * fields.
+     * 
+ * + * map<string, string> properties = 23; + */ + + public java.util.Map getPropertiesMap() { + return internalGetProperties().getMap(); + } + /** + *
+     * The data from the library's library.properties file, including unused
+     * fields.
+     * 
+ * + * map<string, string> properties = 23; + */ + + public java.lang.String getPropertiesOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetProperties().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * The data from the library's library.properties file, including unused
+     * fields.
+     * 
+ * + * map<string, string> properties = 23; + */ + + public java.lang.String getPropertiesOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetProperties().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int LOCATION_FIELD_NUMBER = 24; + private int location_; + /** + *
+     * The location type of the library installation.
+     * 
+ * + * .cc.arduino.cli.commands.LibraryLocation location = 24; + * @return The enum numeric value on the wire for location. + */ + public int getLocationValue() { + return location_; + } + /** + *
+     * The location type of the library installation.
+     * 
+ * + * .cc.arduino.cli.commands.LibraryLocation location = 24; + * @return The location. + */ + public cc.arduino.cli.commands.Lib.LibraryLocation getLocation() { + @SuppressWarnings("deprecation") + cc.arduino.cli.commands.Lib.LibraryLocation result = cc.arduino.cli.commands.Lib.LibraryLocation.valueOf(location_); + return result == null ? cc.arduino.cli.commands.Lib.LibraryLocation.UNRECOGNIZED : result; + } + + public static final int LAYOUT_FIELD_NUMBER = 25; + private int layout_; + /** + *
+     * The library format type.
+     * 
+ * + * .cc.arduino.cli.commands.LibraryLayout layout = 25; + * @return The enum numeric value on the wire for layout. + */ + public int getLayoutValue() { + return layout_; + } + /** + *
+     * The library format type.
+     * 
+ * + * .cc.arduino.cli.commands.LibraryLayout layout = 25; + * @return The layout. + */ + public cc.arduino.cli.commands.Lib.LibraryLayout getLayout() { + @SuppressWarnings("deprecation") + cc.arduino.cli.commands.Lib.LibraryLayout result = cc.arduino.cli.commands.Lib.LibraryLayout.valueOf(layout_); + return result == null ? cc.arduino.cli.commands.Lib.LibraryLayout.UNRECOGNIZED : result; + } + + 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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getAuthorBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, author_); + } + if (!getMaintainerBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, maintainer_); + } + if (!getSentenceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, sentence_); + } + if (!getParagraphBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, paragraph_); + } + if (!getWebsiteBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, website_); + } + if (!getCategoryBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, category_); + } + for (int i = 0; i < architectures_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, architectures_.getRaw(i)); + } + for (int i = 0; i < types_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, types_.getRaw(i)); + } + if (!getInstallDirBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, installDir_); + } + if (!getSourceDirBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 11, sourceDir_); + } + if (!getUtilityDirBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, utilityDir_); + } + if (!getContainerPlatformBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 14, containerPlatform_); + } + if (!getRealNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 16, realName_); + } + if (dotALinkage_ != false) { + output.writeBool(17, dotALinkage_); + } + if (precompiled_ != false) { + output.writeBool(18, precompiled_); + } + if (!getLdFlagsBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 19, ldFlags_); + } + if (isLegacy_ != false) { + output.writeBool(20, isLegacy_); + } + if (!getVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 21, version_); + } + if (!getLicenseBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 22, license_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetProperties(), + PropertiesDefaultEntryHolder.defaultEntry, + 23); + if (location_ != cc.arduino.cli.commands.Lib.LibraryLocation.ide_builtin.getNumber()) { + output.writeEnum(24, location_); + } + if (layout_ != cc.arduino.cli.commands.Lib.LibraryLayout.flat_layout.getNumber()) { + output.writeEnum(25, layout_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getAuthorBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, author_); + } + if (!getMaintainerBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, maintainer_); + } + if (!getSentenceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, sentence_); + } + if (!getParagraphBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, paragraph_); + } + if (!getWebsiteBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, website_); + } + if (!getCategoryBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, category_); + } + { + int dataSize = 0; + for (int i = 0; i < architectures_.size(); i++) { + dataSize += computeStringSizeNoTag(architectures_.getRaw(i)); + } + size += dataSize; + size += 1 * getArchitecturesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < types_.size(); i++) { + dataSize += computeStringSizeNoTag(types_.getRaw(i)); + } + size += dataSize; + size += 1 * getTypesList().size(); + } + if (!getInstallDirBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, installDir_); + } + if (!getSourceDirBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, sourceDir_); + } + if (!getUtilityDirBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, utilityDir_); + } + if (!getContainerPlatformBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, containerPlatform_); + } + if (!getRealNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, realName_); + } + if (dotALinkage_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(17, dotALinkage_); + } + if (precompiled_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(18, precompiled_); + } + if (!getLdFlagsBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(19, ldFlags_); + } + if (isLegacy_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(20, isLegacy_); + } + if (!getVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(21, version_); + } + if (!getLicenseBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(22, license_); + } + for (java.util.Map.Entry entry + : internalGetProperties().getMap().entrySet()) { + com.google.protobuf.MapEntry + properties__ = PropertiesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(23, properties__); + } + if (location_ != cc.arduino.cli.commands.Lib.LibraryLocation.ide_builtin.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(24, location_); + } + if (layout_ != cc.arduino.cli.commands.Lib.LibraryLayout.flat_layout.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(25, layout_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Lib.Library)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Lib.Library other = (cc.arduino.cli.commands.Lib.Library) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getAuthor() + .equals(other.getAuthor())) return false; + if (!getMaintainer() + .equals(other.getMaintainer())) return false; + if (!getSentence() + .equals(other.getSentence())) return false; + if (!getParagraph() + .equals(other.getParagraph())) return false; + if (!getWebsite() + .equals(other.getWebsite())) return false; + if (!getCategory() + .equals(other.getCategory())) return false; + if (!getArchitecturesList() + .equals(other.getArchitecturesList())) return false; + if (!getTypesList() + .equals(other.getTypesList())) return false; + if (!getInstallDir() + .equals(other.getInstallDir())) return false; + if (!getSourceDir() + .equals(other.getSourceDir())) return false; + if (!getUtilityDir() + .equals(other.getUtilityDir())) return false; + if (!getContainerPlatform() + .equals(other.getContainerPlatform())) return false; + if (!getRealName() + .equals(other.getRealName())) return false; + if (getDotALinkage() + != other.getDotALinkage()) return false; + if (getPrecompiled() + != other.getPrecompiled()) return false; + if (!getLdFlags() + .equals(other.getLdFlags())) return false; + if (getIsLegacy() + != other.getIsLegacy()) return false; + if (!getVersion() + .equals(other.getVersion())) return false; + if (!getLicense() + .equals(other.getLicense())) return false; + if (!internalGetProperties().equals( + other.internalGetProperties())) return false; + if (location_ != other.location_) return false; + if (layout_ != other.layout_) return false; + if (!unknownFields.equals(other.unknownFields)) 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(); + hash = (37 * hash) + AUTHOR_FIELD_NUMBER; + hash = (53 * hash) + getAuthor().hashCode(); + hash = (37 * hash) + MAINTAINER_FIELD_NUMBER; + hash = (53 * hash) + getMaintainer().hashCode(); + hash = (37 * hash) + SENTENCE_FIELD_NUMBER; + hash = (53 * hash) + getSentence().hashCode(); + hash = (37 * hash) + PARAGRAPH_FIELD_NUMBER; + hash = (53 * hash) + getParagraph().hashCode(); + hash = (37 * hash) + WEBSITE_FIELD_NUMBER; + hash = (53 * hash) + getWebsite().hashCode(); + hash = (37 * hash) + CATEGORY_FIELD_NUMBER; + hash = (53 * hash) + getCategory().hashCode(); + if (getArchitecturesCount() > 0) { + hash = (37 * hash) + ARCHITECTURES_FIELD_NUMBER; + hash = (53 * hash) + getArchitecturesList().hashCode(); + } + if (getTypesCount() > 0) { + hash = (37 * hash) + TYPES_FIELD_NUMBER; + hash = (53 * hash) + getTypesList().hashCode(); + } + hash = (37 * hash) + INSTALL_DIR_FIELD_NUMBER; + hash = (53 * hash) + getInstallDir().hashCode(); + hash = (37 * hash) + SOURCE_DIR_FIELD_NUMBER; + hash = (53 * hash) + getSourceDir().hashCode(); + hash = (37 * hash) + UTILITY_DIR_FIELD_NUMBER; + hash = (53 * hash) + getUtilityDir().hashCode(); + hash = (37 * hash) + CONTAINER_PLATFORM_FIELD_NUMBER; + hash = (53 * hash) + getContainerPlatform().hashCode(); + hash = (37 * hash) + REAL_NAME_FIELD_NUMBER; + hash = (53 * hash) + getRealName().hashCode(); + hash = (37 * hash) + DOT_A_LINKAGE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getDotALinkage()); + hash = (37 * hash) + PRECOMPILED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getPrecompiled()); + hash = (37 * hash) + LD_FLAGS_FIELD_NUMBER; + hash = (53 * hash) + getLdFlags().hashCode(); + hash = (37 * hash) + IS_LEGACY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsLegacy()); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (37 * hash) + LICENSE_FIELD_NUMBER; + hash = (53 * hash) + getLicense().hashCode(); + if (!internalGetProperties().getMap().isEmpty()) { + hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + internalGetProperties().hashCode(); + } + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + location_; + hash = (37 * hash) + LAYOUT_FIELD_NUMBER; + hash = (53 * hash) + layout_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Lib.Library parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.Library parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.Library parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.Library parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.Library parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Lib.Library parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.Library parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.Library parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.Library parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.Library parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Lib.Library parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Lib.Library parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Lib.Library 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.Library} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.Library) + cc.arduino.cli.commands.Lib.LibraryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_Library_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 23: + return internalGetProperties(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 23: + return internalGetMutableProperties(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_Library_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Lib.Library.class, cc.arduino.cli.commands.Lib.Library.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Lib.Library.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + author_ = ""; + + maintainer_ = ""; + + sentence_ = ""; + + paragraph_ = ""; + + website_ = ""; + + category_ = ""; + + architectures_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + types_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + installDir_ = ""; + + sourceDir_ = ""; + + utilityDir_ = ""; + + containerPlatform_ = ""; + + realName_ = ""; + + dotALinkage_ = false; + + precompiled_ = false; + + ldFlags_ = ""; + + isLegacy_ = false; + + version_ = ""; + + license_ = ""; + + internalGetMutableProperties().clear(); + location_ = 0; + + layout_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Lib.internal_static_cc_arduino_cli_commands_Library_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.Library getDefaultInstanceForType() { + return cc.arduino.cli.commands.Lib.Library.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.Library build() { + cc.arduino.cli.commands.Lib.Library result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.Library buildPartial() { + cc.arduino.cli.commands.Lib.Library result = new cc.arduino.cli.commands.Lib.Library(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.author_ = author_; + result.maintainer_ = maintainer_; + result.sentence_ = sentence_; + result.paragraph_ = paragraph_; + result.website_ = website_; + result.category_ = category_; + if (((bitField0_ & 0x00000001) != 0)) { + architectures_ = architectures_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.architectures_ = architectures_; + if (((bitField0_ & 0x00000002) != 0)) { + types_ = types_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.types_ = types_; + result.installDir_ = installDir_; + result.sourceDir_ = sourceDir_; + result.utilityDir_ = utilityDir_; + result.containerPlatform_ = containerPlatform_; + result.realName_ = realName_; + result.dotALinkage_ = dotALinkage_; + result.precompiled_ = precompiled_; + result.ldFlags_ = ldFlags_; + result.isLegacy_ = isLegacy_; + result.version_ = version_; + result.license_ = license_; + result.properties_ = internalGetProperties(); + result.properties_.makeImmutable(); + result.location_ = location_; + result.layout_ = layout_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Lib.Library) { + return mergeFrom((cc.arduino.cli.commands.Lib.Library)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Lib.Library other) { + if (other == cc.arduino.cli.commands.Lib.Library.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getAuthor().isEmpty()) { + author_ = other.author_; + onChanged(); + } + if (!other.getMaintainer().isEmpty()) { + maintainer_ = other.maintainer_; + onChanged(); + } + if (!other.getSentence().isEmpty()) { + sentence_ = other.sentence_; + onChanged(); + } + if (!other.getParagraph().isEmpty()) { + paragraph_ = other.paragraph_; + onChanged(); + } + if (!other.getWebsite().isEmpty()) { + website_ = other.website_; + onChanged(); + } + if (!other.getCategory().isEmpty()) { + category_ = other.category_; + onChanged(); + } + if (!other.architectures_.isEmpty()) { + if (architectures_.isEmpty()) { + architectures_ = other.architectures_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureArchitecturesIsMutable(); + architectures_.addAll(other.architectures_); + } + onChanged(); + } + if (!other.types_.isEmpty()) { + if (types_.isEmpty()) { + types_ = other.types_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureTypesIsMutable(); + types_.addAll(other.types_); + } + onChanged(); + } + if (!other.getInstallDir().isEmpty()) { + installDir_ = other.installDir_; + onChanged(); + } + if (!other.getSourceDir().isEmpty()) { + sourceDir_ = other.sourceDir_; + onChanged(); + } + if (!other.getUtilityDir().isEmpty()) { + utilityDir_ = other.utilityDir_; + onChanged(); + } + if (!other.getContainerPlatform().isEmpty()) { + containerPlatform_ = other.containerPlatform_; + onChanged(); + } + if (!other.getRealName().isEmpty()) { + realName_ = other.realName_; + onChanged(); + } + if (other.getDotALinkage() != false) { + setDotALinkage(other.getDotALinkage()); + } + if (other.getPrecompiled() != false) { + setPrecompiled(other.getPrecompiled()); + } + if (!other.getLdFlags().isEmpty()) { + ldFlags_ = other.ldFlags_; + onChanged(); + } + if (other.getIsLegacy() != false) { + setIsLegacy(other.getIsLegacy()); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + if (!other.getLicense().isEmpty()) { + license_ = other.license_; + onChanged(); + } + internalGetMutableProperties().mergeFrom( + other.internalGetProperties()); + if (other.location_ != 0) { + setLocationValue(other.getLocationValue()); + } + if (other.layout_ != 0) { + setLayoutValue(other.getLayoutValue()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Lib.Library parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Lib.Library) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + *
+       * The library's directory 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; + } + } + /** + *
+       * The library's directory name.
+       * 
+ * + * 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; + } + } + /** + *
+       * The library's directory name.
+       * 
+ * + * 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; + onChanged(); + return this; + } + /** + *
+       * The library's directory name.
+       * 
+ * + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+       * The library's directory name.
+       * 
+ * + * 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; + onChanged(); + return this; + } + + private java.lang.Object author_ = ""; + /** + *
+       * Value of the `author` field in library.properties.
+       * 
+ * + * string author = 2; + * @return The author. + */ + public java.lang.String getAuthor() { + java.lang.Object ref = author_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + author_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Value of the `author` field in library.properties.
+       * 
+ * + * string author = 2; + * @return The bytes for author. + */ + public com.google.protobuf.ByteString + getAuthorBytes() { + java.lang.Object ref = author_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + author_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Value of the `author` field in library.properties.
+       * 
+ * + * string author = 2; + * @param value The author to set. + * @return This builder for chaining. + */ + public Builder setAuthor( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + author_ = value; + onChanged(); + return this; + } + /** + *
+       * Value of the `author` field in library.properties.
+       * 
+ * + * string author = 2; + * @return This builder for chaining. + */ + public Builder clearAuthor() { + + author_ = getDefaultInstance().getAuthor(); + onChanged(); + return this; + } + /** + *
+       * Value of the `author` field in library.properties.
+       * 
+ * + * string author = 2; + * @param value The bytes for author to set. + * @return This builder for chaining. + */ + public Builder setAuthorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + author_ = value; + onChanged(); + return this; + } + + private java.lang.Object maintainer_ = ""; + /** + *
+       * Value of the `maintainer` field in library.properties.
+       * 
+ * + * string maintainer = 3; + * @return The maintainer. + */ + public java.lang.String getMaintainer() { + java.lang.Object ref = maintainer_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + maintainer_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Value of the `maintainer` field in library.properties.
+       * 
+ * + * string maintainer = 3; + * @return The bytes for maintainer. + */ + public com.google.protobuf.ByteString + getMaintainerBytes() { + java.lang.Object ref = maintainer_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + maintainer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Value of the `maintainer` field in library.properties.
+       * 
+ * + * string maintainer = 3; + * @param value The maintainer to set. + * @return This builder for chaining. + */ + public Builder setMaintainer( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + maintainer_ = value; + onChanged(); + return this; + } + /** + *
+       * Value of the `maintainer` field in library.properties.
+       * 
+ * + * string maintainer = 3; + * @return This builder for chaining. + */ + public Builder clearMaintainer() { + + maintainer_ = getDefaultInstance().getMaintainer(); + onChanged(); + return this; + } + /** + *
+       * Value of the `maintainer` field in library.properties.
+       * 
+ * + * string maintainer = 3; + * @param value The bytes for maintainer to set. + * @return This builder for chaining. + */ + public Builder setMaintainerBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + maintainer_ = value; + onChanged(); + return this; + } + + private java.lang.Object sentence_ = ""; + /** + *
+       * Value of the `sentence` field in library.properties.
+       * 
+ * + * string sentence = 4; + * @return The sentence. + */ + public java.lang.String getSentence() { + java.lang.Object ref = sentence_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sentence_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Value of the `sentence` field in library.properties.
+       * 
+ * + * string sentence = 4; + * @return The bytes for sentence. + */ + public com.google.protobuf.ByteString + getSentenceBytes() { + java.lang.Object ref = sentence_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sentence_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Value of the `sentence` field in library.properties.
+       * 
+ * + * string sentence = 4; + * @param value The sentence to set. + * @return This builder for chaining. + */ + public Builder setSentence( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sentence_ = value; + onChanged(); + return this; + } + /** + *
+       * Value of the `sentence` field in library.properties.
+       * 
+ * + * string sentence = 4; + * @return This builder for chaining. + */ + public Builder clearSentence() { + + sentence_ = getDefaultInstance().getSentence(); + onChanged(); + return this; + } + /** + *
+       * Value of the `sentence` field in library.properties.
+       * 
+ * + * string sentence = 4; + * @param value The bytes for sentence to set. + * @return This builder for chaining. + */ + public Builder setSentenceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sentence_ = value; + onChanged(); + return this; + } + + private java.lang.Object paragraph_ = ""; + /** + *
+       * Value of the `paragraph` field in library.properties.
+       * 
+ * + * string paragraph = 5; + * @return The paragraph. + */ + public java.lang.String getParagraph() { + java.lang.Object ref = paragraph_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + paragraph_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Value of the `paragraph` field in library.properties.
+       * 
+ * + * string paragraph = 5; + * @return The bytes for paragraph. + */ + public com.google.protobuf.ByteString + getParagraphBytes() { + java.lang.Object ref = paragraph_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + paragraph_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Value of the `paragraph` field in library.properties.
+       * 
+ * + * string paragraph = 5; + * @param value The paragraph to set. + * @return This builder for chaining. + */ + public Builder setParagraph( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + paragraph_ = value; + onChanged(); + return this; + } + /** + *
+       * Value of the `paragraph` field in library.properties.
+       * 
+ * + * string paragraph = 5; + * @return This builder for chaining. + */ + public Builder clearParagraph() { + + paragraph_ = getDefaultInstance().getParagraph(); + onChanged(); + return this; + } + /** + *
+       * Value of the `paragraph` field in library.properties.
+       * 
+ * + * string paragraph = 5; + * @param value The bytes for paragraph to set. + * @return This builder for chaining. + */ + public Builder setParagraphBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + paragraph_ = value; + onChanged(); + return this; + } + + private java.lang.Object website_ = ""; + /** + *
+       * Value of the `url` field in library.properties.
+       * 
+ * + * string website = 6; + * @return The website. + */ + public java.lang.String getWebsite() { + java.lang.Object ref = website_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + website_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Value of the `url` field in library.properties.
+       * 
+ * + * string website = 6; + * @return The bytes for website. + */ + public com.google.protobuf.ByteString + getWebsiteBytes() { + java.lang.Object ref = website_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + website_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Value of the `url` field in library.properties.
+       * 
+ * + * string website = 6; + * @param value The website to set. + * @return This builder for chaining. + */ + public Builder setWebsite( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + website_ = value; + onChanged(); + return this; + } + /** + *
+       * Value of the `url` field in library.properties.
+       * 
+ * + * string website = 6; + * @return This builder for chaining. + */ + public Builder clearWebsite() { + + website_ = getDefaultInstance().getWebsite(); + onChanged(); + return this; + } + /** + *
+       * Value of the `url` field in library.properties.
+       * 
+ * + * string website = 6; + * @param value The bytes for website to set. + * @return This builder for chaining. + */ + public Builder setWebsiteBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + website_ = value; + onChanged(); + return this; + } + + private java.lang.Object category_ = ""; + /** + *
+       * Value of the `category` field in library.properties.
+       * 
+ * + * string category = 7; + * @return The category. + */ + public java.lang.String getCategory() { + java.lang.Object ref = category_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + category_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Value of the `category` field in library.properties.
+       * 
+ * + * string category = 7; + * @return The bytes for category. + */ + public com.google.protobuf.ByteString + getCategoryBytes() { + java.lang.Object ref = category_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + category_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Value of the `category` field in library.properties.
+       * 
+ * + * string category = 7; + * @param value The category to set. + * @return This builder for chaining. + */ + public Builder setCategory( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + category_ = value; + onChanged(); + return this; + } + /** + *
+       * Value of the `category` field in library.properties.
+       * 
+ * + * string category = 7; + * @return This builder for chaining. + */ + public Builder clearCategory() { + + category_ = getDefaultInstance().getCategory(); + onChanged(); + return this; + } + /** + *
+       * Value of the `category` field in library.properties.
+       * 
+ * + * string category = 7; + * @param value The bytes for category to set. + * @return This builder for chaining. + */ + public Builder setCategoryBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + category_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList architectures_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureArchitecturesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + architectures_ = new com.google.protobuf.LazyStringArrayList(architectures_); + bitField0_ |= 0x00000001; + } + } + /** + *
+       * Value of the `architectures` field in library.properties.
+       * 
+ * + * repeated string architectures = 8; + * @return A list containing the architectures. + */ + public com.google.protobuf.ProtocolStringList + getArchitecturesList() { + return architectures_.getUnmodifiableView(); + } + /** + *
+       * Value of the `architectures` field in library.properties.
+       * 
+ * + * repeated string architectures = 8; + * @return The count of architectures. + */ + public int getArchitecturesCount() { + return architectures_.size(); + } + /** + *
+       * Value of the `architectures` field in library.properties.
+       * 
+ * + * repeated string architectures = 8; + * @param index The index of the element to return. + * @return The architectures at the given index. + */ + public java.lang.String getArchitectures(int index) { + return architectures_.get(index); + } + /** + *
+       * Value of the `architectures` field in library.properties.
+       * 
+ * + * repeated string architectures = 8; + * @param index The index of the value to return. + * @return The bytes of the architectures at the given index. + */ + public com.google.protobuf.ByteString + getArchitecturesBytes(int index) { + return architectures_.getByteString(index); + } + /** + *
+       * Value of the `architectures` field in library.properties.
+       * 
+ * + * repeated string architectures = 8; + * @param index The index to set the value at. + * @param value The architectures to set. + * @return This builder for chaining. + */ + public Builder setArchitectures( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureArchitecturesIsMutable(); + architectures_.set(index, value); + onChanged(); + return this; + } + /** + *
+       * Value of the `architectures` field in library.properties.
+       * 
+ * + * repeated string architectures = 8; + * @param value The architectures to add. + * @return This builder for chaining. + */ + public Builder addArchitectures( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureArchitecturesIsMutable(); + architectures_.add(value); + onChanged(); + return this; + } + /** + *
+       * Value of the `architectures` field in library.properties.
+       * 
+ * + * repeated string architectures = 8; + * @param values The architectures to add. + * @return This builder for chaining. + */ + public Builder addAllArchitectures( + java.lang.Iterable values) { + ensureArchitecturesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, architectures_); + onChanged(); + return this; + } + /** + *
+       * Value of the `architectures` field in library.properties.
+       * 
+ * + * repeated string architectures = 8; + * @return This builder for chaining. + */ + public Builder clearArchitectures() { + architectures_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+       * Value of the `architectures` field in library.properties.
+       * 
+ * + * repeated string architectures = 8; + * @param value The bytes of the architectures to add. + * @return This builder for chaining. + */ + public Builder addArchitecturesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureArchitecturesIsMutable(); + architectures_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList types_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureTypesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + types_ = new com.google.protobuf.LazyStringArrayList(types_); + bitField0_ |= 0x00000002; + } + } + /** + *
+       * The type categories of the library. Possible values: `Arduino`,
+       * `Partner`, `Recommended`, `Contributed`, `Retired`.
+       * 
+ * + * repeated string types = 9; + * @return A list containing the types. + */ + public com.google.protobuf.ProtocolStringList + getTypesList() { + return types_.getUnmodifiableView(); + } + /** + *
+       * The type categories of the library. Possible values: `Arduino`,
+       * `Partner`, `Recommended`, `Contributed`, `Retired`.
+       * 
+ * + * repeated string types = 9; + * @return The count of types. + */ + public int getTypesCount() { + return types_.size(); + } + /** + *
+       * The type categories of the library. Possible values: `Arduino`,
+       * `Partner`, `Recommended`, `Contributed`, `Retired`.
+       * 
+ * + * repeated string types = 9; + * @param index The index of the element to return. + * @return The types at the given index. + */ + public java.lang.String getTypes(int index) { + return types_.get(index); + } + /** + *
+       * The type categories of the library. Possible values: `Arduino`,
+       * `Partner`, `Recommended`, `Contributed`, `Retired`.
+       * 
+ * + * repeated string types = 9; + * @param index The index of the value to return. + * @return The bytes of the types at the given index. + */ + public com.google.protobuf.ByteString + getTypesBytes(int index) { + return types_.getByteString(index); + } + /** + *
+       * The type categories of the library. Possible values: `Arduino`,
+       * `Partner`, `Recommended`, `Contributed`, `Retired`.
+       * 
+ * + * repeated string types = 9; + * @param index The index to set the value at. + * @param value The types to set. + * @return This builder for chaining. + */ + public Builder setTypes( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypesIsMutable(); + types_.set(index, value); + onChanged(); + return this; + } + /** + *
+       * The type categories of the library. Possible values: `Arduino`,
+       * `Partner`, `Recommended`, `Contributed`, `Retired`.
+       * 
+ * + * repeated string types = 9; + * @param value The types to add. + * @return This builder for chaining. + */ + public Builder addTypes( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypesIsMutable(); + types_.add(value); + onChanged(); + return this; + } + /** + *
+       * The type categories of the library. Possible values: `Arduino`,
+       * `Partner`, `Recommended`, `Contributed`, `Retired`.
+       * 
+ * + * repeated string types = 9; + * @param values The types to add. + * @return This builder for chaining. + */ + public Builder addAllTypes( + java.lang.Iterable values) { + ensureTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, types_); + onChanged(); + return this; + } + /** + *
+       * The type categories of the library. Possible values: `Arduino`,
+       * `Partner`, `Recommended`, `Contributed`, `Retired`.
+       * 
+ * + * repeated string types = 9; + * @return This builder for chaining. + */ + public Builder clearTypes() { + types_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+       * The type categories of the library. Possible values: `Arduino`,
+       * `Partner`, `Recommended`, `Contributed`, `Retired`.
+       * 
+ * + * repeated string types = 9; + * @param value The bytes of the types to add. + * @return This builder for chaining. + */ + public Builder addTypesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTypesIsMutable(); + types_.add(value); + onChanged(); + return this; + } + + private java.lang.Object installDir_ = ""; + /** + *
+       * The path of the library directory.
+       * 
+ * + * string install_dir = 10; + * @return The installDir. + */ + public java.lang.String getInstallDir() { + java.lang.Object ref = installDir_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + installDir_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The path of the library directory.
+       * 
+ * + * string install_dir = 10; + * @return The bytes for installDir. + */ + public com.google.protobuf.ByteString + getInstallDirBytes() { + java.lang.Object ref = installDir_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + installDir_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The path of the library directory.
+       * 
+ * + * string install_dir = 10; + * @param value The installDir to set. + * @return This builder for chaining. + */ + public Builder setInstallDir( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + installDir_ = value; + onChanged(); + return this; + } + /** + *
+       * The path of the library directory.
+       * 
+ * + * string install_dir = 10; + * @return This builder for chaining. + */ + public Builder clearInstallDir() { + + installDir_ = getDefaultInstance().getInstallDir(); + onChanged(); + return this; + } + /** + *
+       * The path of the library directory.
+       * 
+ * + * string install_dir = 10; + * @param value The bytes for installDir to set. + * @return This builder for chaining. + */ + public Builder setInstallDirBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + installDir_ = value; + onChanged(); + return this; + } + + private java.lang.Object sourceDir_ = ""; + /** + *
+       * The location of the library's source files.
+       * 
+ * + * string source_dir = 11; + * @return The sourceDir. + */ + public java.lang.String getSourceDir() { + java.lang.Object ref = sourceDir_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceDir_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The location of the library's source files.
+       * 
+ * + * string source_dir = 11; + * @return The bytes for sourceDir. + */ + public com.google.protobuf.ByteString + getSourceDirBytes() { + java.lang.Object ref = sourceDir_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sourceDir_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The location of the library's source files.
+       * 
+ * + * string source_dir = 11; + * @param value The sourceDir to set. + * @return This builder for chaining. + */ + public Builder setSourceDir( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sourceDir_ = value; + onChanged(); + return this; + } + /** + *
+       * The location of the library's source files.
+       * 
+ * + * string source_dir = 11; + * @return This builder for chaining. + */ + public Builder clearSourceDir() { + + sourceDir_ = getDefaultInstance().getSourceDir(); + onChanged(); + return this; + } + /** + *
+       * The location of the library's source files.
+       * 
+ * + * string source_dir = 11; + * @param value The bytes for sourceDir to set. + * @return This builder for chaining. + */ + public Builder setSourceDirBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sourceDir_ = value; + onChanged(); + return this; + } + + private java.lang.Object utilityDir_ = ""; + /** + *
+       * The location of the library's `utility` directory.
+       * 
+ * + * string utility_dir = 12; + * @return The utilityDir. + */ + public java.lang.String getUtilityDir() { + java.lang.Object ref = utilityDir_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + utilityDir_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The location of the library's `utility` directory.
+       * 
+ * + * string utility_dir = 12; + * @return The bytes for utilityDir. + */ + public com.google.protobuf.ByteString + getUtilityDirBytes() { + java.lang.Object ref = utilityDir_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + utilityDir_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The location of the library's `utility` directory.
+       * 
+ * + * string utility_dir = 12; + * @param value The utilityDir to set. + * @return This builder for chaining. + */ + public Builder setUtilityDir( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + utilityDir_ = value; + onChanged(); + return this; + } + /** + *
+       * The location of the library's `utility` directory.
+       * 
+ * + * string utility_dir = 12; + * @return This builder for chaining. + */ + public Builder clearUtilityDir() { + + utilityDir_ = getDefaultInstance().getUtilityDir(); + onChanged(); + return this; + } + /** + *
+       * The location of the library's `utility` directory.
+       * 
+ * + * string utility_dir = 12; + * @param value The bytes for utilityDir to set. + * @return This builder for chaining. + */ + public Builder setUtilityDirBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + utilityDir_ = value; + onChanged(); + return this; + } + + private java.lang.Object containerPlatform_ = ""; + /** + *
+       * If `location` is `platform_builtin` or `referenced_platform_builtin`, the
+       * identifying string for the platform containing the library
+       * (e.g., `arduino:avr@1.8.2`).
+       * 
+ * + * string container_platform = 14; + * @return The containerPlatform. + */ + public java.lang.String getContainerPlatform() { + java.lang.Object ref = containerPlatform_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + containerPlatform_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * If `location` is `platform_builtin` or `referenced_platform_builtin`, the
+       * identifying string for the platform containing the library
+       * (e.g., `arduino:avr@1.8.2`).
+       * 
+ * + * string container_platform = 14; + * @return The bytes for containerPlatform. + */ + public com.google.protobuf.ByteString + getContainerPlatformBytes() { + java.lang.Object ref = containerPlatform_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerPlatform_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * If `location` is `platform_builtin` or `referenced_platform_builtin`, the
+       * identifying string for the platform containing the library
+       * (e.g., `arduino:avr@1.8.2`).
+       * 
+ * + * string container_platform = 14; + * @param value The containerPlatform to set. + * @return This builder for chaining. + */ + public Builder setContainerPlatform( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + containerPlatform_ = value; + onChanged(); + return this; + } + /** + *
+       * If `location` is `platform_builtin` or `referenced_platform_builtin`, the
+       * identifying string for the platform containing the library
+       * (e.g., `arduino:avr@1.8.2`).
+       * 
+ * + * string container_platform = 14; + * @return This builder for chaining. + */ + public Builder clearContainerPlatform() { + + containerPlatform_ = getDefaultInstance().getContainerPlatform(); + onChanged(); + return this; + } + /** + *
+       * If `location` is `platform_builtin` or `referenced_platform_builtin`, the
+       * identifying string for the platform containing the library
+       * (e.g., `arduino:avr@1.8.2`).
+       * 
+ * + * string container_platform = 14; + * @param value The bytes for containerPlatform to set. + * @return This builder for chaining. + */ + public Builder setContainerPlatformBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + containerPlatform_ = value; + onChanged(); + return this; + } + + private java.lang.Object realName_ = ""; + /** + *
+       * Value of the `name` field in library.properties.
+       * 
+ * + * string real_name = 16; + * @return The realName. + */ + public java.lang.String getRealName() { + java.lang.Object ref = realName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + realName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Value of the `name` field in library.properties.
+       * 
+ * + * string real_name = 16; + * @return The bytes for realName. + */ + public com.google.protobuf.ByteString + getRealNameBytes() { + java.lang.Object ref = realName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + realName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Value of the `name` field in library.properties.
+       * 
+ * + * string real_name = 16; + * @param value The realName to set. + * @return This builder for chaining. + */ + public Builder setRealName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + realName_ = value; + onChanged(); + return this; + } + /** + *
+       * Value of the `name` field in library.properties.
+       * 
+ * + * string real_name = 16; + * @return This builder for chaining. + */ + public Builder clearRealName() { + + realName_ = getDefaultInstance().getRealName(); + onChanged(); + return this; + } + /** + *
+       * Value of the `name` field in library.properties.
+       * 
+ * + * string real_name = 16; + * @param value The bytes for realName to set. + * @return This builder for chaining. + */ + public Builder setRealNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + realName_ = value; + onChanged(); + return this; + } + + private boolean dotALinkage_ ; + /** + *
+       * Value of the `dot_a_linkage` field in library.properties.
+       * 
+ * + * bool dot_a_linkage = 17; + * @return The dotALinkage. + */ + public boolean getDotALinkage() { + return dotALinkage_; + } + /** + *
+       * Value of the `dot_a_linkage` field in library.properties.
+       * 
+ * + * bool dot_a_linkage = 17; + * @param value The dotALinkage to set. + * @return This builder for chaining. + */ + public Builder setDotALinkage(boolean value) { + + dotALinkage_ = value; + onChanged(); + return this; + } + /** + *
+       * Value of the `dot_a_linkage` field in library.properties.
+       * 
+ * + * bool dot_a_linkage = 17; + * @return This builder for chaining. + */ + public Builder clearDotALinkage() { + + dotALinkage_ = false; + onChanged(); + return this; + } + + private boolean precompiled_ ; + /** + *
+       * Value of the `precompiled` field in library.properties.
+       * 
+ * + * bool precompiled = 18; + * @return The precompiled. + */ + public boolean getPrecompiled() { + return precompiled_; + } + /** + *
+       * Value of the `precompiled` field in library.properties.
+       * 
+ * + * bool precompiled = 18; + * @param value The precompiled to set. + * @return This builder for chaining. + */ + public Builder setPrecompiled(boolean value) { + + precompiled_ = value; + onChanged(); + return this; + } + /** + *
+       * Value of the `precompiled` field in library.properties.
+       * 
+ * + * bool precompiled = 18; + * @return This builder for chaining. + */ + public Builder clearPrecompiled() { + + precompiled_ = false; + onChanged(); + return this; + } + + private java.lang.Object ldFlags_ = ""; + /** + *
+       * Value of the `ldflags` field in library.properties.
+       * 
+ * + * string ld_flags = 19; + * @return The ldFlags. + */ + public java.lang.String getLdFlags() { + java.lang.Object ref = ldFlags_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ldFlags_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Value of the `ldflags` field in library.properties.
+       * 
+ * + * string ld_flags = 19; + * @return The bytes for ldFlags. + */ + public com.google.protobuf.ByteString + getLdFlagsBytes() { + java.lang.Object ref = ldFlags_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ldFlags_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Value of the `ldflags` field in library.properties.
+       * 
+ * + * string ld_flags = 19; + * @param value The ldFlags to set. + * @return This builder for chaining. + */ + public Builder setLdFlags( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + ldFlags_ = value; + onChanged(); + return this; + } + /** + *
+       * Value of the `ldflags` field in library.properties.
+       * 
+ * + * string ld_flags = 19; + * @return This builder for chaining. + */ + public Builder clearLdFlags() { + + ldFlags_ = getDefaultInstance().getLdFlags(); + onChanged(); + return this; + } + /** + *
+       * Value of the `ldflags` field in library.properties.
+       * 
+ * + * string ld_flags = 19; + * @param value The bytes for ldFlags to set. + * @return This builder for chaining. + */ + public Builder setLdFlagsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + ldFlags_ = value; + onChanged(); + return this; + } + + private boolean isLegacy_ ; + /** + *
+       * A library.properties file is not present in the library's root directory.
+       * 
+ * + * bool is_legacy = 20; + * @return The isLegacy. + */ + public boolean getIsLegacy() { + return isLegacy_; + } + /** + *
+       * A library.properties file is not present in the library's root directory.
+       * 
+ * + * bool is_legacy = 20; + * @param value The isLegacy to set. + * @return This builder for chaining. + */ + public Builder setIsLegacy(boolean value) { + + isLegacy_ = value; + onChanged(); + return this; + } + /** + *
+       * A library.properties file is not present in the library's root directory.
+       * 
+ * + * bool is_legacy = 20; + * @return This builder for chaining. + */ + public Builder clearIsLegacy() { + + isLegacy_ = false; + onChanged(); + return this; + } + + private java.lang.Object version_ = ""; + /** + *
+       * Value of the `version` field in library.properties.
+       * 
+ * + * string version = 21; + * @return The version. + */ + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + version_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Value of the `version` field in library.properties.
+       * 
+ * + * string version = 21; + * @return The bytes for version. + */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Value of the `version` field in library.properties.
+       * 
+ * + * string version = 21; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + *
+       * Value of the `version` field in library.properties.
+       * 
+ * + * string version = 21; + * @return This builder for chaining. + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + *
+       * Value of the `version` field in library.properties.
+       * 
+ * + * string version = 21; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = value; + onChanged(); + return this; + } + + private java.lang.Object license_ = ""; + /** + *
+       * Value of the `license` field in library.properties.
+       * 
+ * + * string license = 22; + * @return The license. + */ + public java.lang.String getLicense() { + java.lang.Object ref = license_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + license_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Value of the `license` field in library.properties.
+       * 
+ * + * string license = 22; + * @return The bytes for license. + */ + public com.google.protobuf.ByteString + getLicenseBytes() { + java.lang.Object ref = license_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + license_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Value of the `license` field in library.properties.
+       * 
+ * + * string license = 22; + * @param value The license to set. + * @return This builder for chaining. + */ + public Builder setLicense( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + license_ = value; + onChanged(); + return this; + } + /** + *
+       * Value of the `license` field in library.properties.
+       * 
+ * + * string license = 22; + * @return This builder for chaining. + */ + public Builder clearLicense() { + + license_ = getDefaultInstance().getLicense(); + onChanged(); + return this; + } + /** + *
+       * Value of the `license` field in library.properties.
+       * 
+ * + * string license = 22; + * @param value The bytes for license to set. + * @return This builder for chaining. + */ + public Builder setLicenseBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + license_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> properties_; + private com.google.protobuf.MapField + internalGetProperties() { + if (properties_ == null) { + return com.google.protobuf.MapField.emptyMapField( + PropertiesDefaultEntryHolder.defaultEntry); + } + return properties_; + } + private com.google.protobuf.MapField + internalGetMutableProperties() { + onChanged();; + if (properties_ == null) { + properties_ = com.google.protobuf.MapField.newMapField( + PropertiesDefaultEntryHolder.defaultEntry); + } + if (!properties_.isMutable()) { + properties_ = properties_.copy(); + } + return properties_; + } + + public int getPropertiesCount() { + return internalGetProperties().getMap().size(); + } + /** + *
+       * The data from the library's library.properties file, including unused
+       * fields.
+       * 
+ * + * map<string, string> properties = 23; + */ + + public boolean containsProperties( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetProperties().getMap().containsKey(key); + } + /** + * Use {@link #getPropertiesMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getProperties() { + return getPropertiesMap(); + } + /** + *
+       * The data from the library's library.properties file, including unused
+       * fields.
+       * 
+ * + * map<string, string> properties = 23; + */ + + public java.util.Map getPropertiesMap() { + return internalGetProperties().getMap(); + } + /** + *
+       * The data from the library's library.properties file, including unused
+       * fields.
+       * 
+ * + * map<string, string> properties = 23; + */ + + public java.lang.String getPropertiesOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetProperties().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+       * The data from the library's library.properties file, including unused
+       * fields.
+       * 
+ * + * map<string, string> properties = 23; + */ + + public java.lang.String getPropertiesOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetProperties().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearProperties() { + internalGetMutableProperties().getMutableMap() + .clear(); + return this; + } + /** + *
+       * The data from the library's library.properties file, including unused
+       * fields.
+       * 
+ * + * map<string, string> properties = 23; + */ + + public Builder removeProperties( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableProperties().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableProperties() { + return internalGetMutableProperties().getMutableMap(); + } + /** + *
+       * The data from the library's library.properties file, including unused
+       * fields.
+       * 
+ * + * map<string, string> properties = 23; + */ + public Builder putProperties( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableProperties().getMutableMap() + .put(key, value); + return this; + } + /** + *
+       * The data from the library's library.properties file, including unused
+       * fields.
+       * 
+ * + * map<string, string> properties = 23; + */ + + public Builder putAllProperties( + java.util.Map values) { + internalGetMutableProperties().getMutableMap() + .putAll(values); + return this; + } + + private int location_ = 0; + /** + *
+       * The location type of the library installation.
+       * 
+ * + * .cc.arduino.cli.commands.LibraryLocation location = 24; + * @return The enum numeric value on the wire for location. + */ + public int getLocationValue() { + return location_; + } + /** + *
+       * The location type of the library installation.
+       * 
+ * + * .cc.arduino.cli.commands.LibraryLocation location = 24; + * @param value The enum numeric value on the wire for location to set. + * @return This builder for chaining. + */ + public Builder setLocationValue(int value) { + location_ = value; + onChanged(); + return this; + } + /** + *
+       * The location type of the library installation.
+       * 
+ * + * .cc.arduino.cli.commands.LibraryLocation location = 24; + * @return The location. + */ + public cc.arduino.cli.commands.Lib.LibraryLocation getLocation() { + @SuppressWarnings("deprecation") + cc.arduino.cli.commands.Lib.LibraryLocation result = cc.arduino.cli.commands.Lib.LibraryLocation.valueOf(location_); + return result == null ? cc.arduino.cli.commands.Lib.LibraryLocation.UNRECOGNIZED : result; + } + /** + *
+       * The location type of the library installation.
+       * 
+ * + * .cc.arduino.cli.commands.LibraryLocation location = 24; + * @param value The location to set. + * @return This builder for chaining. + */ + public Builder setLocation(cc.arduino.cli.commands.Lib.LibraryLocation value) { + if (value == null) { + throw new NullPointerException(); + } + + location_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * The location type of the library installation.
+       * 
+ * + * .cc.arduino.cli.commands.LibraryLocation location = 24; + * @return This builder for chaining. + */ + public Builder clearLocation() { + + location_ = 0; + onChanged(); + return this; + } + + private int layout_ = 0; + /** + *
+       * The library format type.
+       * 
+ * + * .cc.arduino.cli.commands.LibraryLayout layout = 25; + * @return The enum numeric value on the wire for layout. + */ + public int getLayoutValue() { + return layout_; + } + /** + *
+       * The library format type.
+       * 
+ * + * .cc.arduino.cli.commands.LibraryLayout layout = 25; + * @param value The enum numeric value on the wire for layout to set. + * @return This builder for chaining. + */ + public Builder setLayoutValue(int value) { + layout_ = value; + onChanged(); + return this; + } + /** + *
+       * The library format type.
+       * 
+ * + * .cc.arduino.cli.commands.LibraryLayout layout = 25; + * @return The layout. + */ + public cc.arduino.cli.commands.Lib.LibraryLayout getLayout() { + @SuppressWarnings("deprecation") + cc.arduino.cli.commands.Lib.LibraryLayout result = cc.arduino.cli.commands.Lib.LibraryLayout.valueOf(layout_); + return result == null ? cc.arduino.cli.commands.Lib.LibraryLayout.UNRECOGNIZED : result; + } + /** + *
+       * The library format type.
+       * 
+ * + * .cc.arduino.cli.commands.LibraryLayout layout = 25; + * @param value The layout to set. + * @return This builder for chaining. + */ + public Builder setLayout(cc.arduino.cli.commands.Lib.LibraryLayout value) { + if (value == null) { + throw new NullPointerException(); + } + + layout_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+       * The library format type.
+       * 
+ * + * .cc.arduino.cli.commands.LibraryLayout layout = 25; + * @return This builder for chaining. + */ + public Builder clearLayout() { + + layout_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.Library) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.Library) + private static final cc.arduino.cli.commands.Lib.Library DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Lib.Library(); + } + + public static cc.arduino.cli.commands.Lib.Library getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Library parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Library(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Lib.Library getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_LibraryDownloadReq_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_LibraryDownloadReq_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_LibraryDownloadResp_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_LibraryDownloadResp_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_LibraryInstallReq_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_LibraryInstallReq_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_LibraryInstallResp_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_LibraryInstallResp_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_LibraryUninstallReq_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_LibraryUninstallReq_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_LibraryUninstallResp_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_LibraryUninstallResp_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_LibraryUpgradeAllReq_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_LibraryUpgradeAllReq_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_LibraryUpgradeAllResp_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_LibraryUpgradeAllResp_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_LibraryResolveDependenciesReq_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_LibraryResolveDependenciesReq_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_LibraryResolveDependenciesResp_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_LibraryResolveDependenciesResp_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_LibraryDependencyStatus_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_LibraryDependencyStatus_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_LibrarySearchReq_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_LibrarySearchReq_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_LibrarySearchResp_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_LibrarySearchResp_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_SearchedLibrary_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_SearchedLibrary_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_SearchedLibrary_ReleasesEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_SearchedLibrary_ReleasesEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_LibraryRelease_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_LibraryRelease_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_LibraryDependency_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_LibraryDependency_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_DownloadResource_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_DownloadResource_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_LibraryListReq_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_LibraryListReq_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_LibraryListResp_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_LibraryListResp_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_InstalledLibrary_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_InstalledLibrary_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_Library_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_Library_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_Library_PropertiesEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_Library_PropertiesEntry_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\022commands/lib.proto\022\027cc.arduino.cli.com" + + "mands\032\025commands/common.proto\"h\n\022LibraryD" + + "ownloadReq\0223\n\010instance\030\001 \001(\0132!.cc.arduin" + + "o.cli.commands.Instance\022\014\n\004name\030\002 \001(\t\022\017\n" + + "\007version\030\003 \001(\t\"R\n\023LibraryDownloadResp\022;\n" + + "\010progress\030\001 \001(\0132).cc.arduino.cli.command" + + "s.DownloadProgress\"g\n\021LibraryInstallReq\022" + + "3\n\010instance\030\001 \001(\0132!.cc.arduino.cli.comma" + + "nds.Instance\022\014\n\004name\030\002 \001(\t\022\017\n\007version\030\003 " + + "\001(\t\"\217\001\n\022LibraryInstallResp\022;\n\010progress\030\001" + + " \001(\0132).cc.arduino.cli.commands.DownloadP" + + "rogress\022<\n\rtask_progress\030\002 \001(\0132%.cc.ardu" + + "ino.cli.commands.TaskProgress\"i\n\023Library" + + "UninstallReq\0223\n\010instance\030\001 \001(\0132!.cc.ardu" + + "ino.cli.commands.Instance\022\014\n\004name\030\002 \001(\t\022" + + "\017\n\007version\030\003 \001(\t\"T\n\024LibraryUninstallResp" + + "\022<\n\rtask_progress\030\001 \001(\0132%.cc.arduino.cli" + + ".commands.TaskProgress\"K\n\024LibraryUpgrade" + + "AllReq\0223\n\010instance\030\001 \001(\0132!.cc.arduino.cl" + + "i.commands.Instance\"\222\001\n\025LibraryUpgradeAl" + + "lResp\022;\n\010progress\030\001 \001(\0132).cc.arduino.cli" + + ".commands.DownloadProgress\022<\n\rtask_progr" + + "ess\030\002 \001(\0132%.cc.arduino.cli.commands.Task" + + "Progress\"s\n\035LibraryResolveDependenciesRe" + + "q\0223\n\010instance\030\001 \001(\0132!.cc.arduino.cli.com" + + "mands.Instance\022\014\n\004name\030\002 \001(\t\022\017\n\007version\030" + + "\003 \001(\t\"h\n\036LibraryResolveDependenciesResp\022" + + "F\n\014dependencies\030\001 \003(\01320.cc.arduino.cli.c" + + "ommands.LibraryDependencyStatus\"Z\n\027Libra" + + "ryDependencyStatus\022\014\n\004name\030\001 \001(\t\022\027\n\017vers" + + "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\"\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, + new com.google.protobuf.Descriptors.FileDescriptor[] { + cc.arduino.cli.commands.Common.getDescriptor(), + }); + internal_static_cc_arduino_cli_commands_LibraryDownloadReq_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_cc_arduino_cli_commands_LibraryDownloadReq_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_LibraryDownloadReq_descriptor, + new java.lang.String[] { "Instance", "Name", "Version", }); + internal_static_cc_arduino_cli_commands_LibraryDownloadResp_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_cc_arduino_cli_commands_LibraryDownloadResp_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_LibraryDownloadResp_descriptor, + new java.lang.String[] { "Progress", }); + internal_static_cc_arduino_cli_commands_LibraryInstallReq_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_cc_arduino_cli_commands_LibraryInstallReq_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_LibraryInstallReq_descriptor, + new java.lang.String[] { "Instance", "Name", "Version", }); + internal_static_cc_arduino_cli_commands_LibraryInstallResp_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_cc_arduino_cli_commands_LibraryInstallResp_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_LibraryInstallResp_descriptor, + new java.lang.String[] { "Progress", "TaskProgress", }); + internal_static_cc_arduino_cli_commands_LibraryUninstallReq_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_cc_arduino_cli_commands_LibraryUninstallReq_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_LibraryUninstallReq_descriptor, + new java.lang.String[] { "Instance", "Name", "Version", }); + internal_static_cc_arduino_cli_commands_LibraryUninstallResp_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_cc_arduino_cli_commands_LibraryUninstallResp_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_LibraryUninstallResp_descriptor, + new java.lang.String[] { "TaskProgress", }); + internal_static_cc_arduino_cli_commands_LibraryUpgradeAllReq_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_cc_arduino_cli_commands_LibraryUpgradeAllReq_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_LibraryUpgradeAllReq_descriptor, + new java.lang.String[] { "Instance", }); + internal_static_cc_arduino_cli_commands_LibraryUpgradeAllResp_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_cc_arduino_cli_commands_LibraryUpgradeAllResp_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_LibraryUpgradeAllResp_descriptor, + new java.lang.String[] { "Progress", "TaskProgress", }); + internal_static_cc_arduino_cli_commands_LibraryResolveDependenciesReq_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_cc_arduino_cli_commands_LibraryResolveDependenciesReq_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_LibraryResolveDependenciesReq_descriptor, + new java.lang.String[] { "Instance", "Name", "Version", }); + internal_static_cc_arduino_cli_commands_LibraryResolveDependenciesResp_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_cc_arduino_cli_commands_LibraryResolveDependenciesResp_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_LibraryResolveDependenciesResp_descriptor, + new java.lang.String[] { "Dependencies", }); + internal_static_cc_arduino_cli_commands_LibraryDependencyStatus_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_cc_arduino_cli_commands_LibraryDependencyStatus_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_LibraryDependencyStatus_descriptor, + new java.lang.String[] { "Name", "VersionRequired", "VersionInstalled", }); + internal_static_cc_arduino_cli_commands_LibrarySearchReq_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_cc_arduino_cli_commands_LibrarySearchReq_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_LibrarySearchReq_descriptor, + new java.lang.String[] { "Instance", "Query", }); + internal_static_cc_arduino_cli_commands_LibrarySearchResp_descriptor = + getDescriptor().getMessageTypes().get(12); + 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", "Status", }); + internal_static_cc_arduino_cli_commands_SearchedLibrary_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_cc_arduino_cli_commands_SearchedLibrary_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_SearchedLibrary_descriptor, + new java.lang.String[] { "Name", "Releases", "Latest", }); + internal_static_cc_arduino_cli_commands_SearchedLibrary_ReleasesEntry_descriptor = + internal_static_cc_arduino_cli_commands_SearchedLibrary_descriptor.getNestedTypes().get(0); + internal_static_cc_arduino_cli_commands_SearchedLibrary_ReleasesEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_SearchedLibrary_ReleasesEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_cc_arduino_cli_commands_LibraryRelease_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_cc_arduino_cli_commands_LibraryRelease_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_LibraryRelease_descriptor, + new java.lang.String[] { "Author", "Version", "Maintainer", "Sentence", "Paragraph", "Website", "Category", "Architectures", "Types", "Resources", "License", "ProvidesIncludes", "Dependencies", }); + internal_static_cc_arduino_cli_commands_LibraryDependency_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_cc_arduino_cli_commands_LibraryDependency_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_LibraryDependency_descriptor, + new java.lang.String[] { "Name", "VersionConstraint", }); + internal_static_cc_arduino_cli_commands_DownloadResource_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_cc_arduino_cli_commands_DownloadResource_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_DownloadResource_descriptor, + new java.lang.String[] { "Url", "Archivefilename", "Checksum", "Size", "Cachepath", }); + internal_static_cc_arduino_cli_commands_LibraryListReq_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_cc_arduino_cli_commands_LibraryListReq_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_LibraryListReq_descriptor, + new java.lang.String[] { "Instance", "All", "Updatable", }); + internal_static_cc_arduino_cli_commands_LibraryListResp_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_cc_arduino_cli_commands_LibraryListResp_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_LibraryListResp_descriptor, + new java.lang.String[] { "InstalledLibrary", }); + internal_static_cc_arduino_cli_commands_InstalledLibrary_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_cc_arduino_cli_commands_InstalledLibrary_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_InstalledLibrary_descriptor, + new java.lang.String[] { "Library", "Release", }); + internal_static_cc_arduino_cli_commands_Library_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_cc_arduino_cli_commands_Library_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_Library_descriptor, + new java.lang.String[] { "Name", "Author", "Maintainer", "Sentence", "Paragraph", "Website", "Category", "Architectures", "Types", "InstallDir", "SourceDir", "UtilityDir", "ContainerPlatform", "RealName", "DotALinkage", "Precompiled", "LdFlags", "IsLegacy", "Version", "License", "Properties", "Location", "Layout", }); + internal_static_cc_arduino_cli_commands_Library_PropertiesEntry_descriptor = + internal_static_cc_arduino_cli_commands_Library_descriptor.getNestedTypes().get(0); + internal_static_cc_arduino_cli_commands_Library_PropertiesEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_Library_PropertiesEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + cc.arduino.cli.commands.Common.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/arduino-core/src/cc/arduino/cli/commands/Upload.java b/arduino-core/src/cc/arduino/cli/commands/Upload.java new file mode 100644 index 00000000000..9940c0d5e70 --- /dev/null +++ b/arduino-core/src/cc/arduino/cli/commands/Upload.java @@ -0,0 +1,7142 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: commands/upload.proto + +package cc.arduino.cli.commands; + +public final class Upload { + private Upload() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface UploadReqOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.UploadReq) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + boolean hasInstance(); + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + cc.arduino.cli.commands.Common.Instance getInstance(); + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder(); + + /** + *
+     * Fully qualified board name of the target board (e.g., `arduino:avr:uno`).
+     * If this field is not defined, the FQBN of the board attached to the sketch
+     * via the `BoardAttach` method is used.
+     * 
+ * + * string fqbn = 2; + * @return The fqbn. + */ + java.lang.String getFqbn(); + /** + *
+     * Fully qualified board name of the target board (e.g., `arduino:avr:uno`).
+     * If this field is not defined, the FQBN of the board attached to the sketch
+     * via the `BoardAttach` method is used.
+     * 
+ * + * string fqbn = 2; + * @return The bytes for fqbn. + */ + com.google.protobuf.ByteString + getFqbnBytes(); + + /** + *
+     * Path where the sketch to be uploaded is stored. Unless the `import_file`
+     * field is defined, the compiled binary is assumed to be at the location and
+     * filename under this path where it is saved by the `Compile` method.
+     * 
+ * + * string sketch_path = 3; + * @return The sketchPath. + */ + java.lang.String getSketchPath(); + /** + *
+     * Path where the sketch to be uploaded is stored. Unless the `import_file`
+     * field is defined, the compiled binary is assumed to be at the location and
+     * filename under this path where it is saved by the `Compile` method.
+     * 
+ * + * string sketch_path = 3; + * @return The bytes for sketchPath. + */ + com.google.protobuf.ByteString + getSketchPathBytes(); + + /** + *
+     * The port of the board.
+     * 
+ * + * string port = 4; + * @return The port. + */ + java.lang.String getPort(); + /** + *
+     * The port of the board.
+     * 
+ * + * string port = 4; + * @return The bytes for port. + */ + com.google.protobuf.ByteString + getPortBytes(); + + /** + *
+     * Whether to turn on verbose output during the upload.
+     * 
+ * + * bool verbose = 5; + * @return The verbose. + */ + boolean getVerbose(); + + /** + *
+     * After upload, verify that the contents of the memory on the board match the
+     * uploaded binary.
+     * 
+ * + * bool verify = 6; + * @return The verify. + */ + boolean getVerify(); + + /** + *
+     * DEPRECATED: Use import_dir instead
+     * 
+ * + * string import_file = 7 [deprecated = true]; + * @return The importFile. + */ + @java.lang.Deprecated java.lang.String getImportFile(); + /** + *
+     * DEPRECATED: Use import_dir instead
+     * 
+ * + * string import_file = 7 [deprecated = true]; + * @return The bytes for importFile. + */ + @java.lang.Deprecated com.google.protobuf.ByteString + getImportFileBytes(); + + /** + *
+     * Custom path to a directory containing compiled files. When `import_dir` is
+     * not specified, the standard build directory under `sketch_path` is used.
+     * 
+ * + * string import_dir = 8; + * @return The importDir. + */ + java.lang.String getImportDir(); + /** + *
+     * Custom path to a directory containing compiled files. When `import_dir` is
+     * not specified, the standard build directory under `sketch_path` is used.
+     * 
+ * + * string import_dir = 8; + * @return The bytes for importDir. + */ + com.google.protobuf.ByteString + getImportDirBytes(); + + /** + * string programmer = 9; + * @return The programmer. + */ + java.lang.String getProgrammer(); + /** + * string programmer = 9; + * @return The bytes for programmer. + */ + com.google.protobuf.ByteString + getProgrammerBytes(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.UploadReq} + */ + public static final class UploadReq extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.UploadReq) + UploadReqOrBuilder { + private static final long serialVersionUID = 0L; + // Use UploadReq.newBuilder() to construct. + private UploadReq(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UploadReq() { + fqbn_ = ""; + sketchPath_ = ""; + port_ = ""; + importFile_ = ""; + importDir_ = ""; + programmer_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UploadReq(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private UploadReq( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cc.arduino.cli.commands.Common.Instance.Builder subBuilder = null; + if (instance_ != null) { + subBuilder = instance_.toBuilder(); + } + instance_ = input.readMessage(cc.arduino.cli.commands.Common.Instance.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instance_); + instance_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + fqbn_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + sketchPath_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + port_ = s; + break; + } + case 40: { + + verbose_ = input.readBool(); + break; + } + case 48: { + + verify_ = input.readBool(); + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + + importFile_ = s; + break; + } + case 66: { + java.lang.String s = input.readStringRequireUtf8(); + + importDir_ = s; + break; + } + case 74: { + java.lang.String s = input.readStringRequireUtf8(); + + programmer_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Upload.internal_static_cc_arduino_cli_commands_UploadReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Upload.internal_static_cc_arduino_cli_commands_UploadReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Upload.UploadReq.class, cc.arduino.cli.commands.Upload.UploadReq.Builder.class); + } + + public static final int INSTANCE_FIELD_NUMBER = 1; + private cc.arduino.cli.commands.Common.Instance instance_; + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instance_ != null; + } + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + return getInstance(); + } + + public static final int FQBN_FIELD_NUMBER = 2; + private volatile java.lang.Object fqbn_; + /** + *
+     * Fully qualified board name of the target board (e.g., `arduino:avr:uno`).
+     * If this field is not defined, the FQBN of the board attached to the sketch
+     * via the `BoardAttach` method is used.
+     * 
+ * + * string fqbn = 2; + * @return The fqbn. + */ + public java.lang.String getFqbn() { + java.lang.Object ref = fqbn_; + 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(); + fqbn_ = s; + return s; + } + } + /** + *
+     * Fully qualified board name of the target board (e.g., `arduino:avr:uno`).
+     * If this field is not defined, the FQBN of the board attached to the sketch
+     * via the `BoardAttach` method is used.
+     * 
+ * + * string fqbn = 2; + * @return The bytes for fqbn. + */ + public com.google.protobuf.ByteString + getFqbnBytes() { + java.lang.Object ref = fqbn_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fqbn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SKETCH_PATH_FIELD_NUMBER = 3; + private volatile java.lang.Object sketchPath_; + /** + *
+     * Path where the sketch to be uploaded is stored. Unless the `import_file`
+     * field is defined, the compiled binary is assumed to be at the location and
+     * filename under this path where it is saved by the `Compile` method.
+     * 
+ * + * string sketch_path = 3; + * @return The sketchPath. + */ + public java.lang.String getSketchPath() { + java.lang.Object ref = sketchPath_; + 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(); + sketchPath_ = s; + return s; + } + } + /** + *
+     * Path where the sketch to be uploaded is stored. Unless the `import_file`
+     * field is defined, the compiled binary is assumed to be at the location and
+     * filename under this path where it is saved by the `Compile` method.
+     * 
+ * + * string sketch_path = 3; + * @return The bytes for sketchPath. + */ + public com.google.protobuf.ByteString + getSketchPathBytes() { + java.lang.Object ref = sketchPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sketchPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PORT_FIELD_NUMBER = 4; + private volatile java.lang.Object port_; + /** + *
+     * The port of the board.
+     * 
+ * + * string port = 4; + * @return The port. + */ + public java.lang.String getPort() { + java.lang.Object ref = port_; + 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(); + port_ = s; + return s; + } + } + /** + *
+     * The port of the board.
+     * 
+ * + * string port = 4; + * @return The bytes for port. + */ + public com.google.protobuf.ByteString + getPortBytes() { + java.lang.Object ref = port_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + port_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERBOSE_FIELD_NUMBER = 5; + private boolean verbose_; + /** + *
+     * Whether to turn on verbose output during the upload.
+     * 
+ * + * bool verbose = 5; + * @return The verbose. + */ + public boolean getVerbose() { + return verbose_; + } + + public static final int VERIFY_FIELD_NUMBER = 6; + private boolean verify_; + /** + *
+     * After upload, verify that the contents of the memory on the board match the
+     * uploaded binary.
+     * 
+ * + * bool verify = 6; + * @return The verify. + */ + public boolean getVerify() { + return verify_; + } + + public static final int IMPORT_FILE_FIELD_NUMBER = 7; + private volatile java.lang.Object importFile_; + /** + *
+     * DEPRECATED: Use import_dir instead
+     * 
+ * + * string import_file = 7 [deprecated = true]; + * @return The importFile. + */ + @java.lang.Deprecated public java.lang.String getImportFile() { + java.lang.Object ref = importFile_; + 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(); + importFile_ = s; + return s; + } + } + /** + *
+     * DEPRECATED: Use import_dir instead
+     * 
+ * + * string import_file = 7 [deprecated = true]; + * @return The bytes for importFile. + */ + @java.lang.Deprecated public com.google.protobuf.ByteString + getImportFileBytes() { + java.lang.Object ref = importFile_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + importFile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMPORT_DIR_FIELD_NUMBER = 8; + private volatile java.lang.Object importDir_; + /** + *
+     * Custom path to a directory containing compiled files. When `import_dir` is
+     * not specified, the standard build directory under `sketch_path` is used.
+     * 
+ * + * string import_dir = 8; + * @return The importDir. + */ + public java.lang.String getImportDir() { + java.lang.Object ref = importDir_; + 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(); + importDir_ = s; + return s; + } + } + /** + *
+     * Custom path to a directory containing compiled files. When `import_dir` is
+     * not specified, the standard build directory under `sketch_path` is used.
+     * 
+ * + * string import_dir = 8; + * @return The bytes for importDir. + */ + public com.google.protobuf.ByteString + getImportDirBytes() { + java.lang.Object ref = importDir_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + importDir_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROGRAMMER_FIELD_NUMBER = 9; + private volatile java.lang.Object programmer_; + /** + * string programmer = 9; + * @return The programmer. + */ + public java.lang.String getProgrammer() { + java.lang.Object ref = programmer_; + 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(); + programmer_ = s; + return s; + } + } + /** + * string programmer = 9; + * @return The bytes for programmer. + */ + public com.google.protobuf.ByteString + getProgrammerBytes() { + java.lang.Object ref = programmer_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + programmer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (instance_ != null) { + output.writeMessage(1, getInstance()); + } + if (!getFqbnBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, fqbn_); + } + if (!getSketchPathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, sketchPath_); + } + if (!getPortBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, port_); + } + if (verbose_ != false) { + output.writeBool(5, verbose_); + } + if (verify_ != false) { + output.writeBool(6, verify_); + } + if (!getImportFileBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, importFile_); + } + if (!getImportDirBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, importDir_); + } + if (!getProgrammerBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, programmer_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (instance_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInstance()); + } + if (!getFqbnBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, fqbn_); + } + if (!getSketchPathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, sketchPath_); + } + if (!getPortBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, port_); + } + if (verbose_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, verbose_); + } + if (verify_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(6, verify_); + } + if (!getImportFileBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, importFile_); + } + if (!getImportDirBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, importDir_); + } + if (!getProgrammerBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, programmer_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Upload.UploadReq)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Upload.UploadReq other = (cc.arduino.cli.commands.Upload.UploadReq) obj; + + if (hasInstance() != other.hasInstance()) return false; + if (hasInstance()) { + if (!getInstance() + .equals(other.getInstance())) return false; + } + if (!getFqbn() + .equals(other.getFqbn())) return false; + if (!getSketchPath() + .equals(other.getSketchPath())) return false; + if (!getPort() + .equals(other.getPort())) return false; + if (getVerbose() + != other.getVerbose()) return false; + if (getVerify() + != other.getVerify()) return false; + if (!getImportFile() + .equals(other.getImportFile())) return false; + if (!getImportDir() + .equals(other.getImportDir())) return false; + if (!getProgrammer() + .equals(other.getProgrammer())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInstance()) { + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + } + hash = (37 * hash) + FQBN_FIELD_NUMBER; + hash = (53 * hash) + getFqbn().hashCode(); + hash = (37 * hash) + SKETCH_PATH_FIELD_NUMBER; + hash = (53 * hash) + getSketchPath().hashCode(); + hash = (37 * hash) + PORT_FIELD_NUMBER; + hash = (53 * hash) + getPort().hashCode(); + hash = (37 * hash) + VERBOSE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getVerbose()); + hash = (37 * hash) + VERIFY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getVerify()); + hash = (37 * hash) + IMPORT_FILE_FIELD_NUMBER; + hash = (53 * hash) + getImportFile().hashCode(); + hash = (37 * hash) + IMPORT_DIR_FIELD_NUMBER; + hash = (53 * hash) + getImportDir().hashCode(); + hash = (37 * hash) + PROGRAMMER_FIELD_NUMBER; + hash = (53 * hash) + getProgrammer().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Upload.UploadReq parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Upload.UploadReq parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Upload.UploadReq parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Upload.UploadReq parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Upload.UploadReq parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Upload.UploadReq parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Upload.UploadReq parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Upload.UploadReq parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Upload.UploadReq parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Upload.UploadReq parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Upload.UploadReq parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Upload.UploadReq parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Upload.UploadReq 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.UploadReq} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.UploadReq) + cc.arduino.cli.commands.Upload.UploadReqOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Upload.internal_static_cc_arduino_cli_commands_UploadReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Upload.internal_static_cc_arduino_cli_commands_UploadReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Upload.UploadReq.class, cc.arduino.cli.commands.Upload.UploadReq.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Upload.UploadReq.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (instanceBuilder_ == null) { + instance_ = null; + } else { + instance_ = null; + instanceBuilder_ = null; + } + fqbn_ = ""; + + sketchPath_ = ""; + + port_ = ""; + + verbose_ = false; + + verify_ = false; + + importFile_ = ""; + + importDir_ = ""; + + programmer_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Upload.internal_static_cc_arduino_cli_commands_UploadReq_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Upload.UploadReq getDefaultInstanceForType() { + return cc.arduino.cli.commands.Upload.UploadReq.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Upload.UploadReq build() { + cc.arduino.cli.commands.Upload.UploadReq result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Upload.UploadReq buildPartial() { + cc.arduino.cli.commands.Upload.UploadReq result = new cc.arduino.cli.commands.Upload.UploadReq(this); + if (instanceBuilder_ == null) { + result.instance_ = instance_; + } else { + result.instance_ = instanceBuilder_.build(); + } + result.fqbn_ = fqbn_; + result.sketchPath_ = sketchPath_; + result.port_ = port_; + result.verbose_ = verbose_; + result.verify_ = verify_; + result.importFile_ = importFile_; + result.importDir_ = importDir_; + result.programmer_ = programmer_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Upload.UploadReq) { + return mergeFrom((cc.arduino.cli.commands.Upload.UploadReq)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Upload.UploadReq other) { + if (other == cc.arduino.cli.commands.Upload.UploadReq.getDefaultInstance()) return this; + if (other.hasInstance()) { + mergeInstance(other.getInstance()); + } + if (!other.getFqbn().isEmpty()) { + fqbn_ = other.fqbn_; + onChanged(); + } + if (!other.getSketchPath().isEmpty()) { + sketchPath_ = other.sketchPath_; + onChanged(); + } + if (!other.getPort().isEmpty()) { + port_ = other.port_; + onChanged(); + } + if (other.getVerbose() != false) { + setVerbose(other.getVerbose()); + } + if (other.getVerify() != false) { + setVerify(other.getVerify()); + } + if (!other.getImportFile().isEmpty()) { + importFile_ = other.importFile_; + onChanged(); + } + if (!other.getImportDir().isEmpty()) { + importDir_ = other.importDir_; + onChanged(); + } + if (!other.getProgrammer().isEmpty()) { + programmer_ = other.programmer_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Upload.UploadReq parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Upload.UploadReq) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private cc.arduino.cli.commands.Common.Instance instance_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> instanceBuilder_; + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instanceBuilder_ != null || instance_ != null; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + if (instanceBuilder_ == null) { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } else { + return instanceBuilder_.getMessage(); + } + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + onChanged(); + } else { + instanceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance( + cc.arduino.cli.commands.Common.Instance.Builder builderForValue) { + if (instanceBuilder_ == null) { + instance_ = builderForValue.build(); + onChanged(); + } else { + instanceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder mergeInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (instance_ != null) { + instance_ = + cc.arduino.cli.commands.Common.Instance.newBuilder(instance_).mergeFrom(value).buildPartial(); + } else { + instance_ = value; + } + onChanged(); + } else { + instanceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder clearInstance() { + if (instanceBuilder_ == null) { + instance_ = null; + onChanged(); + } else { + instance_ = null; + instanceBuilder_ = null; + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.Instance.Builder getInstanceBuilder() { + + onChanged(); + return getInstanceFieldBuilder().getBuilder(); + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + if (instanceBuilder_ != null) { + return instanceBuilder_.getMessageOrBuilder(); + } else { + return instance_ == null ? + cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> + getInstanceFieldBuilder() { + if (instanceBuilder_ == null) { + instanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder>( + getInstance(), + getParentForChildren(), + isClean()); + instance_ = null; + } + return instanceBuilder_; + } + + private java.lang.Object fqbn_ = ""; + /** + *
+       * Fully qualified board name of the target board (e.g., `arduino:avr:uno`).
+       * If this field is not defined, the FQBN of the board attached to the sketch
+       * via the `BoardAttach` method is used.
+       * 
+ * + * string fqbn = 2; + * @return The fqbn. + */ + public java.lang.String getFqbn() { + java.lang.Object ref = fqbn_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fqbn_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Fully qualified board name of the target board (e.g., `arduino:avr:uno`).
+       * If this field is not defined, the FQBN of the board attached to the sketch
+       * via the `BoardAttach` method is used.
+       * 
+ * + * string fqbn = 2; + * @return The bytes for fqbn. + */ + public com.google.protobuf.ByteString + getFqbnBytes() { + java.lang.Object ref = fqbn_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fqbn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Fully qualified board name of the target board (e.g., `arduino:avr:uno`).
+       * If this field is not defined, the FQBN of the board attached to the sketch
+       * via the `BoardAttach` method is used.
+       * 
+ * + * string fqbn = 2; + * @param value The fqbn to set. + * @return This builder for chaining. + */ + public Builder setFqbn( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + fqbn_ = value; + onChanged(); + return this; + } + /** + *
+       * Fully qualified board name of the target board (e.g., `arduino:avr:uno`).
+       * If this field is not defined, the FQBN of the board attached to the sketch
+       * via the `BoardAttach` method is used.
+       * 
+ * + * string fqbn = 2; + * @return This builder for chaining. + */ + public Builder clearFqbn() { + + fqbn_ = getDefaultInstance().getFqbn(); + onChanged(); + return this; + } + /** + *
+       * Fully qualified board name of the target board (e.g., `arduino:avr:uno`).
+       * If this field is not defined, the FQBN of the board attached to the sketch
+       * via the `BoardAttach` method is used.
+       * 
+ * + * string fqbn = 2; + * @param value The bytes for fqbn to set. + * @return This builder for chaining. + */ + public Builder setFqbnBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + fqbn_ = value; + onChanged(); + return this; + } + + private java.lang.Object sketchPath_ = ""; + /** + *
+       * Path where the sketch to be uploaded is stored. Unless the `import_file`
+       * field is defined, the compiled binary is assumed to be at the location and
+       * filename under this path where it is saved by the `Compile` method.
+       * 
+ * + * string sketch_path = 3; + * @return The sketchPath. + */ + public java.lang.String getSketchPath() { + java.lang.Object ref = sketchPath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sketchPath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Path where the sketch to be uploaded is stored. Unless the `import_file`
+       * field is defined, the compiled binary is assumed to be at the location and
+       * filename under this path where it is saved by the `Compile` method.
+       * 
+ * + * string sketch_path = 3; + * @return The bytes for sketchPath. + */ + public com.google.protobuf.ByteString + getSketchPathBytes() { + java.lang.Object ref = sketchPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sketchPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Path where the sketch to be uploaded is stored. Unless the `import_file`
+       * field is defined, the compiled binary is assumed to be at the location and
+       * filename under this path where it is saved by the `Compile` method.
+       * 
+ * + * string sketch_path = 3; + * @param value The sketchPath to set. + * @return This builder for chaining. + */ + public Builder setSketchPath( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sketchPath_ = value; + onChanged(); + return this; + } + /** + *
+       * Path where the sketch to be uploaded is stored. Unless the `import_file`
+       * field is defined, the compiled binary is assumed to be at the location and
+       * filename under this path where it is saved by the `Compile` method.
+       * 
+ * + * string sketch_path = 3; + * @return This builder for chaining. + */ + public Builder clearSketchPath() { + + sketchPath_ = getDefaultInstance().getSketchPath(); + onChanged(); + return this; + } + /** + *
+       * Path where the sketch to be uploaded is stored. Unless the `import_file`
+       * field is defined, the compiled binary is assumed to be at the location and
+       * filename under this path where it is saved by the `Compile` method.
+       * 
+ * + * string sketch_path = 3; + * @param value The bytes for sketchPath to set. + * @return This builder for chaining. + */ + public Builder setSketchPathBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sketchPath_ = value; + onChanged(); + return this; + } + + private java.lang.Object port_ = ""; + /** + *
+       * The port of the board.
+       * 
+ * + * string port = 4; + * @return The port. + */ + public java.lang.String getPort() { + java.lang.Object ref = port_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + port_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The port of the board.
+       * 
+ * + * string port = 4; + * @return The bytes for port. + */ + public com.google.protobuf.ByteString + getPortBytes() { + java.lang.Object ref = port_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + port_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The port of the board.
+       * 
+ * + * string port = 4; + * @param value The port to set. + * @return This builder for chaining. + */ + public Builder setPort( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + port_ = value; + onChanged(); + return this; + } + /** + *
+       * The port of the board.
+       * 
+ * + * string port = 4; + * @return This builder for chaining. + */ + public Builder clearPort() { + + port_ = getDefaultInstance().getPort(); + onChanged(); + return this; + } + /** + *
+       * The port of the board.
+       * 
+ * + * string port = 4; + * @param value The bytes for port to set. + * @return This builder for chaining. + */ + public Builder setPortBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + port_ = value; + onChanged(); + return this; + } + + private boolean verbose_ ; + /** + *
+       * Whether to turn on verbose output during the upload.
+       * 
+ * + * bool verbose = 5; + * @return The verbose. + */ + public boolean getVerbose() { + return verbose_; + } + /** + *
+       * Whether to turn on verbose output during the upload.
+       * 
+ * + * bool verbose = 5; + * @param value The verbose to set. + * @return This builder for chaining. + */ + public Builder setVerbose(boolean value) { + + verbose_ = value; + onChanged(); + return this; + } + /** + *
+       * Whether to turn on verbose output during the upload.
+       * 
+ * + * bool verbose = 5; + * @return This builder for chaining. + */ + public Builder clearVerbose() { + + verbose_ = false; + onChanged(); + return this; + } + + private boolean verify_ ; + /** + *
+       * After upload, verify that the contents of the memory on the board match the
+       * uploaded binary.
+       * 
+ * + * bool verify = 6; + * @return The verify. + */ + public boolean getVerify() { + return verify_; + } + /** + *
+       * After upload, verify that the contents of the memory on the board match the
+       * uploaded binary.
+       * 
+ * + * bool verify = 6; + * @param value The verify to set. + * @return This builder for chaining. + */ + public Builder setVerify(boolean value) { + + verify_ = value; + onChanged(); + return this; + } + /** + *
+       * After upload, verify that the contents of the memory on the board match the
+       * uploaded binary.
+       * 
+ * + * bool verify = 6; + * @return This builder for chaining. + */ + public Builder clearVerify() { + + verify_ = false; + onChanged(); + return this; + } + + private java.lang.Object importFile_ = ""; + /** + *
+       * DEPRECATED: Use import_dir instead
+       * 
+ * + * string import_file = 7 [deprecated = true]; + * @return The importFile. + */ + @java.lang.Deprecated public java.lang.String getImportFile() { + java.lang.Object ref = importFile_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + importFile_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * DEPRECATED: Use import_dir instead
+       * 
+ * + * string import_file = 7 [deprecated = true]; + * @return The bytes for importFile. + */ + @java.lang.Deprecated public com.google.protobuf.ByteString + getImportFileBytes() { + java.lang.Object ref = importFile_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + importFile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * DEPRECATED: Use import_dir instead
+       * 
+ * + * string import_file = 7 [deprecated = true]; + * @param value The importFile to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder setImportFile( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + importFile_ = value; + onChanged(); + return this; + } + /** + *
+       * DEPRECATED: Use import_dir instead
+       * 
+ * + * string import_file = 7 [deprecated = true]; + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder clearImportFile() { + + importFile_ = getDefaultInstance().getImportFile(); + onChanged(); + return this; + } + /** + *
+       * DEPRECATED: Use import_dir instead
+       * 
+ * + * string import_file = 7 [deprecated = true]; + * @param value The bytes for importFile to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder setImportFileBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + importFile_ = value; + onChanged(); + return this; + } + + private java.lang.Object importDir_ = ""; + /** + *
+       * Custom path to a directory containing compiled files. When `import_dir` is
+       * not specified, the standard build directory under `sketch_path` is used.
+       * 
+ * + * string import_dir = 8; + * @return The importDir. + */ + public java.lang.String getImportDir() { + java.lang.Object ref = importDir_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + importDir_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Custom path to a directory containing compiled files. When `import_dir` is
+       * not specified, the standard build directory under `sketch_path` is used.
+       * 
+ * + * string import_dir = 8; + * @return The bytes for importDir. + */ + public com.google.protobuf.ByteString + getImportDirBytes() { + java.lang.Object ref = importDir_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + importDir_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Custom path to a directory containing compiled files. When `import_dir` is
+       * not specified, the standard build directory under `sketch_path` is used.
+       * 
+ * + * string import_dir = 8; + * @param value The importDir to set. + * @return This builder for chaining. + */ + public Builder setImportDir( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + importDir_ = value; + onChanged(); + return this; + } + /** + *
+       * Custom path to a directory containing compiled files. When `import_dir` is
+       * not specified, the standard build directory under `sketch_path` is used.
+       * 
+ * + * string import_dir = 8; + * @return This builder for chaining. + */ + public Builder clearImportDir() { + + importDir_ = getDefaultInstance().getImportDir(); + onChanged(); + return this; + } + /** + *
+       * Custom path to a directory containing compiled files. When `import_dir` is
+       * not specified, the standard build directory under `sketch_path` is used.
+       * 
+ * + * string import_dir = 8; + * @param value The bytes for importDir to set. + * @return This builder for chaining. + */ + public Builder setImportDirBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + importDir_ = value; + onChanged(); + return this; + } + + private java.lang.Object programmer_ = ""; + /** + * string programmer = 9; + * @return The programmer. + */ + public java.lang.String getProgrammer() { + java.lang.Object ref = programmer_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + programmer_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string programmer = 9; + * @return The bytes for programmer. + */ + public com.google.protobuf.ByteString + getProgrammerBytes() { + java.lang.Object ref = programmer_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + programmer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string programmer = 9; + * @param value The programmer to set. + * @return This builder for chaining. + */ + public Builder setProgrammer( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + programmer_ = value; + onChanged(); + return this; + } + /** + * string programmer = 9; + * @return This builder for chaining. + */ + public Builder clearProgrammer() { + + programmer_ = getDefaultInstance().getProgrammer(); + onChanged(); + return this; + } + /** + * string programmer = 9; + * @param value The bytes for programmer to set. + * @return This builder for chaining. + */ + public Builder setProgrammerBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + programmer_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.UploadReq) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.UploadReq) + private static final cc.arduino.cli.commands.Upload.UploadReq DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Upload.UploadReq(); + } + + public static cc.arduino.cli.commands.Upload.UploadReq getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UploadReq parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UploadReq(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Upload.UploadReq getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface UploadRespOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.UploadResp) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The output of the upload process.
+     * 
+ * + * bytes out_stream = 1; + * @return The outStream. + */ + com.google.protobuf.ByteString getOutStream(); + + /** + *
+     * The error output of the upload process.
+     * 
+ * + * bytes err_stream = 2; + * @return The errStream. + */ + com.google.protobuf.ByteString getErrStream(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.UploadResp} + */ + public static final class UploadResp extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.UploadResp) + UploadRespOrBuilder { + private static final long serialVersionUID = 0L; + // Use UploadResp.newBuilder() to construct. + private UploadResp(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UploadResp() { + outStream_ = com.google.protobuf.ByteString.EMPTY; + errStream_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UploadResp(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private UploadResp( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + + outStream_ = input.readBytes(); + break; + } + case 18: { + + errStream_ = input.readBytes(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Upload.internal_static_cc_arduino_cli_commands_UploadResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Upload.internal_static_cc_arduino_cli_commands_UploadResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Upload.UploadResp.class, cc.arduino.cli.commands.Upload.UploadResp.Builder.class); + } + + public static final int OUT_STREAM_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString outStream_; + /** + *
+     * The output of the upload process.
+     * 
+ * + * bytes out_stream = 1; + * @return The outStream. + */ + public com.google.protobuf.ByteString getOutStream() { + return outStream_; + } + + public static final int ERR_STREAM_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString errStream_; + /** + *
+     * The error output of the upload process.
+     * 
+ * + * bytes err_stream = 2; + * @return The errStream. + */ + public com.google.protobuf.ByteString getErrStream() { + return errStream_; + } + + 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 (!outStream_.isEmpty()) { + output.writeBytes(1, outStream_); + } + if (!errStream_.isEmpty()) { + output.writeBytes(2, errStream_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!outStream_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, outStream_); + } + if (!errStream_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, errStream_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Upload.UploadResp)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Upload.UploadResp other = (cc.arduino.cli.commands.Upload.UploadResp) obj; + + if (!getOutStream() + .equals(other.getOutStream())) return false; + if (!getErrStream() + .equals(other.getErrStream())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + OUT_STREAM_FIELD_NUMBER; + hash = (53 * hash) + getOutStream().hashCode(); + hash = (37 * hash) + ERR_STREAM_FIELD_NUMBER; + hash = (53 * hash) + getErrStream().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Upload.UploadResp parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Upload.UploadResp parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Upload.UploadResp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Upload.UploadResp parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Upload.UploadResp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Upload.UploadResp parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Upload.UploadResp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Upload.UploadResp parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Upload.UploadResp parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Upload.UploadResp parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Upload.UploadResp parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Upload.UploadResp parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Upload.UploadResp 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.UploadResp} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.UploadResp) + cc.arduino.cli.commands.Upload.UploadRespOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Upload.internal_static_cc_arduino_cli_commands_UploadResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Upload.internal_static_cc_arduino_cli_commands_UploadResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Upload.UploadResp.class, cc.arduino.cli.commands.Upload.UploadResp.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Upload.UploadResp.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + outStream_ = com.google.protobuf.ByteString.EMPTY; + + errStream_ = com.google.protobuf.ByteString.EMPTY; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Upload.internal_static_cc_arduino_cli_commands_UploadResp_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Upload.UploadResp getDefaultInstanceForType() { + return cc.arduino.cli.commands.Upload.UploadResp.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Upload.UploadResp build() { + cc.arduino.cli.commands.Upload.UploadResp result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Upload.UploadResp buildPartial() { + cc.arduino.cli.commands.Upload.UploadResp result = new cc.arduino.cli.commands.Upload.UploadResp(this); + result.outStream_ = outStream_; + result.errStream_ = errStream_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Upload.UploadResp) { + return mergeFrom((cc.arduino.cli.commands.Upload.UploadResp)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Upload.UploadResp other) { + if (other == cc.arduino.cli.commands.Upload.UploadResp.getDefaultInstance()) return this; + if (other.getOutStream() != com.google.protobuf.ByteString.EMPTY) { + setOutStream(other.getOutStream()); + } + if (other.getErrStream() != com.google.protobuf.ByteString.EMPTY) { + setErrStream(other.getErrStream()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Upload.UploadResp parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Upload.UploadResp) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.ByteString outStream_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+       * The output of the upload process.
+       * 
+ * + * bytes out_stream = 1; + * @return The outStream. + */ + public com.google.protobuf.ByteString getOutStream() { + return outStream_; + } + /** + *
+       * The output of the upload process.
+       * 
+ * + * bytes out_stream = 1; + * @param value The outStream to set. + * @return This builder for chaining. + */ + public Builder setOutStream(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + outStream_ = value; + onChanged(); + return this; + } + /** + *
+       * The output of the upload process.
+       * 
+ * + * bytes out_stream = 1; + * @return This builder for chaining. + */ + public Builder clearOutStream() { + + outStream_ = getDefaultInstance().getOutStream(); + onChanged(); + return this; + } + + private com.google.protobuf.ByteString errStream_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+       * The error output of the upload process.
+       * 
+ * + * bytes err_stream = 2; + * @return The errStream. + */ + public com.google.protobuf.ByteString getErrStream() { + return errStream_; + } + /** + *
+       * The error output of the upload process.
+       * 
+ * + * bytes err_stream = 2; + * @param value The errStream to set. + * @return This builder for chaining. + */ + public Builder setErrStream(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + errStream_ = value; + onChanged(); + return this; + } + /** + *
+       * The error output of the upload process.
+       * 
+ * + * bytes err_stream = 2; + * @return This builder for chaining. + */ + public Builder clearErrStream() { + + errStream_ = getDefaultInstance().getErrStream(); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.UploadResp) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.UploadResp) + private static final cc.arduino.cli.commands.Upload.UploadResp DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Upload.UploadResp(); + } + + public static cc.arduino.cli.commands.Upload.UploadResp getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UploadResp parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UploadResp(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Upload.UploadResp getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface BurnBootloaderReqOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.BurnBootloaderReq) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + boolean hasInstance(); + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + cc.arduino.cli.commands.Common.Instance getInstance(); + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder(); + + /** + *
+     * Fully qualified board name of the target board (e.g., `arduino:avr:uno`).
+     * 
+ * + * string fqbn = 2; + * @return The fqbn. + */ + java.lang.String getFqbn(); + /** + *
+     * Fully qualified board name of the target board (e.g., `arduino:avr:uno`).
+     * 
+ * + * string fqbn = 2; + * @return The bytes for fqbn. + */ + com.google.protobuf.ByteString + getFqbnBytes(); + + /** + *
+     * The port of the programmer used to program the bootloader.
+     * 
+ * + * string port = 3; + * @return The port. + */ + java.lang.String getPort(); + /** + *
+     * The port of the programmer used to program the bootloader.
+     * 
+ * + * string port = 3; + * @return The bytes for port. + */ + com.google.protobuf.ByteString + getPortBytes(); + + /** + *
+     * Whether to turn on verbose output during the programming.
+     * 
+ * + * bool verbose = 4; + * @return The verbose. + */ + boolean getVerbose(); + + /** + *
+     * After programming, verify the contents of the memory on the board match the
+     * uploaded binary.
+     * 
+ * + * bool verify = 5; + * @return The verify. + */ + boolean getVerify(); + + /** + *
+     * The programmer to use for burning bootloader.
+     * 
+ * + * string programmer = 6; + * @return The programmer. + */ + java.lang.String getProgrammer(); + /** + *
+     * The programmer to use for burning bootloader.
+     * 
+ * + * string programmer = 6; + * @return The bytes for programmer. + */ + com.google.protobuf.ByteString + getProgrammerBytes(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.BurnBootloaderReq} + */ + public static final class BurnBootloaderReq extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.BurnBootloaderReq) + BurnBootloaderReqOrBuilder { + private static final long serialVersionUID = 0L; + // Use BurnBootloaderReq.newBuilder() to construct. + private BurnBootloaderReq(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BurnBootloaderReq() { + fqbn_ = ""; + port_ = ""; + programmer_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BurnBootloaderReq(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BurnBootloaderReq( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cc.arduino.cli.commands.Common.Instance.Builder subBuilder = null; + if (instance_ != null) { + subBuilder = instance_.toBuilder(); + } + instance_ = input.readMessage(cc.arduino.cli.commands.Common.Instance.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instance_); + instance_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + fqbn_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + port_ = s; + break; + } + case 32: { + + verbose_ = input.readBool(); + break; + } + case 40: { + + verify_ = input.readBool(); + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + programmer_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Upload.internal_static_cc_arduino_cli_commands_BurnBootloaderReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Upload.internal_static_cc_arduino_cli_commands_BurnBootloaderReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Upload.BurnBootloaderReq.class, cc.arduino.cli.commands.Upload.BurnBootloaderReq.Builder.class); + } + + public static final int INSTANCE_FIELD_NUMBER = 1; + private cc.arduino.cli.commands.Common.Instance instance_; + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instance_ != null; + } + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + return getInstance(); + } + + public static final int FQBN_FIELD_NUMBER = 2; + private volatile java.lang.Object fqbn_; + /** + *
+     * Fully qualified board name of the target board (e.g., `arduino:avr:uno`).
+     * 
+ * + * string fqbn = 2; + * @return The fqbn. + */ + public java.lang.String getFqbn() { + java.lang.Object ref = fqbn_; + 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(); + fqbn_ = s; + return s; + } + } + /** + *
+     * Fully qualified board name of the target board (e.g., `arduino:avr:uno`).
+     * 
+ * + * string fqbn = 2; + * @return The bytes for fqbn. + */ + public com.google.protobuf.ByteString + getFqbnBytes() { + java.lang.Object ref = fqbn_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fqbn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PORT_FIELD_NUMBER = 3; + private volatile java.lang.Object port_; + /** + *
+     * The port of the programmer used to program the bootloader.
+     * 
+ * + * string port = 3; + * @return The port. + */ + public java.lang.String getPort() { + java.lang.Object ref = port_; + 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(); + port_ = s; + return s; + } + } + /** + *
+     * The port of the programmer used to program the bootloader.
+     * 
+ * + * string port = 3; + * @return The bytes for port. + */ + public com.google.protobuf.ByteString + getPortBytes() { + java.lang.Object ref = port_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + port_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERBOSE_FIELD_NUMBER = 4; + private boolean verbose_; + /** + *
+     * Whether to turn on verbose output during the programming.
+     * 
+ * + * bool verbose = 4; + * @return The verbose. + */ + public boolean getVerbose() { + return verbose_; + } + + public static final int VERIFY_FIELD_NUMBER = 5; + private boolean verify_; + /** + *
+     * After programming, verify the contents of the memory on the board match the
+     * uploaded binary.
+     * 
+ * + * bool verify = 5; + * @return The verify. + */ + public boolean getVerify() { + return verify_; + } + + public static final int PROGRAMMER_FIELD_NUMBER = 6; + private volatile java.lang.Object programmer_; + /** + *
+     * The programmer to use for burning bootloader.
+     * 
+ * + * string programmer = 6; + * @return The programmer. + */ + public java.lang.String getProgrammer() { + java.lang.Object ref = programmer_; + 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(); + programmer_ = s; + return s; + } + } + /** + *
+     * The programmer to use for burning bootloader.
+     * 
+ * + * string programmer = 6; + * @return The bytes for programmer. + */ + public com.google.protobuf.ByteString + getProgrammerBytes() { + java.lang.Object ref = programmer_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + programmer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (instance_ != null) { + output.writeMessage(1, getInstance()); + } + if (!getFqbnBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, fqbn_); + } + if (!getPortBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, port_); + } + if (verbose_ != false) { + output.writeBool(4, verbose_); + } + if (verify_ != false) { + output.writeBool(5, verify_); + } + if (!getProgrammerBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, programmer_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (instance_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInstance()); + } + if (!getFqbnBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, fqbn_); + } + if (!getPortBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, port_); + } + if (verbose_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, verbose_); + } + if (verify_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, verify_); + } + if (!getProgrammerBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, programmer_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Upload.BurnBootloaderReq)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Upload.BurnBootloaderReq other = (cc.arduino.cli.commands.Upload.BurnBootloaderReq) obj; + + if (hasInstance() != other.hasInstance()) return false; + if (hasInstance()) { + if (!getInstance() + .equals(other.getInstance())) return false; + } + if (!getFqbn() + .equals(other.getFqbn())) return false; + if (!getPort() + .equals(other.getPort())) return false; + if (getVerbose() + != other.getVerbose()) return false; + if (getVerify() + != other.getVerify()) return false; + if (!getProgrammer() + .equals(other.getProgrammer())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInstance()) { + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + } + hash = (37 * hash) + FQBN_FIELD_NUMBER; + hash = (53 * hash) + getFqbn().hashCode(); + hash = (37 * hash) + PORT_FIELD_NUMBER; + hash = (53 * hash) + getPort().hashCode(); + hash = (37 * hash) + VERBOSE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getVerbose()); + hash = (37 * hash) + VERIFY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getVerify()); + hash = (37 * hash) + PROGRAMMER_FIELD_NUMBER; + hash = (53 * hash) + getProgrammer().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Upload.BurnBootloaderReq parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Upload.BurnBootloaderReq parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Upload.BurnBootloaderReq parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Upload.BurnBootloaderReq parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Upload.BurnBootloaderReq parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Upload.BurnBootloaderReq parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Upload.BurnBootloaderReq parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Upload.BurnBootloaderReq parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Upload.BurnBootloaderReq parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Upload.BurnBootloaderReq parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Upload.BurnBootloaderReq parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Upload.BurnBootloaderReq parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Upload.BurnBootloaderReq 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.BurnBootloaderReq} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.BurnBootloaderReq) + cc.arduino.cli.commands.Upload.BurnBootloaderReqOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Upload.internal_static_cc_arduino_cli_commands_BurnBootloaderReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Upload.internal_static_cc_arduino_cli_commands_BurnBootloaderReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Upload.BurnBootloaderReq.class, cc.arduino.cli.commands.Upload.BurnBootloaderReq.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Upload.BurnBootloaderReq.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (instanceBuilder_ == null) { + instance_ = null; + } else { + instance_ = null; + instanceBuilder_ = null; + } + fqbn_ = ""; + + port_ = ""; + + verbose_ = false; + + verify_ = false; + + programmer_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Upload.internal_static_cc_arduino_cli_commands_BurnBootloaderReq_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Upload.BurnBootloaderReq getDefaultInstanceForType() { + return cc.arduino.cli.commands.Upload.BurnBootloaderReq.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Upload.BurnBootloaderReq build() { + cc.arduino.cli.commands.Upload.BurnBootloaderReq result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Upload.BurnBootloaderReq buildPartial() { + cc.arduino.cli.commands.Upload.BurnBootloaderReq result = new cc.arduino.cli.commands.Upload.BurnBootloaderReq(this); + if (instanceBuilder_ == null) { + result.instance_ = instance_; + } else { + result.instance_ = instanceBuilder_.build(); + } + result.fqbn_ = fqbn_; + result.port_ = port_; + result.verbose_ = verbose_; + result.verify_ = verify_; + result.programmer_ = programmer_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Upload.BurnBootloaderReq) { + return mergeFrom((cc.arduino.cli.commands.Upload.BurnBootloaderReq)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Upload.BurnBootloaderReq other) { + if (other == cc.arduino.cli.commands.Upload.BurnBootloaderReq.getDefaultInstance()) return this; + if (other.hasInstance()) { + mergeInstance(other.getInstance()); + } + if (!other.getFqbn().isEmpty()) { + fqbn_ = other.fqbn_; + onChanged(); + } + if (!other.getPort().isEmpty()) { + port_ = other.port_; + onChanged(); + } + if (other.getVerbose() != false) { + setVerbose(other.getVerbose()); + } + if (other.getVerify() != false) { + setVerify(other.getVerify()); + } + if (!other.getProgrammer().isEmpty()) { + programmer_ = other.programmer_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Upload.BurnBootloaderReq parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Upload.BurnBootloaderReq) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private cc.arduino.cli.commands.Common.Instance instance_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> instanceBuilder_; + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instanceBuilder_ != null || instance_ != null; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + if (instanceBuilder_ == null) { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } else { + return instanceBuilder_.getMessage(); + } + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + onChanged(); + } else { + instanceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance( + cc.arduino.cli.commands.Common.Instance.Builder builderForValue) { + if (instanceBuilder_ == null) { + instance_ = builderForValue.build(); + onChanged(); + } else { + instanceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder mergeInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (instance_ != null) { + instance_ = + cc.arduino.cli.commands.Common.Instance.newBuilder(instance_).mergeFrom(value).buildPartial(); + } else { + instance_ = value; + } + onChanged(); + } else { + instanceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder clearInstance() { + if (instanceBuilder_ == null) { + instance_ = null; + onChanged(); + } else { + instance_ = null; + instanceBuilder_ = null; + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.Instance.Builder getInstanceBuilder() { + + onChanged(); + return getInstanceFieldBuilder().getBuilder(); + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + if (instanceBuilder_ != null) { + return instanceBuilder_.getMessageOrBuilder(); + } else { + return instance_ == null ? + cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> + getInstanceFieldBuilder() { + if (instanceBuilder_ == null) { + instanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder>( + getInstance(), + getParentForChildren(), + isClean()); + instance_ = null; + } + return instanceBuilder_; + } + + private java.lang.Object fqbn_ = ""; + /** + *
+       * Fully qualified board name of the target board (e.g., `arduino:avr:uno`).
+       * 
+ * + * string fqbn = 2; + * @return The fqbn. + */ + public java.lang.String getFqbn() { + java.lang.Object ref = fqbn_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fqbn_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Fully qualified board name of the target board (e.g., `arduino:avr:uno`).
+       * 
+ * + * string fqbn = 2; + * @return The bytes for fqbn. + */ + public com.google.protobuf.ByteString + getFqbnBytes() { + java.lang.Object ref = fqbn_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fqbn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Fully qualified board name of the target board (e.g., `arduino:avr:uno`).
+       * 
+ * + * string fqbn = 2; + * @param value The fqbn to set. + * @return This builder for chaining. + */ + public Builder setFqbn( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + fqbn_ = value; + onChanged(); + return this; + } + /** + *
+       * Fully qualified board name of the target board (e.g., `arduino:avr:uno`).
+       * 
+ * + * string fqbn = 2; + * @return This builder for chaining. + */ + public Builder clearFqbn() { + + fqbn_ = getDefaultInstance().getFqbn(); + onChanged(); + return this; + } + /** + *
+       * Fully qualified board name of the target board (e.g., `arduino:avr:uno`).
+       * 
+ * + * string fqbn = 2; + * @param value The bytes for fqbn to set. + * @return This builder for chaining. + */ + public Builder setFqbnBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + fqbn_ = value; + onChanged(); + return this; + } + + private java.lang.Object port_ = ""; + /** + *
+       * The port of the programmer used to program the bootloader.
+       * 
+ * + * string port = 3; + * @return The port. + */ + public java.lang.String getPort() { + java.lang.Object ref = port_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + port_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The port of the programmer used to program the bootloader.
+       * 
+ * + * string port = 3; + * @return The bytes for port. + */ + public com.google.protobuf.ByteString + getPortBytes() { + java.lang.Object ref = port_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + port_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The port of the programmer used to program the bootloader.
+       * 
+ * + * string port = 3; + * @param value The port to set. + * @return This builder for chaining. + */ + public Builder setPort( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + port_ = value; + onChanged(); + return this; + } + /** + *
+       * The port of the programmer used to program the bootloader.
+       * 
+ * + * string port = 3; + * @return This builder for chaining. + */ + public Builder clearPort() { + + port_ = getDefaultInstance().getPort(); + onChanged(); + return this; + } + /** + *
+       * The port of the programmer used to program the bootloader.
+       * 
+ * + * string port = 3; + * @param value The bytes for port to set. + * @return This builder for chaining. + */ + public Builder setPortBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + port_ = value; + onChanged(); + return this; + } + + private boolean verbose_ ; + /** + *
+       * Whether to turn on verbose output during the programming.
+       * 
+ * + * bool verbose = 4; + * @return The verbose. + */ + public boolean getVerbose() { + return verbose_; + } + /** + *
+       * Whether to turn on verbose output during the programming.
+       * 
+ * + * bool verbose = 4; + * @param value The verbose to set. + * @return This builder for chaining. + */ + public Builder setVerbose(boolean value) { + + verbose_ = value; + onChanged(); + return this; + } + /** + *
+       * Whether to turn on verbose output during the programming.
+       * 
+ * + * bool verbose = 4; + * @return This builder for chaining. + */ + public Builder clearVerbose() { + + verbose_ = false; + onChanged(); + return this; + } + + private boolean verify_ ; + /** + *
+       * After programming, verify the contents of the memory on the board match the
+       * uploaded binary.
+       * 
+ * + * bool verify = 5; + * @return The verify. + */ + public boolean getVerify() { + return verify_; + } + /** + *
+       * After programming, verify the contents of the memory on the board match the
+       * uploaded binary.
+       * 
+ * + * bool verify = 5; + * @param value The verify to set. + * @return This builder for chaining. + */ + public Builder setVerify(boolean value) { + + verify_ = value; + onChanged(); + return this; + } + /** + *
+       * After programming, verify the contents of the memory on the board match the
+       * uploaded binary.
+       * 
+ * + * bool verify = 5; + * @return This builder for chaining. + */ + public Builder clearVerify() { + + verify_ = false; + onChanged(); + return this; + } + + private java.lang.Object programmer_ = ""; + /** + *
+       * The programmer to use for burning bootloader.
+       * 
+ * + * string programmer = 6; + * @return The programmer. + */ + public java.lang.String getProgrammer() { + java.lang.Object ref = programmer_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + programmer_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The programmer to use for burning bootloader.
+       * 
+ * + * string programmer = 6; + * @return The bytes for programmer. + */ + public com.google.protobuf.ByteString + getProgrammerBytes() { + java.lang.Object ref = programmer_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + programmer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The programmer to use for burning bootloader.
+       * 
+ * + * string programmer = 6; + * @param value The programmer to set. + * @return This builder for chaining. + */ + public Builder setProgrammer( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + programmer_ = value; + onChanged(); + return this; + } + /** + *
+       * The programmer to use for burning bootloader.
+       * 
+ * + * string programmer = 6; + * @return This builder for chaining. + */ + public Builder clearProgrammer() { + + programmer_ = getDefaultInstance().getProgrammer(); + onChanged(); + return this; + } + /** + *
+       * The programmer to use for burning bootloader.
+       * 
+ * + * string programmer = 6; + * @param value The bytes for programmer to set. + * @return This builder for chaining. + */ + public Builder setProgrammerBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + programmer_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.BurnBootloaderReq) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.BurnBootloaderReq) + private static final cc.arduino.cli.commands.Upload.BurnBootloaderReq DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Upload.BurnBootloaderReq(); + } + + public static cc.arduino.cli.commands.Upload.BurnBootloaderReq getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BurnBootloaderReq parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BurnBootloaderReq(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Upload.BurnBootloaderReq getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface BurnBootloaderRespOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.BurnBootloaderResp) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The output of the burn bootloader process.
+     * 
+ * + * bytes out_stream = 1; + * @return The outStream. + */ + com.google.protobuf.ByteString getOutStream(); + + /** + *
+     * The error output of the burn bootloader process.
+     * 
+ * + * bytes err_stream = 2; + * @return The errStream. + */ + com.google.protobuf.ByteString getErrStream(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.BurnBootloaderResp} + */ + public static final class BurnBootloaderResp extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.BurnBootloaderResp) + BurnBootloaderRespOrBuilder { + private static final long serialVersionUID = 0L; + // Use BurnBootloaderResp.newBuilder() to construct. + private BurnBootloaderResp(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private BurnBootloaderResp() { + outStream_ = com.google.protobuf.ByteString.EMPTY; + errStream_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new BurnBootloaderResp(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BurnBootloaderResp( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + + outStream_ = input.readBytes(); + break; + } + case 18: { + + errStream_ = input.readBytes(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Upload.internal_static_cc_arduino_cli_commands_BurnBootloaderResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Upload.internal_static_cc_arduino_cli_commands_BurnBootloaderResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Upload.BurnBootloaderResp.class, cc.arduino.cli.commands.Upload.BurnBootloaderResp.Builder.class); + } + + public static final int OUT_STREAM_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString outStream_; + /** + *
+     * The output of the burn bootloader process.
+     * 
+ * + * bytes out_stream = 1; + * @return The outStream. + */ + public com.google.protobuf.ByteString getOutStream() { + return outStream_; + } + + public static final int ERR_STREAM_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString errStream_; + /** + *
+     * The error output of the burn bootloader process.
+     * 
+ * + * bytes err_stream = 2; + * @return The errStream. + */ + public com.google.protobuf.ByteString getErrStream() { + return errStream_; + } + + 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 (!outStream_.isEmpty()) { + output.writeBytes(1, outStream_); + } + if (!errStream_.isEmpty()) { + output.writeBytes(2, errStream_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!outStream_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, outStream_); + } + if (!errStream_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, errStream_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Upload.BurnBootloaderResp)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Upload.BurnBootloaderResp other = (cc.arduino.cli.commands.Upload.BurnBootloaderResp) obj; + + if (!getOutStream() + .equals(other.getOutStream())) return false; + if (!getErrStream() + .equals(other.getErrStream())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + OUT_STREAM_FIELD_NUMBER; + hash = (53 * hash) + getOutStream().hashCode(); + hash = (37 * hash) + ERR_STREAM_FIELD_NUMBER; + hash = (53 * hash) + getErrStream().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Upload.BurnBootloaderResp parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Upload.BurnBootloaderResp parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Upload.BurnBootloaderResp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Upload.BurnBootloaderResp parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Upload.BurnBootloaderResp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Upload.BurnBootloaderResp parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Upload.BurnBootloaderResp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Upload.BurnBootloaderResp parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Upload.BurnBootloaderResp parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Upload.BurnBootloaderResp parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Upload.BurnBootloaderResp parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Upload.BurnBootloaderResp parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Upload.BurnBootloaderResp 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.BurnBootloaderResp} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.BurnBootloaderResp) + cc.arduino.cli.commands.Upload.BurnBootloaderRespOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Upload.internal_static_cc_arduino_cli_commands_BurnBootloaderResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Upload.internal_static_cc_arduino_cli_commands_BurnBootloaderResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Upload.BurnBootloaderResp.class, cc.arduino.cli.commands.Upload.BurnBootloaderResp.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Upload.BurnBootloaderResp.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + outStream_ = com.google.protobuf.ByteString.EMPTY; + + errStream_ = com.google.protobuf.ByteString.EMPTY; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Upload.internal_static_cc_arduino_cli_commands_BurnBootloaderResp_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Upload.BurnBootloaderResp getDefaultInstanceForType() { + return cc.arduino.cli.commands.Upload.BurnBootloaderResp.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Upload.BurnBootloaderResp build() { + cc.arduino.cli.commands.Upload.BurnBootloaderResp result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Upload.BurnBootloaderResp buildPartial() { + cc.arduino.cli.commands.Upload.BurnBootloaderResp result = new cc.arduino.cli.commands.Upload.BurnBootloaderResp(this); + result.outStream_ = outStream_; + result.errStream_ = errStream_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Upload.BurnBootloaderResp) { + return mergeFrom((cc.arduino.cli.commands.Upload.BurnBootloaderResp)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Upload.BurnBootloaderResp other) { + if (other == cc.arduino.cli.commands.Upload.BurnBootloaderResp.getDefaultInstance()) return this; + if (other.getOutStream() != com.google.protobuf.ByteString.EMPTY) { + setOutStream(other.getOutStream()); + } + if (other.getErrStream() != com.google.protobuf.ByteString.EMPTY) { + setErrStream(other.getErrStream()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Upload.BurnBootloaderResp parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Upload.BurnBootloaderResp) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.ByteString outStream_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+       * The output of the burn bootloader process.
+       * 
+ * + * bytes out_stream = 1; + * @return The outStream. + */ + public com.google.protobuf.ByteString getOutStream() { + return outStream_; + } + /** + *
+       * The output of the burn bootloader process.
+       * 
+ * + * bytes out_stream = 1; + * @param value The outStream to set. + * @return This builder for chaining. + */ + public Builder setOutStream(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + outStream_ = value; + onChanged(); + return this; + } + /** + *
+       * The output of the burn bootloader process.
+       * 
+ * + * bytes out_stream = 1; + * @return This builder for chaining. + */ + public Builder clearOutStream() { + + outStream_ = getDefaultInstance().getOutStream(); + onChanged(); + return this; + } + + private com.google.protobuf.ByteString errStream_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+       * The error output of the burn bootloader process.
+       * 
+ * + * bytes err_stream = 2; + * @return The errStream. + */ + public com.google.protobuf.ByteString getErrStream() { + return errStream_; + } + /** + *
+       * The error output of the burn bootloader process.
+       * 
+ * + * bytes err_stream = 2; + * @param value The errStream to set. + * @return This builder for chaining. + */ + public Builder setErrStream(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + errStream_ = value; + onChanged(); + return this; + } + /** + *
+       * The error output of the burn bootloader process.
+       * 
+ * + * bytes err_stream = 2; + * @return This builder for chaining. + */ + public Builder clearErrStream() { + + errStream_ = getDefaultInstance().getErrStream(); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.BurnBootloaderResp) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.BurnBootloaderResp) + private static final cc.arduino.cli.commands.Upload.BurnBootloaderResp DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Upload.BurnBootloaderResp(); + } + + public static cc.arduino.cli.commands.Upload.BurnBootloaderResp getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BurnBootloaderResp parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BurnBootloaderResp(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Upload.BurnBootloaderResp getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ListProgrammersAvailableForUploadReqOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.ListProgrammersAvailableForUploadReq) + com.google.protobuf.MessageOrBuilder { + + /** + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + boolean hasInstance(); + /** + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + cc.arduino.cli.commands.Common.Instance getInstance(); + /** + * .cc.arduino.cli.commands.Instance instance = 1; + */ + cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder(); + + /** + * string fqbn = 2; + * @return The fqbn. + */ + java.lang.String getFqbn(); + /** + * string fqbn = 2; + * @return The bytes for fqbn. + */ + com.google.protobuf.ByteString + getFqbnBytes(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.ListProgrammersAvailableForUploadReq} + */ + public static final class ListProgrammersAvailableForUploadReq extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.ListProgrammersAvailableForUploadReq) + ListProgrammersAvailableForUploadReqOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListProgrammersAvailableForUploadReq.newBuilder() to construct. + private ListProgrammersAvailableForUploadReq(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListProgrammersAvailableForUploadReq() { + fqbn_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListProgrammersAvailableForUploadReq(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListProgrammersAvailableForUploadReq( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cc.arduino.cli.commands.Common.Instance.Builder subBuilder = null; + if (instance_ != null) { + subBuilder = instance_.toBuilder(); + } + instance_ = input.readMessage(cc.arduino.cli.commands.Common.Instance.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instance_); + instance_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + fqbn_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Upload.internal_static_cc_arduino_cli_commands_ListProgrammersAvailableForUploadReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Upload.internal_static_cc_arduino_cli_commands_ListProgrammersAvailableForUploadReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq.class, cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq.Builder.class); + } + + public static final int INSTANCE_FIELD_NUMBER = 1; + private cc.arduino.cli.commands.Common.Instance instance_; + /** + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instance_ != null; + } + /** + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + /** + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + return getInstance(); + } + + public static final int FQBN_FIELD_NUMBER = 2; + private volatile java.lang.Object fqbn_; + /** + * string fqbn = 2; + * @return The fqbn. + */ + public java.lang.String getFqbn() { + java.lang.Object ref = fqbn_; + 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(); + fqbn_ = s; + return s; + } + } + /** + * string fqbn = 2; + * @return The bytes for fqbn. + */ + public com.google.protobuf.ByteString + getFqbnBytes() { + java.lang.Object ref = fqbn_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fqbn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (instance_ != null) { + output.writeMessage(1, getInstance()); + } + if (!getFqbnBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, fqbn_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (instance_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInstance()); + } + if (!getFqbnBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, fqbn_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq other = (cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq) obj; + + if (hasInstance() != other.hasInstance()) return false; + if (hasInstance()) { + if (!getInstance() + .equals(other.getInstance())) return false; + } + if (!getFqbn() + .equals(other.getFqbn())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInstance()) { + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + } + hash = (37 * hash) + FQBN_FIELD_NUMBER; + hash = (53 * hash) + getFqbn().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.ListProgrammersAvailableForUploadReq} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.ListProgrammersAvailableForUploadReq) + cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReqOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Upload.internal_static_cc_arduino_cli_commands_ListProgrammersAvailableForUploadReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Upload.internal_static_cc_arduino_cli_commands_ListProgrammersAvailableForUploadReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq.class, cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (instanceBuilder_ == null) { + instance_ = null; + } else { + instance_ = null; + instanceBuilder_ = null; + } + fqbn_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Upload.internal_static_cc_arduino_cli_commands_ListProgrammersAvailableForUploadReq_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq getDefaultInstanceForType() { + return cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq build() { + cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq buildPartial() { + cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq result = new cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq(this); + if (instanceBuilder_ == null) { + result.instance_ = instance_; + } else { + result.instance_ = instanceBuilder_.build(); + } + result.fqbn_ = fqbn_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq) { + return mergeFrom((cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq other) { + if (other == cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq.getDefaultInstance()) return this; + if (other.hasInstance()) { + mergeInstance(other.getInstance()); + } + if (!other.getFqbn().isEmpty()) { + fqbn_ = other.fqbn_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private cc.arduino.cli.commands.Common.Instance instance_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> instanceBuilder_; + /** + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instanceBuilder_ != null || instance_ != null; + } + /** + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + if (instanceBuilder_ == null) { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } else { + return instanceBuilder_.getMessage(); + } + } + /** + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + onChanged(); + } else { + instanceBuilder_.setMessage(value); + } + + return this; + } + /** + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance( + cc.arduino.cli.commands.Common.Instance.Builder builderForValue) { + if (instanceBuilder_ == null) { + instance_ = builderForValue.build(); + onChanged(); + } else { + instanceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder mergeInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (instance_ != null) { + instance_ = + cc.arduino.cli.commands.Common.Instance.newBuilder(instance_).mergeFrom(value).buildPartial(); + } else { + instance_ = value; + } + onChanged(); + } else { + instanceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder clearInstance() { + if (instanceBuilder_ == null) { + instance_ = null; + onChanged(); + } else { + instance_ = null; + instanceBuilder_ = null; + } + + return this; + } + /** + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.Instance.Builder getInstanceBuilder() { + + onChanged(); + return getInstanceFieldBuilder().getBuilder(); + } + /** + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + if (instanceBuilder_ != null) { + return instanceBuilder_.getMessageOrBuilder(); + } else { + return instance_ == null ? + cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + } + /** + * .cc.arduino.cli.commands.Instance instance = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> + getInstanceFieldBuilder() { + if (instanceBuilder_ == null) { + instanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder>( + getInstance(), + getParentForChildren(), + isClean()); + instance_ = null; + } + return instanceBuilder_; + } + + private java.lang.Object fqbn_ = ""; + /** + * string fqbn = 2; + * @return The fqbn. + */ + public java.lang.String getFqbn() { + java.lang.Object ref = fqbn_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fqbn_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string fqbn = 2; + * @return The bytes for fqbn. + */ + public com.google.protobuf.ByteString + getFqbnBytes() { + java.lang.Object ref = fqbn_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fqbn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string fqbn = 2; + * @param value The fqbn to set. + * @return This builder for chaining. + */ + public Builder setFqbn( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + fqbn_ = value; + onChanged(); + return this; + } + /** + * string fqbn = 2; + * @return This builder for chaining. + */ + public Builder clearFqbn() { + + fqbn_ = getDefaultInstance().getFqbn(); + onChanged(); + return this; + } + /** + * string fqbn = 2; + * @param value The bytes for fqbn to set. + * @return This builder for chaining. + */ + public Builder setFqbnBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + fqbn_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.ListProgrammersAvailableForUploadReq) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.ListProgrammersAvailableForUploadReq) + private static final cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq(); + } + + public static cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListProgrammersAvailableForUploadReq parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListProgrammersAvailableForUploadReq(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadReq getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ListProgrammersAvailableForUploadRespOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.ListProgrammersAvailableForUploadResp) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .cc.arduino.cli.commands.Programmer programmers = 1; + */ + java.util.List + getProgrammersList(); + /** + * repeated .cc.arduino.cli.commands.Programmer programmers = 1; + */ + cc.arduino.cli.commands.Upload.Programmer getProgrammers(int index); + /** + * repeated .cc.arduino.cli.commands.Programmer programmers = 1; + */ + int getProgrammersCount(); + /** + * repeated .cc.arduino.cli.commands.Programmer programmers = 1; + */ + java.util.List + getProgrammersOrBuilderList(); + /** + * repeated .cc.arduino.cli.commands.Programmer programmers = 1; + */ + cc.arduino.cli.commands.Upload.ProgrammerOrBuilder getProgrammersOrBuilder( + int index); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.ListProgrammersAvailableForUploadResp} + */ + public static final class ListProgrammersAvailableForUploadResp extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.ListProgrammersAvailableForUploadResp) + ListProgrammersAvailableForUploadRespOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListProgrammersAvailableForUploadResp.newBuilder() to construct. + private ListProgrammersAvailableForUploadResp(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListProgrammersAvailableForUploadResp() { + programmers_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListProgrammersAvailableForUploadResp(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListProgrammersAvailableForUploadResp( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + programmers_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + programmers_.add( + input.readMessage(cc.arduino.cli.commands.Upload.Programmer.parser(), extensionRegistry)); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + programmers_ = java.util.Collections.unmodifiableList(programmers_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Upload.internal_static_cc_arduino_cli_commands_ListProgrammersAvailableForUploadResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Upload.internal_static_cc_arduino_cli_commands_ListProgrammersAvailableForUploadResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadResp.class, cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadResp.Builder.class); + } + + public static final int PROGRAMMERS_FIELD_NUMBER = 1; + private java.util.List programmers_; + /** + * repeated .cc.arduino.cli.commands.Programmer programmers = 1; + */ + public java.util.List getProgrammersList() { + return programmers_; + } + /** + * repeated .cc.arduino.cli.commands.Programmer programmers = 1; + */ + public java.util.List + getProgrammersOrBuilderList() { + return programmers_; + } + /** + * repeated .cc.arduino.cli.commands.Programmer programmers = 1; + */ + public int getProgrammersCount() { + return programmers_.size(); + } + /** + * repeated .cc.arduino.cli.commands.Programmer programmers = 1; + */ + public cc.arduino.cli.commands.Upload.Programmer getProgrammers(int index) { + return programmers_.get(index); + } + /** + * repeated .cc.arduino.cli.commands.Programmer programmers = 1; + */ + public cc.arduino.cli.commands.Upload.ProgrammerOrBuilder getProgrammersOrBuilder( + int index) { + return programmers_.get(index); + } + + 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 < programmers_.size(); i++) { + output.writeMessage(1, programmers_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < programmers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, programmers_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadResp)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadResp other = (cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadResp) obj; + + if (!getProgrammersList() + .equals(other.getProgrammersList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getProgrammersCount() > 0) { + hash = (37 * hash) + PROGRAMMERS_FIELD_NUMBER; + hash = (53 * hash) + getProgrammersList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadResp parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadResp parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadResp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadResp parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadResp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadResp parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadResp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadResp parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadResp parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadResp parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadResp parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadResp parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadResp 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.ListProgrammersAvailableForUploadResp} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.ListProgrammersAvailableForUploadResp) + cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadRespOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Upload.internal_static_cc_arduino_cli_commands_ListProgrammersAvailableForUploadResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Upload.internal_static_cc_arduino_cli_commands_ListProgrammersAvailableForUploadResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadResp.class, cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadResp.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadResp.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getProgrammersFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (programmersBuilder_ == null) { + programmers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + programmersBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Upload.internal_static_cc_arduino_cli_commands_ListProgrammersAvailableForUploadResp_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadResp getDefaultInstanceForType() { + return cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadResp.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadResp build() { + cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadResp result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadResp buildPartial() { + cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadResp result = new cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadResp(this); + int from_bitField0_ = bitField0_; + if (programmersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + programmers_ = java.util.Collections.unmodifiableList(programmers_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.programmers_ = programmers_; + } else { + result.programmers_ = programmersBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadResp) { + return mergeFrom((cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadResp)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadResp other) { + if (other == cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadResp.getDefaultInstance()) return this; + if (programmersBuilder_ == null) { + if (!other.programmers_.isEmpty()) { + if (programmers_.isEmpty()) { + programmers_ = other.programmers_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureProgrammersIsMutable(); + programmers_.addAll(other.programmers_); + } + onChanged(); + } + } else { + if (!other.programmers_.isEmpty()) { + if (programmersBuilder_.isEmpty()) { + programmersBuilder_.dispose(); + programmersBuilder_ = null; + programmers_ = other.programmers_; + bitField0_ = (bitField0_ & ~0x00000001); + programmersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getProgrammersFieldBuilder() : null; + } else { + programmersBuilder_.addAllMessages(other.programmers_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadResp parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadResp) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List programmers_ = + java.util.Collections.emptyList(); + private void ensureProgrammersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + programmers_ = new java.util.ArrayList(programmers_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Upload.Programmer, cc.arduino.cli.commands.Upload.Programmer.Builder, cc.arduino.cli.commands.Upload.ProgrammerOrBuilder> programmersBuilder_; + + /** + * repeated .cc.arduino.cli.commands.Programmer programmers = 1; + */ + public java.util.List getProgrammersList() { + if (programmersBuilder_ == null) { + return java.util.Collections.unmodifiableList(programmers_); + } else { + return programmersBuilder_.getMessageList(); + } + } + /** + * repeated .cc.arduino.cli.commands.Programmer programmers = 1; + */ + public int getProgrammersCount() { + if (programmersBuilder_ == null) { + return programmers_.size(); + } else { + return programmersBuilder_.getCount(); + } + } + /** + * repeated .cc.arduino.cli.commands.Programmer programmers = 1; + */ + public cc.arduino.cli.commands.Upload.Programmer getProgrammers(int index) { + if (programmersBuilder_ == null) { + return programmers_.get(index); + } else { + return programmersBuilder_.getMessage(index); + } + } + /** + * repeated .cc.arduino.cli.commands.Programmer programmers = 1; + */ + public Builder setProgrammers( + int index, cc.arduino.cli.commands.Upload.Programmer value) { + if (programmersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProgrammersIsMutable(); + programmers_.set(index, value); + onChanged(); + } else { + programmersBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .cc.arduino.cli.commands.Programmer programmers = 1; + */ + public Builder setProgrammers( + int index, cc.arduino.cli.commands.Upload.Programmer.Builder builderForValue) { + if (programmersBuilder_ == null) { + ensureProgrammersIsMutable(); + programmers_.set(index, builderForValue.build()); + onChanged(); + } else { + programmersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .cc.arduino.cli.commands.Programmer programmers = 1; + */ + public Builder addProgrammers(cc.arduino.cli.commands.Upload.Programmer value) { + if (programmersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProgrammersIsMutable(); + programmers_.add(value); + onChanged(); + } else { + programmersBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .cc.arduino.cli.commands.Programmer programmers = 1; + */ + public Builder addProgrammers( + int index, cc.arduino.cli.commands.Upload.Programmer value) { + if (programmersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProgrammersIsMutable(); + programmers_.add(index, value); + onChanged(); + } else { + programmersBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .cc.arduino.cli.commands.Programmer programmers = 1; + */ + public Builder addProgrammers( + cc.arduino.cli.commands.Upload.Programmer.Builder builderForValue) { + if (programmersBuilder_ == null) { + ensureProgrammersIsMutable(); + programmers_.add(builderForValue.build()); + onChanged(); + } else { + programmersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .cc.arduino.cli.commands.Programmer programmers = 1; + */ + public Builder addProgrammers( + int index, cc.arduino.cli.commands.Upload.Programmer.Builder builderForValue) { + if (programmersBuilder_ == null) { + ensureProgrammersIsMutable(); + programmers_.add(index, builderForValue.build()); + onChanged(); + } else { + programmersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .cc.arduino.cli.commands.Programmer programmers = 1; + */ + public Builder addAllProgrammers( + java.lang.Iterable values) { + if (programmersBuilder_ == null) { + ensureProgrammersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, programmers_); + onChanged(); + } else { + programmersBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .cc.arduino.cli.commands.Programmer programmers = 1; + */ + public Builder clearProgrammers() { + if (programmersBuilder_ == null) { + programmers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + programmersBuilder_.clear(); + } + return this; + } + /** + * repeated .cc.arduino.cli.commands.Programmer programmers = 1; + */ + public Builder removeProgrammers(int index) { + if (programmersBuilder_ == null) { + ensureProgrammersIsMutable(); + programmers_.remove(index); + onChanged(); + } else { + programmersBuilder_.remove(index); + } + return this; + } + /** + * repeated .cc.arduino.cli.commands.Programmer programmers = 1; + */ + public cc.arduino.cli.commands.Upload.Programmer.Builder getProgrammersBuilder( + int index) { + return getProgrammersFieldBuilder().getBuilder(index); + } + /** + * repeated .cc.arduino.cli.commands.Programmer programmers = 1; + */ + public cc.arduino.cli.commands.Upload.ProgrammerOrBuilder getProgrammersOrBuilder( + int index) { + if (programmersBuilder_ == null) { + return programmers_.get(index); } else { + return programmersBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .cc.arduino.cli.commands.Programmer programmers = 1; + */ + public java.util.List + getProgrammersOrBuilderList() { + if (programmersBuilder_ != null) { + return programmersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(programmers_); + } + } + /** + * repeated .cc.arduino.cli.commands.Programmer programmers = 1; + */ + public cc.arduino.cli.commands.Upload.Programmer.Builder addProgrammersBuilder() { + return getProgrammersFieldBuilder().addBuilder( + cc.arduino.cli.commands.Upload.Programmer.getDefaultInstance()); + } + /** + * repeated .cc.arduino.cli.commands.Programmer programmers = 1; + */ + public cc.arduino.cli.commands.Upload.Programmer.Builder addProgrammersBuilder( + int index) { + return getProgrammersFieldBuilder().addBuilder( + index, cc.arduino.cli.commands.Upload.Programmer.getDefaultInstance()); + } + /** + * repeated .cc.arduino.cli.commands.Programmer programmers = 1; + */ + public java.util.List + getProgrammersBuilderList() { + return getProgrammersFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Upload.Programmer, cc.arduino.cli.commands.Upload.Programmer.Builder, cc.arduino.cli.commands.Upload.ProgrammerOrBuilder> + getProgrammersFieldBuilder() { + if (programmersBuilder_ == null) { + programmersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + cc.arduino.cli.commands.Upload.Programmer, cc.arduino.cli.commands.Upload.Programmer.Builder, cc.arduino.cli.commands.Upload.ProgrammerOrBuilder>( + programmers_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + programmers_ = null; + } + return programmersBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.ListProgrammersAvailableForUploadResp) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.ListProgrammersAvailableForUploadResp) + private static final cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadResp DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadResp(); + } + + public static cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadResp getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListProgrammersAvailableForUploadResp parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListProgrammersAvailableForUploadResp(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Upload.ListProgrammersAvailableForUploadResp getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ProgrammerOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.commands.Programmer) + com.google.protobuf.MessageOrBuilder { + + /** + * string platform = 1; + * @return The platform. + */ + java.lang.String getPlatform(); + /** + * string platform = 1; + * @return The bytes for platform. + */ + com.google.protobuf.ByteString + getPlatformBytes(); + + /** + * string id = 2; + * @return The id. + */ + java.lang.String getId(); + /** + * string id = 2; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + * string name = 3; + * @return The name. + */ + java.lang.String getName(); + /** + * string name = 3; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + } + /** + * Protobuf type {@code cc.arduino.cli.commands.Programmer} + */ + public static final class Programmer extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.commands.Programmer) + ProgrammerOrBuilder { + private static final long serialVersionUID = 0L; + // Use Programmer.newBuilder() to construct. + private Programmer(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Programmer() { + platform_ = ""; + id_ = ""; + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Programmer(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Programmer( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + platform_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + id_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Upload.internal_static_cc_arduino_cli_commands_Programmer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Upload.internal_static_cc_arduino_cli_commands_Programmer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Upload.Programmer.class, cc.arduino.cli.commands.Upload.Programmer.Builder.class); + } + + public static final int PLATFORM_FIELD_NUMBER = 1; + private volatile java.lang.Object platform_; + /** + * string platform = 1; + * @return The platform. + */ + public java.lang.String getPlatform() { + java.lang.Object ref = platform_; + 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(); + platform_ = s; + return s; + } + } + /** + * string platform = 1; + * @return The bytes for platform. + */ + public com.google.protobuf.ByteString + getPlatformBytes() { + java.lang.Object ref = platform_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + platform_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ID_FIELD_NUMBER = 2; + private volatile java.lang.Object id_; + /** + * string id = 2; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + 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(); + id_ = s; + return s; + } + } + /** + * string id = 2; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object name_; + /** + * string name = 3; + * @return The name. + */ + 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 = 3; + * @return The bytes for name. + */ + 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; + } + } + + 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 (!getPlatformBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, platform_); + } + if (!getIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_); + } + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getPlatformBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, platform_); + } + if (!getIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_); + } + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.commands.Upload.Programmer)) { + return super.equals(obj); + } + cc.arduino.cli.commands.Upload.Programmer other = (cc.arduino.cli.commands.Upload.Programmer) obj; + + if (!getPlatform() + .equals(other.getPlatform())) return false; + if (!getId() + .equals(other.getId())) return false; + if (!getName() + .equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + PLATFORM_FIELD_NUMBER; + hash = (53 * hash) + getPlatform().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.commands.Upload.Programmer parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Upload.Programmer parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Upload.Programmer parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Upload.Programmer parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Upload.Programmer parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.commands.Upload.Programmer parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.commands.Upload.Programmer parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Upload.Programmer parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Upload.Programmer parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Upload.Programmer parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.commands.Upload.Programmer parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.commands.Upload.Programmer parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.commands.Upload.Programmer 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.commands.Programmer} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.commands.Programmer) + cc.arduino.cli.commands.Upload.ProgrammerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.commands.Upload.internal_static_cc_arduino_cli_commands_Programmer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.commands.Upload.internal_static_cc_arduino_cli_commands_Programmer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.commands.Upload.Programmer.class, cc.arduino.cli.commands.Upload.Programmer.Builder.class); + } + + // Construct using cc.arduino.cli.commands.Upload.Programmer.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + platform_ = ""; + + id_ = ""; + + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.commands.Upload.internal_static_cc_arduino_cli_commands_Programmer_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.commands.Upload.Programmer getDefaultInstanceForType() { + return cc.arduino.cli.commands.Upload.Programmer.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.commands.Upload.Programmer build() { + cc.arduino.cli.commands.Upload.Programmer result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.commands.Upload.Programmer buildPartial() { + cc.arduino.cli.commands.Upload.Programmer result = new cc.arduino.cli.commands.Upload.Programmer(this); + result.platform_ = platform_; + result.id_ = id_; + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.commands.Upload.Programmer) { + return mergeFrom((cc.arduino.cli.commands.Upload.Programmer)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.commands.Upload.Programmer other) { + if (other == cc.arduino.cli.commands.Upload.Programmer.getDefaultInstance()) return this; + if (!other.getPlatform().isEmpty()) { + platform_ = other.platform_; + onChanged(); + } + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.commands.Upload.Programmer parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.commands.Upload.Programmer) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object platform_ = ""; + /** + * string platform = 1; + * @return The platform. + */ + public java.lang.String getPlatform() { + java.lang.Object ref = platform_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + platform_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string platform = 1; + * @return The bytes for platform. + */ + public com.google.protobuf.ByteString + getPlatformBytes() { + java.lang.Object ref = platform_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + platform_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string platform = 1; + * @param value The platform to set. + * @return This builder for chaining. + */ + public Builder setPlatform( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + platform_ = value; + onChanged(); + return this; + } + /** + * string platform = 1; + * @return This builder for chaining. + */ + public Builder clearPlatform() { + + platform_ = getDefaultInstance().getPlatform(); + onChanged(); + return this; + } + /** + * string platform = 1; + * @param value The bytes for platform to set. + * @return This builder for chaining. + */ + public Builder setPlatformBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + platform_ = value; + onChanged(); + return this; + } + + private java.lang.Object id_ = ""; + /** + * string id = 2; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string id = 2; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string id = 2; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + * string id = 2; + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + * string id = 2; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + * string name = 3; + * @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 = 3; + * @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 = 3; + * @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; + onChanged(); + return this; + } + /** + * string name = 3; + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * string name = 3; + * @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; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.commands.Programmer) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.commands.Programmer) + private static final cc.arduino.cli.commands.Upload.Programmer DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.commands.Upload.Programmer(); + } + + public static cc.arduino.cli.commands.Upload.Programmer getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Programmer parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Programmer(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.commands.Upload.Programmer getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_UploadReq_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_UploadReq_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_UploadResp_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_UploadResp_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_BurnBootloaderReq_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_BurnBootloaderReq_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_BurnBootloaderResp_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_BurnBootloaderResp_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_ListProgrammersAvailableForUploadReq_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_ListProgrammersAvailableForUploadReq_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_ListProgrammersAvailableForUploadResp_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_ListProgrammersAvailableForUploadResp_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_commands_Programmer_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_commands_Programmer_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\025commands/upload.proto\022\027cc.arduino.cli." + + "commands\032\025commands/common.proto\"\323\001\n\tUplo" + + "adReq\0223\n\010instance\030\001 \001(\0132!.cc.arduino.cli" + + ".commands.Instance\022\014\n\004fqbn\030\002 \001(\t\022\023\n\013sket" + + "ch_path\030\003 \001(\t\022\014\n\004port\030\004 \001(\t\022\017\n\007verbose\030\005" + + " \001(\010\022\016\n\006verify\030\006 \001(\010\022\027\n\013import_file\030\007 \001(" + + "\tB\002\030\001\022\022\n\nimport_dir\030\010 \001(\t\022\022\n\nprogrammer\030" + + "\t \001(\t\"4\n\nUploadResp\022\022\n\nout_stream\030\001 \001(\014\022" + + "\022\n\nerr_stream\030\002 \001(\014\"\231\001\n\021BurnBootloaderRe" + + "q\0223\n\010instance\030\001 \001(\0132!.cc.arduino.cli.com" + + "mands.Instance\022\014\n\004fqbn\030\002 \001(\t\022\014\n\004port\030\003 \001" + + "(\t\022\017\n\007verbose\030\004 \001(\010\022\016\n\006verify\030\005 \001(\010\022\022\n\np" + + "rogrammer\030\006 \001(\t\"<\n\022BurnBootloaderResp\022\022\n" + + "\nout_stream\030\001 \001(\014\022\022\n\nerr_stream\030\002 \001(\014\"i\n" + + "$ListProgrammersAvailableForUploadReq\0223\n" + + "\010instance\030\001 \001(\0132!.cc.arduino.cli.command" + + "s.Instance\022\014\n\004fqbn\030\002 \001(\t\"a\n%ListProgramm" + + "ersAvailableForUploadResp\0228\n\013programmers" + + "\030\001 \003(\0132#.cc.arduino.cli.commands.Program" + + "mer\"8\n\nProgrammer\022\020\n\010platform\030\001 \001(\t\022\n\n\002i" + + "d\030\002 \001(\t\022\014\n\004name\030\003 \001(\tB-Z+github.com/ardu" + + "ino/arduino-cli/rpc/commandsb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + cc.arduino.cli.commands.Common.getDescriptor(), + }); + internal_static_cc_arduino_cli_commands_UploadReq_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_cc_arduino_cli_commands_UploadReq_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_UploadReq_descriptor, + new java.lang.String[] { "Instance", "Fqbn", "SketchPath", "Port", "Verbose", "Verify", "ImportFile", "ImportDir", "Programmer", }); + internal_static_cc_arduino_cli_commands_UploadResp_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_cc_arduino_cli_commands_UploadResp_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_UploadResp_descriptor, + new java.lang.String[] { "OutStream", "ErrStream", }); + internal_static_cc_arduino_cli_commands_BurnBootloaderReq_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_cc_arduino_cli_commands_BurnBootloaderReq_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_BurnBootloaderReq_descriptor, + new java.lang.String[] { "Instance", "Fqbn", "Port", "Verbose", "Verify", "Programmer", }); + internal_static_cc_arduino_cli_commands_BurnBootloaderResp_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_cc_arduino_cli_commands_BurnBootloaderResp_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_BurnBootloaderResp_descriptor, + new java.lang.String[] { "OutStream", "ErrStream", }); + internal_static_cc_arduino_cli_commands_ListProgrammersAvailableForUploadReq_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_cc_arduino_cli_commands_ListProgrammersAvailableForUploadReq_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_ListProgrammersAvailableForUploadReq_descriptor, + new java.lang.String[] { "Instance", "Fqbn", }); + internal_static_cc_arduino_cli_commands_ListProgrammersAvailableForUploadResp_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_cc_arduino_cli_commands_ListProgrammersAvailableForUploadResp_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_ListProgrammersAvailableForUploadResp_descriptor, + new java.lang.String[] { "Programmers", }); + internal_static_cc_arduino_cli_commands_Programmer_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_cc_arduino_cli_commands_Programmer_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_commands_Programmer_descriptor, + new java.lang.String[] { "Platform", "Id", "Name", }); + cc.arduino.cli.commands.Common.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/arduino-core/src/cc/arduino/cli/debug/DebugGrpc.java b/arduino-core/src/cc/arduino/cli/debug/DebugGrpc.java new file mode 100644 index 00000000000..7c5ba2c4d42 --- /dev/null +++ b/arduino-core/src/cc/arduino/cli/debug/DebugGrpc.java @@ -0,0 +1,285 @@ +package cc.arduino.cli.debug; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall; +import static io.grpc.stub.ClientCalls.asyncClientStreamingCall; +import static io.grpc.stub.ClientCalls.asyncServerStreamingCall; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingServerStreamingCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; +import static io.grpc.stub.ServerCalls.asyncClientStreamingCall; +import static io.grpc.stub.ServerCalls.asyncServerStreamingCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + *
+ * Service that abstract a debug Session usage
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.20.0)", + comments = "Source: debug/debug.proto") +public final class DebugGrpc { + + private DebugGrpc() {} + + public static final String SERVICE_NAME = "cc.arduino.cli.debug.Debug"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getDebugMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "Debug", + requestType = cc.arduino.cli.debug.DebugOuterClass.DebugReq.class, + responseType = cc.arduino.cli.debug.DebugOuterClass.DebugResp.class, + methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) + public static io.grpc.MethodDescriptor getDebugMethod() { + io.grpc.MethodDescriptor getDebugMethod; + if ((getDebugMethod = DebugGrpc.getDebugMethod) == null) { + synchronized (DebugGrpc.class) { + if ((getDebugMethod = DebugGrpc.getDebugMethod) == null) { + DebugGrpc.getDebugMethod = getDebugMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) + .setFullMethodName(generateFullMethodName( + "cc.arduino.cli.debug.Debug", "Debug")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.debug.DebugOuterClass.DebugReq.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.debug.DebugOuterClass.DebugResp.getDefaultInstance())) + .setSchemaDescriptor(new DebugMethodDescriptorSupplier("Debug")) + .build(); + } + } + } + return getDebugMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static DebugStub newStub(io.grpc.Channel channel) { + return new DebugStub(channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static DebugBlockingStub newBlockingStub( + io.grpc.Channel channel) { + return new DebugBlockingStub(channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static DebugFutureStub newFutureStub( + io.grpc.Channel channel) { + return new DebugFutureStub(channel); + } + + /** + *
+   * Service that abstract a debug Session usage
+   * 
+ */ + public static abstract class DebugImplBase implements io.grpc.BindableService { + + /** + *
+     * Start a debug session and communicate with the debugger tool.
+     * 
+ */ + public io.grpc.stub.StreamObserver debug( + io.grpc.stub.StreamObserver responseObserver) { + return asyncUnimplementedStreamingCall(getDebugMethod(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getDebugMethod(), + asyncBidiStreamingCall( + new MethodHandlers< + cc.arduino.cli.debug.DebugOuterClass.DebugReq, + cc.arduino.cli.debug.DebugOuterClass.DebugResp>( + this, METHODID_DEBUG))) + .build(); + } + } + + /** + *
+   * Service that abstract a debug Session usage
+   * 
+ */ + public static final class DebugStub extends io.grpc.stub.AbstractStub { + private DebugStub(io.grpc.Channel channel) { + super(channel); + } + + private DebugStub(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DebugStub build(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + return new DebugStub(channel, callOptions); + } + + /** + *
+     * Start a debug session and communicate with the debugger tool.
+     * 
+ */ + public io.grpc.stub.StreamObserver debug( + io.grpc.stub.StreamObserver responseObserver) { + return asyncBidiStreamingCall( + getChannel().newCall(getDebugMethod(), getCallOptions()), responseObserver); + } + } + + /** + *
+   * Service that abstract a debug Session usage
+   * 
+ */ + public static final class DebugBlockingStub extends io.grpc.stub.AbstractStub { + private DebugBlockingStub(io.grpc.Channel channel) { + super(channel); + } + + private DebugBlockingStub(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DebugBlockingStub build(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + return new DebugBlockingStub(channel, callOptions); + } + } + + /** + *
+   * Service that abstract a debug Session usage
+   * 
+ */ + public static final class DebugFutureStub extends io.grpc.stub.AbstractStub { + private DebugFutureStub(io.grpc.Channel channel) { + super(channel); + } + + private DebugFutureStub(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DebugFutureStub build(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + return new DebugFutureStub(channel, callOptions); + } + } + + private static final int METHODID_DEBUG = 0; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final DebugImplBase serviceImpl; + private final int methodId; + + MethodHandlers(DebugImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_DEBUG: + return (io.grpc.stub.StreamObserver) serviceImpl.debug( + (io.grpc.stub.StreamObserver) responseObserver); + default: + throw new AssertionError(); + } + } + } + + private static abstract class DebugBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + DebugBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return cc.arduino.cli.debug.DebugOuterClass.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Debug"); + } + } + + private static final class DebugFileDescriptorSupplier + extends DebugBaseDescriptorSupplier { + DebugFileDescriptorSupplier() {} + } + + private static final class DebugMethodDescriptorSupplier + extends DebugBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + DebugMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (DebugGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new DebugFileDescriptorSupplier()) + .addMethod(getDebugMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/arduino-core/src/cc/arduino/cli/debug/DebugOuterClass.java b/arduino-core/src/cc/arduino/cli/debug/DebugOuterClass.java new file mode 100644 index 00000000000..5af83c4df78 --- /dev/null +++ b/arduino-core/src/cc/arduino/cli/debug/DebugOuterClass.java @@ -0,0 +1,3515 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: debug/debug.proto + +package cc.arduino.cli.debug; + +public final class DebugOuterClass { + private DebugOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface DebugReqOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.debug.DebugReq) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Provides information to the debug that specifies which is the target.
+     * The first `StreamingOpenReq` message must contain a `DebugReq`
+     * message.
+     * 
+ * + * .cc.arduino.cli.debug.DebugConfigReq debugReq = 1; + * @return Whether the debugReq field is set. + */ + boolean hasDebugReq(); + /** + *
+     * Provides information to the debug that specifies which is the target.
+     * The first `StreamingOpenReq` message must contain a `DebugReq`
+     * message.
+     * 
+ * + * .cc.arduino.cli.debug.DebugConfigReq debugReq = 1; + * @return The debugReq. + */ + cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq getDebugReq(); + /** + *
+     * Provides information to the debug that specifies which is the target.
+     * The first `StreamingOpenReq` message must contain a `DebugReq`
+     * message.
+     * 
+ * + * .cc.arduino.cli.debug.DebugConfigReq debugReq = 1; + */ + cc.arduino.cli.debug.DebugOuterClass.DebugConfigReqOrBuilder getDebugReqOrBuilder(); + + /** + *
+     * The data to be sent to the target being monitored.
+     * 
+ * + * bytes data = 2; + * @return The data. + */ + com.google.protobuf.ByteString getData(); + + /** + *
+     * Set this to true to send and Interrupt signal to the debugger process
+     * 
+ * + * bool send_interrupt = 3; + * @return The sendInterrupt. + */ + boolean getSendInterrupt(); + } + /** + *
+   * The top-level message sent by the client for the `Debug` method.
+   * Multiple `DebugReq` messages can be sent but the first message
+   * must contain a `DebugReq` message to initialize the debug session.
+   * All subsequent messages must contain bytes to be sent to the debug session
+   * and must not contain a `DebugReq` message.
+   * 
+ * + * Protobuf type {@code cc.arduino.cli.debug.DebugReq} + */ + public static final class DebugReq extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.debug.DebugReq) + DebugReqOrBuilder { + private static final long serialVersionUID = 0L; + // Use DebugReq.newBuilder() to construct. + private DebugReq(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DebugReq() { + data_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DebugReq(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DebugReq( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq.Builder subBuilder = null; + if (debugReq_ != null) { + subBuilder = debugReq_.toBuilder(); + } + debugReq_ = input.readMessage(cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(debugReq_); + debugReq_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + + data_ = input.readBytes(); + break; + } + case 24: { + + sendInterrupt_ = input.readBool(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.debug.DebugOuterClass.internal_static_cc_arduino_cli_debug_DebugReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.debug.DebugOuterClass.internal_static_cc_arduino_cli_debug_DebugReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.debug.DebugOuterClass.DebugReq.class, cc.arduino.cli.debug.DebugOuterClass.DebugReq.Builder.class); + } + + public static final int DEBUGREQ_FIELD_NUMBER = 1; + private cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq debugReq_; + /** + *
+     * Provides information to the debug that specifies which is the target.
+     * The first `StreamingOpenReq` message must contain a `DebugReq`
+     * message.
+     * 
+ * + * .cc.arduino.cli.debug.DebugConfigReq debugReq = 1; + * @return Whether the debugReq field is set. + */ + public boolean hasDebugReq() { + return debugReq_ != null; + } + /** + *
+     * Provides information to the debug that specifies which is the target.
+     * The first `StreamingOpenReq` message must contain a `DebugReq`
+     * message.
+     * 
+ * + * .cc.arduino.cli.debug.DebugConfigReq debugReq = 1; + * @return The debugReq. + */ + public cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq getDebugReq() { + return debugReq_ == null ? cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq.getDefaultInstance() : debugReq_; + } + /** + *
+     * Provides information to the debug that specifies which is the target.
+     * The first `StreamingOpenReq` message must contain a `DebugReq`
+     * message.
+     * 
+ * + * .cc.arduino.cli.debug.DebugConfigReq debugReq = 1; + */ + public cc.arduino.cli.debug.DebugOuterClass.DebugConfigReqOrBuilder getDebugReqOrBuilder() { + return getDebugReq(); + } + + public static final int DATA_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString data_; + /** + *
+     * The data to be sent to the target being monitored.
+     * 
+ * + * bytes data = 2; + * @return The data. + */ + public com.google.protobuf.ByteString getData() { + return data_; + } + + public static final int SEND_INTERRUPT_FIELD_NUMBER = 3; + private boolean sendInterrupt_; + /** + *
+     * Set this to true to send and Interrupt signal to the debugger process
+     * 
+ * + * bool send_interrupt = 3; + * @return The sendInterrupt. + */ + public boolean getSendInterrupt() { + return sendInterrupt_; + } + + 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 (debugReq_ != null) { + output.writeMessage(1, getDebugReq()); + } + if (!data_.isEmpty()) { + output.writeBytes(2, data_); + } + if (sendInterrupt_ != false) { + output.writeBool(3, sendInterrupt_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (debugReq_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getDebugReq()); + } + if (!data_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, data_); + } + if (sendInterrupt_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, sendInterrupt_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.debug.DebugOuterClass.DebugReq)) { + return super.equals(obj); + } + cc.arduino.cli.debug.DebugOuterClass.DebugReq other = (cc.arduino.cli.debug.DebugOuterClass.DebugReq) obj; + + if (hasDebugReq() != other.hasDebugReq()) return false; + if (hasDebugReq()) { + if (!getDebugReq() + .equals(other.getDebugReq())) return false; + } + if (!getData() + .equals(other.getData())) return false; + if (getSendInterrupt() + != other.getSendInterrupt()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDebugReq()) { + hash = (37 * hash) + DEBUGREQ_FIELD_NUMBER; + hash = (53 * hash) + getDebugReq().hashCode(); + } + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + hash = (37 * hash) + SEND_INTERRUPT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getSendInterrupt()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.debug.DebugOuterClass.DebugReq parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.debug.DebugOuterClass.DebugReq parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.debug.DebugOuterClass.DebugReq parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.debug.DebugOuterClass.DebugReq parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.debug.DebugOuterClass.DebugReq parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.debug.DebugOuterClass.DebugReq parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.debug.DebugOuterClass.DebugReq parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.debug.DebugOuterClass.DebugReq parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.debug.DebugOuterClass.DebugReq parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.debug.DebugOuterClass.DebugReq parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.debug.DebugOuterClass.DebugReq parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.debug.DebugOuterClass.DebugReq parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.debug.DebugOuterClass.DebugReq 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * The top-level message sent by the client for the `Debug` method.
+     * Multiple `DebugReq` messages can be sent but the first message
+     * must contain a `DebugReq` message to initialize the debug session.
+     * All subsequent messages must contain bytes to be sent to the debug session
+     * and must not contain a `DebugReq` message.
+     * 
+ * + * Protobuf type {@code cc.arduino.cli.debug.DebugReq} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.debug.DebugReq) + cc.arduino.cli.debug.DebugOuterClass.DebugReqOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.debug.DebugOuterClass.internal_static_cc_arduino_cli_debug_DebugReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.debug.DebugOuterClass.internal_static_cc_arduino_cli_debug_DebugReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.debug.DebugOuterClass.DebugReq.class, cc.arduino.cli.debug.DebugOuterClass.DebugReq.Builder.class); + } + + // Construct using cc.arduino.cli.debug.DebugOuterClass.DebugReq.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (debugReqBuilder_ == null) { + debugReq_ = null; + } else { + debugReq_ = null; + debugReqBuilder_ = null; + } + data_ = com.google.protobuf.ByteString.EMPTY; + + sendInterrupt_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.debug.DebugOuterClass.internal_static_cc_arduino_cli_debug_DebugReq_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.debug.DebugOuterClass.DebugReq getDefaultInstanceForType() { + return cc.arduino.cli.debug.DebugOuterClass.DebugReq.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.debug.DebugOuterClass.DebugReq build() { + cc.arduino.cli.debug.DebugOuterClass.DebugReq result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.debug.DebugOuterClass.DebugReq buildPartial() { + cc.arduino.cli.debug.DebugOuterClass.DebugReq result = new cc.arduino.cli.debug.DebugOuterClass.DebugReq(this); + if (debugReqBuilder_ == null) { + result.debugReq_ = debugReq_; + } else { + result.debugReq_ = debugReqBuilder_.build(); + } + result.data_ = data_; + result.sendInterrupt_ = sendInterrupt_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.debug.DebugOuterClass.DebugReq) { + return mergeFrom((cc.arduino.cli.debug.DebugOuterClass.DebugReq)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.debug.DebugOuterClass.DebugReq other) { + if (other == cc.arduino.cli.debug.DebugOuterClass.DebugReq.getDefaultInstance()) return this; + if (other.hasDebugReq()) { + mergeDebugReq(other.getDebugReq()); + } + if (other.getData() != com.google.protobuf.ByteString.EMPTY) { + setData(other.getData()); + } + if (other.getSendInterrupt() != false) { + setSendInterrupt(other.getSendInterrupt()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.debug.DebugOuterClass.DebugReq parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.debug.DebugOuterClass.DebugReq) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq debugReq_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq, cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq.Builder, cc.arduino.cli.debug.DebugOuterClass.DebugConfigReqOrBuilder> debugReqBuilder_; + /** + *
+       * Provides information to the debug that specifies which is the target.
+       * The first `StreamingOpenReq` message must contain a `DebugReq`
+       * message.
+       * 
+ * + * .cc.arduino.cli.debug.DebugConfigReq debugReq = 1; + * @return Whether the debugReq field is set. + */ + public boolean hasDebugReq() { + return debugReqBuilder_ != null || debugReq_ != null; + } + /** + *
+       * Provides information to the debug that specifies which is the target.
+       * The first `StreamingOpenReq` message must contain a `DebugReq`
+       * message.
+       * 
+ * + * .cc.arduino.cli.debug.DebugConfigReq debugReq = 1; + * @return The debugReq. + */ + public cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq getDebugReq() { + if (debugReqBuilder_ == null) { + return debugReq_ == null ? cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq.getDefaultInstance() : debugReq_; + } else { + return debugReqBuilder_.getMessage(); + } + } + /** + *
+       * Provides information to the debug that specifies which is the target.
+       * The first `StreamingOpenReq` message must contain a `DebugReq`
+       * message.
+       * 
+ * + * .cc.arduino.cli.debug.DebugConfigReq debugReq = 1; + */ + public Builder setDebugReq(cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq value) { + if (debugReqBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + debugReq_ = value; + onChanged(); + } else { + debugReqBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Provides information to the debug that specifies which is the target.
+       * The first `StreamingOpenReq` message must contain a `DebugReq`
+       * message.
+       * 
+ * + * .cc.arduino.cli.debug.DebugConfigReq debugReq = 1; + */ + public Builder setDebugReq( + cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq.Builder builderForValue) { + if (debugReqBuilder_ == null) { + debugReq_ = builderForValue.build(); + onChanged(); + } else { + debugReqBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Provides information to the debug that specifies which is the target.
+       * The first `StreamingOpenReq` message must contain a `DebugReq`
+       * message.
+       * 
+ * + * .cc.arduino.cli.debug.DebugConfigReq debugReq = 1; + */ + public Builder mergeDebugReq(cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq value) { + if (debugReqBuilder_ == null) { + if (debugReq_ != null) { + debugReq_ = + cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq.newBuilder(debugReq_).mergeFrom(value).buildPartial(); + } else { + debugReq_ = value; + } + onChanged(); + } else { + debugReqBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Provides information to the debug that specifies which is the target.
+       * The first `StreamingOpenReq` message must contain a `DebugReq`
+       * message.
+       * 
+ * + * .cc.arduino.cli.debug.DebugConfigReq debugReq = 1; + */ + public Builder clearDebugReq() { + if (debugReqBuilder_ == null) { + debugReq_ = null; + onChanged(); + } else { + debugReq_ = null; + debugReqBuilder_ = null; + } + + return this; + } + /** + *
+       * Provides information to the debug that specifies which is the target.
+       * The first `StreamingOpenReq` message must contain a `DebugReq`
+       * message.
+       * 
+ * + * .cc.arduino.cli.debug.DebugConfigReq debugReq = 1; + */ + public cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq.Builder getDebugReqBuilder() { + + onChanged(); + return getDebugReqFieldBuilder().getBuilder(); + } + /** + *
+       * Provides information to the debug that specifies which is the target.
+       * The first `StreamingOpenReq` message must contain a `DebugReq`
+       * message.
+       * 
+ * + * .cc.arduino.cli.debug.DebugConfigReq debugReq = 1; + */ + public cc.arduino.cli.debug.DebugOuterClass.DebugConfigReqOrBuilder getDebugReqOrBuilder() { + if (debugReqBuilder_ != null) { + return debugReqBuilder_.getMessageOrBuilder(); + } else { + return debugReq_ == null ? + cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq.getDefaultInstance() : debugReq_; + } + } + /** + *
+       * Provides information to the debug that specifies which is the target.
+       * The first `StreamingOpenReq` message must contain a `DebugReq`
+       * message.
+       * 
+ * + * .cc.arduino.cli.debug.DebugConfigReq debugReq = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq, cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq.Builder, cc.arduino.cli.debug.DebugOuterClass.DebugConfigReqOrBuilder> + getDebugReqFieldBuilder() { + if (debugReqBuilder_ == null) { + debugReqBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq, cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq.Builder, cc.arduino.cli.debug.DebugOuterClass.DebugConfigReqOrBuilder>( + getDebugReq(), + getParentForChildren(), + isClean()); + debugReq_ = null; + } + return debugReqBuilder_; + } + + private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+       * The data to be sent to the target being monitored.
+       * 
+ * + * bytes data = 2; + * @return The data. + */ + public com.google.protobuf.ByteString getData() { + return data_; + } + /** + *
+       * The data to be sent to the target being monitored.
+       * 
+ * + * bytes data = 2; + * @param value The data to set. + * @return This builder for chaining. + */ + public Builder setData(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + data_ = value; + onChanged(); + return this; + } + /** + *
+       * The data to be sent to the target being monitored.
+       * 
+ * + * bytes data = 2; + * @return This builder for chaining. + */ + public Builder clearData() { + + data_ = getDefaultInstance().getData(); + onChanged(); + return this; + } + + private boolean sendInterrupt_ ; + /** + *
+       * Set this to true to send and Interrupt signal to the debugger process
+       * 
+ * + * bool send_interrupt = 3; + * @return The sendInterrupt. + */ + public boolean getSendInterrupt() { + return sendInterrupt_; + } + /** + *
+       * Set this to true to send and Interrupt signal to the debugger process
+       * 
+ * + * bool send_interrupt = 3; + * @param value The sendInterrupt to set. + * @return This builder for chaining. + */ + public Builder setSendInterrupt(boolean value) { + + sendInterrupt_ = value; + onChanged(); + return this; + } + /** + *
+       * Set this to true to send and Interrupt signal to the debugger process
+       * 
+ * + * bool send_interrupt = 3; + * @return This builder for chaining. + */ + public Builder clearSendInterrupt() { + + sendInterrupt_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.debug.DebugReq) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.debug.DebugReq) + private static final cc.arduino.cli.debug.DebugOuterClass.DebugReq DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.debug.DebugOuterClass.DebugReq(); + } + + public static cc.arduino.cli.debug.DebugOuterClass.DebugReq getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DebugReq parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DebugReq(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.debug.DebugOuterClass.DebugReq getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DebugConfigReqOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.debug.DebugConfigReq) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + boolean hasInstance(); + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + cc.arduino.cli.commands.Common.Instance getInstance(); + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder(); + + /** + *
+     * Fully qualified board name of the board in use
+     * (e.g., `arduino:samd:mkr1000`). If this is omitted, the FQBN attached to
+     * the sketch will be used.
+     * 
+ * + * string fqbn = 2; + * @return The fqbn. + */ + java.lang.String getFqbn(); + /** + *
+     * Fully qualified board name of the board in use
+     * (e.g., `arduino:samd:mkr1000`). If this is omitted, the FQBN attached to
+     * the sketch will be used.
+     * 
+ * + * string fqbn = 2; + * @return The bytes for fqbn. + */ + com.google.protobuf.ByteString + getFqbnBytes(); + + /** + *
+     * Path to the sketch that is running on the board. The compiled executable
+     * is expected to be located under this path.
+     * 
+ * + * string sketch_path = 3; + * @return The sketchPath. + */ + java.lang.String getSketchPath(); + /** + *
+     * Path to the sketch that is running on the board. The compiled executable
+     * is expected to be located under this path.
+     * 
+ * + * string sketch_path = 3; + * @return The bytes for sketchPath. + */ + com.google.protobuf.ByteString + getSketchPathBytes(); + + /** + *
+     * Port of the debugger. Set to `none` if the debugger doesn't use a port.
+     * 
+ * + * string port = 4; + * @return The port. + */ + java.lang.String getPort(); + /** + *
+     * Port of the debugger. Set to `none` if the debugger doesn't use a port.
+     * 
+ * + * string port = 4; + * @return The bytes for port. + */ + com.google.protobuf.ByteString + getPortBytes(); + + /** + *
+     * Which GDB command interpreter to use.
+     * 
+ * + * string interpreter = 5; + * @return The interpreter. + */ + java.lang.String getInterpreter(); + /** + *
+     * Which GDB command interpreter to use.
+     * 
+ * + * string interpreter = 5; + * @return The bytes for interpreter. + */ + com.google.protobuf.ByteString + getInterpreterBytes(); + + /** + *
+     * DEPRECATED: use import_dir instead
+     * 
+ * + * string import_file = 7 [deprecated = true]; + * @return The importFile. + */ + @java.lang.Deprecated java.lang.String getImportFile(); + /** + *
+     * DEPRECATED: use import_dir instead
+     * 
+ * + * string import_file = 7 [deprecated = true]; + * @return The bytes for importFile. + */ + @java.lang.Deprecated com.google.protobuf.ByteString + getImportFileBytes(); + + /** + *
+     * Directory containing the compiled executable. If `import_dir` is not
+     * specified, the executable is assumed to be in
+     * `{sketch_path}/build/{fqbn}/`.
+     * 
+ * + * string import_dir = 8; + * @return The importDir. + */ + java.lang.String getImportDir(); + /** + *
+     * Directory containing the compiled executable. If `import_dir` is not
+     * specified, the executable is assumed to be in
+     * `{sketch_path}/build/{fqbn}/`.
+     * 
+ * + * string import_dir = 8; + * @return The bytes for importDir. + */ + com.google.protobuf.ByteString + getImportDirBytes(); + } + /** + * Protobuf type {@code cc.arduino.cli.debug.DebugConfigReq} + */ + public static final class DebugConfigReq extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.debug.DebugConfigReq) + DebugConfigReqOrBuilder { + private static final long serialVersionUID = 0L; + // Use DebugConfigReq.newBuilder() to construct. + private DebugConfigReq(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DebugConfigReq() { + fqbn_ = ""; + sketchPath_ = ""; + port_ = ""; + interpreter_ = ""; + importFile_ = ""; + importDir_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DebugConfigReq(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DebugConfigReq( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cc.arduino.cli.commands.Common.Instance.Builder subBuilder = null; + if (instance_ != null) { + subBuilder = instance_.toBuilder(); + } + instance_ = input.readMessage(cc.arduino.cli.commands.Common.Instance.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(instance_); + instance_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + fqbn_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + sketchPath_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + port_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + interpreter_ = s; + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + + importFile_ = s; + break; + } + case 66: { + java.lang.String s = input.readStringRequireUtf8(); + + importDir_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.debug.DebugOuterClass.internal_static_cc_arduino_cli_debug_DebugConfigReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.debug.DebugOuterClass.internal_static_cc_arduino_cli_debug_DebugConfigReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq.class, cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq.Builder.class); + } + + public static final int INSTANCE_FIELD_NUMBER = 1; + private cc.arduino.cli.commands.Common.Instance instance_; + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instance_ != null; + } + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + /** + *
+     * Arduino Core Service instance from the `Init` response.
+     * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + return getInstance(); + } + + public static final int FQBN_FIELD_NUMBER = 2; + private volatile java.lang.Object fqbn_; + /** + *
+     * Fully qualified board name of the board in use
+     * (e.g., `arduino:samd:mkr1000`). If this is omitted, the FQBN attached to
+     * the sketch will be used.
+     * 
+ * + * string fqbn = 2; + * @return The fqbn. + */ + public java.lang.String getFqbn() { + java.lang.Object ref = fqbn_; + 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(); + fqbn_ = s; + return s; + } + } + /** + *
+     * Fully qualified board name of the board in use
+     * (e.g., `arduino:samd:mkr1000`). If this is omitted, the FQBN attached to
+     * the sketch will be used.
+     * 
+ * + * string fqbn = 2; + * @return The bytes for fqbn. + */ + public com.google.protobuf.ByteString + getFqbnBytes() { + java.lang.Object ref = fqbn_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fqbn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SKETCH_PATH_FIELD_NUMBER = 3; + private volatile java.lang.Object sketchPath_; + /** + *
+     * Path to the sketch that is running on the board. The compiled executable
+     * is expected to be located under this path.
+     * 
+ * + * string sketch_path = 3; + * @return The sketchPath. + */ + public java.lang.String getSketchPath() { + java.lang.Object ref = sketchPath_; + 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(); + sketchPath_ = s; + return s; + } + } + /** + *
+     * Path to the sketch that is running on the board. The compiled executable
+     * is expected to be located under this path.
+     * 
+ * + * string sketch_path = 3; + * @return The bytes for sketchPath. + */ + public com.google.protobuf.ByteString + getSketchPathBytes() { + java.lang.Object ref = sketchPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sketchPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PORT_FIELD_NUMBER = 4; + private volatile java.lang.Object port_; + /** + *
+     * Port of the debugger. Set to `none` if the debugger doesn't use a port.
+     * 
+ * + * string port = 4; + * @return The port. + */ + public java.lang.String getPort() { + java.lang.Object ref = port_; + 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(); + port_ = s; + return s; + } + } + /** + *
+     * Port of the debugger. Set to `none` if the debugger doesn't use a port.
+     * 
+ * + * string port = 4; + * @return The bytes for port. + */ + public com.google.protobuf.ByteString + getPortBytes() { + java.lang.Object ref = port_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + port_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INTERPRETER_FIELD_NUMBER = 5; + private volatile java.lang.Object interpreter_; + /** + *
+     * Which GDB command interpreter to use.
+     * 
+ * + * string interpreter = 5; + * @return The interpreter. + */ + public java.lang.String getInterpreter() { + java.lang.Object ref = interpreter_; + 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(); + interpreter_ = s; + return s; + } + } + /** + *
+     * Which GDB command interpreter to use.
+     * 
+ * + * string interpreter = 5; + * @return The bytes for interpreter. + */ + public com.google.protobuf.ByteString + getInterpreterBytes() { + java.lang.Object ref = interpreter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + interpreter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMPORT_FILE_FIELD_NUMBER = 7; + private volatile java.lang.Object importFile_; + /** + *
+     * DEPRECATED: use import_dir instead
+     * 
+ * + * string import_file = 7 [deprecated = true]; + * @return The importFile. + */ + @java.lang.Deprecated public java.lang.String getImportFile() { + java.lang.Object ref = importFile_; + 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(); + importFile_ = s; + return s; + } + } + /** + *
+     * DEPRECATED: use import_dir instead
+     * 
+ * + * string import_file = 7 [deprecated = true]; + * @return The bytes for importFile. + */ + @java.lang.Deprecated public com.google.protobuf.ByteString + getImportFileBytes() { + java.lang.Object ref = importFile_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + importFile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMPORT_DIR_FIELD_NUMBER = 8; + private volatile java.lang.Object importDir_; + /** + *
+     * Directory containing the compiled executable. If `import_dir` is not
+     * specified, the executable is assumed to be in
+     * `{sketch_path}/build/{fqbn}/`.
+     * 
+ * + * string import_dir = 8; + * @return The importDir. + */ + public java.lang.String getImportDir() { + java.lang.Object ref = importDir_; + 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(); + importDir_ = s; + return s; + } + } + /** + *
+     * Directory containing the compiled executable. If `import_dir` is not
+     * specified, the executable is assumed to be in
+     * `{sketch_path}/build/{fqbn}/`.
+     * 
+ * + * string import_dir = 8; + * @return The bytes for importDir. + */ + public com.google.protobuf.ByteString + getImportDirBytes() { + java.lang.Object ref = importDir_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + importDir_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (instance_ != null) { + output.writeMessage(1, getInstance()); + } + if (!getFqbnBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, fqbn_); + } + if (!getSketchPathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, sketchPath_); + } + if (!getPortBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, port_); + } + if (!getInterpreterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, interpreter_); + } + if (!getImportFileBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, importFile_); + } + if (!getImportDirBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, importDir_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (instance_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getInstance()); + } + if (!getFqbnBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, fqbn_); + } + if (!getSketchPathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, sketchPath_); + } + if (!getPortBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, port_); + } + if (!getInterpreterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, interpreter_); + } + if (!getImportFileBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, importFile_); + } + if (!getImportDirBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, importDir_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq)) { + return super.equals(obj); + } + cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq other = (cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq) obj; + + if (hasInstance() != other.hasInstance()) return false; + if (hasInstance()) { + if (!getInstance() + .equals(other.getInstance())) return false; + } + if (!getFqbn() + .equals(other.getFqbn())) return false; + if (!getSketchPath() + .equals(other.getSketchPath())) return false; + if (!getPort() + .equals(other.getPort())) return false; + if (!getInterpreter() + .equals(other.getInterpreter())) return false; + if (!getImportFile() + .equals(other.getImportFile())) return false; + if (!getImportDir() + .equals(other.getImportDir())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasInstance()) { + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + } + hash = (37 * hash) + FQBN_FIELD_NUMBER; + hash = (53 * hash) + getFqbn().hashCode(); + hash = (37 * hash) + SKETCH_PATH_FIELD_NUMBER; + hash = (53 * hash) + getSketchPath().hashCode(); + hash = (37 * hash) + PORT_FIELD_NUMBER; + hash = (53 * hash) + getPort().hashCode(); + hash = (37 * hash) + INTERPRETER_FIELD_NUMBER; + hash = (53 * hash) + getInterpreter().hashCode(); + hash = (37 * hash) + IMPORT_FILE_FIELD_NUMBER; + hash = (53 * hash) + getImportFile().hashCode(); + hash = (37 * hash) + IMPORT_DIR_FIELD_NUMBER; + hash = (53 * hash) + getImportDir().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.debug.DebugConfigReq} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.debug.DebugConfigReq) + cc.arduino.cli.debug.DebugOuterClass.DebugConfigReqOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.debug.DebugOuterClass.internal_static_cc_arduino_cli_debug_DebugConfigReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.debug.DebugOuterClass.internal_static_cc_arduino_cli_debug_DebugConfigReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq.class, cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq.Builder.class); + } + + // Construct using cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (instanceBuilder_ == null) { + instance_ = null; + } else { + instance_ = null; + instanceBuilder_ = null; + } + fqbn_ = ""; + + sketchPath_ = ""; + + port_ = ""; + + interpreter_ = ""; + + importFile_ = ""; + + importDir_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.debug.DebugOuterClass.internal_static_cc_arduino_cli_debug_DebugConfigReq_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq getDefaultInstanceForType() { + return cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq build() { + cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq buildPartial() { + cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq result = new cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq(this); + if (instanceBuilder_ == null) { + result.instance_ = instance_; + } else { + result.instance_ = instanceBuilder_.build(); + } + result.fqbn_ = fqbn_; + result.sketchPath_ = sketchPath_; + result.port_ = port_; + result.interpreter_ = interpreter_; + result.importFile_ = importFile_; + result.importDir_ = importDir_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq) { + return mergeFrom((cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq other) { + if (other == cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq.getDefaultInstance()) return this; + if (other.hasInstance()) { + mergeInstance(other.getInstance()); + } + if (!other.getFqbn().isEmpty()) { + fqbn_ = other.fqbn_; + onChanged(); + } + if (!other.getSketchPath().isEmpty()) { + sketchPath_ = other.sketchPath_; + onChanged(); + } + if (!other.getPort().isEmpty()) { + port_ = other.port_; + onChanged(); + } + if (!other.getInterpreter().isEmpty()) { + interpreter_ = other.interpreter_; + onChanged(); + } + if (!other.getImportFile().isEmpty()) { + importFile_ = other.importFile_; + onChanged(); + } + if (!other.getImportDir().isEmpty()) { + importDir_ = other.importDir_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private cc.arduino.cli.commands.Common.Instance instance_; + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> instanceBuilder_; + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return Whether the instance field is set. + */ + public boolean hasInstance() { + return instanceBuilder_ != null || instance_ != null; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + * @return The instance. + */ + public cc.arduino.cli.commands.Common.Instance getInstance() { + if (instanceBuilder_ == null) { + return instance_ == null ? cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } else { + return instanceBuilder_.getMessage(); + } + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + onChanged(); + } else { + instanceBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder setInstance( + cc.arduino.cli.commands.Common.Instance.Builder builderForValue) { + if (instanceBuilder_ == null) { + instance_ = builderForValue.build(); + onChanged(); + } else { + instanceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder mergeInstance(cc.arduino.cli.commands.Common.Instance value) { + if (instanceBuilder_ == null) { + if (instance_ != null) { + instance_ = + cc.arduino.cli.commands.Common.Instance.newBuilder(instance_).mergeFrom(value).buildPartial(); + } else { + instance_ = value; + } + onChanged(); + } else { + instanceBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public Builder clearInstance() { + if (instanceBuilder_ == null) { + instance_ = null; + onChanged(); + } else { + instance_ = null; + instanceBuilder_ = null; + } + + return this; + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.Instance.Builder getInstanceBuilder() { + + onChanged(); + return getInstanceFieldBuilder().getBuilder(); + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + public cc.arduino.cli.commands.Common.InstanceOrBuilder getInstanceOrBuilder() { + if (instanceBuilder_ != null) { + return instanceBuilder_.getMessageOrBuilder(); + } else { + return instance_ == null ? + cc.arduino.cli.commands.Common.Instance.getDefaultInstance() : instance_; + } + } + /** + *
+       * Arduino Core Service instance from the `Init` response.
+       * 
+ * + * .cc.arduino.cli.commands.Instance instance = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder> + getInstanceFieldBuilder() { + if (instanceBuilder_ == null) { + instanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.commands.Common.Instance, cc.arduino.cli.commands.Common.Instance.Builder, cc.arduino.cli.commands.Common.InstanceOrBuilder>( + getInstance(), + getParentForChildren(), + isClean()); + instance_ = null; + } + return instanceBuilder_; + } + + private java.lang.Object fqbn_ = ""; + /** + *
+       * Fully qualified board name of the board in use
+       * (e.g., `arduino:samd:mkr1000`). If this is omitted, the FQBN attached to
+       * the sketch will be used.
+       * 
+ * + * string fqbn = 2; + * @return The fqbn. + */ + public java.lang.String getFqbn() { + java.lang.Object ref = fqbn_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fqbn_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Fully qualified board name of the board in use
+       * (e.g., `arduino:samd:mkr1000`). If this is omitted, the FQBN attached to
+       * the sketch will be used.
+       * 
+ * + * string fqbn = 2; + * @return The bytes for fqbn. + */ + public com.google.protobuf.ByteString + getFqbnBytes() { + java.lang.Object ref = fqbn_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + fqbn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Fully qualified board name of the board in use
+       * (e.g., `arduino:samd:mkr1000`). If this is omitted, the FQBN attached to
+       * the sketch will be used.
+       * 
+ * + * string fqbn = 2; + * @param value The fqbn to set. + * @return This builder for chaining. + */ + public Builder setFqbn( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + fqbn_ = value; + onChanged(); + return this; + } + /** + *
+       * Fully qualified board name of the board in use
+       * (e.g., `arduino:samd:mkr1000`). If this is omitted, the FQBN attached to
+       * the sketch will be used.
+       * 
+ * + * string fqbn = 2; + * @return This builder for chaining. + */ + public Builder clearFqbn() { + + fqbn_ = getDefaultInstance().getFqbn(); + onChanged(); + return this; + } + /** + *
+       * Fully qualified board name of the board in use
+       * (e.g., `arduino:samd:mkr1000`). If this is omitted, the FQBN attached to
+       * the sketch will be used.
+       * 
+ * + * string fqbn = 2; + * @param value The bytes for fqbn to set. + * @return This builder for chaining. + */ + public Builder setFqbnBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + fqbn_ = value; + onChanged(); + return this; + } + + private java.lang.Object sketchPath_ = ""; + /** + *
+       * Path to the sketch that is running on the board. The compiled executable
+       * is expected to be located under this path.
+       * 
+ * + * string sketch_path = 3; + * @return The sketchPath. + */ + public java.lang.String getSketchPath() { + java.lang.Object ref = sketchPath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sketchPath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Path to the sketch that is running on the board. The compiled executable
+       * is expected to be located under this path.
+       * 
+ * + * string sketch_path = 3; + * @return The bytes for sketchPath. + */ + public com.google.protobuf.ByteString + getSketchPathBytes() { + java.lang.Object ref = sketchPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sketchPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Path to the sketch that is running on the board. The compiled executable
+       * is expected to be located under this path.
+       * 
+ * + * string sketch_path = 3; + * @param value The sketchPath to set. + * @return This builder for chaining. + */ + public Builder setSketchPath( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sketchPath_ = value; + onChanged(); + return this; + } + /** + *
+       * Path to the sketch that is running on the board. The compiled executable
+       * is expected to be located under this path.
+       * 
+ * + * string sketch_path = 3; + * @return This builder for chaining. + */ + public Builder clearSketchPath() { + + sketchPath_ = getDefaultInstance().getSketchPath(); + onChanged(); + return this; + } + /** + *
+       * Path to the sketch that is running on the board. The compiled executable
+       * is expected to be located under this path.
+       * 
+ * + * string sketch_path = 3; + * @param value The bytes for sketchPath to set. + * @return This builder for chaining. + */ + public Builder setSketchPathBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sketchPath_ = value; + onChanged(); + return this; + } + + private java.lang.Object port_ = ""; + /** + *
+       * Port of the debugger. Set to `none` if the debugger doesn't use a port.
+       * 
+ * + * string port = 4; + * @return The port. + */ + public java.lang.String getPort() { + java.lang.Object ref = port_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + port_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Port of the debugger. Set to `none` if the debugger doesn't use a port.
+       * 
+ * + * string port = 4; + * @return The bytes for port. + */ + public com.google.protobuf.ByteString + getPortBytes() { + java.lang.Object ref = port_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + port_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Port of the debugger. Set to `none` if the debugger doesn't use a port.
+       * 
+ * + * string port = 4; + * @param value The port to set. + * @return This builder for chaining. + */ + public Builder setPort( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + port_ = value; + onChanged(); + return this; + } + /** + *
+       * Port of the debugger. Set to `none` if the debugger doesn't use a port.
+       * 
+ * + * string port = 4; + * @return This builder for chaining. + */ + public Builder clearPort() { + + port_ = getDefaultInstance().getPort(); + onChanged(); + return this; + } + /** + *
+       * Port of the debugger. Set to `none` if the debugger doesn't use a port.
+       * 
+ * + * string port = 4; + * @param value The bytes for port to set. + * @return This builder for chaining. + */ + public Builder setPortBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + port_ = value; + onChanged(); + return this; + } + + private java.lang.Object interpreter_ = ""; + /** + *
+       * Which GDB command interpreter to use.
+       * 
+ * + * string interpreter = 5; + * @return The interpreter. + */ + public java.lang.String getInterpreter() { + java.lang.Object ref = interpreter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + interpreter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Which GDB command interpreter to use.
+       * 
+ * + * string interpreter = 5; + * @return The bytes for interpreter. + */ + public com.google.protobuf.ByteString + getInterpreterBytes() { + java.lang.Object ref = interpreter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + interpreter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Which GDB command interpreter to use.
+       * 
+ * + * string interpreter = 5; + * @param value The interpreter to set. + * @return This builder for chaining. + */ + public Builder setInterpreter( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + interpreter_ = value; + onChanged(); + return this; + } + /** + *
+       * Which GDB command interpreter to use.
+       * 
+ * + * string interpreter = 5; + * @return This builder for chaining. + */ + public Builder clearInterpreter() { + + interpreter_ = getDefaultInstance().getInterpreter(); + onChanged(); + return this; + } + /** + *
+       * Which GDB command interpreter to use.
+       * 
+ * + * string interpreter = 5; + * @param value The bytes for interpreter to set. + * @return This builder for chaining. + */ + public Builder setInterpreterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + interpreter_ = value; + onChanged(); + return this; + } + + private java.lang.Object importFile_ = ""; + /** + *
+       * DEPRECATED: use import_dir instead
+       * 
+ * + * string import_file = 7 [deprecated = true]; + * @return The importFile. + */ + @java.lang.Deprecated public java.lang.String getImportFile() { + java.lang.Object ref = importFile_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + importFile_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * DEPRECATED: use import_dir instead
+       * 
+ * + * string import_file = 7 [deprecated = true]; + * @return The bytes for importFile. + */ + @java.lang.Deprecated public com.google.protobuf.ByteString + getImportFileBytes() { + java.lang.Object ref = importFile_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + importFile_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * DEPRECATED: use import_dir instead
+       * 
+ * + * string import_file = 7 [deprecated = true]; + * @param value The importFile to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder setImportFile( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + importFile_ = value; + onChanged(); + return this; + } + /** + *
+       * DEPRECATED: use import_dir instead
+       * 
+ * + * string import_file = 7 [deprecated = true]; + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder clearImportFile() { + + importFile_ = getDefaultInstance().getImportFile(); + onChanged(); + return this; + } + /** + *
+       * DEPRECATED: use import_dir instead
+       * 
+ * + * string import_file = 7 [deprecated = true]; + * @param value The bytes for importFile to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder setImportFileBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + importFile_ = value; + onChanged(); + return this; + } + + private java.lang.Object importDir_ = ""; + /** + *
+       * Directory containing the compiled executable. If `import_dir` is not
+       * specified, the executable is assumed to be in
+       * `{sketch_path}/build/{fqbn}/`.
+       * 
+ * + * string import_dir = 8; + * @return The importDir. + */ + public java.lang.String getImportDir() { + java.lang.Object ref = importDir_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + importDir_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Directory containing the compiled executable. If `import_dir` is not
+       * specified, the executable is assumed to be in
+       * `{sketch_path}/build/{fqbn}/`.
+       * 
+ * + * string import_dir = 8; + * @return The bytes for importDir. + */ + public com.google.protobuf.ByteString + getImportDirBytes() { + java.lang.Object ref = importDir_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + importDir_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Directory containing the compiled executable. If `import_dir` is not
+       * specified, the executable is assumed to be in
+       * `{sketch_path}/build/{fqbn}/`.
+       * 
+ * + * string import_dir = 8; + * @param value The importDir to set. + * @return This builder for chaining. + */ + public Builder setImportDir( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + importDir_ = value; + onChanged(); + return this; + } + /** + *
+       * Directory containing the compiled executable. If `import_dir` is not
+       * specified, the executable is assumed to be in
+       * `{sketch_path}/build/{fqbn}/`.
+       * 
+ * + * string import_dir = 8; + * @return This builder for chaining. + */ + public Builder clearImportDir() { + + importDir_ = getDefaultInstance().getImportDir(); + onChanged(); + return this; + } + /** + *
+       * Directory containing the compiled executable. If `import_dir` is not
+       * specified, the executable is assumed to be in
+       * `{sketch_path}/build/{fqbn}/`.
+       * 
+ * + * string import_dir = 8; + * @param value The bytes for importDir to set. + * @return This builder for chaining. + */ + public Builder setImportDirBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + importDir_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.debug.DebugConfigReq) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.debug.DebugConfigReq) + private static final cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq(); + } + + public static cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DebugConfigReq parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DebugConfigReq(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.debug.DebugOuterClass.DebugConfigReq getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DebugRespOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.debug.DebugResp) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Incoming data from the debugger tool.
+     * 
+ * + * bytes data = 1; + * @return The data. + */ + com.google.protobuf.ByteString getData(); + + /** + *
+     * Incoming error output from the debugger tool.
+     * 
+ * + * string error = 2; + * @return The error. + */ + java.lang.String getError(); + /** + *
+     * Incoming error output from the debugger tool.
+     * 
+ * + * string error = 2; + * @return The bytes for error. + */ + com.google.protobuf.ByteString + getErrorBytes(); + } + /** + *
+   * 
+ * + * Protobuf type {@code cc.arduino.cli.debug.DebugResp} + */ + public static final class DebugResp extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.debug.DebugResp) + DebugRespOrBuilder { + private static final long serialVersionUID = 0L; + // Use DebugResp.newBuilder() to construct. + private DebugResp(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DebugResp() { + data_ = com.google.protobuf.ByteString.EMPTY; + error_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DebugResp(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DebugResp( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + + data_ = input.readBytes(); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + error_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.debug.DebugOuterClass.internal_static_cc_arduino_cli_debug_DebugResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.debug.DebugOuterClass.internal_static_cc_arduino_cli_debug_DebugResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.debug.DebugOuterClass.DebugResp.class, cc.arduino.cli.debug.DebugOuterClass.DebugResp.Builder.class); + } + + public static final int DATA_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString data_; + /** + *
+     * Incoming data from the debugger tool.
+     * 
+ * + * bytes data = 1; + * @return The data. + */ + public com.google.protobuf.ByteString getData() { + return data_; + } + + public static final int ERROR_FIELD_NUMBER = 2; + private volatile java.lang.Object error_; + /** + *
+     * Incoming error output from the debugger tool.
+     * 
+ * + * string error = 2; + * @return The error. + */ + public java.lang.String getError() { + java.lang.Object ref = error_; + 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(); + error_ = s; + return s; + } + } + /** + *
+     * Incoming error output from the debugger tool.
+     * 
+ * + * string error = 2; + * @return The bytes for error. + */ + public com.google.protobuf.ByteString + getErrorBytes() { + java.lang.Object ref = error_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + error_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (!data_.isEmpty()) { + output.writeBytes(1, data_); + } + if (!getErrorBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, error_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!data_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, data_); + } + if (!getErrorBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, error_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.debug.DebugOuterClass.DebugResp)) { + return super.equals(obj); + } + cc.arduino.cli.debug.DebugOuterClass.DebugResp other = (cc.arduino.cli.debug.DebugOuterClass.DebugResp) obj; + + if (!getData() + .equals(other.getData())) return false; + if (!getError() + .equals(other.getError())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.debug.DebugOuterClass.DebugResp parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.debug.DebugOuterClass.DebugResp parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.debug.DebugOuterClass.DebugResp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.debug.DebugOuterClass.DebugResp parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.debug.DebugOuterClass.DebugResp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.debug.DebugOuterClass.DebugResp parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.debug.DebugOuterClass.DebugResp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.debug.DebugOuterClass.DebugResp parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.debug.DebugOuterClass.DebugResp parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.debug.DebugOuterClass.DebugResp parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.debug.DebugOuterClass.DebugResp parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.debug.DebugOuterClass.DebugResp parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.debug.DebugOuterClass.DebugResp 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * 
+ * + * Protobuf type {@code cc.arduino.cli.debug.DebugResp} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.debug.DebugResp) + cc.arduino.cli.debug.DebugOuterClass.DebugRespOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.debug.DebugOuterClass.internal_static_cc_arduino_cli_debug_DebugResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.debug.DebugOuterClass.internal_static_cc_arduino_cli_debug_DebugResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.debug.DebugOuterClass.DebugResp.class, cc.arduino.cli.debug.DebugOuterClass.DebugResp.Builder.class); + } + + // Construct using cc.arduino.cli.debug.DebugOuterClass.DebugResp.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + data_ = com.google.protobuf.ByteString.EMPTY; + + error_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.debug.DebugOuterClass.internal_static_cc_arduino_cli_debug_DebugResp_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.debug.DebugOuterClass.DebugResp getDefaultInstanceForType() { + return cc.arduino.cli.debug.DebugOuterClass.DebugResp.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.debug.DebugOuterClass.DebugResp build() { + cc.arduino.cli.debug.DebugOuterClass.DebugResp result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.debug.DebugOuterClass.DebugResp buildPartial() { + cc.arduino.cli.debug.DebugOuterClass.DebugResp result = new cc.arduino.cli.debug.DebugOuterClass.DebugResp(this); + result.data_ = data_; + result.error_ = error_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.debug.DebugOuterClass.DebugResp) { + return mergeFrom((cc.arduino.cli.debug.DebugOuterClass.DebugResp)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.debug.DebugOuterClass.DebugResp other) { + if (other == cc.arduino.cli.debug.DebugOuterClass.DebugResp.getDefaultInstance()) return this; + if (other.getData() != com.google.protobuf.ByteString.EMPTY) { + setData(other.getData()); + } + if (!other.getError().isEmpty()) { + error_ = other.error_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.debug.DebugOuterClass.DebugResp parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.debug.DebugOuterClass.DebugResp) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+       * Incoming data from the debugger tool.
+       * 
+ * + * bytes data = 1; + * @return The data. + */ + public com.google.protobuf.ByteString getData() { + return data_; + } + /** + *
+       * Incoming data from the debugger tool.
+       * 
+ * + * bytes data = 1; + * @param value The data to set. + * @return This builder for chaining. + */ + public Builder setData(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + data_ = value; + onChanged(); + return this; + } + /** + *
+       * Incoming data from the debugger tool.
+       * 
+ * + * bytes data = 1; + * @return This builder for chaining. + */ + public Builder clearData() { + + data_ = getDefaultInstance().getData(); + onChanged(); + return this; + } + + private java.lang.Object error_ = ""; + /** + *
+       * Incoming error output from the debugger tool.
+       * 
+ * + * string error = 2; + * @return The error. + */ + public java.lang.String getError() { + java.lang.Object ref = error_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + error_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * Incoming error output from the debugger tool.
+       * 
+ * + * string error = 2; + * @return The bytes for error. + */ + public com.google.protobuf.ByteString + getErrorBytes() { + java.lang.Object ref = error_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + error_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * Incoming error output from the debugger tool.
+       * 
+ * + * string error = 2; + * @param value The error to set. + * @return This builder for chaining. + */ + public Builder setError( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + error_ = value; + onChanged(); + return this; + } + /** + *
+       * Incoming error output from the debugger tool.
+       * 
+ * + * string error = 2; + * @return This builder for chaining. + */ + public Builder clearError() { + + error_ = getDefaultInstance().getError(); + onChanged(); + return this; + } + /** + *
+       * Incoming error output from the debugger tool.
+       * 
+ * + * string error = 2; + * @param value The bytes for error to set. + * @return This builder for chaining. + */ + public Builder setErrorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + error_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.debug.DebugResp) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.debug.DebugResp) + private static final cc.arduino.cli.debug.DebugOuterClass.DebugResp DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.debug.DebugOuterClass.DebugResp(); + } + + public static cc.arduino.cli.debug.DebugOuterClass.DebugResp getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DebugResp parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DebugResp(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.debug.DebugOuterClass.DebugResp getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_debug_DebugReq_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_debug_DebugReq_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_debug_DebugConfigReq_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_debug_DebugConfigReq_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_debug_DebugResp_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_debug_DebugResp_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\021debug/debug.proto\022\024cc.arduino.cli.debu" + + "g\032\025commands/common.proto\"h\n\010DebugReq\0226\n\010" + + "debugReq\030\001 \001(\0132$.cc.arduino.cli.debug.De" + + "bugConfigReq\022\014\n\004data\030\002 \001(\014\022\026\n\016send_inter" + + "rupt\030\003 \001(\010\"\270\001\n\016DebugConfigReq\0223\n\010instanc" + + "e\030\001 \001(\0132!.cc.arduino.cli.commands.Instan" + + "ce\022\014\n\004fqbn\030\002 \001(\t\022\023\n\013sketch_path\030\003 \001(\t\022\014\n" + + "\004port\030\004 \001(\t\022\023\n\013interpreter\030\005 \001(\t\022\027\n\013impo" + + "rt_file\030\007 \001(\tB\002\030\001\022\022\n\nimport_dir\030\010 \001(\t\"(\n" + + "\tDebugResp\022\014\n\004data\030\001 \001(\014\022\r\n\005error\030\002 \001(\t2" + + "W\n\005Debug\022N\n\005Debug\022\036.cc.arduino.cli.debug" + + ".DebugReq\032\037.cc.arduino.cli.debug.DebugRe" + + "sp\"\000(\0010\001B*Z(github.com/arduino/arduino-c" + + "li/rpc/debugb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + cc.arduino.cli.commands.Common.getDescriptor(), + }); + internal_static_cc_arduino_cli_debug_DebugReq_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_cc_arduino_cli_debug_DebugReq_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_debug_DebugReq_descriptor, + new java.lang.String[] { "DebugReq", "Data", "SendInterrupt", }); + internal_static_cc_arduino_cli_debug_DebugConfigReq_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_cc_arduino_cli_debug_DebugConfigReq_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_debug_DebugConfigReq_descriptor, + new java.lang.String[] { "Instance", "Fqbn", "SketchPath", "Port", "Interpreter", "ImportFile", "ImportDir", }); + internal_static_cc_arduino_cli_debug_DebugResp_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_cc_arduino_cli_debug_DebugResp_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_debug_DebugResp_descriptor, + new java.lang.String[] { "Data", "Error", }); + cc.arduino.cli.commands.Common.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/arduino-core/src/cc/arduino/cli/monitor/MonitorGrpc.java b/arduino-core/src/cc/arduino/cli/monitor/MonitorGrpc.java new file mode 100644 index 00000000000..738b0ce4663 --- /dev/null +++ b/arduino-core/src/cc/arduino/cli/monitor/MonitorGrpc.java @@ -0,0 +1,287 @@ +package cc.arduino.cli.monitor; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall; +import static io.grpc.stub.ClientCalls.asyncClientStreamingCall; +import static io.grpc.stub.ClientCalls.asyncServerStreamingCall; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingServerStreamingCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; +import static io.grpc.stub.ServerCalls.asyncClientStreamingCall; +import static io.grpc.stub.ServerCalls.asyncServerStreamingCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + *
+ * Service that abstract a Monitor usage
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.20.0)", + comments = "Source: monitor/monitor.proto") +public final class MonitorGrpc { + + private MonitorGrpc() {} + + public static final String SERVICE_NAME = "cc.arduino.cli.monitor.Monitor"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getStreamingOpenMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "StreamingOpen", + requestType = cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReq.class, + responseType = cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenResp.class, + methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) + public static io.grpc.MethodDescriptor getStreamingOpenMethod() { + io.grpc.MethodDescriptor getStreamingOpenMethod; + if ((getStreamingOpenMethod = MonitorGrpc.getStreamingOpenMethod) == null) { + synchronized (MonitorGrpc.class) { + if ((getStreamingOpenMethod = MonitorGrpc.getStreamingOpenMethod) == null) { + MonitorGrpc.getStreamingOpenMethod = getStreamingOpenMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING) + .setFullMethodName(generateFullMethodName( + "cc.arduino.cli.monitor.Monitor", "StreamingOpen")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReq.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenResp.getDefaultInstance())) + .setSchemaDescriptor(new MonitorMethodDescriptorSupplier("StreamingOpen")) + .build(); + } + } + } + return getStreamingOpenMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static MonitorStub newStub(io.grpc.Channel channel) { + return new MonitorStub(channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static MonitorBlockingStub newBlockingStub( + io.grpc.Channel channel) { + return new MonitorBlockingStub(channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static MonitorFutureStub newFutureStub( + io.grpc.Channel channel) { + return new MonitorFutureStub(channel); + } + + /** + *
+   * Service that abstract a Monitor usage
+   * 
+ */ + public static abstract class MonitorImplBase implements io.grpc.BindableService { + + /** + *
+     * Open a bidirectional monitor stream. This can be used to implement
+     * something similar to the Arduino IDE's Serial Monitor.
+     * 
+ */ + public io.grpc.stub.StreamObserver streamingOpen( + io.grpc.stub.StreamObserver responseObserver) { + return asyncUnimplementedStreamingCall(getStreamingOpenMethod(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getStreamingOpenMethod(), + asyncBidiStreamingCall( + new MethodHandlers< + cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReq, + cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenResp>( + this, METHODID_STREAMING_OPEN))) + .build(); + } + } + + /** + *
+   * Service that abstract a Monitor usage
+   * 
+ */ + public static final class MonitorStub extends io.grpc.stub.AbstractStub { + private MonitorStub(io.grpc.Channel channel) { + super(channel); + } + + private MonitorStub(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected MonitorStub build(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + return new MonitorStub(channel, callOptions); + } + + /** + *
+     * Open a bidirectional monitor stream. This can be used to implement
+     * something similar to the Arduino IDE's Serial Monitor.
+     * 
+ */ + public io.grpc.stub.StreamObserver streamingOpen( + io.grpc.stub.StreamObserver responseObserver) { + return asyncBidiStreamingCall( + getChannel().newCall(getStreamingOpenMethod(), getCallOptions()), responseObserver); + } + } + + /** + *
+   * Service that abstract a Monitor usage
+   * 
+ */ + public static final class MonitorBlockingStub extends io.grpc.stub.AbstractStub { + private MonitorBlockingStub(io.grpc.Channel channel) { + super(channel); + } + + private MonitorBlockingStub(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected MonitorBlockingStub build(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + return new MonitorBlockingStub(channel, callOptions); + } + } + + /** + *
+   * Service that abstract a Monitor usage
+   * 
+ */ + public static final class MonitorFutureStub extends io.grpc.stub.AbstractStub { + private MonitorFutureStub(io.grpc.Channel channel) { + super(channel); + } + + private MonitorFutureStub(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected MonitorFutureStub build(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + return new MonitorFutureStub(channel, callOptions); + } + } + + private static final int METHODID_STREAMING_OPEN = 0; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final MonitorImplBase serviceImpl; + private final int methodId; + + MethodHandlers(MonitorImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_STREAMING_OPEN: + return (io.grpc.stub.StreamObserver) serviceImpl.streamingOpen( + (io.grpc.stub.StreamObserver) responseObserver); + default: + throw new AssertionError(); + } + } + } + + private static abstract class MonitorBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + MonitorBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return cc.arduino.cli.monitor.MonitorOuterClass.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Monitor"); + } + } + + private static final class MonitorFileDescriptorSupplier + extends MonitorBaseDescriptorSupplier { + MonitorFileDescriptorSupplier() {} + } + + private static final class MonitorMethodDescriptorSupplier + extends MonitorBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + MonitorMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (MonitorGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new MonitorFileDescriptorSupplier()) + .addMethod(getStreamingOpenMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/arduino-core/src/cc/arduino/cli/monitor/MonitorOuterClass.java b/arduino-core/src/cc/arduino/cli/monitor/MonitorOuterClass.java new file mode 100644 index 00000000000..826a358198b --- /dev/null +++ b/arduino-core/src/cc/arduino/cli/monitor/MonitorOuterClass.java @@ -0,0 +1,2611 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: monitor/monitor.proto + +package cc.arduino.cli.monitor; + +public final class MonitorOuterClass { + private MonitorOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface StreamingOpenReqOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.monitor.StreamingOpenReq) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Provides information to the monitor that specifies which is the target.
+     * The first `StreamingOpenReq` message must contain a `monitor_config`
+     * message.
+     * 
+ * + * .cc.arduino.cli.monitor.MonitorConfig monitorConfig = 1; + * @return Whether the monitorConfig field is set. + */ + boolean hasMonitorConfig(); + /** + *
+     * Provides information to the monitor that specifies which is the target.
+     * The first `StreamingOpenReq` message must contain a `monitor_config`
+     * message.
+     * 
+ * + * .cc.arduino.cli.monitor.MonitorConfig monitorConfig = 1; + * @return The monitorConfig. + */ + cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig getMonitorConfig(); + /** + *
+     * Provides information to the monitor that specifies which is the target.
+     * The first `StreamingOpenReq` message must contain a `monitor_config`
+     * message.
+     * 
+ * + * .cc.arduino.cli.monitor.MonitorConfig monitorConfig = 1; + */ + cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfigOrBuilder getMonitorConfigOrBuilder(); + + /** + *
+     * The data to be sent to the target being monitored.
+     * 
+ * + * bytes data = 2; + * @return The data. + */ + com.google.protobuf.ByteString getData(); + + public cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReq.ContentCase getContentCase(); + } + /** + *
+   * The top-level message sent by the client for the `StreamingOpen` method.
+   * Multiple `StreamingOpenReq` messages can be sent but the first message
+   * must contain a `monitor_config` message to initialize the monitor target.
+   * All subsequent messages must contain bytes to be sent to the target
+   * and must not contain a `monitor_config` message.
+   * 
+ * + * Protobuf type {@code cc.arduino.cli.monitor.StreamingOpenReq} + */ + public static final class StreamingOpenReq extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.monitor.StreamingOpenReq) + StreamingOpenReqOrBuilder { + private static final long serialVersionUID = 0L; + // Use StreamingOpenReq.newBuilder() to construct. + private StreamingOpenReq(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StreamingOpenReq() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new StreamingOpenReq(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StreamingOpenReq( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig.Builder subBuilder = null; + if (contentCase_ == 1) { + subBuilder = ((cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig) content_).toBuilder(); + } + content_ = + input.readMessage(cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig) content_); + content_ = subBuilder.buildPartial(); + } + contentCase_ = 1; + break; + } + case 18: { + contentCase_ = 2; + content_ = input.readBytes(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.monitor.MonitorOuterClass.internal_static_cc_arduino_cli_monitor_StreamingOpenReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.monitor.MonitorOuterClass.internal_static_cc_arduino_cli_monitor_StreamingOpenReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReq.class, cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReq.Builder.class); + } + + private int contentCase_ = 0; + private java.lang.Object content_; + public enum ContentCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + MONITORCONFIG(1), + DATA(2), + CONTENT_NOT_SET(0); + private final int value; + private ContentCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ContentCase valueOf(int value) { + return forNumber(value); + } + + public static ContentCase forNumber(int value) { + switch (value) { + case 1: return MONITORCONFIG; + case 2: return DATA; + case 0: return CONTENT_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public ContentCase + getContentCase() { + return ContentCase.forNumber( + contentCase_); + } + + public static final int MONITORCONFIG_FIELD_NUMBER = 1; + /** + *
+     * Provides information to the monitor that specifies which is the target.
+     * The first `StreamingOpenReq` message must contain a `monitor_config`
+     * message.
+     * 
+ * + * .cc.arduino.cli.monitor.MonitorConfig monitorConfig = 1; + * @return Whether the monitorConfig field is set. + */ + public boolean hasMonitorConfig() { + return contentCase_ == 1; + } + /** + *
+     * Provides information to the monitor that specifies which is the target.
+     * The first `StreamingOpenReq` message must contain a `monitor_config`
+     * message.
+     * 
+ * + * .cc.arduino.cli.monitor.MonitorConfig monitorConfig = 1; + * @return The monitorConfig. + */ + public cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig getMonitorConfig() { + if (contentCase_ == 1) { + return (cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig) content_; + } + return cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig.getDefaultInstance(); + } + /** + *
+     * Provides information to the monitor that specifies which is the target.
+     * The first `StreamingOpenReq` message must contain a `monitor_config`
+     * message.
+     * 
+ * + * .cc.arduino.cli.monitor.MonitorConfig monitorConfig = 1; + */ + public cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfigOrBuilder getMonitorConfigOrBuilder() { + if (contentCase_ == 1) { + return (cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig) content_; + } + return cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig.getDefaultInstance(); + } + + public static final int DATA_FIELD_NUMBER = 2; + /** + *
+     * The data to be sent to the target being monitored.
+     * 
+ * + * bytes data = 2; + * @return The data. + */ + public com.google.protobuf.ByteString getData() { + if (contentCase_ == 2) { + return (com.google.protobuf.ByteString) content_; + } + return com.google.protobuf.ByteString.EMPTY; + } + + 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 (contentCase_ == 1) { + output.writeMessage(1, (cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig) content_); + } + if (contentCase_ == 2) { + output.writeBytes( + 2, (com.google.protobuf.ByteString) content_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (contentCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig) content_); + } + if (contentCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize( + 2, (com.google.protobuf.ByteString) content_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReq)) { + return super.equals(obj); + } + cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReq other = (cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReq) obj; + + if (!getContentCase().equals(other.getContentCase())) return false; + switch (contentCase_) { + case 1: + if (!getMonitorConfig() + .equals(other.getMonitorConfig())) return false; + break; + case 2: + if (!getData() + .equals(other.getData())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (contentCase_) { + case 1: + hash = (37 * hash) + MONITORCONFIG_FIELD_NUMBER; + hash = (53 * hash) + getMonitorConfig().hashCode(); + break; + case 2: + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReq parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReq parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReq parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReq parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReq parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReq parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReq parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReq parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReq parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReq parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReq parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReq parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReq 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * The top-level message sent by the client for the `StreamingOpen` method.
+     * Multiple `StreamingOpenReq` messages can be sent but the first message
+     * must contain a `monitor_config` message to initialize the monitor target.
+     * All subsequent messages must contain bytes to be sent to the target
+     * and must not contain a `monitor_config` message.
+     * 
+ * + * Protobuf type {@code cc.arduino.cli.monitor.StreamingOpenReq} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.monitor.StreamingOpenReq) + cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReqOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.monitor.MonitorOuterClass.internal_static_cc_arduino_cli_monitor_StreamingOpenReq_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.monitor.MonitorOuterClass.internal_static_cc_arduino_cli_monitor_StreamingOpenReq_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReq.class, cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReq.Builder.class); + } + + // Construct using cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReq.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + contentCase_ = 0; + content_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.monitor.MonitorOuterClass.internal_static_cc_arduino_cli_monitor_StreamingOpenReq_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReq getDefaultInstanceForType() { + return cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReq.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReq build() { + cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReq result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReq buildPartial() { + cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReq result = new cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReq(this); + if (contentCase_ == 1) { + if (monitorConfigBuilder_ == null) { + result.content_ = content_; + } else { + result.content_ = monitorConfigBuilder_.build(); + } + } + if (contentCase_ == 2) { + result.content_ = content_; + } + result.contentCase_ = contentCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReq) { + return mergeFrom((cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReq)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReq other) { + if (other == cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReq.getDefaultInstance()) return this; + switch (other.getContentCase()) { + case MONITORCONFIG: { + mergeMonitorConfig(other.getMonitorConfig()); + break; + } + case DATA: { + setData(other.getData()); + break; + } + case CONTENT_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReq parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReq) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int contentCase_ = 0; + private java.lang.Object content_; + public ContentCase + getContentCase() { + return ContentCase.forNumber( + contentCase_); + } + + public Builder clearContent() { + contentCase_ = 0; + content_ = null; + onChanged(); + return this; + } + + + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig, cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig.Builder, cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfigOrBuilder> monitorConfigBuilder_; + /** + *
+       * Provides information to the monitor that specifies which is the target.
+       * The first `StreamingOpenReq` message must contain a `monitor_config`
+       * message.
+       * 
+ * + * .cc.arduino.cli.monitor.MonitorConfig monitorConfig = 1; + * @return Whether the monitorConfig field is set. + */ + public boolean hasMonitorConfig() { + return contentCase_ == 1; + } + /** + *
+       * Provides information to the monitor that specifies which is the target.
+       * The first `StreamingOpenReq` message must contain a `monitor_config`
+       * message.
+       * 
+ * + * .cc.arduino.cli.monitor.MonitorConfig monitorConfig = 1; + * @return The monitorConfig. + */ + public cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig getMonitorConfig() { + if (monitorConfigBuilder_ == null) { + if (contentCase_ == 1) { + return (cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig) content_; + } + return cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig.getDefaultInstance(); + } else { + if (contentCase_ == 1) { + return monitorConfigBuilder_.getMessage(); + } + return cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig.getDefaultInstance(); + } + } + /** + *
+       * Provides information to the monitor that specifies which is the target.
+       * The first `StreamingOpenReq` message must contain a `monitor_config`
+       * message.
+       * 
+ * + * .cc.arduino.cli.monitor.MonitorConfig monitorConfig = 1; + */ + public Builder setMonitorConfig(cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig value) { + if (monitorConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + onChanged(); + } else { + monitorConfigBuilder_.setMessage(value); + } + contentCase_ = 1; + return this; + } + /** + *
+       * Provides information to the monitor that specifies which is the target.
+       * The first `StreamingOpenReq` message must contain a `monitor_config`
+       * message.
+       * 
+ * + * .cc.arduino.cli.monitor.MonitorConfig monitorConfig = 1; + */ + public Builder setMonitorConfig( + cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig.Builder builderForValue) { + if (monitorConfigBuilder_ == null) { + content_ = builderForValue.build(); + onChanged(); + } else { + monitorConfigBuilder_.setMessage(builderForValue.build()); + } + contentCase_ = 1; + return this; + } + /** + *
+       * Provides information to the monitor that specifies which is the target.
+       * The first `StreamingOpenReq` message must contain a `monitor_config`
+       * message.
+       * 
+ * + * .cc.arduino.cli.monitor.MonitorConfig monitorConfig = 1; + */ + public Builder mergeMonitorConfig(cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig value) { + if (monitorConfigBuilder_ == null) { + if (contentCase_ == 1 && + content_ != cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig.getDefaultInstance()) { + content_ = cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig.newBuilder((cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig) content_) + .mergeFrom(value).buildPartial(); + } else { + content_ = value; + } + onChanged(); + } else { + if (contentCase_ == 1) { + monitorConfigBuilder_.mergeFrom(value); + } + monitorConfigBuilder_.setMessage(value); + } + contentCase_ = 1; + return this; + } + /** + *
+       * Provides information to the monitor that specifies which is the target.
+       * The first `StreamingOpenReq` message must contain a `monitor_config`
+       * message.
+       * 
+ * + * .cc.arduino.cli.monitor.MonitorConfig monitorConfig = 1; + */ + public Builder clearMonitorConfig() { + if (monitorConfigBuilder_ == null) { + if (contentCase_ == 1) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + } else { + if (contentCase_ == 1) { + contentCase_ = 0; + content_ = null; + } + monitorConfigBuilder_.clear(); + } + return this; + } + /** + *
+       * Provides information to the monitor that specifies which is the target.
+       * The first `StreamingOpenReq` message must contain a `monitor_config`
+       * message.
+       * 
+ * + * .cc.arduino.cli.monitor.MonitorConfig monitorConfig = 1; + */ + public cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig.Builder getMonitorConfigBuilder() { + return getMonitorConfigFieldBuilder().getBuilder(); + } + /** + *
+       * Provides information to the monitor that specifies which is the target.
+       * The first `StreamingOpenReq` message must contain a `monitor_config`
+       * message.
+       * 
+ * + * .cc.arduino.cli.monitor.MonitorConfig monitorConfig = 1; + */ + public cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfigOrBuilder getMonitorConfigOrBuilder() { + if ((contentCase_ == 1) && (monitorConfigBuilder_ != null)) { + return monitorConfigBuilder_.getMessageOrBuilder(); + } else { + if (contentCase_ == 1) { + return (cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig) content_; + } + return cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig.getDefaultInstance(); + } + } + /** + *
+       * Provides information to the monitor that specifies which is the target.
+       * The first `StreamingOpenReq` message must contain a `monitor_config`
+       * message.
+       * 
+ * + * .cc.arduino.cli.monitor.MonitorConfig monitorConfig = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig, cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig.Builder, cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfigOrBuilder> + getMonitorConfigFieldBuilder() { + if (monitorConfigBuilder_ == null) { + if (!(contentCase_ == 1)) { + content_ = cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig.getDefaultInstance(); + } + monitorConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig, cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig.Builder, cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfigOrBuilder>( + (cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig) content_, + getParentForChildren(), + isClean()); + content_ = null; + } + contentCase_ = 1; + onChanged();; + return monitorConfigBuilder_; + } + + /** + *
+       * The data to be sent to the target being monitored.
+       * 
+ * + * bytes data = 2; + * @return The data. + */ + public com.google.protobuf.ByteString getData() { + if (contentCase_ == 2) { + return (com.google.protobuf.ByteString) content_; + } + return com.google.protobuf.ByteString.EMPTY; + } + /** + *
+       * The data to be sent to the target being monitored.
+       * 
+ * + * bytes data = 2; + * @param value The data to set. + * @return This builder for chaining. + */ + public Builder setData(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + contentCase_ = 2; + content_ = value; + onChanged(); + return this; + } + /** + *
+       * The data to be sent to the target being monitored.
+       * 
+ * + * bytes data = 2; + * @return This builder for chaining. + */ + public Builder clearData() { + if (contentCase_ == 2) { + contentCase_ = 0; + content_ = null; + onChanged(); + } + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.monitor.StreamingOpenReq) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.monitor.StreamingOpenReq) + private static final cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReq DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReq(); + } + + public static cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReq getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StreamingOpenReq parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StreamingOpenReq(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenReq getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface MonitorConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.monitor.MonitorConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The target name.
+     * 
+ * + * string target = 1; + * @return The target. + */ + java.lang.String getTarget(); + /** + *
+     * The target name.
+     * 
+ * + * string target = 1; + * @return The bytes for target. + */ + com.google.protobuf.ByteString + getTargetBytes(); + + /** + * .cc.arduino.cli.monitor.MonitorConfig.TargetType type = 2; + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * .cc.arduino.cli.monitor.MonitorConfig.TargetType type = 2; + * @return The type. + */ + cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig.TargetType getType(); + + /** + *
+     * Additional parameters that might be needed to configure the target or the
+     * monitor itself.
+     * 
+ * + * .google.protobuf.Struct additionalConfig = 3; + * @return Whether the additionalConfig field is set. + */ + boolean hasAdditionalConfig(); + /** + *
+     * Additional parameters that might be needed to configure the target or the
+     * monitor itself.
+     * 
+ * + * .google.protobuf.Struct additionalConfig = 3; + * @return The additionalConfig. + */ + com.google.protobuf.Struct getAdditionalConfig(); + /** + *
+     * Additional parameters that might be needed to configure the target or the
+     * monitor itself.
+     * 
+ * + * .google.protobuf.Struct additionalConfig = 3; + */ + com.google.protobuf.StructOrBuilder getAdditionalConfigOrBuilder(); + } + /** + *
+   * Tells the monitor which target to open and provides additional parameters
+   * that might be needed to configure the target or the monitor itself.
+   * 
+ * + * Protobuf type {@code cc.arduino.cli.monitor.MonitorConfig} + */ + public static final class MonitorConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.monitor.MonitorConfig) + MonitorConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use MonitorConfig.newBuilder() to construct. + private MonitorConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MonitorConfig() { + target_ = ""; + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new MonitorConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private MonitorConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + target_ = s; + break; + } + case 16: { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + case 26: { + com.google.protobuf.Struct.Builder subBuilder = null; + if (additionalConfig_ != null) { + subBuilder = additionalConfig_.toBuilder(); + } + additionalConfig_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(additionalConfig_); + additionalConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.monitor.MonitorOuterClass.internal_static_cc_arduino_cli_monitor_MonitorConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.monitor.MonitorOuterClass.internal_static_cc_arduino_cli_monitor_MonitorConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig.class, cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig.Builder.class); + } + + /** + * Protobuf enum {@code cc.arduino.cli.monitor.MonitorConfig.TargetType} + */ + public enum TargetType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * SERIAL = 0; + */ + SERIAL(0), + UNRECOGNIZED(-1), + ; + + /** + * SERIAL = 0; + */ + public static final int SERIAL_VALUE = 0; + + + 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 TargetType 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 TargetType forNumber(int value) { + switch (value) { + case 0: return SERIAL; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + TargetType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public TargetType findValueByNumber(int number) { + return TargetType.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.monitor.MonitorOuterClass.MonitorConfig.getDescriptor().getEnumTypes().get(0); + } + + private static final TargetType[] VALUES = values(); + + public static TargetType 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 TargetType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:cc.arduino.cli.monitor.MonitorConfig.TargetType) + } + + public static final int TARGET_FIELD_NUMBER = 1; + private volatile java.lang.Object target_; + /** + *
+     * The target name.
+     * 
+ * + * string target = 1; + * @return The target. + */ + public java.lang.String getTarget() { + java.lang.Object ref = target_; + 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(); + target_ = s; + return s; + } + } + /** + *
+     * The target name.
+     * 
+ * + * string target = 1; + * @return The bytes for target. + */ + public com.google.protobuf.ByteString + getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 2; + private int type_; + /** + * .cc.arduino.cli.monitor.MonitorConfig.TargetType type = 2; + * @return The enum numeric value on the wire for type. + */ + public int getTypeValue() { + return type_; + } + /** + * .cc.arduino.cli.monitor.MonitorConfig.TargetType type = 2; + * @return The type. + */ + public cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig.TargetType getType() { + @SuppressWarnings("deprecation") + cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig.TargetType result = cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig.TargetType.valueOf(type_); + return result == null ? cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig.TargetType.UNRECOGNIZED : result; + } + + public static final int ADDITIONALCONFIG_FIELD_NUMBER = 3; + private com.google.protobuf.Struct additionalConfig_; + /** + *
+     * Additional parameters that might be needed to configure the target or the
+     * monitor itself.
+     * 
+ * + * .google.protobuf.Struct additionalConfig = 3; + * @return Whether the additionalConfig field is set. + */ + public boolean hasAdditionalConfig() { + return additionalConfig_ != null; + } + /** + *
+     * Additional parameters that might be needed to configure the target or the
+     * monitor itself.
+     * 
+ * + * .google.protobuf.Struct additionalConfig = 3; + * @return The additionalConfig. + */ + public com.google.protobuf.Struct getAdditionalConfig() { + return additionalConfig_ == null ? com.google.protobuf.Struct.getDefaultInstance() : additionalConfig_; + } + /** + *
+     * Additional parameters that might be needed to configure the target or the
+     * monitor itself.
+     * 
+ * + * .google.protobuf.Struct additionalConfig = 3; + */ + public com.google.protobuf.StructOrBuilder getAdditionalConfigOrBuilder() { + return getAdditionalConfig(); + } + + 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 (!getTargetBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, target_); + } + if (type_ != cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig.TargetType.SERIAL.getNumber()) { + output.writeEnum(2, type_); + } + if (additionalConfig_ != null) { + output.writeMessage(3, getAdditionalConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getTargetBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, target_); + } + if (type_ != cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig.TargetType.SERIAL.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, type_); + } + if (additionalConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getAdditionalConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig)) { + return super.equals(obj); + } + cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig other = (cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig) obj; + + if (!getTarget() + .equals(other.getTarget())) return false; + if (type_ != other.type_) return false; + if (hasAdditionalConfig() != other.hasAdditionalConfig()) return false; + if (hasAdditionalConfig()) { + if (!getAdditionalConfig() + .equals(other.getAdditionalConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) 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) + TARGET_FIELD_NUMBER; + hash = (53 * hash) + getTarget().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + if (hasAdditionalConfig()) { + hash = (37 * hash) + ADDITIONALCONFIG_FIELD_NUMBER; + hash = (53 * hash) + getAdditionalConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * Tells the monitor which target to open and provides additional parameters
+     * that might be needed to configure the target or the monitor itself.
+     * 
+ * + * Protobuf type {@code cc.arduino.cli.monitor.MonitorConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.monitor.MonitorConfig) + cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.monitor.MonitorOuterClass.internal_static_cc_arduino_cli_monitor_MonitorConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.monitor.MonitorOuterClass.internal_static_cc_arduino_cli_monitor_MonitorConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig.class, cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig.Builder.class); + } + + // Construct using cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + target_ = ""; + + type_ = 0; + + if (additionalConfigBuilder_ == null) { + additionalConfig_ = null; + } else { + additionalConfig_ = null; + additionalConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.monitor.MonitorOuterClass.internal_static_cc_arduino_cli_monitor_MonitorConfig_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig getDefaultInstanceForType() { + return cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig build() { + cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig buildPartial() { + cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig result = new cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig(this); + result.target_ = target_; + result.type_ = type_; + if (additionalConfigBuilder_ == null) { + result.additionalConfig_ = additionalConfig_; + } else { + result.additionalConfig_ = additionalConfigBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig) { + return mergeFrom((cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig other) { + if (other == cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig.getDefaultInstance()) return this; + if (!other.getTarget().isEmpty()) { + target_ = other.target_; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.hasAdditionalConfig()) { + mergeAdditionalConfig(other.getAdditionalConfig()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object target_ = ""; + /** + *
+       * The target name.
+       * 
+ * + * string target = 1; + * @return The target. + */ + public java.lang.String getTarget() { + java.lang.Object ref = target_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + target_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The target name.
+       * 
+ * + * string target = 1; + * @return The bytes for target. + */ + public com.google.protobuf.ByteString + getTargetBytes() { + java.lang.Object ref = target_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + target_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The target name.
+       * 
+ * + * string target = 1; + * @param value The target to set. + * @return This builder for chaining. + */ + public Builder setTarget( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + target_ = value; + onChanged(); + return this; + } + /** + *
+       * The target name.
+       * 
+ * + * string target = 1; + * @return This builder for chaining. + */ + public Builder clearTarget() { + + target_ = getDefaultInstance().getTarget(); + onChanged(); + return this; + } + /** + *
+       * The target name.
+       * 
+ * + * string target = 1; + * @param value The bytes for target to set. + * @return This builder for chaining. + */ + public Builder setTargetBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + target_ = value; + onChanged(); + return this; + } + + private int type_ = 0; + /** + * .cc.arduino.cli.monitor.MonitorConfig.TargetType type = 2; + * @return The enum numeric value on the wire for type. + */ + public int getTypeValue() { + return type_; + } + /** + * .cc.arduino.cli.monitor.MonitorConfig.TargetType type = 2; + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + onChanged(); + return this; + } + /** + * .cc.arduino.cli.monitor.MonitorConfig.TargetType type = 2; + * @return The type. + */ + public cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig.TargetType getType() { + @SuppressWarnings("deprecation") + cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig.TargetType result = cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig.TargetType.valueOf(type_); + return result == null ? cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig.TargetType.UNRECOGNIZED : result; + } + /** + * .cc.arduino.cli.monitor.MonitorConfig.TargetType type = 2; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig.TargetType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .cc.arduino.cli.monitor.MonitorConfig.TargetType type = 2; + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Struct additionalConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> additionalConfigBuilder_; + /** + *
+       * Additional parameters that might be needed to configure the target or the
+       * monitor itself.
+       * 
+ * + * .google.protobuf.Struct additionalConfig = 3; + * @return Whether the additionalConfig field is set. + */ + public boolean hasAdditionalConfig() { + return additionalConfigBuilder_ != null || additionalConfig_ != null; + } + /** + *
+       * Additional parameters that might be needed to configure the target or the
+       * monitor itself.
+       * 
+ * + * .google.protobuf.Struct additionalConfig = 3; + * @return The additionalConfig. + */ + public com.google.protobuf.Struct getAdditionalConfig() { + if (additionalConfigBuilder_ == null) { + return additionalConfig_ == null ? com.google.protobuf.Struct.getDefaultInstance() : additionalConfig_; + } else { + return additionalConfigBuilder_.getMessage(); + } + } + /** + *
+       * Additional parameters that might be needed to configure the target or the
+       * monitor itself.
+       * 
+ * + * .google.protobuf.Struct additionalConfig = 3; + */ + public Builder setAdditionalConfig(com.google.protobuf.Struct value) { + if (additionalConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + additionalConfig_ = value; + onChanged(); + } else { + additionalConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+       * Additional parameters that might be needed to configure the target or the
+       * monitor itself.
+       * 
+ * + * .google.protobuf.Struct additionalConfig = 3; + */ + public Builder setAdditionalConfig( + com.google.protobuf.Struct.Builder builderForValue) { + if (additionalConfigBuilder_ == null) { + additionalConfig_ = builderForValue.build(); + onChanged(); + } else { + additionalConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+       * Additional parameters that might be needed to configure the target or the
+       * monitor itself.
+       * 
+ * + * .google.protobuf.Struct additionalConfig = 3; + */ + public Builder mergeAdditionalConfig(com.google.protobuf.Struct value) { + if (additionalConfigBuilder_ == null) { + if (additionalConfig_ != null) { + additionalConfig_ = + com.google.protobuf.Struct.newBuilder(additionalConfig_).mergeFrom(value).buildPartial(); + } else { + additionalConfig_ = value; + } + onChanged(); + } else { + additionalConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+       * Additional parameters that might be needed to configure the target or the
+       * monitor itself.
+       * 
+ * + * .google.protobuf.Struct additionalConfig = 3; + */ + public Builder clearAdditionalConfig() { + if (additionalConfigBuilder_ == null) { + additionalConfig_ = null; + onChanged(); + } else { + additionalConfig_ = null; + additionalConfigBuilder_ = null; + } + + return this; + } + /** + *
+       * Additional parameters that might be needed to configure the target or the
+       * monitor itself.
+       * 
+ * + * .google.protobuf.Struct additionalConfig = 3; + */ + public com.google.protobuf.Struct.Builder getAdditionalConfigBuilder() { + + onChanged(); + return getAdditionalConfigFieldBuilder().getBuilder(); + } + /** + *
+       * Additional parameters that might be needed to configure the target or the
+       * monitor itself.
+       * 
+ * + * .google.protobuf.Struct additionalConfig = 3; + */ + public com.google.protobuf.StructOrBuilder getAdditionalConfigOrBuilder() { + if (additionalConfigBuilder_ != null) { + return additionalConfigBuilder_.getMessageOrBuilder(); + } else { + return additionalConfig_ == null ? + com.google.protobuf.Struct.getDefaultInstance() : additionalConfig_; + } + } + /** + *
+       * Additional parameters that might be needed to configure the target or the
+       * monitor itself.
+       * 
+ * + * .google.protobuf.Struct additionalConfig = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> + getAdditionalConfigFieldBuilder() { + if (additionalConfigBuilder_ == null) { + additionalConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( + getAdditionalConfig(), + getParentForChildren(), + isClean()); + additionalConfig_ = null; + } + return additionalConfigBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.monitor.MonitorConfig) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.monitor.MonitorConfig) + private static final cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig(); + } + + public static cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MonitorConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MonitorConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.monitor.MonitorOuterClass.MonitorConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface StreamingOpenRespOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.monitor.StreamingOpenResp) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The data received from the target.
+     * 
+ * + * bytes data = 1; + * @return The data. + */ + com.google.protobuf.ByteString getData(); + } + /** + *
+   * 
+ * + * Protobuf type {@code cc.arduino.cli.monitor.StreamingOpenResp} + */ + public static final class StreamingOpenResp extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.monitor.StreamingOpenResp) + StreamingOpenRespOrBuilder { + private static final long serialVersionUID = 0L; + // Use StreamingOpenResp.newBuilder() to construct. + private StreamingOpenResp(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StreamingOpenResp() { + data_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new StreamingOpenResp(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StreamingOpenResp( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + + data_ = input.readBytes(); + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.monitor.MonitorOuterClass.internal_static_cc_arduino_cli_monitor_StreamingOpenResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.monitor.MonitorOuterClass.internal_static_cc_arduino_cli_monitor_StreamingOpenResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenResp.class, cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenResp.Builder.class); + } + + public static final int DATA_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString data_; + /** + *
+     * The data received from the target.
+     * 
+ * + * bytes data = 1; + * @return The data. + */ + public com.google.protobuf.ByteString getData() { + return data_; + } + + 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 (!data_.isEmpty()) { + output.writeBytes(1, data_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!data_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, data_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenResp)) { + return super.equals(obj); + } + cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenResp other = (cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenResp) obj; + + if (!getData() + .equals(other.getData())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenResp parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenResp parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenResp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenResp parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenResp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenResp parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenResp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenResp parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenResp parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenResp parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenResp parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenResp parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenResp 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * 
+ * + * Protobuf type {@code cc.arduino.cli.monitor.StreamingOpenResp} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.monitor.StreamingOpenResp) + cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenRespOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.monitor.MonitorOuterClass.internal_static_cc_arduino_cli_monitor_StreamingOpenResp_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.monitor.MonitorOuterClass.internal_static_cc_arduino_cli_monitor_StreamingOpenResp_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenResp.class, cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenResp.Builder.class); + } + + // Construct using cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenResp.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + data_ = com.google.protobuf.ByteString.EMPTY; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.monitor.MonitorOuterClass.internal_static_cc_arduino_cli_monitor_StreamingOpenResp_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenResp getDefaultInstanceForType() { + return cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenResp.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenResp build() { + cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenResp result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenResp buildPartial() { + cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenResp result = new cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenResp(this); + result.data_ = data_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenResp) { + return mergeFrom((cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenResp)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenResp other) { + if (other == cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenResp.getDefaultInstance()) return this; + if (other.getData() != com.google.protobuf.ByteString.EMPTY) { + setData(other.getData()); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenResp parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenResp) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+       * The data received from the target.
+       * 
+ * + * bytes data = 1; + * @return The data. + */ + public com.google.protobuf.ByteString getData() { + return data_; + } + /** + *
+       * The data received from the target.
+       * 
+ * + * bytes data = 1; + * @param value The data to set. + * @return This builder for chaining. + */ + public Builder setData(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + data_ = value; + onChanged(); + return this; + } + /** + *
+       * The data received from the target.
+       * 
+ * + * bytes data = 1; + * @return This builder for chaining. + */ + public Builder clearData() { + + data_ = getDefaultInstance().getData(); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.monitor.StreamingOpenResp) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.monitor.StreamingOpenResp) + private static final cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenResp DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenResp(); + } + + public static cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenResp getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StreamingOpenResp parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StreamingOpenResp(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.monitor.MonitorOuterClass.StreamingOpenResp getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_monitor_StreamingOpenReq_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_monitor_StreamingOpenReq_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_monitor_MonitorConfig_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_monitor_MonitorConfig_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_monitor_StreamingOpenResp_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_monitor_StreamingOpenResp_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\025monitor/monitor.proto\022\026cc.arduino.cli." + + "monitor\032\034google/protobuf/struct.proto\"m\n" + + "\020StreamingOpenReq\022>\n\rmonitorConfig\030\001 \001(\013" + + "2%.cc.arduino.cli.monitor.MonitorConfigH" + + "\000\022\016\n\004data\030\002 \001(\014H\000B\t\n\007content\"\254\001\n\rMonitor" + + "Config\022\016\n\006target\030\001 \001(\t\022>\n\004type\030\002 \001(\01620.c" + + "c.arduino.cli.monitor.MonitorConfig.Targ" + + "etType\0221\n\020additionalConfig\030\003 \001(\0132\027.googl" + + "e.protobuf.Struct\"\030\n\nTargetType\022\n\n\006SERIA" + + "L\020\000\"!\n\021StreamingOpenResp\022\014\n\004data\030\001 \001(\0142u" + + "\n\007Monitor\022j\n\rStreamingOpen\022(.cc.arduino." + + "cli.monitor.StreamingOpenReq\032).cc.arduin" + + "o.cli.monitor.StreamingOpenResp\"\000(\0010\001B,Z" + + "*github.com/arduino/arduino-cli/rpc/moni" + + "torb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.StructProto.getDescriptor(), + }); + internal_static_cc_arduino_cli_monitor_StreamingOpenReq_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_cc_arduino_cli_monitor_StreamingOpenReq_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_monitor_StreamingOpenReq_descriptor, + new java.lang.String[] { "MonitorConfig", "Data", "Content", }); + internal_static_cc_arduino_cli_monitor_MonitorConfig_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_cc_arduino_cli_monitor_MonitorConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_monitor_MonitorConfig_descriptor, + new java.lang.String[] { "Target", "Type", "AdditionalConfig", }); + internal_static_cc_arduino_cli_monitor_StreamingOpenResp_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_cc_arduino_cli_monitor_StreamingOpenResp_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_monitor_StreamingOpenResp_descriptor, + new java.lang.String[] { "Data", }); + com.google.protobuf.StructProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/arduino-core/src/cc/arduino/cli/settings/SettingsGrpc.java b/arduino-core/src/cc/arduino/cli/settings/SettingsGrpc.java new file mode 100644 index 00000000000..ce7449b0064 --- /dev/null +++ b/arduino-core/src/cc/arduino/cli/settings/SettingsGrpc.java @@ -0,0 +1,573 @@ +package cc.arduino.cli.settings; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall; +import static io.grpc.stub.ClientCalls.asyncClientStreamingCall; +import static io.grpc.stub.ClientCalls.asyncServerStreamingCall; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingServerStreamingCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; +import static io.grpc.stub.ServerCalls.asyncClientStreamingCall; +import static io.grpc.stub.ServerCalls.asyncServerStreamingCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + *
+ * The Settings service provides an interface to Arduino CLI's configuration
+ * options
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.20.0)", + comments = "Source: settings/settings.proto") +public final class SettingsGrpc { + + private SettingsGrpc() {} + + public static final String SERVICE_NAME = "cc.arduino.cli.settings.Settings"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor getGetAllMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAll", + requestType = cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest.class, + responseType = cc.arduino.cli.settings.SettingsOuterClass.RawData.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetAllMethod() { + io.grpc.MethodDescriptor getGetAllMethod; + if ((getGetAllMethod = SettingsGrpc.getGetAllMethod) == null) { + synchronized (SettingsGrpc.class) { + if ((getGetAllMethod = SettingsGrpc.getGetAllMethod) == null) { + SettingsGrpc.getGetAllMethod = getGetAllMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "cc.arduino.cli.settings.Settings", "GetAll")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.settings.SettingsOuterClass.RawData.getDefaultInstance())) + .setSchemaDescriptor(new SettingsMethodDescriptorSupplier("GetAll")) + .build(); + } + } + } + return getGetAllMethod; + } + + private static volatile io.grpc.MethodDescriptor getMergeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "Merge", + requestType = cc.arduino.cli.settings.SettingsOuterClass.RawData.class, + responseType = cc.arduino.cli.settings.SettingsOuterClass.MergeResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getMergeMethod() { + io.grpc.MethodDescriptor getMergeMethod; + if ((getMergeMethod = SettingsGrpc.getMergeMethod) == null) { + synchronized (SettingsGrpc.class) { + if ((getMergeMethod = SettingsGrpc.getMergeMethod) == null) { + SettingsGrpc.getMergeMethod = getMergeMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "cc.arduino.cli.settings.Settings", "Merge")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.settings.SettingsOuterClass.RawData.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.settings.SettingsOuterClass.MergeResponse.getDefaultInstance())) + .setSchemaDescriptor(new SettingsMethodDescriptorSupplier("Merge")) + .build(); + } + } + } + return getMergeMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetValueMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetValue", + requestType = cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest.class, + responseType = cc.arduino.cli.settings.SettingsOuterClass.Value.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetValueMethod() { + io.grpc.MethodDescriptor getGetValueMethod; + if ((getGetValueMethod = SettingsGrpc.getGetValueMethod) == null) { + synchronized (SettingsGrpc.class) { + if ((getGetValueMethod = SettingsGrpc.getGetValueMethod) == null) { + SettingsGrpc.getGetValueMethod = getGetValueMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "cc.arduino.cli.settings.Settings", "GetValue")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.settings.SettingsOuterClass.Value.getDefaultInstance())) + .setSchemaDescriptor(new SettingsMethodDescriptorSupplier("GetValue")) + .build(); + } + } + } + return getGetValueMethod; + } + + private static volatile io.grpc.MethodDescriptor getSetValueMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SetValue", + requestType = cc.arduino.cli.settings.SettingsOuterClass.Value.class, + responseType = cc.arduino.cli.settings.SettingsOuterClass.SetValueResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getSetValueMethod() { + io.grpc.MethodDescriptor getSetValueMethod; + if ((getSetValueMethod = SettingsGrpc.getSetValueMethod) == null) { + synchronized (SettingsGrpc.class) { + if ((getSetValueMethod = SettingsGrpc.getSetValueMethod) == null) { + SettingsGrpc.getSetValueMethod = getSetValueMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "cc.arduino.cli.settings.Settings", "SetValue")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.settings.SettingsOuterClass.Value.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + cc.arduino.cli.settings.SettingsOuterClass.SetValueResponse.getDefaultInstance())) + .setSchemaDescriptor(new SettingsMethodDescriptorSupplier("SetValue")) + .build(); + } + } + } + return getSetValueMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static SettingsStub newStub(io.grpc.Channel channel) { + return new SettingsStub(channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static SettingsBlockingStub newBlockingStub( + io.grpc.Channel channel) { + return new SettingsBlockingStub(channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static SettingsFutureStub newFutureStub( + io.grpc.Channel channel) { + return new SettingsFutureStub(channel); + } + + /** + *
+   * The Settings service provides an interface to Arduino CLI's configuration
+   * options
+   * 
+ */ + public static abstract class SettingsImplBase implements io.grpc.BindableService { + + /** + *
+     * List all the settings.
+     * 
+ */ + public void getAll(cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getGetAllMethod(), responseObserver); + } + + /** + *
+     * Set multiple settings values at once.
+     * 
+ */ + public void merge(cc.arduino.cli.settings.SettingsOuterClass.RawData request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getMergeMethod(), responseObserver); + } + + /** + *
+     * Get the value of a specific setting.
+     * 
+ */ + public void getValue(cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getGetValueMethod(), responseObserver); + } + + /** + *
+     * Set the value of a specific setting.
+     * 
+ */ + public void setValue(cc.arduino.cli.settings.SettingsOuterClass.Value request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getSetValueMethod(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getGetAllMethod(), + asyncUnaryCall( + new MethodHandlers< + cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest, + cc.arduino.cli.settings.SettingsOuterClass.RawData>( + this, METHODID_GET_ALL))) + .addMethod( + getMergeMethod(), + asyncUnaryCall( + new MethodHandlers< + cc.arduino.cli.settings.SettingsOuterClass.RawData, + cc.arduino.cli.settings.SettingsOuterClass.MergeResponse>( + this, METHODID_MERGE))) + .addMethod( + getGetValueMethod(), + asyncUnaryCall( + new MethodHandlers< + cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest, + cc.arduino.cli.settings.SettingsOuterClass.Value>( + this, METHODID_GET_VALUE))) + .addMethod( + getSetValueMethod(), + asyncUnaryCall( + new MethodHandlers< + cc.arduino.cli.settings.SettingsOuterClass.Value, + cc.arduino.cli.settings.SettingsOuterClass.SetValueResponse>( + this, METHODID_SET_VALUE))) + .build(); + } + } + + /** + *
+   * The Settings service provides an interface to Arduino CLI's configuration
+   * options
+   * 
+ */ + public static final class SettingsStub extends io.grpc.stub.AbstractStub { + private SettingsStub(io.grpc.Channel channel) { + super(channel); + } + + private SettingsStub(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SettingsStub build(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + return new SettingsStub(channel, callOptions); + } + + /** + *
+     * List all the settings.
+     * 
+ */ + public void getAll(cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetAllMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Set multiple settings values at once.
+     * 
+ */ + public void merge(cc.arduino.cli.settings.SettingsOuterClass.RawData request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getMergeMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Get the value of a specific setting.
+     * 
+ */ + public void getValue(cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetValueMethod(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Set the value of a specific setting.
+     * 
+ */ + public void setValue(cc.arduino.cli.settings.SettingsOuterClass.Value request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getSetValueMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + *
+   * The Settings service provides an interface to Arduino CLI's configuration
+   * options
+   * 
+ */ + public static final class SettingsBlockingStub extends io.grpc.stub.AbstractStub { + private SettingsBlockingStub(io.grpc.Channel channel) { + super(channel); + } + + private SettingsBlockingStub(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SettingsBlockingStub build(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + return new SettingsBlockingStub(channel, callOptions); + } + + /** + *
+     * List all the settings.
+     * 
+ */ + public cc.arduino.cli.settings.SettingsOuterClass.RawData getAll(cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest request) { + return blockingUnaryCall( + getChannel(), getGetAllMethod(), getCallOptions(), request); + } + + /** + *
+     * Set multiple settings values at once.
+     * 
+ */ + public cc.arduino.cli.settings.SettingsOuterClass.MergeResponse merge(cc.arduino.cli.settings.SettingsOuterClass.RawData request) { + return blockingUnaryCall( + getChannel(), getMergeMethod(), getCallOptions(), request); + } + + /** + *
+     * Get the value of a specific setting.
+     * 
+ */ + public cc.arduino.cli.settings.SettingsOuterClass.Value getValue(cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest request) { + return blockingUnaryCall( + getChannel(), getGetValueMethod(), getCallOptions(), request); + } + + /** + *
+     * Set the value of a specific setting.
+     * 
+ */ + public cc.arduino.cli.settings.SettingsOuterClass.SetValueResponse setValue(cc.arduino.cli.settings.SettingsOuterClass.Value request) { + return blockingUnaryCall( + getChannel(), getSetValueMethod(), getCallOptions(), request); + } + } + + /** + *
+   * The Settings service provides an interface to Arduino CLI's configuration
+   * options
+   * 
+ */ + public static final class SettingsFutureStub extends io.grpc.stub.AbstractStub { + private SettingsFutureStub(io.grpc.Channel channel) { + super(channel); + } + + private SettingsFutureStub(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SettingsFutureStub build(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + return new SettingsFutureStub(channel, callOptions); + } + + /** + *
+     * List all the settings.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getAll( + cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetAllMethod(), getCallOptions()), request); + } + + /** + *
+     * Set multiple settings values at once.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture merge( + cc.arduino.cli.settings.SettingsOuterClass.RawData request) { + return futureUnaryCall( + getChannel().newCall(getMergeMethod(), getCallOptions()), request); + } + + /** + *
+     * Get the value of a specific setting.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getValue( + cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetValueMethod(), getCallOptions()), request); + } + + /** + *
+     * Set the value of a specific setting.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture setValue( + cc.arduino.cli.settings.SettingsOuterClass.Value request) { + return futureUnaryCall( + getChannel().newCall(getSetValueMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_GET_ALL = 0; + private static final int METHODID_MERGE = 1; + private static final int METHODID_GET_VALUE = 2; + private static final int METHODID_SET_VALUE = 3; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final SettingsImplBase serviceImpl; + private final int methodId; + + MethodHandlers(SettingsImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_GET_ALL: + serviceImpl.getAll((cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_MERGE: + serviceImpl.merge((cc.arduino.cli.settings.SettingsOuterClass.RawData) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_VALUE: + serviceImpl.getValue((cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SET_VALUE: + serviceImpl.setValue((cc.arduino.cli.settings.SettingsOuterClass.Value) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private static abstract class SettingsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + SettingsBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return cc.arduino.cli.settings.SettingsOuterClass.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("Settings"); + } + } + + private static final class SettingsFileDescriptorSupplier + extends SettingsBaseDescriptorSupplier { + SettingsFileDescriptorSupplier() {} + } + + private static final class SettingsMethodDescriptorSupplier + extends SettingsBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + SettingsMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (SettingsGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new SettingsFileDescriptorSupplier()) + .addMethod(getGetAllMethod()) + .addMethod(getMergeMethod()) + .addMethod(getGetValueMethod()) + .addMethod(getSetValueMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/arduino-core/src/cc/arduino/cli/settings/SettingsOuterClass.java b/arduino-core/src/cc/arduino/cli/settings/SettingsOuterClass.java new file mode 100644 index 00000000000..a8f3a6d6502 --- /dev/null +++ b/arduino-core/src/cc/arduino/cli/settings/SettingsOuterClass.java @@ -0,0 +1,3360 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: settings/settings.proto + +package cc.arduino.cli.settings; + +public final class SettingsOuterClass { + private SettingsOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface RawDataOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.settings.RawData) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The settings, in JSON format.
+     * 
+ * + * string jsonData = 1; + * @return The jsonData. + */ + java.lang.String getJsonData(); + /** + *
+     * The settings, in JSON format.
+     * 
+ * + * string jsonData = 1; + * @return The bytes for jsonData. + */ + com.google.protobuf.ByteString + getJsonDataBytes(); + } + /** + * Protobuf type {@code cc.arduino.cli.settings.RawData} + */ + public static final class RawData extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.settings.RawData) + RawDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use RawData.newBuilder() to construct. + private RawData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RawData() { + jsonData_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new RawData(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RawData( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + jsonData_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.settings.SettingsOuterClass.internal_static_cc_arduino_cli_settings_RawData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.settings.SettingsOuterClass.internal_static_cc_arduino_cli_settings_RawData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.settings.SettingsOuterClass.RawData.class, cc.arduino.cli.settings.SettingsOuterClass.RawData.Builder.class); + } + + public static final int JSONDATA_FIELD_NUMBER = 1; + private volatile java.lang.Object jsonData_; + /** + *
+     * The settings, in JSON format.
+     * 
+ * + * string jsonData = 1; + * @return The jsonData. + */ + public java.lang.String getJsonData() { + java.lang.Object ref = jsonData_; + 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(); + jsonData_ = s; + return s; + } + } + /** + *
+     * The settings, in JSON format.
+     * 
+ * + * string jsonData = 1; + * @return The bytes for jsonData. + */ + public com.google.protobuf.ByteString + getJsonDataBytes() { + java.lang.Object ref = jsonData_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + jsonData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (!getJsonDataBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, jsonData_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getJsonDataBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, jsonData_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.settings.SettingsOuterClass.RawData)) { + return super.equals(obj); + } + cc.arduino.cli.settings.SettingsOuterClass.RawData other = (cc.arduino.cli.settings.SettingsOuterClass.RawData) obj; + + if (!getJsonData() + .equals(other.getJsonData())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + JSONDATA_FIELD_NUMBER; + hash = (53 * hash) + getJsonData().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.settings.SettingsOuterClass.RawData parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.settings.SettingsOuterClass.RawData parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.settings.SettingsOuterClass.RawData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.settings.SettingsOuterClass.RawData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.settings.SettingsOuterClass.RawData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.settings.SettingsOuterClass.RawData parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.settings.SettingsOuterClass.RawData parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.settings.SettingsOuterClass.RawData parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.settings.SettingsOuterClass.RawData parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.settings.SettingsOuterClass.RawData parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.settings.SettingsOuterClass.RawData parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.settings.SettingsOuterClass.RawData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.settings.SettingsOuterClass.RawData 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.settings.RawData} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.settings.RawData) + cc.arduino.cli.settings.SettingsOuterClass.RawDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.settings.SettingsOuterClass.internal_static_cc_arduino_cli_settings_RawData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.settings.SettingsOuterClass.internal_static_cc_arduino_cli_settings_RawData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.settings.SettingsOuterClass.RawData.class, cc.arduino.cli.settings.SettingsOuterClass.RawData.Builder.class); + } + + // Construct using cc.arduino.cli.settings.SettingsOuterClass.RawData.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + jsonData_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.settings.SettingsOuterClass.internal_static_cc_arduino_cli_settings_RawData_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.settings.SettingsOuterClass.RawData getDefaultInstanceForType() { + return cc.arduino.cli.settings.SettingsOuterClass.RawData.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.settings.SettingsOuterClass.RawData build() { + cc.arduino.cli.settings.SettingsOuterClass.RawData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.settings.SettingsOuterClass.RawData buildPartial() { + cc.arduino.cli.settings.SettingsOuterClass.RawData result = new cc.arduino.cli.settings.SettingsOuterClass.RawData(this); + result.jsonData_ = jsonData_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.settings.SettingsOuterClass.RawData) { + return mergeFrom((cc.arduino.cli.settings.SettingsOuterClass.RawData)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.settings.SettingsOuterClass.RawData other) { + if (other == cc.arduino.cli.settings.SettingsOuterClass.RawData.getDefaultInstance()) return this; + if (!other.getJsonData().isEmpty()) { + jsonData_ = other.jsonData_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.settings.SettingsOuterClass.RawData parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.settings.SettingsOuterClass.RawData) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object jsonData_ = ""; + /** + *
+       * The settings, in JSON format.
+       * 
+ * + * string jsonData = 1; + * @return The jsonData. + */ + public java.lang.String getJsonData() { + java.lang.Object ref = jsonData_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jsonData_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The settings, in JSON format.
+       * 
+ * + * string jsonData = 1; + * @return The bytes for jsonData. + */ + public com.google.protobuf.ByteString + getJsonDataBytes() { + java.lang.Object ref = jsonData_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + jsonData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The settings, in JSON format.
+       * 
+ * + * string jsonData = 1; + * @param value The jsonData to set. + * @return This builder for chaining. + */ + public Builder setJsonData( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + jsonData_ = value; + onChanged(); + return this; + } + /** + *
+       * The settings, in JSON format.
+       * 
+ * + * string jsonData = 1; + * @return This builder for chaining. + */ + public Builder clearJsonData() { + + jsonData_ = getDefaultInstance().getJsonData(); + onChanged(); + return this; + } + /** + *
+       * The settings, in JSON format.
+       * 
+ * + * string jsonData = 1; + * @param value The bytes for jsonData to set. + * @return This builder for chaining. + */ + public Builder setJsonDataBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + jsonData_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.settings.RawData) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.settings.RawData) + private static final cc.arduino.cli.settings.SettingsOuterClass.RawData DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.settings.SettingsOuterClass.RawData(); + } + + public static cc.arduino.cli.settings.SettingsOuterClass.RawData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RawData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RawData(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.settings.SettingsOuterClass.RawData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ValueOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.settings.Value) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The key of the setting.
+     * 
+ * + * string key = 1; + * @return The key. + */ + java.lang.String getKey(); + /** + *
+     * The key of the setting.
+     * 
+ * + * string key = 1; + * @return The bytes for key. + */ + com.google.protobuf.ByteString + getKeyBytes(); + + /** + *
+     * The setting, in JSON format.
+     * 
+ * + * string jsonData = 2; + * @return The jsonData. + */ + java.lang.String getJsonData(); + /** + *
+     * The setting, in JSON format.
+     * 
+ * + * string jsonData = 2; + * @return The bytes for jsonData. + */ + com.google.protobuf.ByteString + getJsonDataBytes(); + } + /** + * Protobuf type {@code cc.arduino.cli.settings.Value} + */ + public static final class Value extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.settings.Value) + ValueOrBuilder { + private static final long serialVersionUID = 0L; + // Use Value.newBuilder() to construct. + private Value(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Value() { + key_ = ""; + jsonData_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Value(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Value( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + key_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + jsonData_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.settings.SettingsOuterClass.internal_static_cc_arduino_cli_settings_Value_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.settings.SettingsOuterClass.internal_static_cc_arduino_cli_settings_Value_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.settings.SettingsOuterClass.Value.class, cc.arduino.cli.settings.SettingsOuterClass.Value.Builder.class); + } + + public static final int KEY_FIELD_NUMBER = 1; + private volatile java.lang.Object key_; + /** + *
+     * The key of the setting.
+     * 
+ * + * string key = 1; + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + 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(); + key_ = s; + return s; + } + } + /** + *
+     * The key of the setting.
+     * 
+ * + * string key = 1; + * @return The bytes for key. + */ + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int JSONDATA_FIELD_NUMBER = 2; + private volatile java.lang.Object jsonData_; + /** + *
+     * The setting, in JSON format.
+     * 
+ * + * string jsonData = 2; + * @return The jsonData. + */ + public java.lang.String getJsonData() { + java.lang.Object ref = jsonData_; + 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(); + jsonData_ = s; + return s; + } + } + /** + *
+     * The setting, in JSON format.
+     * 
+ * + * string jsonData = 2; + * @return The bytes for jsonData. + */ + public com.google.protobuf.ByteString + getJsonDataBytes() { + java.lang.Object ref = jsonData_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + jsonData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (!getKeyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_); + } + if (!getJsonDataBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, jsonData_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getKeyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_); + } + if (!getJsonDataBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, jsonData_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.settings.SettingsOuterClass.Value)) { + return super.equals(obj); + } + cc.arduino.cli.settings.SettingsOuterClass.Value other = (cc.arduino.cli.settings.SettingsOuterClass.Value) obj; + + if (!getKey() + .equals(other.getKey())) return false; + if (!getJsonData() + .equals(other.getJsonData())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + hash = (37 * hash) + JSONDATA_FIELD_NUMBER; + hash = (53 * hash) + getJsonData().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.settings.SettingsOuterClass.Value parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.settings.SettingsOuterClass.Value parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.settings.SettingsOuterClass.Value parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.settings.SettingsOuterClass.Value parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.settings.SettingsOuterClass.Value parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.settings.SettingsOuterClass.Value parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.settings.SettingsOuterClass.Value parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.settings.SettingsOuterClass.Value parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.settings.SettingsOuterClass.Value parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.settings.SettingsOuterClass.Value parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.settings.SettingsOuterClass.Value parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.settings.SettingsOuterClass.Value parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.settings.SettingsOuterClass.Value 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.settings.Value} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.settings.Value) + cc.arduino.cli.settings.SettingsOuterClass.ValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.settings.SettingsOuterClass.internal_static_cc_arduino_cli_settings_Value_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.settings.SettingsOuterClass.internal_static_cc_arduino_cli_settings_Value_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.settings.SettingsOuterClass.Value.class, cc.arduino.cli.settings.SettingsOuterClass.Value.Builder.class); + } + + // Construct using cc.arduino.cli.settings.SettingsOuterClass.Value.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + key_ = ""; + + jsonData_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.settings.SettingsOuterClass.internal_static_cc_arduino_cli_settings_Value_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.settings.SettingsOuterClass.Value getDefaultInstanceForType() { + return cc.arduino.cli.settings.SettingsOuterClass.Value.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.settings.SettingsOuterClass.Value build() { + cc.arduino.cli.settings.SettingsOuterClass.Value result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.settings.SettingsOuterClass.Value buildPartial() { + cc.arduino.cli.settings.SettingsOuterClass.Value result = new cc.arduino.cli.settings.SettingsOuterClass.Value(this); + result.key_ = key_; + result.jsonData_ = jsonData_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.settings.SettingsOuterClass.Value) { + return mergeFrom((cc.arduino.cli.settings.SettingsOuterClass.Value)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.settings.SettingsOuterClass.Value other) { + if (other == cc.arduino.cli.settings.SettingsOuterClass.Value.getDefaultInstance()) return this; + if (!other.getKey().isEmpty()) { + key_ = other.key_; + onChanged(); + } + if (!other.getJsonData().isEmpty()) { + jsonData_ = other.jsonData_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.settings.SettingsOuterClass.Value parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.settings.SettingsOuterClass.Value) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object key_ = ""; + /** + *
+       * The key of the setting.
+       * 
+ * + * string key = 1; + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The key of the setting.
+       * 
+ * + * string key = 1; + * @return The bytes for key. + */ + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The key of the setting.
+       * 
+ * + * string key = 1; + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + key_ = value; + onChanged(); + return this; + } + /** + *
+       * The key of the setting.
+       * 
+ * + * string key = 1; + * @return This builder for chaining. + */ + public Builder clearKey() { + + key_ = getDefaultInstance().getKey(); + onChanged(); + return this; + } + /** + *
+       * The key of the setting.
+       * 
+ * + * string key = 1; + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + key_ = value; + onChanged(); + return this; + } + + private java.lang.Object jsonData_ = ""; + /** + *
+       * The setting, in JSON format.
+       * 
+ * + * string jsonData = 2; + * @return The jsonData. + */ + public java.lang.String getJsonData() { + java.lang.Object ref = jsonData_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jsonData_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The setting, in JSON format.
+       * 
+ * + * string jsonData = 2; + * @return The bytes for jsonData. + */ + public com.google.protobuf.ByteString + getJsonDataBytes() { + java.lang.Object ref = jsonData_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + jsonData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The setting, in JSON format.
+       * 
+ * + * string jsonData = 2; + * @param value The jsonData to set. + * @return This builder for chaining. + */ + public Builder setJsonData( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + jsonData_ = value; + onChanged(); + return this; + } + /** + *
+       * The setting, in JSON format.
+       * 
+ * + * string jsonData = 2; + * @return This builder for chaining. + */ + public Builder clearJsonData() { + + jsonData_ = getDefaultInstance().getJsonData(); + onChanged(); + return this; + } + /** + *
+       * The setting, in JSON format.
+       * 
+ * + * string jsonData = 2; + * @param value The bytes for jsonData to set. + * @return This builder for chaining. + */ + public Builder setJsonDataBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + jsonData_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.settings.Value) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.settings.Value) + private static final cc.arduino.cli.settings.SettingsOuterClass.Value DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.settings.SettingsOuterClass.Value(); + } + + public static cc.arduino.cli.settings.SettingsOuterClass.Value getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Value parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Value(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.settings.SettingsOuterClass.Value getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetAllRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.settings.GetAllRequest) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code cc.arduino.cli.settings.GetAllRequest} + */ + public static final class GetAllRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.settings.GetAllRequest) + GetAllRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetAllRequest.newBuilder() to construct. + private GetAllRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetAllRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetAllRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetAllRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.settings.SettingsOuterClass.internal_static_cc_arduino_cli_settings_GetAllRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.settings.SettingsOuterClass.internal_static_cc_arduino_cli_settings_GetAllRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest.class, cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest.Builder.class); + } + + 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 { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest)) { + return super.equals(obj); + } + cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest other = (cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.settings.GetAllRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.settings.GetAllRequest) + cc.arduino.cli.settings.SettingsOuterClass.GetAllRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.settings.SettingsOuterClass.internal_static_cc_arduino_cli_settings_GetAllRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.settings.SettingsOuterClass.internal_static_cc_arduino_cli_settings_GetAllRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest.class, cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest.Builder.class); + } + + // Construct using cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.settings.SettingsOuterClass.internal_static_cc_arduino_cli_settings_GetAllRequest_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest getDefaultInstanceForType() { + return cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest build() { + cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest buildPartial() { + cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest result = new cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest) { + return mergeFrom((cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest other) { + if (other == cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.settings.GetAllRequest) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.settings.GetAllRequest) + private static final cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest(); + } + + public static cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAllRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetAllRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.settings.SettingsOuterClass.GetAllRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GetValueRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.settings.GetValueRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * The key of the setting.
+     * 
+ * + * string key = 1; + * @return The key. + */ + java.lang.String getKey(); + /** + *
+     * The key of the setting.
+     * 
+ * + * string key = 1; + * @return The bytes for key. + */ + com.google.protobuf.ByteString + getKeyBytes(); + } + /** + * Protobuf type {@code cc.arduino.cli.settings.GetValueRequest} + */ + public static final class GetValueRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.settings.GetValueRequest) + GetValueRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetValueRequest.newBuilder() to construct. + private GetValueRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetValueRequest() { + key_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetValueRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetValueRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + key_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.settings.SettingsOuterClass.internal_static_cc_arduino_cli_settings_GetValueRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.settings.SettingsOuterClass.internal_static_cc_arduino_cli_settings_GetValueRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest.class, cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest.Builder.class); + } + + public static final int KEY_FIELD_NUMBER = 1; + private volatile java.lang.Object key_; + /** + *
+     * The key of the setting.
+     * 
+ * + * string key = 1; + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + 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(); + key_ = s; + return s; + } + } + /** + *
+     * The key of the setting.
+     * 
+ * + * string key = 1; + * @return The bytes for key. + */ + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 (!getKeyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getKeyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest)) { + return super.equals(obj); + } + cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest other = (cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest) obj; + + if (!getKey() + .equals(other.getKey())) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.settings.GetValueRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.settings.GetValueRequest) + cc.arduino.cli.settings.SettingsOuterClass.GetValueRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.settings.SettingsOuterClass.internal_static_cc_arduino_cli_settings_GetValueRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.settings.SettingsOuterClass.internal_static_cc_arduino_cli_settings_GetValueRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest.class, cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest.Builder.class); + } + + // Construct using cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + key_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.settings.SettingsOuterClass.internal_static_cc_arduino_cli_settings_GetValueRequest_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest getDefaultInstanceForType() { + return cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest build() { + cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest buildPartial() { + cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest result = new cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest(this); + result.key_ = key_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest) { + return mergeFrom((cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest other) { + if (other == cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest.getDefaultInstance()) return this; + if (!other.getKey().isEmpty()) { + key_ = other.key_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object key_ = ""; + /** + *
+       * The key of the setting.
+       * 
+ * + * string key = 1; + * @return The key. + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * The key of the setting.
+       * 
+ * + * string key = 1; + * @return The bytes for key. + */ + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * The key of the setting.
+       * 
+ * + * string key = 1; + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + key_ = value; + onChanged(); + return this; + } + /** + *
+       * The key of the setting.
+       * 
+ * + * string key = 1; + * @return This builder for chaining. + */ + public Builder clearKey() { + + key_ = getDefaultInstance().getKey(); + onChanged(); + return this; + } + /** + *
+       * The key of the setting.
+       * 
+ * + * string key = 1; + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + key_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.settings.GetValueRequest) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.settings.GetValueRequest) + private static final cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest(); + } + + public static cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetValueRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetValueRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.settings.SettingsOuterClass.GetValueRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface MergeResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.settings.MergeResponse) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code cc.arduino.cli.settings.MergeResponse} + */ + public static final class MergeResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.settings.MergeResponse) + MergeResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use MergeResponse.newBuilder() to construct. + private MergeResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MergeResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new MergeResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private MergeResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.settings.SettingsOuterClass.internal_static_cc_arduino_cli_settings_MergeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.settings.SettingsOuterClass.internal_static_cc_arduino_cli_settings_MergeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.settings.SettingsOuterClass.MergeResponse.class, cc.arduino.cli.settings.SettingsOuterClass.MergeResponse.Builder.class); + } + + 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 { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.settings.SettingsOuterClass.MergeResponse)) { + return super.equals(obj); + } + cc.arduino.cli.settings.SettingsOuterClass.MergeResponse other = (cc.arduino.cli.settings.SettingsOuterClass.MergeResponse) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.settings.SettingsOuterClass.MergeResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.settings.SettingsOuterClass.MergeResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.settings.SettingsOuterClass.MergeResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.settings.SettingsOuterClass.MergeResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.settings.SettingsOuterClass.MergeResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.settings.SettingsOuterClass.MergeResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.settings.SettingsOuterClass.MergeResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.settings.SettingsOuterClass.MergeResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.settings.SettingsOuterClass.MergeResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.settings.SettingsOuterClass.MergeResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.settings.SettingsOuterClass.MergeResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.settings.SettingsOuterClass.MergeResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.settings.SettingsOuterClass.MergeResponse 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.settings.MergeResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.settings.MergeResponse) + cc.arduino.cli.settings.SettingsOuterClass.MergeResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.settings.SettingsOuterClass.internal_static_cc_arduino_cli_settings_MergeResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.settings.SettingsOuterClass.internal_static_cc_arduino_cli_settings_MergeResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.settings.SettingsOuterClass.MergeResponse.class, cc.arduino.cli.settings.SettingsOuterClass.MergeResponse.Builder.class); + } + + // Construct using cc.arduino.cli.settings.SettingsOuterClass.MergeResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.settings.SettingsOuterClass.internal_static_cc_arduino_cli_settings_MergeResponse_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.settings.SettingsOuterClass.MergeResponse getDefaultInstanceForType() { + return cc.arduino.cli.settings.SettingsOuterClass.MergeResponse.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.settings.SettingsOuterClass.MergeResponse build() { + cc.arduino.cli.settings.SettingsOuterClass.MergeResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.settings.SettingsOuterClass.MergeResponse buildPartial() { + cc.arduino.cli.settings.SettingsOuterClass.MergeResponse result = new cc.arduino.cli.settings.SettingsOuterClass.MergeResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.settings.SettingsOuterClass.MergeResponse) { + return mergeFrom((cc.arduino.cli.settings.SettingsOuterClass.MergeResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.settings.SettingsOuterClass.MergeResponse other) { + if (other == cc.arduino.cli.settings.SettingsOuterClass.MergeResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.settings.SettingsOuterClass.MergeResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.settings.SettingsOuterClass.MergeResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.settings.MergeResponse) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.settings.MergeResponse) + private static final cc.arduino.cli.settings.SettingsOuterClass.MergeResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.settings.SettingsOuterClass.MergeResponse(); + } + + public static cc.arduino.cli.settings.SettingsOuterClass.MergeResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MergeResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MergeResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.settings.SettingsOuterClass.MergeResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SetValueResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:cc.arduino.cli.settings.SetValueResponse) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code cc.arduino.cli.settings.SetValueResponse} + */ + public static final class SetValueResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:cc.arduino.cli.settings.SetValueResponse) + SetValueResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use SetValueResponse.newBuilder() to construct. + private SetValueResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SetValueResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SetValueResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SetValueResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.settings.SettingsOuterClass.internal_static_cc_arduino_cli_settings_SetValueResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.settings.SettingsOuterClass.internal_static_cc_arduino_cli_settings_SetValueResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.settings.SettingsOuterClass.SetValueResponse.class, cc.arduino.cli.settings.SettingsOuterClass.SetValueResponse.Builder.class); + } + + 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 { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof cc.arduino.cli.settings.SettingsOuterClass.SetValueResponse)) { + return super.equals(obj); + } + cc.arduino.cli.settings.SettingsOuterClass.SetValueResponse other = (cc.arduino.cli.settings.SettingsOuterClass.SetValueResponse) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static cc.arduino.cli.settings.SettingsOuterClass.SetValueResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.settings.SettingsOuterClass.SetValueResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.settings.SettingsOuterClass.SetValueResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.settings.SettingsOuterClass.SetValueResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.settings.SettingsOuterClass.SetValueResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static cc.arduino.cli.settings.SettingsOuterClass.SetValueResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static cc.arduino.cli.settings.SettingsOuterClass.SetValueResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.settings.SettingsOuterClass.SetValueResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.settings.SettingsOuterClass.SetValueResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static cc.arduino.cli.settings.SettingsOuterClass.SetValueResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static cc.arduino.cli.settings.SettingsOuterClass.SetValueResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static cc.arduino.cli.settings.SettingsOuterClass.SetValueResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(cc.arduino.cli.settings.SettingsOuterClass.SetValueResponse 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.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code cc.arduino.cli.settings.SetValueResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:cc.arduino.cli.settings.SetValueResponse) + cc.arduino.cli.settings.SettingsOuterClass.SetValueResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return cc.arduino.cli.settings.SettingsOuterClass.internal_static_cc_arduino_cli_settings_SetValueResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return cc.arduino.cli.settings.SettingsOuterClass.internal_static_cc_arduino_cli_settings_SetValueResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + cc.arduino.cli.settings.SettingsOuterClass.SetValueResponse.class, cc.arduino.cli.settings.SettingsOuterClass.SetValueResponse.Builder.class); + } + + // Construct using cc.arduino.cli.settings.SettingsOuterClass.SetValueResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return cc.arduino.cli.settings.SettingsOuterClass.internal_static_cc_arduino_cli_settings_SetValueResponse_descriptor; + } + + @java.lang.Override + public cc.arduino.cli.settings.SettingsOuterClass.SetValueResponse getDefaultInstanceForType() { + return cc.arduino.cli.settings.SettingsOuterClass.SetValueResponse.getDefaultInstance(); + } + + @java.lang.Override + public cc.arduino.cli.settings.SettingsOuterClass.SetValueResponse build() { + cc.arduino.cli.settings.SettingsOuterClass.SetValueResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public cc.arduino.cli.settings.SettingsOuterClass.SetValueResponse buildPartial() { + cc.arduino.cli.settings.SettingsOuterClass.SetValueResponse result = new cc.arduino.cli.settings.SettingsOuterClass.SetValueResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof cc.arduino.cli.settings.SettingsOuterClass.SetValueResponse) { + return mergeFrom((cc.arduino.cli.settings.SettingsOuterClass.SetValueResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(cc.arduino.cli.settings.SettingsOuterClass.SetValueResponse other) { + if (other == cc.arduino.cli.settings.SettingsOuterClass.SetValueResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + 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 { + cc.arduino.cli.settings.SettingsOuterClass.SetValueResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (cc.arduino.cli.settings.SettingsOuterClass.SetValueResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:cc.arduino.cli.settings.SetValueResponse) + } + + // @@protoc_insertion_point(class_scope:cc.arduino.cli.settings.SetValueResponse) + private static final cc.arduino.cli.settings.SettingsOuterClass.SetValueResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new cc.arduino.cli.settings.SettingsOuterClass.SetValueResponse(); + } + + public static cc.arduino.cli.settings.SettingsOuterClass.SetValueResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SetValueResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SetValueResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public cc.arduino.cli.settings.SettingsOuterClass.SetValueResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_settings_RawData_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_settings_RawData_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_settings_Value_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_settings_Value_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_settings_GetAllRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_settings_GetAllRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_settings_GetValueRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_settings_GetValueRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_settings_MergeResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_settings_MergeResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_cc_arduino_cli_settings_SetValueResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_cc_arduino_cli_settings_SetValueResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\027settings/settings.proto\022\027cc.arduino.cl" + + "i.settings\"\033\n\007RawData\022\020\n\010jsonData\030\001 \001(\t\"" + + "&\n\005Value\022\013\n\003key\030\001 \001(\t\022\020\n\010jsonData\030\002 \001(\t\"" + + "\017\n\rGetAllRequest\"\036\n\017GetValueRequest\022\013\n\003k" + + "ey\030\001 \001(\t\"\017\n\rMergeResponse\"\022\n\020SetValueRes" + + "ponse2\336\002\n\010Settings\022R\n\006GetAll\022&.cc.arduin" + + "o.cli.settings.GetAllRequest\032 .cc.arduin" + + "o.cli.settings.RawData\022Q\n\005Merge\022 .cc.ard" + + "uino.cli.settings.RawData\032&.cc.arduino.c" + + "li.settings.MergeResponse\022T\n\010GetValue\022(." + + "cc.arduino.cli.settings.GetValueRequest\032" + + "\036.cc.arduino.cli.settings.Value\022U\n\010SetVa" + + "lue\022\036.cc.arduino.cli.settings.Value\032).cc" + + ".arduino.cli.settings.SetValueResponseB-" + + "Z+github.com/arduino/arduino-cli/rpc/set" + + "tingsb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_cc_arduino_cli_settings_RawData_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_cc_arduino_cli_settings_RawData_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_settings_RawData_descriptor, + new java.lang.String[] { "JsonData", }); + internal_static_cc_arduino_cli_settings_Value_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_cc_arduino_cli_settings_Value_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_settings_Value_descriptor, + new java.lang.String[] { "Key", "JsonData", }); + internal_static_cc_arduino_cli_settings_GetAllRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_cc_arduino_cli_settings_GetAllRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_settings_GetAllRequest_descriptor, + new java.lang.String[] { }); + internal_static_cc_arduino_cli_settings_GetValueRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_cc_arduino_cli_settings_GetValueRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_settings_GetValueRequest_descriptor, + new java.lang.String[] { "Key", }); + internal_static_cc_arduino_cli_settings_MergeResponse_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_cc_arduino_cli_settings_MergeResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_settings_MergeResponse_descriptor, + new java.lang.String[] { }); + internal_static_cc_arduino_cli_settings_SetValueResponse_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_cc_arduino_cli_settings_SetValueResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_cc_arduino_cli_settings_SetValueResponse_descriptor, + new java.lang.String[] { }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/arduino-core/src/cc/arduino/contributions/DownloadableContribution.java b/arduino-core/src/cc/arduino/contributions/DownloadableContribution.java index 87ef9cee465..dd47f76f565 100644 --- a/arduino-core/src/cc/arduino/contributions/DownloadableContribution.java +++ b/arduino-core/src/cc/arduino/contributions/DownloadableContribution.java @@ -38,7 +38,7 @@ public abstract class DownloadableContribution { public abstract String getUrl(); - public abstract String getVersion(); + public abstract String getVersion(); // TODO: Move outside of DownloadableContribution public abstract String getChecksum(); diff --git a/arduino-core/src/cc/arduino/contributions/VersionComparator.java b/arduino-core/src/cc/arduino/contributions/VersionComparator.java index af6a1fdb376..cf76c843310 100644 --- a/arduino-core/src/cc/arduino/contributions/VersionComparator.java +++ b/arduino-core/src/cc/arduino/contributions/VersionComparator.java @@ -31,7 +31,7 @@ import com.github.zafarkhaja.semver.Version; -import cc.arduino.contributions.libraries.ContributedLibrary; +import cc.arduino.contributions.libraries.ContributedLibraryRelease; import java.util.Comparator; import java.util.Optional; @@ -70,15 +70,15 @@ public static String max(String a, String b) { return greaterThan(a, b) ? a : b; } - public static ContributedLibrary max(ContributedLibrary a, ContributedLibrary b) { + public static ContributedLibraryRelease max(ContributedLibraryRelease a, ContributedLibraryRelease b) { return greaterThan(a, b) ? a : b; } - public static boolean greaterThan(ContributedLibrary a, ContributedLibrary b) { + public static boolean greaterThan(ContributedLibraryRelease a, ContributedLibraryRelease b) { return greaterThan(a.getParsedVersion(), b.getParsedVersion()); } - public static int compareTo(ContributedLibrary a, ContributedLibrary b) { + public static int compareTo(ContributedLibraryRelease a, ContributedLibraryRelease b) { return compareTo(a.getParsedVersion(), b.getParsedVersion()); } } diff --git a/arduino-core/src/cc/arduino/contributions/libraries/ContributedLibrary.java b/arduino-core/src/cc/arduino/contributions/libraries/ContributedLibrary.java index 603b46909b3..eee7b18b12b 100644 --- a/arduino-core/src/cc/arduino/contributions/libraries/ContributedLibrary.java +++ b/arduino-core/src/cc/arduino/contributions/libraries/ContributedLibrary.java @@ -1,7 +1,7 @@ /* * This file is part of Arduino. * - * Copyright 2014 Arduino LLC (http://www.arduino.cc/) + * Copyright 2015 Arduino LLC (http://www.arduino.cc/) * * Arduino is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -29,195 +29,77 @@ package cc.arduino.contributions.libraries; -import cc.arduino.contributions.DownloadableContribution; -import processing.app.I18n; -import processing.app.packages.UserLibrary; -import static processing.app.I18n.tr; - -import java.util.Comparator; -import java.util.ArrayList; -import java.util.List; +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; import java.util.Optional; -import cc.arduino.contributions.VersionHelper; +import cc.arduino.cli.commands.Lib.LibraryLocation; +import cc.arduino.contributions.VersionComparator; -public class ContributedLibrary extends DownloadableContribution { +public class ContributedLibrary { - private String url; - private String version; - private String checksum; - private long size; - private String archiveFileName; private String name; - private String maintainer; - private String author; - private String website; - private String category; - private String licence; - private String paragraph; - private String sentence; - private ArrayList architectures; - private ArrayList types; - private ArrayList dependencies; - private ArrayList providesIncludes; - - public String getUrl() { return url; } - - public String getVersion() { return version; } - - public String getChecksum() { return checksum; } - - public long getSize() { return size; } - - public String getArchiveFileName() { return archiveFileName; } - - public String getName() { return name; } - - public String getMaintainer() { return maintainer; } - - public String getAuthor() { return author; } - - public String getWebsite() { return website; } - - public String getCategory() { return category; } - - public void setCategory(String category) { this.category = category; } - - public String getLicense() { return licence; } - - public String getParagraph() { return paragraph; } - - public String getSentence() { return sentence; } - - public List getArchitectures() { return architectures; } - - public List getTypes() { return types; } - - public List getDependencies() { return dependencies; } + // version -> release map + private Map releases = new HashMap<>(); + private Optional latest = Optional.empty(); + private Optional selected = Optional.empty(); - public List getProvidesIncludes() { return providesIncludes; } - - public static final Comparator CASE_INSENSITIVE_ORDER = (o1, o2) -> o1.getName().compareToIgnoreCase(o2.getName()); - - private Optional installedLib = Optional.empty(); - - public Optional getInstalledLibrary() { - return installedLib; + public ContributedLibrary(String name) { + this.name = name; } - public boolean isLibraryInstalled() { - return installedLib.isPresent(); + public String getName() { + return name; } - public void setInstalledUserLibrary(UserLibrary installed) { - this.installedLib = Optional.of(installed); + public Collection getReleases() { + return releases.values(); } - public void unsetInstalledUserLibrary() { - installedLib = Optional.empty(); + public Optional getVersion(String version) { + return Optional.ofNullable(releases.get(version)); } - public boolean isIDEBuiltIn() { - if (!installedLib.isPresent()) { - return false; + public void addRelease(ContributedLibraryRelease release) { + if (!latest.isPresent()) { + latest = Optional.of(release); } - return installedLib.get().isIDEBuiltIn(); + String version = release.getParsedVersion(); + releases.put(version, release); + if (VersionComparator.greaterThan(version, latest.get().getParsedVersion())) { + latest = Optional.of(release); + } + selected = latest; } - /** - * Returns true if the library declares to support the specified - * architecture (through the "architectures" property field). - * - * @param reqArch - * @return - */ - public boolean supportsArchitecture(String reqArch) { - return getArchitectures().contains(reqArch) || getArchitectures().contains("*"); + public Optional getInstalled() { + return releases.values().stream() // + .filter(ContributedLibraryRelease::isLibraryInstalled) // + .reduce((x, y) -> { + LibraryLocation lx = x.getInstalledLibrary().get().getLocation(); + LibraryLocation ly = y.getInstalledLibrary().get().getLocation(); + if (lx.equals(ly)) { + return VersionComparator.max(x, y); + } + return lx.equals(LibraryLocation.user) ? x : y; + }); } - /** - * Returns true if the library declares to support at least one of the - * specified architectures. - * - * @param reqArchs A List of architectures to check - * @return - */ - public boolean supportsArchitecture(List reqArchs) { - if (reqArchs.contains("*")) - return true; - for (String reqArch : reqArchs) - if (supportsArchitecture(reqArch)) - return true; - return false; + public Optional getLatest() { + return latest; } - @Override - public String toString() { - return I18n.format(tr("Version {0}"), getParsedVersion()); + public Optional getSelected() { + return selected; } - public String info() { - String res = ""; - res += " ContributedLibrary : " + getName() + "\n"; - res += " author : " + getAuthor() + "\n"; - res += " maintainer : " + getMaintainer() + "\n"; - res += " version : " + getParsedVersion() + "\n"; - res += " website : " + getUrl() + "\n"; - res += " category : " + getCategory() + "\n"; - res += " license : " + getLicense() + "\n"; - res += " descrip : " + getSentence() + "\n"; - if (getParagraph() != null && !getParagraph().isEmpty()) - res += " " + getParagraph() + "\n"; - res += " architectures : "; - if (getArchitectures() != null) - for (String a : getArchitectures()) { - res += a + ","; - } - res += "\n"; - res += " requires :\n"; - if (getDependencies() != null) - for (ContributedLibraryDependency r : getDependencies()) { - res += " " + r; + public void select(ContributedLibraryRelease lib) { + for (ContributedLibraryRelease r : releases.values()) { + if (r == lib) { + selected = Optional.of(r); + return; } - res += "\n"; - - // DownloadableContribution - res += super.toString(); - - return res; - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof ContributedLibrary)) { - return false; } - ContributedLibrary other = (ContributedLibrary) obj; - String thisVersion = getParsedVersion(); - String otherVersion = other.getParsedVersion(); - - boolean versionEquals = (thisVersion != null - && thisVersion.equals(otherVersion)); - - // Important: for legacy libs, versions are null. Two legacy libs must - // always pass this test. - if (thisVersion == null && otherVersion == null) - versionEquals = true; - - String thisName = getName(); - String otherName = other.getName(); - boolean nameEquals = thisName != null && thisName.equals(otherName); - - return versionEquals && nameEquals; - } - - public boolean isBefore(ContributedLibrary other) { - return VersionHelper.compare(getVersion(), other.getVersion()) < 0; - } - - @Override - public int hashCode() { - String hashingData = "CONTRIBUTEDLIB" + getName() + getVersion(); - return hashingData.hashCode(); } } diff --git a/arduino-core/src/cc/arduino/contributions/libraries/ContributedLibraryDependency.java b/arduino-core/src/cc/arduino/contributions/libraries/ContributedLibraryDependency.java deleted file mode 100644 index 4da5ba6f75b..00000000000 --- a/arduino-core/src/cc/arduino/contributions/libraries/ContributedLibraryDependency.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * This file is part of Arduino. - * - * Copyright 2014 Arduino LLC (http://www.arduino.cc/) - * - * Arduino is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * As a special exception, you may use this file as part of a free software - * library without restriction. Specifically, if other files instantiate - * templates or use macros or inline functions from this file, or you compile - * this file and link it with other files to produce an executable, this - * file does not by itself cause the resulting executable to be covered by - * the GNU General Public License. This exception does not however - * invalidate any other reasons why the executable file might be covered by - * the GNU General Public License. - */ - -package cc.arduino.contributions.libraries; - -public class ContributedLibraryDependency { - - private String name; - private String version; - - public String getName() { return name; } - - public String getVersion() { return version; } - - @Override - public String toString() { - return getName() + " " + getVersion(); - } -} diff --git a/arduino-core/src/cc/arduino/contributions/libraries/ContributedLibraryRelease.java b/arduino-core/src/cc/arduino/contributions/libraries/ContributedLibraryRelease.java new file mode 100644 index 00000000000..0e65041fbaa --- /dev/null +++ b/arduino-core/src/cc/arduino/contributions/libraries/ContributedLibraryRelease.java @@ -0,0 +1,300 @@ +/* + * This file is part of Arduino. + * + * Copyright 2014 Arduino LLC (http://www.arduino.cc/) + * + * Arduino is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + * As a special exception, you may use this file as part of a free software + * library without restriction. Specifically, if other files instantiate + * templates or use macros or inline functions from this file, or you compile + * this file and link it with other files to produce an executable, this + * file does not by itself cause the resulting executable to be covered by + * the GNU General Public License. This exception does not however + * invalidate any other reasons why the executable file might be covered by + * the GNU General Public License. + */ + +package cc.arduino.contributions.libraries; + +import cc.arduino.cli.commands.Lib; +import cc.arduino.contributions.DownloadableContribution; +import processing.app.I18n; +import processing.app.packages.UserLibrary; +import static processing.app.I18n.tr; + +import java.util.Comparator; +import java.util.List; +import java.util.Optional; + +import cc.arduino.contributions.VersionHelper; + +public class ContributedLibraryRelease extends DownloadableContribution { + + final private ContributedLibrary library; + final private String maintainer; + final private String author; + final private String website; + final private String category; + final private String license; + final private String paragraph; + final private String sentence; + final private List architectures; + final private List types; + final private List dependencies; + final private List providesIncludes; + + public ContributedLibraryRelease(ContributedLibrary library, + String maintainer, String author, + String website, String category, + String license, String paragraph, + String sentence, List architectures, + List types, + List dependencies, + List providesIncludes, // + // + String url, String version, String checksum, + long size, String archiveFileName) { + this.library = library; + this.maintainer = maintainer; + this.author = author; + this.website = website; + this.category = category; + this.license = license; + this.paragraph = paragraph; + this.sentence = sentence; + this.architectures = architectures; + this.types = types; + this.dependencies = dependencies; + this.providesIncludes = providesIncludes; + + this.url = url; + this.version = version; + this.checksum = checksum; + this.size = size; + this.archiveFileName = archiveFileName; + } + + public ContributedLibrary getLibrary() { + return library; + } + + public String getName() { + return library.getName(); + } + + public String getMaintainer() { + return maintainer; + } + + public String getAuthor() { + return author; + } + + public String getWebsite() { + return website; + } + + public String getCategory() { + return category; + } + + public String getLicense() { + return license; + } + + public String getParagraph() { + return paragraph; + } + + public String getSentence() { + return sentence; + } + + public List getArchitectures() { + return architectures; + } + + public List getTypes() { + return types; + } + + public List getDependencies() { + return dependencies; + } + + public List getProvidesIncludes() { + return providesIncludes; + } + + // Implementation of DownloadableResource + final private String url; + final private String version; + final private String checksum; + final private long size; + final private String archiveFileName; + + @Override + public String getUrl() { + return url; + } + + @Override + public String getVersion() { + return version; + } + + @Override + public String getChecksum() { + return checksum; + } + + @Override + public long getSize() { + return size; + } + + @Override + public String getArchiveFileName() { + return archiveFileName; + } + public static final Comparator // + CASE_INSENSITIVE_ORDER = (o1, o2) -> o1.getName() + .compareToIgnoreCase(o2.getName()); + + private Optional installedLib = Optional.empty(); + + public Optional getInstalledLibrary() { + return installedLib; + } + + public boolean isLibraryInstalled() { + return installedLib.isPresent(); + } + + public void setInstalledUserLibrary(UserLibrary installed) { + this.installedLib = Optional.of(installed); + } + + public void unsetInstalledUserLibrary() { + installedLib = Optional.empty(); + } + + public boolean isIDEBuiltIn() { + if (!installedLib.isPresent()) { + return false; + } + return installedLib.get().isIDEBuiltIn(); + } + + /** + * Returns true if the library declares to support the specified + * architecture (through the "architectures" property field). + * + * @param reqArch + * @return + */ + public boolean supportsArchitecture(String reqArch) { + return getArchitectures().contains(reqArch) + || getArchitectures().contains("*"); + } + + /** + * Returns true if the library declares to support at least one of the + * specified architectures. + * + * @param reqArchs + * A List of architectures to check + * @return + */ + public boolean supportsArchitecture(List reqArchs) { + if (reqArchs.contains("*")) + return true; + for (String reqArch : reqArchs) + if (supportsArchitecture(reqArch)) + return true; + return false; + } + + @Override + public String toString() { + return I18n.format(tr("Version {0}"), getParsedVersion()); + } + + public String info() { + String res = ""; + res += " ContributedLibrary : " + getName() + "\n"; + res += " author : " + getAuthor() + "\n"; + res += " maintainer : " + getMaintainer() + "\n"; + res += " version : " + getParsedVersion() + "\n"; + res += " website : " + getUrl() + "\n"; + res += " category : " + getCategory() + "\n"; + res += " license : " + getLicense() + "\n"; + res += " descrip : " + getSentence() + "\n"; + if (getParagraph() != null && !getParagraph().isEmpty()) + res += " " + getParagraph() + "\n"; + res += " architectures : "; + if (getArchitectures() != null) + for (String a : getArchitectures()) { + res += a + ","; + } + res += "\n"; + res += " requires :\n"; + if (getDependencies() != null) + for (Lib.LibraryDependency r : getDependencies()) { + res += " " + r; + } + res += "\n"; + + // DownloadableContribution + res += super.toString(); + + return res; + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof ContributedLibraryRelease)) { + return false; + } + ContributedLibraryRelease other = (ContributedLibraryRelease) obj; + String thisVersion = getParsedVersion(); + String otherVersion = other.getParsedVersion(); + + boolean versionEquals = (thisVersion != null + && thisVersion.equals(otherVersion)); + + // Important: for legacy libs, versions are null. Two legacy libs must + // always pass this test. + if (thisVersion == null && otherVersion == null) + versionEquals = true; + + String thisName = getName(); + String otherName = other.getName(); + boolean nameEquals = thisName != null && thisName.equals(otherName); + + return versionEquals && nameEquals; + } + + public boolean isBefore(ContributedLibraryRelease other) { + return VersionHelper.compare(getVersion(), other.getVersion()) < 0; + } + + @Override + public int hashCode() { + String hashingData = "CONTRIBUTEDLIB" + getName() + getVersion(); + return hashingData.hashCode(); + } +} diff --git a/arduino-core/src/cc/arduino/contributions/libraries/ContributedLibraryReleases.java b/arduino-core/src/cc/arduino/contributions/libraries/ContributedLibraryReleases.java deleted file mode 100644 index 7a2a75a4498..00000000000 --- a/arduino-core/src/cc/arduino/contributions/libraries/ContributedLibraryReleases.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * This file is part of Arduino. - * - * Copyright 2015 Arduino LLC (http://www.arduino.cc/) - * - * Arduino is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * As a special exception, you may use this file as part of a free software - * library without restriction. Specifically, if other files instantiate - * templates or use macros or inline functions from this file, or you compile - * this file and link it with other files to produce an executable, this - * file does not by itself cause the resulting executable to be covered by - * the GNU General Public License. This exception does not however - * invalidate any other reasons why the executable file might be covered by - * the GNU General Public License. - */ - -package cc.arduino.contributions.libraries; - -import cc.arduino.contributions.VersionComparator; -import processing.app.packages.UserLibraryFolder.Location; - -import java.util.LinkedList; -import java.util.List; -import java.util.Optional; - -public class ContributedLibraryReleases { - - private List releases = new LinkedList<>(); - private List versions = new LinkedList<>(); - private ContributedLibrary latest = null; - private ContributedLibrary selected = null; - - public ContributedLibraryReleases(ContributedLibrary library) { - add(library); - } - - public ContributedLibraryReleases(List libraries) { - libraries.forEach(this::add); - } - - public List getReleases() { - return releases; - } - - public boolean shouldContain(ContributedLibrary lib) { - if (latest == null) { - return true; - } - return lib.getName().equals(latest.getName()); - } - - public void add(ContributedLibrary library) { - if (latest == null) { - latest = library; - } - releases.add(library); - String version = library.getParsedVersion(); - if (version != null) { - versions.add(version); - } - if (VersionComparator.greaterThan(version, latest.getParsedVersion())) { - latest = library; - } - selected = latest; - } - - public Optional getInstalled() { - return releases.stream() // - .filter(ContributedLibrary::isLibraryInstalled) // - .reduce((x, y) -> { - Location lx = x.getInstalledLibrary().get().getLocation(); - Location ly = y.getInstalledLibrary().get().getLocation(); - if (lx == ly) { - return VersionComparator.max(x, y); - } - return lx == Location.SKETCHBOOK ? x : y; - }); - } - - public ContributedLibrary getLatest() { - return latest; - } - - public ContributedLibrary getSelected() { - return selected; - } - - public void select(ContributedLibrary lib) { - for (ContributedLibrary r : releases) { - if (r == lib) { - selected = r; - return; - } - } - } -} diff --git a/arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndex.java b/arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndex.java index 02ff0475cfa..66358ebd1b7 100644 --- a/arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndex.java +++ b/arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndex.java @@ -32,151 +32,60 @@ import java.util.ArrayList; import java.util.Collection; import java.util.Collections; +import java.util.HashMap; import java.util.HashSet; -import java.util.LinkedList; import java.util.List; +import java.util.Map; import java.util.Optional; -import java.util.stream.Collectors; - -import cc.arduino.contributions.VersionComparator; +import java.util.Set; public class LibrariesIndex { - private ArrayList list = new ArrayList<>(); + // name -> library map + private Map libraries = new HashMap<>(); + private Set categories = new HashSet<>(); + private Set types = new HashSet<>(); - public List getLibraries() { - return list; + public Collection getLibraries() { + return libraries.values(); } - public List find(final String name) { - return getLibraries().stream() // - .filter(l -> name.equals(l.getName())) // - .collect(Collectors.toList()); + public void add(ContributedLibrary library) { + libraries.put(library.getName(), library); + library.getReleases().forEach(rel -> { + categories.add(rel.getCategory()); + types.addAll(rel.getTypes()); + }); } - public ContributedLibrary find(String name, String version) { - if (name == null || version == null) { - return null; - } - for (ContributedLibrary lib : find(name)) { - if (version.equals(lib.getParsedVersion())) { - return lib; - } - } - return null; + public Optional find(String name) { + return Optional.ofNullable(libraries.get(name)); } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - for (ContributedLibrary library : getLibraries()) { - sb.append(library.toString()); + public Optional find(String name, String version) { + if (libraries.containsKey(name)) { + return libraries.get(name).getVersion(version); } - return sb.toString(); + return Optional.empty(); } public List getCategories() { - List categories = new LinkedList<>(); - for (ContributedLibrary lib : getLibraries()) { - if (lib.getCategory() != null && !categories.contains(lib.getCategory())) { - categories.add(lib.getCategory()); - } - } - Collections.sort(categories); - - return categories; + List res = new ArrayList<>(categories); + Collections.sort(res); + return res; } public List getTypes() { - Collection typesAccumulator = new HashSet<>(); - for (ContributedLibrary lib : getLibraries()) { - if (lib.getTypes() != null) { - typesAccumulator.addAll(lib.getTypes()); - } - } - - List types = new LinkedList<>(typesAccumulator); - Collections.sort(types); - - return types; - } - - public Optional getInstalled(String name) { - ContributedLibraryReleases rel = new ContributedLibraryReleases(find(name)); - return rel.getInstalled(); - } - - public List resolveDependeciesOf(ContributedLibrary library) { - List solution = new ArrayList<>(); - solution.add(library); - if (resolveDependeciesOf(solution, library)) { - return solution; - } else { - return null; - } + List res = new ArrayList<>(types); + Collections.sort(res); + return res; } - public boolean resolveDependeciesOf(List solution, - ContributedLibrary library) { - List requirements = library.getDependencies(); - if (requirements == null) { - // No deps for this library, great! - return true; - } - - for (ContributedLibraryDependency dep : requirements) { - - // If the current solution already contains this dependency, skip over - boolean alreadyInSolution = solution.stream() - .anyMatch(l -> l.getName().equals(dep.getName())); - if (alreadyInSolution) - continue; - - // Generate possible matching dependencies - List possibleDeps = findMatchingDependencies(dep); - - // If there are no dependencies available add as "missing" lib - if (possibleDeps.isEmpty()) { - solution.add(new UnavailableContributedLibrary(dep)); - continue; - } - - // Pick the installed version if available - ContributedLibrary selected; - Optional installed = possibleDeps.stream() - .filter(l -> l.getInstalledLibrary().isPresent()).findAny(); - if (installed.isPresent()) { - selected = installed.get(); - } else { - // otherwise pick the latest version - selected = possibleDeps.stream().reduce(VersionComparator::max).get(); - } - - // Add dependency to the solution and process recursively - solution.add(selected); - if (!resolveDependeciesOf(solution, selected)) { - return false; - } + public Optional getInstalled(String name) { + if (libraries.containsKey(name)) { + return libraries.get(name).getInstalled(); } - return true; + return Optional.empty(); } - private List findMatchingDependencies(ContributedLibraryDependency dep) { - List available = find(dep.getName()); - if (dep.getVersion() == null || dep.getVersion().isEmpty()) - return available; - - // XXX: The following part is actually never reached. The use of version - // constraints requires a much complex backtracking algorithm, the following - // is just a draft placeholder. - -// List match = available.stream() -// // TODO: add more complex version comparators (> >= < <= ~ 1.0.* 1.*...) -// .filter(candidate -> candidate.getParsedVersion() -// .equals(dep.getVersionRequired())) -// .collect(Collectors.toList()); -// return match; - - return available; - } } diff --git a/arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java b/arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java index 57460fc19e1..a98bda267dd 100644 --- a/arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java +++ b/arduino-core/src/cc/arduino/contributions/libraries/LibrariesIndexer.java @@ -29,117 +29,91 @@ package cc.arduino.contributions.libraries; -import cc.arduino.Constants; -import cc.arduino.contributions.packages.ContributedPlatform; - -import com.fasterxml.jackson.core.JsonParseException; -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import org.apache.commons.compress.utils.IOUtils; -import processing.app.BaseNoGui; -import processing.app.I18n; -import processing.app.helpers.filefilters.OnlyDirs; -import processing.app.packages.LegacyUserLibrary; -import processing.app.packages.LibraryList; -import processing.app.packages.UserLibrary; -import processing.app.packages.UserLibraryFolder; -import processing.app.packages.UserLibraryFolder.Location; -import processing.app.packages.UserLibraryPriorityComparator; +import static processing.app.I18n.format; +import static processing.app.I18n.tr; import java.io.File; -import java.io.FileInputStream; import java.io.IOException; -import java.io.InputStream; -import java.util.ArrayList; import java.util.Collections; +import java.util.Comparator; import java.util.List; import java.util.Optional; -import static processing.app.I18n.format; -import static processing.app.I18n.tr; +import cc.arduino.cli.ArduinoCoreInstance; +import cc.arduino.cli.commands.Lib.InstalledLibrary; +import cc.arduino.cli.commands.Lib.Library; +import cc.arduino.cli.commands.Lib.LibraryLocation; +import cc.arduino.contributions.packages.ContributedPlatform; +import io.grpc.StatusException; +import processing.app.BaseNoGui; +import processing.app.debug.TargetPlatform; +import processing.app.helpers.FileUtils; +import processing.app.packages.LibraryList; +import processing.app.packages.UserLibrary; +import processing.app.packages.UserLibraryPriorityComparator; public class LibrariesIndexer { private LibrariesIndex index; private final LibraryList installedLibraries = new LibraryList(); - private List librariesFolders; - private final File indexFile; - private final File stagingFolder; - private final List badLibNotified = new ArrayList<>(); + private ArduinoCoreInstance core; - public LibrariesIndexer(File preferencesFolder) { - indexFile = new File(preferencesFolder, "library_index.json"); - stagingFolder = new File(new File(preferencesFolder, "staging"), "libraries"); + public LibrariesIndexer(ArduinoCoreInstance core) { + this.core = core; } - public void parseIndex() throws IOException { - index = new LibrariesIndex(); // Fallback - - if (!indexFile.exists()) { - return; - } - - parseIndex(indexFile); - - // TODO: resolve libraries inner references - } - - private void parseIndex(File file) throws IOException { - InputStream indexIn = null; + public void regenerateIndex() { + index = new LibrariesIndex(); try { - indexIn = new FileInputStream(file); - ObjectMapper mapper = new ObjectMapper(); - mapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true); - mapper.configure(DeserializationFeature.EAGER_DESERIALIZER_FETCH, true); - mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - LibrariesIndex newIndex = mapper.readValue(indexIn, LibrariesIndex.class); - - newIndex.getLibraries() - .stream() - .filter(library -> library.getCategory() == null || "".equals(library.getCategory()) || !Constants.LIBRARY_CATEGORIES.contains(library.getCategory())) - .forEach(library -> library.setCategory("Uncategorized")); - - index = newIndex; - } catch (JsonParseException | JsonMappingException e) { - System.err.println( - format(tr("Error parsing libraries index: {0}\nTry to open the Library Manager to update the libraries index."), - e.getMessage())); - } catch (Exception e) { - System.err.println(format(tr("Error reading libraries index: {0}"), e.getMessage())); - } finally { - IOUtils.closeQuietly(indexIn); + core.searchLibrary("").forEach(inLib -> { + ContributedLibrary library = new ContributedLibrary(inLib.getName()); + inLib.getReleasesMap().forEach((ver, rel) -> { + ContributedLibraryRelease release = new ContributedLibraryRelease( + library, // + rel.getMaintainer(), // + rel.getAuthor(), // + rel.getWebsite(), // + rel.getCategory(), // + rel.getLicense(), // + rel.getParagraph(), // + rel.getSentence(), // + rel.getArchitecturesList(), // + rel.getTypesList(), // + rel.getDependenciesList(), // + rel.getProvidesIncludesList(), // + // + rel.getResources().getUrl(), // + rel.getVersion(), // + rel.getResources().getChecksum(), // + rel.getResources().getSize(), // + rel.getResources().getArchivefilename()); + library.addRelease(release); + }); + index.add(library); + }); + } catch (StatusException e) { + e.printStackTrace(); } - } - public void setLibrariesFolders(List folders) { - this.librariesFolders = folders; - } - - public void setLibrariesFoldersAndRescan(List folders) { - setLibrariesFolders(folders); +// format(tr("Error parsing libraries index: {0}\nTry to open the Library Manager to update the libraries index."), +// System.err.println(format(tr("Error reading libraries index: {0}"), rescanLibraries(); } - public List getLibrariesFolders() { - return librariesFolders; - } + private Comparator priorityComparator = new UserLibraryPriorityComparator( + null); - private UserLibraryPriorityComparator priorityComparator = new UserLibraryPriorityComparator(null); - - public void addToInstalledLibraries(UserLibrary lib) { + public void addToInstalledLibraries(UserLibrary lib) throws IOException { UserLibrary toReplace = installedLibraries.getByName(lib.getName()); if (toReplace == null) { installedLibraries.add(lib); - return; - } - if (priorityComparator.compare(toReplace, lib) >= 0) { + } else if (priorityComparator.compare(toReplace, lib) >= 0) { // The current lib has priority, do nothing - return; + } else { + installedLibraries.remove(toReplace); + installedLibraries.add(lib); } - installedLibraries.remove(toReplace); - installedLibraries.add(lib); } public void setArchitecturePriority(String arch) { @@ -154,101 +128,132 @@ public void rescanLibraries() { return; } - for (ContributedLibrary lib : index.getLibraries()) { - lib.unsetInstalledUserLibrary(); - } + index.getLibraries().forEach(l -> { + l.getReleases().forEach(r -> { + r.unsetInstalledUserLibrary(); + }); + }); // Rescan libraries - for (UserLibraryFolder folderDesc : librariesFolders) { - scanInstalledLibraries(folderDesc); + List installedLibsMeta; + try { + installedLibsMeta = core.libraryList(true); + } catch (StatusException e) { + e.printStackTrace(); + return; } - installedLibraries.stream() // - .filter(l -> l.getTypes().contains("Contributed")) // - .filter(l -> l.getLocation() == Location.CORE || l.getLocation() == Location.REFERENCED_CORE) // - .forEach(l -> { - File libFolder = l.getInstalledFolder(); - Optional platform = BaseNoGui.indexer.getPlatformByFolder(libFolder); - if (platform.isPresent()) { - l.setTypes(Collections.singletonList(platform.get().getCategory())); - } - }); - } + File coreLibsDir = null; + File refcoreLibsDir = null; + Optional targetPlatform = BaseNoGui.getTargetPlatform(); + if (targetPlatform.isPresent()) { + String buildCore = BaseNoGui.getBoardPreferences().get("build.core", "arduino"); + if (buildCore.contains(":")) { + String referencedCore = buildCore.split(":")[0]; + Optional referencedPlatform = BaseNoGui.getTargetPlatform(referencedCore, targetPlatform.get().getId()); + if (referencedPlatform.isPresent()) { + File referencedPlatformFolder = referencedPlatform.get().getFolder(); + // Add libraries folder for the referenced platform + refcoreLibsDir = new File(referencedPlatformFolder, "libraries"); + } + } + File platformFolder = targetPlatform.get().getFolder(); + // Add libraries folder for the selected platform + coreLibsDir = new File(platformFolder, "libraries"); + } - private void scanInstalledLibraries(UserLibraryFolder folderDesc) { - File list[] = folderDesc.folder.listFiles(OnlyDirs.ONLY_DIRS); - // if a bad folder or something like that, this might come back null - if (list == null) - return; + for (InstalledLibrary meta : installedLibsMeta) { + Library l = meta.getLibrary(); + + // Skip platform-related libraries that are not part of the currently + // selected platform/board. + if (l.getLocation().equals(LibraryLocation.platform_builtin)) { + File libDir = new File(l.getInstallDir()); + boolean isCoreLib = (coreLibsDir != null) + && FileUtils.isSubDirectory(coreLibsDir, libDir); + boolean isRefCoreLib = (refcoreLibsDir != null) // + && FileUtils.isSubDirectory(refcoreLibsDir, + libDir); + if (!isCoreLib && !isRefCoreLib) { + continue; + } + } - for (File subfolder : list) { - String subfolderName = subfolder.getName(); - if (!BaseNoGui.isSanitaryName(subfolderName)) { + UserLibrary lib = new UserLibrary( // + new File(l.getInstallDir()), // + l.getRealName(), // + l.getVersion(), // + l.getAuthor(), // + l.getMaintainer(), // + l.getSentence(), // + l.getParagraph(), // + l.getWebsite(), // + l.getCategory(), // + l.getLicense(), // + l.getArchitecturesList(), // + l.getLayout(), // + l.getTypesList(), // + false, // TODO: onGoingDevelopment + null, // TODO: includes + l.getLocation() // + ); - // Detect whether the current folder name has already had a notification. - if (!badLibNotified.contains(subfolderName)) { + try { + String[] headers = BaseNoGui + .headerListFromIncludePath(lib.getSrcFolder()); // TODO: Obtain from the CLI? + if (headers.length == 0) { + System.out.println(format(tr("no headers files (.h) found in {0}"), + lib.getSrcFolder())); + } - badLibNotified.add(subfolderName); + LibraryLocation loc = lib.getLocation(); + if (!loc.equals(LibraryLocation.platform_builtin) && !loc.equals(LibraryLocation.referenced_platform_builtin)) { + // Check if we can find the same library in the index + // and mark it as installed + index.find(lib.getName(), lib.getVersion()).ifPresent(foundLib -> { + foundLib.setInstalledUserLibrary(lib); + lib.setTypes(foundLib.getTypes()); + }); + } - String mess = I18n.format(tr("The library \"{0}\" cannot be used.\n" - + "Library folder names must start with a letter or number, followed by letters,\n" - + "numbers, dashes, dots and underscores. Maximum length is 63 characters."), - subfolderName); - BaseNoGui.showMessage(tr("Ignoring library with bad name"), mess); + if (lib.getTypes().isEmpty() && loc.equals(LibraryLocation.user)) { + lib.setTypes(lib.getDeclaredTypes()); } - continue; - } - try { - scanLibrary(new UserLibraryFolder(subfolder, folderDesc.location)); - } catch (IOException e) { - System.out.println(I18n.format(tr("Invalid library found in {0}: {1}"), subfolder, e.getMessage())); - } - } - } + if (lib.getTypes().isEmpty()) { + lib.setTypes(Collections.singletonList("Contributed")); + } - private void scanLibrary(UserLibraryFolder folderDesc) throws IOException { - // A library is considered "legacy" if it doesn't contains - // a file called "library.properties" - File check = new File(folderDesc.folder, "library.properties"); - if (!check.exists() || !check.isFile()) { - // Create a legacy library and exit - LegacyUserLibrary lib = LegacyUserLibrary.create(folderDesc); - String[] headers = BaseNoGui.headerListFromIncludePath(lib.getSrcFolder()); - if (headers.length == 0) { - throw new IOException(format(tr("no headers files (.h) found in {0}"), lib.getSrcFolder())); + addToInstalledLibraries(lib); + } catch (Exception e) { + e.printStackTrace(); } - addToInstalledLibraries(lib); - return; } - // Create a regular library - UserLibrary lib = UserLibrary.create(folderDesc); - String[] headers = BaseNoGui.headerListFromIncludePath(lib.getSrcFolder()); - if (headers.length == 0) { - throw new IOException(format(tr("no headers files (.h) found in {0}"), lib.getSrcFolder())); - } - addToInstalledLibraries(lib); - - Location loc = lib.getLocation(); - if (loc != Location.CORE && loc != Location.REFERENCED_CORE) { - // Check if we can find the same library in the index - // and mark it as installed - ContributedLibrary foundLib = index.find(lib.getName(), lib.getVersion()); - if (foundLib != null) { - foundLib.setInstalledUserLibrary(lib); - lib.setTypes(foundLib.getTypes()); - } - } + // TODO: Should be done on the CLI? + installedLibraries.stream() // + .filter(l -> l.getTypes().contains("Contributed")) // + .filter(l -> l.getLocation().equals(LibraryLocation.platform_builtin) + || l.getLocation().equals(LibraryLocation.referenced_platform_builtin)) // + .forEach(l -> { + File libFolder = l.getInstalledFolder(); + Optional platform = BaseNoGui.indexer + .getPlatformByFolder(libFolder); + if (platform.isPresent()) { + l.setTypes(Collections.singletonList(platform.get().getCategory())); + } + }); + } - if (lib.getTypes().isEmpty() && loc == Location.SKETCHBOOK) { - lib.setTypes(lib.getDeclaredTypes()); - } +// String mess = I18n.format( +// tr("The library \"{0}\" cannot be used.\n" +// + "Library folder names must start with a letter or number, followed by letters,\n" +// + "numbers, dashes, dots and underscores. Maximum length is 63 characters."), +// subfolderName); +// BaseNoGui.showMessage(tr("Ignoring library with bad name"), mess); - if (lib.getTypes().isEmpty()) { - lib.setTypes(Collections.singletonList("Contributed")); - } - } +// System.out.println(I18n.format(tr("Invalid library found in {0}: {1}"), +// subfolder, e.getMessage())); public LibrariesIndex getIndex() { return index; @@ -257,12 +262,4 @@ public LibrariesIndex getIndex() { public LibraryList getInstalledLibraries() { return new LibraryList(installedLibraries); } - - public File getStagingFolder() { - return stagingFolder; - } - - public File getIndexFile() { - return indexFile; - } } diff --git a/arduino-core/src/cc/arduino/contributions/libraries/LibraryInstaller.java b/arduino-core/src/cc/arduino/contributions/libraries/LibraryInstaller.java deleted file mode 100644 index 3f00f909b0d..00000000000 --- a/arduino-core/src/cc/arduino/contributions/libraries/LibraryInstaller.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * This file is part of Arduino. - * - * Copyright 2015 Arduino LLC (http://www.arduino.cc/) - * - * Arduino is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * As a special exception, you may use this file as part of a free software - * library without restriction. Specifically, if other files instantiate - * templates or use macros or inline functions from this file, or you compile - * this file and link it with other files to produce an executable, this - * file does not by itself cause the resulting executable to be covered by - * the GNU General Public License. This exception does not however - * invalidate any other reasons why the executable file might be covered by - * the GNU General Public License. - */ - -package cc.arduino.contributions.libraries; - -import cc.arduino.Constants; -import cc.arduino.contributions.DownloadableContributionsDownloader; -import cc.arduino.contributions.GPGDetachedSignatureVerifier; -import cc.arduino.contributions.GZippedJsonDownloader; -import cc.arduino.contributions.ProgressListener; -import cc.arduino.utils.ArchiveExtractor; -import cc.arduino.utils.MultiStepProgress; -import cc.arduino.utils.network.FileDownloader; -import org.apache.commons.io.FilenameUtils; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; -import processing.app.BaseNoGui; -import processing.app.I18n; -import processing.app.Platform; -import processing.app.helpers.FileUtils; - -import java.io.File; -import java.io.IOException; -import java.net.URL; -import java.nio.file.Files; -import java.nio.file.StandardCopyOption; -import java.util.ArrayList; -import java.util.List; -import java.util.Optional; - -import static processing.app.I18n.tr; - -public class LibraryInstaller { - private static Logger log = LogManager.getLogger(LibraryInstaller.class); - - private final Platform platform; - private final GPGDetachedSignatureVerifier signatureVerifier; - - public LibraryInstaller(Platform platform, GPGDetachedSignatureVerifier signatureVerifier) { - this.platform = platform; - this.signatureVerifier = signatureVerifier; - } - - public synchronized void updateIndex(ProgressListener progressListener) throws Exception { - final MultiStepProgress progress = new MultiStepProgress(3); - - DownloadableContributionsDownloader downloader = new DownloadableContributionsDownloader(BaseNoGui.librariesIndexer.getStagingFolder()); - // Step 1: Download index - File outputFile = BaseNoGui.librariesIndexer.getIndexFile(); - // Create temp files - String signatureFileName = FilenameUtils.getName(new URL(Constants.LIBRARY_INDEX_URL).getPath()); - File libraryIndexTemp = File.createTempFile(signatureFileName, ".tmp"); - final URL libraryURL = new URL(Constants.LIBRARY_INDEX_URL); - final URL libraryGzURL = new URL(Constants.LIBRARY_INDEX_URL_GZ); - final String statusText = tr("Downloading libraries index..."); - try { - GZippedJsonDownloader gZippedJsonDownloader = new GZippedJsonDownloader(downloader, libraryURL, libraryGzURL); - gZippedJsonDownloader.download(libraryIndexTemp, progress, statusText, progressListener, true); - } catch (InterruptedException e) { - // Download interrupted... just exit - return; - } - progress.stepDone(); - - URL signatureUrl = new URL(libraryURL.toString() + ".sig"); - if (downloader.verifyDomain(signatureUrl)) { - if (downloader.checkSignature(progress, signatureUrl, progressListener, signatureVerifier, statusText, libraryIndexTemp)) { - // Replace old index with the updated one - if (libraryIndexTemp.length() > 0) { - Files.move(libraryIndexTemp.toPath(), outputFile.toPath(), StandardCopyOption.REPLACE_EXISTING); - } - } else { - FileDownloader.invalidateFiles(libraryGzURL, libraryURL, signatureUrl); - log.error("Fail to verify the signature of {} the cached files have been removed", libraryURL); - } - } else { - log.info("The domain is not selected to verify the signature. library index: {}", signatureUrl); - } - - // Step 2: Parse index - BaseNoGui.librariesIndexer.parseIndex(); - - // Step 3: Rescan index - rescanLibraryIndex(progress, progressListener); - - } - - public void install(ContributedLibrary lib, ProgressListener progressListener) throws Exception { - ArrayList libs = new ArrayList<>(); - libs.add(lib); - install(libs, progressListener); - } - - public synchronized void install(List libs, ProgressListener progressListener) throws Exception { - MultiStepProgress progress = new MultiStepProgress(3 * libs.size() + 1); - - for (ContributedLibrary lib : libs) { - // Do install library (3 steps) - performInstall(lib, progressListener, progress); - } - - // Rescan index (1 step) - rescanLibraryIndex(progress, progressListener); - } - - private void performInstall(ContributedLibrary lib, ProgressListener progressListener, MultiStepProgress progress) throws Exception { - if (lib.isLibraryInstalled()) { - System.out.println(I18n.format(tr("Library is already installed: {0}:{1}"), lib.getName(), lib.getParsedVersion())); - return; - } - - File libsFolder = BaseNoGui.getSketchbookLibrariesFolder().folder; - File destFolder = new File(libsFolder, lib.getName().replaceAll(" ", "_")); - - // Check if we are replacing an already installed lib - LibrariesIndex index = BaseNoGui.librariesIndexer.getIndex(); - Optional replacedLib = index.find(lib.getName()).stream() // - .filter(l -> l.getInstalledLibrary().isPresent()) // - .filter(l -> l.getInstalledLibrary().get().getInstalledFolder().equals(destFolder)) // - .findAny(); - if (!replacedLib.isPresent() && destFolder.exists()) { - System.out.println(I18n.format(tr("Library {0} is already installed in: {1}"), lib.getName(), destFolder)); - return; - } - DownloadableContributionsDownloader downloader = new DownloadableContributionsDownloader(BaseNoGui.librariesIndexer.getStagingFolder()); - - // Step 1: Download library - try { - downloader.download(lib, progress, I18n.format(tr("Downloading library: {0}"), lib.getName()), progressListener, false); - } catch (InterruptedException e) { - // Download interrupted... just exit - return; - } - progress.stepDone(); - - // TODO: Extract to temporary folders and move to the final destination only - // once everything is successfully unpacked. If the operation fails remove - // all the temporary folders and abort installation. - - // Step 2: Unpack library on the correct location - progress.setStatus(I18n.format(tr("Installing library: {0}:{1}"), lib.getName(), lib.getParsedVersion())); - progressListener.onProgress(progress); - File tmpFolder = FileUtils.createTempFolder(libsFolder); - try { - new ArchiveExtractor(platform).extract(lib.getDownloadedFile(), tmpFolder, 1); - } catch (Exception e) { - if (tmpFolder.exists()) - FileUtils.recursiveDelete(tmpFolder); - } - progress.stepDone(); - - // Step 3: Remove replaced library and move installed one to the correct location - // TODO: Fix progress bar... - if (replacedLib.isPresent()) { - remove(replacedLib.get(), progressListener); - } - tmpFolder.renameTo(destFolder); - progress.stepDone(); - } - - public synchronized void remove(ContributedLibrary lib, ProgressListener progressListener) throws IOException { - if (lib.isIDEBuiltIn()) { - return; - } - - final MultiStepProgress progress = new MultiStepProgress(2); - - // Step 1: Remove library - progress.setStatus(I18n.format(tr("Removing library: {0}:{1}"), lib.getName(), lib.getParsedVersion())); - progressListener.onProgress(progress); - FileUtils.recursiveDelete(lib.getInstalledLibrary().get().getInstalledFolder()); - progress.stepDone(); - - // Step 2: Rescan index - rescanLibraryIndex(progress, progressListener); - } - - private void rescanLibraryIndex(MultiStepProgress progress, ProgressListener progressListener) { - progress.setStatus(tr("Updating list of installed libraries")); - progressListener.onProgress(progress); - BaseNoGui.librariesIndexer.rescanLibraries(); - progress.stepDone(); - } -} diff --git a/arduino-core/src/cc/arduino/contributions/libraries/UnavailableContributedLibrary.java b/arduino-core/src/cc/arduino/contributions/libraries/UnavailableContributedLibrary.java deleted file mode 100644 index 277d969dede..00000000000 --- a/arduino-core/src/cc/arduino/contributions/libraries/UnavailableContributedLibrary.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * This file is part of Arduino. - * - * Copyright 2017 Arduino LLC (http://www.arduino.cc/) - * - * Arduino is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * As a special exception, you may use this file as part of a free software - * library without restriction. Specifically, if other files instantiate - * templates or use macros or inline functions from this file, or you compile - * this file and link it with other files to produce an executable, this - * file does not by itself cause the resulting executable to be covered by - * the GNU General Public License. This exception does not however - * invalidate any other reasons why the executable file might be covered by - * the GNU General Public License. - */ - -package cc.arduino.contributions.libraries; - -import java.util.ArrayList; -import java.util.List; - -public class UnavailableContributedLibrary extends ContributedLibrary { - - private String name; - private String version; - - public UnavailableContributedLibrary(ContributedLibraryDependency dependency) { - this(dependency.getName(), dependency.getVersion()); - } - - public UnavailableContributedLibrary(String _name, String _version) { - name = _name; - version = _version; - } - - @Override - public String getName() { - return name; - } - - @Override - public String getMaintainer() { - return "Unknown"; - } - - @Override - public String getAuthor() { - return "Unknown"; - } - - @Override - public String getWebsite() { - return "Unknown"; - } - - @Override - public String getCategory() { - return "Uncategorized"; - } - - @Override - public void setCategory(String category) { - // Empty - } - - @Override - public String getLicense() { - return "Unknown"; - } - - @Override - public String getParagraph() { - return ""; - } - - @Override - public String getSentence() { - return ""; - } - - @Override - public List getArchitectures() { - return new ArrayList<>(); - } - - @Override - public List getTypes() { - return new ArrayList<>(); - } - - @Override - public List getDependencies() { - return new ArrayList<>(); - } - - @Override - public String getUrl() { - return ""; - } - - @Override - public String getVersion() { - return version; - } - - @Override - public String getChecksum() { - return ""; - } - - @Override - public long getSize() { - return 0; - } - - @Override - public String getArchiveFileName() { - return ""; - } - - @Override - public String toString() { - return "!" + super.toString(); - } - - @Override - public List getProvidesIncludes() { - return new ArrayList<>(); - } -} diff --git a/arduino-core/src/cc/arduino/legacy/OldI18nMessages.java b/arduino-core/src/cc/arduino/legacy/OldI18nMessages.java new file mode 100644 index 00000000000..345ecb5ba3d --- /dev/null +++ b/arduino-core/src/cc/arduino/legacy/OldI18nMessages.java @@ -0,0 +1,11 @@ +package cc.arduino.legacy; + +import static processing.app.I18n.tr; + +public class OldI18nMessages { + + static { + tr("Invalid version '{0}' for library in: {1}"); + } + +} diff --git a/arduino-core/src/cc/arduino/net/CustomProxySelector.java b/arduino-core/src/cc/arduino/net/CustomProxySelector.java index 32a0894e89e..b96094ae833 100644 --- a/arduino-core/src/cc/arduino/net/CustomProxySelector.java +++ b/arduino-core/src/cc/arduino/net/CustomProxySelector.java @@ -29,16 +29,33 @@ package cc.arduino.net; -import cc.arduino.Constants; -import org.apache.commons.compress.utils.IOUtils; - -import javax.script.*; import java.io.IOException; -import java.net.*; +import java.net.Authenticator; +import java.net.HttpURLConnection; +import java.net.InetSocketAddress; +import java.net.MalformedURLException; +import java.net.PasswordAuthentication; +import java.net.Proxy; +import java.net.ProxySelector; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.URL; +import java.net.URLConnection; import java.nio.charset.Charset; import java.util.Map; +import java.util.Optional; import java.util.stream.Stream; +import javax.script.Invocable; +import javax.script.ScriptContext; +import javax.script.ScriptEngine; +import javax.script.ScriptEngineManager; +import javax.script.ScriptException; + +import org.apache.commons.compress.utils.IOUtils; + +import cc.arduino.Constants; + public class CustomProxySelector { private final Map preferences; @@ -48,6 +65,56 @@ public CustomProxySelector(Map preferences) { clearPreviousAuthenticator(); } + public Optional getProxyURIFor(URI uri) throws URISyntaxException { + String auth = ""; + String user = preferences.getOrDefault(Constants.PREF_PROXY_USERNAME, ""); + if (!user.isEmpty()) { + String pass = preferences.getOrDefault(Constants.PREF_PROXY_PASSWORD, ""); + auth = user + ":" + pass + "@"; + } + String host, port, proto; + + switch (preferences.get(Constants.PREF_PROXY_TYPE)) { + default: + return Optional.empty(); + + case Constants.PROXY_TYPE_NONE: + return Optional.empty(); + + case Constants.PROXY_TYPE_MANUAL: + host = preferences.get(Constants.PREF_PROXY_MANUAL_HOSTNAME); + port = preferences.get(Constants.PREF_PROXY_MANUAL_PORT); + proto = preferences.get(Constants.PREF_PROXY_MANUAL_TYPE).toLowerCase(); + break; + + case Constants.PROXY_TYPE_AUTO: + String pac = preferences.getOrDefault(Constants.PREF_PROXY_PAC_URL, ""); + if (pac.isEmpty()) { + return Optional.empty(); + } + + try { + String proxyConfigs = pacProxy(pac, uri); + System.out.println(proxyConfigs); + String proxyConfig = proxyConfigs.split(";")[0]; + if (proxyConfig.startsWith("DIRECT")) { + return Optional.empty(); + } + proto = proxyConfig.startsWith("PROXY ") ? "http" : "socks"; + proxyConfig = proxyConfig.substring(6); + String[] hostPort = proxyConfig.split(":"); + host = hostPort[0]; + port = hostPort[1]; + } catch (Exception e) { + e.printStackTrace(); + return Optional.empty(); + } + break; + } + + return Optional.of(new URI(proto + "://" + auth + host + ":" + port + "/")); + } + public Proxy getProxyFor(URI uri) throws IOException, ScriptException, NoSuchMethodException { String proxyType = preferences.get(Constants.PREF_PROXY_TYPE); if (proxyType == null || proxyType.isEmpty()) { @@ -64,7 +131,7 @@ public Proxy getProxyFor(URI uri) throws IOException, ScriptException, NoSuchMet return ProxySelector.getDefault().select(uri).get(0); } - return pacProxy(pac, uri); + return makeProxyFrom(pacProxy(pac, uri)); } if (Constants.PROXY_TYPE_MANUAL.equals(proxyType)) { @@ -74,7 +141,7 @@ public Proxy getProxyFor(URI uri) throws IOException, ScriptException, NoSuchMet throw new IllegalStateException("Unable to understand proxy settings"); } - private Proxy pacProxy(String pac, URI uri) throws IOException, ScriptException, NoSuchMethodException { + private String pacProxy(String pac, URI uri) throws IOException, ScriptException, NoSuchMethodException { setAuthenticator(preferences.get(Constants.PREF_PROXY_USERNAME), preferences.get(Constants.PREF_PROXY_PASSWORD)); URLConnection urlConnection = new URL(pac).openConnection(); @@ -105,8 +172,7 @@ private Proxy pacProxy(String pac, URI uri) throws IOException, ScriptException, } }); nashorn.eval(pacScript); - String proxyConfigs = callFindProxyForURL(uri, nashorn); - return makeProxyFrom(proxyConfigs); + return callFindProxyForURL(uri, nashorn); } private String callFindProxyForURL(URI uri, ScriptEngine nashorn) throws ScriptException, NoSuchMethodException { diff --git a/arduino-core/src/cc/arduino/packages/UploaderFactory.java b/arduino-core/src/cc/arduino/packages/UploaderFactory.java index 74b993433da..343176e0687 100644 --- a/arduino-core/src/cc/arduino/packages/UploaderFactory.java +++ b/arduino-core/src/cc/arduino/packages/UploaderFactory.java @@ -32,11 +32,10 @@ import cc.arduino.packages.uploaders.SSHUploader; import cc.arduino.packages.uploaders.SerialUploader; import cc.arduino.packages.uploaders.GenericNetworkUploader; -import processing.app.debug.TargetBoard; public class UploaderFactory { - public Uploader newUploader(TargetBoard board, BoardPort port, boolean noUploadPort) { + public Uploader newUploader(BoardPort port, boolean noUploadPort) { if (noUploadPort) { return new SerialUploader(true); } diff --git a/arduino-core/src/cc/arduino/packages/discoverers/PluggableDiscovery.java b/arduino-core/src/cc/arduino/packages/discoverers/PluggableDiscovery.java index 3f7202fa6a9..7bc9778f4b9 100644 --- a/arduino-core/src/cc/arduino/packages/discoverers/PluggableDiscovery.java +++ b/arduino-core/src/cc/arduino/packages/discoverers/PluggableDiscovery.java @@ -56,10 +56,10 @@ public class PluggableDiscovery implements Discovery { private final String discoveryName; private final String[] cmd; private final List portList = new ArrayList<>(); - private Process program=null; + Process program = null; private Thread pollingThread; - private void debug(String x) { + void debug(String x) { if (PreferencesData.getBoolean("discovery.debug")) System.out.println(discoveryName + ": " + x); } @@ -211,6 +211,7 @@ private void startPolling() { debug("START"); write("START\n"); Thread pollingThread = new Thread() { + @Override public void run() { try { while (program != null && program.isAlive()) { @@ -238,7 +239,7 @@ public void stop() throws Exception { } } - private void write(String command) { + void write(String command) { if (program != null && program.isAlive()) { OutputStream out = program.getOutputStream(); try { diff --git a/arduino-core/src/cc/arduino/packages/uploaders/GenericNetworkUploader.java b/arduino-core/src/cc/arduino/packages/uploaders/GenericNetworkUploader.java index 0cf2ba04be5..a344e193770 100644 --- a/arduino-core/src/cc/arduino/packages/uploaders/GenericNetworkUploader.java +++ b/arduino-core/src/cc/arduino/packages/uploaders/GenericNetworkUploader.java @@ -37,6 +37,10 @@ import java.io.File; import java.util.List; +import java.util.Optional; + +import static processing.app.I18n.format; +import static processing.app.I18n.tr; public class GenericNetworkUploader extends Uploader { @@ -58,19 +62,26 @@ public String getAuthorizationKey() { @Override public boolean uploadUsingPreferences(File sourcePath, String buildPath, String className, boolean usingProgrammer, List warningsAccumulator) throws Exception { - TargetPlatform targetPlatform = BaseNoGui.getTargetPlatform(); PreferencesMap prefs = PreferencesData.getMap(); PreferencesMap boardPreferences = BaseNoGui.getBoardPreferences(); if (boardPreferences != null) { prefs.putAll(boardPreferences); } + + Optional targetPlatform = BaseNoGui.getTargetPlatform(); String tool = prefs.getOrExcept("upload.tool"); if (tool.contains(":")) { String[] split = tool.split(":", 2); targetPlatform = BaseNoGui.getCurrentTargetPlatformFromPackage(split[0]); + if (!targetPlatform.isPresent()) { + throw new Exception(format(tr("Could not find tool {0} from package {1}"), tool, split[0])); + } tool = split[1]; } - prefs.putAll(targetPlatform.getTool(tool)); + if (!targetPlatform.isPresent()) { + throw new Exception(format(tr("Could not find tool {0}"), tool)); + } + prefs.putAll(targetPlatform.get().getTool(tool)); String password = ""; if(requiresAuthorization()){ diff --git a/arduino-core/src/cc/arduino/packages/uploaders/SSHUploader.java b/arduino-core/src/cc/arduino/packages/uploaders/SSHUploader.java index fb0eb3ffbd5..58ef3ba5c79 100644 --- a/arduino-core/src/cc/arduino/packages/uploaders/SSHUploader.java +++ b/arduino-core/src/cc/arduino/packages/uploaders/SSHUploader.java @@ -42,7 +42,6 @@ import processing.app.debug.RunnerException; import processing.app.debug.TargetPlatform; import processing.app.helpers.PreferencesMap; -import processing.app.helpers.PreferencesMapException; import processing.app.helpers.StringReplacer; import java.io.File; @@ -51,16 +50,18 @@ import java.util.Collections; import java.util.HashSet; import java.util.List; +import java.util.Optional; import java.util.Set; import org.apache.commons.lang3.StringUtils; +import static processing.app.I18n.format; import static processing.app.I18n.tr; public class SSHUploader extends Uploader { private static final Set FILES_NOT_TO_COPY = - Collections.unmodifiableSet(new HashSet(Arrays.asList(".DS_Store", ".Trash", "Thumbs.db", "__MACOSX"))); + Collections.unmodifiableSet(new HashSet<>(Arrays.asList(".DS_Store", ".Trash", "Thumbs.db", "__MACOSX"))); private final BoardPort port; @@ -79,31 +80,38 @@ public String getAuthorizationKey() { } @Override - public boolean uploadUsingPreferences(File sourcePath, String buildPath, String className, boolean usingProgrammer, List warningsAccumulator) throws RunnerException, PreferencesMapException { + public boolean uploadUsingPreferences(File sourcePath, String buildPath, String className, boolean usingProgrammer, List warningsAccumulator) throws Exception { if (usingProgrammer) { throw new RunnerException(tr("Network upload using programmer not supported")); } - TargetPlatform targetPlatform = BaseNoGui.getTargetPlatform(); PreferencesMap prefs = PreferencesData.getMap(); PreferencesMap boardPreferences = BaseNoGui.getBoardPreferences(); if (boardPreferences != null) { prefs.putAll(boardPreferences); } + + Optional targetPlatform = BaseNoGui.getTargetPlatform(); String tool = prefs.getOrExcept("upload.tool"); if (tool.contains(":")) { String[] split = tool.split(":", 2); targetPlatform = BaseNoGui.getCurrentTargetPlatformFromPackage(split[0]); + if (!targetPlatform.isPresent()) { + throw new Exception(format(tr("Could not find tool {0} from package {1}"), tool, split[0])); + } tool = split[1]; } - prefs.putAll(targetPlatform.getTool(tool)); + if (!targetPlatform.isPresent()) { + throw new Exception(format(tr("Could not find tool {0}"), tool)); + } + prefs.putAll(targetPlatform.get().getTool(tool)); - boolean coreMissesRemoteUploadTool = targetPlatform.getTool(tool + "_remote").isEmpty(); + boolean coreMissesRemoteUploadTool = targetPlatform.get().getTool(tool + "_remote").isEmpty(); if (coreMissesRemoteUploadTool) { prefs.put("upload.pattern", "/usr/bin/run-avrdude /tmp/sketch.hex"); } else { - prefs.putAll(targetPlatform.getTool(tool + "_remote")); + prefs.putAll(targetPlatform.get().getTool(tool + "_remote")); } prefs.put("build.path", buildPath); diff --git a/arduino-core/src/cc/arduino/packages/uploaders/SerialUploader.java b/arduino-core/src/cc/arduino/packages/uploaders/SerialUploader.java index 96ba383aceb..af11c5cc479 100644 --- a/arduino-core/src/cc/arduino/packages/uploaders/SerialUploader.java +++ b/arduino-core/src/cc/arduino/packages/uploaders/SerialUploader.java @@ -47,7 +47,9 @@ import java.io.File; import java.util.ArrayList; import java.util.List; +import java.util.Optional; +import static processing.app.I18n.format; import static processing.app.I18n.tr; public class SerialUploader extends Uploader { @@ -65,19 +67,26 @@ public SerialUploader(boolean noUploadPort) @Override public boolean uploadUsingPreferences(File sourcePath, String buildPath, String className, boolean usingProgrammer, List warningsAccumulator) throws Exception { // FIXME: Preferences should be reorganized - TargetPlatform targetPlatform = BaseNoGui.getTargetPlatform(); PreferencesMap prefs = PreferencesData.getMap(); PreferencesMap boardPreferences = BaseNoGui.getBoardPreferences(); if (boardPreferences != null) { prefs.putAll(boardPreferences); } + + Optional targetPlatform = BaseNoGui.getTargetPlatform(); String tool = prefs.getOrExcept("upload.tool"); if (tool.contains(":")) { String[] split = tool.split(":", 2); targetPlatform = BaseNoGui.getCurrentTargetPlatformFromPackage(split[0]); + if (!targetPlatform.isPresent()) { + throw new Exception(format(tr("Could not find tool {0} from package {1}"), tool, split[0])); + } tool = split[1]; } - prefs.putAll(targetPlatform.getTool(tool)); + if (!targetPlatform.isPresent()) { + throw new Exception(format(tr("Could not find tool {0}"), tool)); + } + prefs.putAll(targetPlatform.get().getTool(tool)); if (programmerPid != null && programmerPid.isAlive()) { // kill the previous programmer @@ -232,14 +241,14 @@ private String waitForUploadPort(String uploadPort, List before) throws return waitForUploadPort(uploadPort, before, verbose, 10000); } - private String waitForUploadPort(String uploadPort, List before, boolean verbose, int timeout) throws InterruptedException, RunnerException { + private String waitForUploadPort(String uploadPort, List before, boolean verboseDebug, int timeout) throws InterruptedException, RunnerException { // Wait for a port to appear on the list int elapsed = 0; while (elapsed < timeout) { List now = Serial.list(); List diff = new ArrayList<>(now); diff.removeAll(before); - if (verbose) { + if (verboseDebug) { System.out.print("PORTS {"); for (String p : before) System.out.print(p + ", "); @@ -253,7 +262,7 @@ private String waitForUploadPort(String uploadPort, List before, boolean } if (diff.size() > 0) { String newPort = diff.get(0); - if (verbose) + if (verboseDebug) System.out.println("Found upload port: " + newPort); return newPort; } @@ -267,7 +276,7 @@ private String waitForUploadPort(String uploadPort, List before, boolean // come back, so use a time out before assuming that the selected port is the // bootloader (not the sketch). if (elapsed >= 5000 && now.contains(uploadPort)) { - if (verbose) + if (verboseDebug) System.out.println("Uploading using selected port: " + uploadPort); return uploadPort; } @@ -279,24 +288,30 @@ private String waitForUploadPort(String uploadPort, List before, boolean private boolean uploadUsingProgrammer(String buildPath, String className) throws Exception { - TargetPlatform targetPlatform = BaseNoGui.getTargetPlatform(); + Optional targetPlatform = BaseNoGui.getTargetPlatform(); String programmer = PreferencesData.get("programmer"); if (programmer.contains(":")) { String[] split = programmer.split(":", 2); targetPlatform = BaseNoGui.getCurrentTargetPlatformFromPackage(split[0]); + if (!targetPlatform.isPresent()) { + throw new Exception(format(tr("Could not find tool {0} from package {1}"), programmer, split[0])); + } programmer = split[1]; } + if (!targetPlatform.isPresent()) { + throw new Exception(format(tr("Could not find tool {0}"), programmer)); + } PreferencesMap prefs = PreferencesData.getMap(); PreferencesMap boardPreferences = BaseNoGui.getBoardPreferences(); if (boardPreferences != null) { prefs.putAll(boardPreferences); } - PreferencesMap programmerPrefs = targetPlatform.getProgrammer(programmer); + PreferencesMap programmerPrefs = targetPlatform.get().getProgrammer(programmer); if (programmerPrefs == null) throw new RunnerException( tr("Please select a programmer from Tools->Programmer menu")); - prefs.putAll(targetPlatform.getTool(programmerPrefs.getOrExcept("program.tool"))); + prefs.putAll(targetPlatform.get().getTool(programmerPrefs.getOrExcept("program.tool"))); prefs.putAll(programmerPrefs); prefs.put("build.path", buildPath); @@ -317,22 +332,26 @@ private boolean uploadUsingProgrammer(String buildPath, String className) throws @Override public boolean burnBootloader() throws Exception { - TargetPlatform targetPlatform = BaseNoGui.getTargetPlatform(); + TargetPlatform targetPlatform = BaseNoGui.getTargetPlatform() + .orElseThrow(() -> new RunnerException(tr("Please select a programmer from Tools->Programmer menu"))); // Find preferences for the selected programmer - PreferencesMap programmerPrefs; + PreferencesMap programmerPrefs = null; String programmer = PreferencesData.get("programmer"); if (programmer.contains(":")) { String[] split = programmer.split(":", 2); - TargetPlatform platform = BaseNoGui.getCurrentTargetPlatformFromPackage(split[0]); + Optional platform = BaseNoGui.getCurrentTargetPlatformFromPackage(split[0]); + if (!platform.isPresent()) { + throw new Exception(format(tr("Could not find tool {0} from package {1}"), programmer, split[0])); + } programmer = split[1]; - programmerPrefs = platform.getProgrammer(programmer); + programmerPrefs = platform.get().getProgrammer(programmer); } else { programmerPrefs = targetPlatform.getProgrammer(programmer); } - if (programmerPrefs == null) - throw new RunnerException( - tr("Please select a programmer from Tools->Programmer menu")); + if (programmerPrefs == null) { + throw new RunnerException(tr("Please select a programmer from Tools->Programmer menu")); + } // Build configuration for the current programmer PreferencesMap prefs = PreferencesData.getMap(); @@ -347,15 +366,19 @@ public boolean burnBootloader() throws Exception { String tool = prefs.getOrExcept("bootloader.tool"); if (tool.contains(":")) { String[] split = tool.split(":", 2); - TargetPlatform platform = BaseNoGui.getCurrentTargetPlatformFromPackage(split[0]); tool = split[1]; - toolPrefs.putAll(platform.getTool(tool)); - if (toolPrefs.size() == 0) + Optional platform = BaseNoGui.getCurrentTargetPlatformFromPackage(split[0]); + if (platform.isPresent()) { + toolPrefs.putAll(platform.get().getTool(tool)); + } + if (toolPrefs.size() == 0) { throw new RunnerException(I18n.format(tr("Could not find tool {0} from package {1}"), tool, split[0])); + } } toolPrefs.putAll(targetPlatform.getTool(tool)); - if (toolPrefs.size() == 0) + if (toolPrefs.size() == 0) { throw new RunnerException(I18n.format(tr("Could not find tool {0}"), tool)); + } // Merge tool with global configuration prefs.putAll(toolPrefs); diff --git a/arduino-core/src/cc/arduino/utils/network/FileDownloaderCache.java b/arduino-core/src/cc/arduino/utils/network/FileDownloaderCache.java index 766e70859e1..8ad051dd885 100644 --- a/arduino-core/src/cc/arduino/utils/network/FileDownloaderCache.java +++ b/arduino-core/src/cc/arduino/utils/network/FileDownloaderCache.java @@ -64,9 +64,9 @@ public class FileDownloaderCache { private final static String CACHE_ENABLE_PREFERENCE_KEY = "cache.enable"; - private final static Logger log = LogManager + final static Logger log = LogManager .getLogger(FileDownloaderCache.class); - private final static Map cachedFiles = Collections + final static Map cachedFiles = Collections .synchronizedMap(new HashMap<>()); private final static String cacheFolder; private static boolean enableCache; @@ -123,11 +123,11 @@ public static Optional getFileCached(final URL remoteURL) return getFileCached(remoteURL, true); } - public static Optional getFileCached(final URL remoteURL, boolean enableCache) + public static Optional getFileCached(final URL remoteURL, boolean _enableCache) throws URISyntaxException, NoSuchMethodException, ScriptException, IOException { // Return always and empty file if the cache is not enable - if (!(enableCache && FileDownloaderCache.enableCache)) { + if (!(_enableCache && FileDownloaderCache.enableCache)) { log.info("The cache is not enable."); return Optional.empty(); } @@ -208,7 +208,7 @@ private static Optional updateCacheInfo(URL remoteURL, BiFunction beforeConnection) throws IOException, URISyntaxException, ScriptException, NoSuchMethodException { if (movedTimes > maxRedirectNumber) { - log.warn("Too many redirect " + requestURL); - throw new IOException("Too many redirect " + requestURL); + log.warn("Too many redirect " + url); + throw new IOException("Too many redirect " + url); } Proxy proxy = new CustomProxySelector(PreferencesData.getMap()) - .getProxyFor(requestURL.toURI()); + .getProxyFor(url.toURI()); log.debug("Using proxy {}", proxy); final String requestId = UUID.randomUUID().toString() .toUpperCase().replace("-", "").substring(0, 16); - HttpURLConnection connection = (HttpURLConnection) requestURL + HttpURLConnection connection = (HttpURLConnection) url .openConnection(proxy); // see https://github.com/arduino/Arduino/issues/10264 @@ -138,9 +138,9 @@ private HttpURLConnection makeConnection(URL requestURL, int movedTimes, if (id != null) { connection.setRequestProperty("X-ID", id); } - if (requestURL.getUserInfo() != null) { + if (url.getUserInfo() != null) { String auth = "Basic " + new String( - new Base64().encode(requestURL.getUserInfo().getBytes())); + new Base64().encode(url.getUserInfo().getBytes())); connection.setRequestProperty("Authorization", auth); } @@ -150,12 +150,12 @@ private HttpURLConnection makeConnection(URL requestURL, int movedTimes, beforeConnection.accept(connection); // Connect - log.info("Connect to {}, method={}, request id={}", requestURL, connection.getRequestMethod(), requestId); + log.info("Connect to {}, method={}, request id={}", url, connection.getRequestMethod(), requestId); connection.connect(); int resp = connection.getResponseCode(); log.info("Request complete URL=\"{}\", method={}, response code={}, request id={}, headers={}", - requestURL, connection.getRequestMethod(), resp, requestId, StringUtils.join(connection.getHeaderFields())); + url, connection.getRequestMethod(), resp, requestId, StringUtils.join(connection.getHeaderFields())); if (resp == HttpURLConnection.HTTP_MOVED_PERM || resp == HttpURLConnection.HTTP_MOVED_TEMP) { diff --git a/arduino-core/src/processing/app/BaseNoGui.java b/arduino-core/src/processing/app/BaseNoGui.java index e9adb255b3d..383f5d5cb96 100644 --- a/arduino-core/src/processing/app/BaseNoGui.java +++ b/arduino-core/src/processing/app/BaseNoGui.java @@ -1,6 +1,8 @@ package processing.app; import cc.arduino.Constants; +import cc.arduino.cli.ArduinoCore; +import cc.arduino.cli.ArduinoCoreInstance; import cc.arduino.contributions.GPGDetachedSignatureVerifier; import cc.arduino.contributions.VersionComparator; import cc.arduino.contributions.libraries.LibrariesIndexer; @@ -19,8 +21,6 @@ import processing.app.legacy.PApplet; import processing.app.packages.LibraryList; import processing.app.packages.UserLibrary; -import processing.app.packages.UserLibraryFolder; -import processing.app.packages.UserLibraryFolder.Location; import cc.arduino.files.DeleteFilesOnShutdown; import processing.app.helpers.FileUtils; @@ -86,9 +86,6 @@ public class BaseNoGui { // maps #included files to their library folder public static Map importToLibraryTable; - // XXX: Remove this field - static private List librariesFolders; - static UserNotifier notifier = new BasicUserNotifier(); static public Map packages; @@ -105,6 +102,21 @@ public class BaseNoGui { private static File buildCache; + private static ArduinoCoreInstance arduinoCoreInstance; + + public static void initArduinoCoreService() { + try { + ArduinoCore core = new ArduinoCore(); + arduinoCoreInstance = core.init(); + } catch (Exception e) { + e.printStackTrace(); + } + } + + public static ArduinoCoreInstance getArduinoCoreService() { + return arduinoCoreInstance; + } + // Returns a File object for the given pathname. If the pathname // is not absolute, it is interpreted relative to the current // directory when starting the IDE (which is not the same as the @@ -132,9 +144,10 @@ static public int countLines(String what) { } static public PreferencesMap getBoardPreferences() { - TargetBoard board = getTargetBoard(); - if (board == null) + Optional mayBoard = getTargetBoard(); + if (!mayBoard.isPresent()) return null; + TargetBoard board = mayBoard.get(); String boardId = board.getId(); PreferencesMap prefs = new PreferencesMap(board.getPreferences()); @@ -161,19 +174,24 @@ static public PreferencesMap getBoardPreferences() { List requiredTools = new ArrayList<>(); // Add all tools dependencies specified in package index - ContributedPlatform p = indexer.getContributedPlaform(getTargetPlatform()); - if (p != null) - requiredTools.addAll(p.getResolvedTools()); + Optional targetPlatform = getTargetPlatform(); + if (targetPlatform.isPresent()) { + ContributedPlatform p = indexer.getContributedPlaform(targetPlatform.get()); + if (p != null) { + requiredTools.addAll(p.getResolvedTools()); + } + } // Add all tools dependencies from the (possibily) referenced core String core = prefs.get("build.core"); if (core != null && core.contains(":")) { String split[] = core.split(":"); - TargetPlatform referenced = BaseNoGui.getCurrentTargetPlatformFromPackage(split[0]); - if (referenced != null) { - ContributedPlatform referencedPlatform = indexer.getContributedPlaform(referenced); - if (referencedPlatform != null) + Optional referenced = BaseNoGui.getCurrentTargetPlatformFromPackage(split[0]); + if (referenced.isPresent()) { + ContributedPlatform referencedPlatform = indexer.getContributedPlaform(referenced.get()); + if (referencedPlatform != null) { requiredTools.addAll(referencedPlatform.getResolvedTools()); + } } else { String msg = tr("The current selected board needs the core '{0}' that is not installed."); System.out.println(I18n.format(msg, core)); @@ -204,7 +222,7 @@ static public File getContentFile(String name) { return new File(installationFolder, name); } - static public TargetPlatform getCurrentTargetPlatformFromPackage(String pack) { + static public Optional getCurrentTargetPlatformFromPackage(String pack) { return getTargetPlatform(pack, PreferencesData.get("target_platform")); } @@ -246,10 +264,6 @@ static public String getHardwarePath() { return getHardwareFolder().getAbsolutePath(); } - static public List getLibrariesFolders() { - return librariesFolders; - } - static public Platform getPlatform() { return platform; } @@ -327,7 +341,7 @@ static public File getSketchbookHardwareFolder() { return new File(getSketchbookFolder(), "hardware"); } - static public UserLibraryFolder getSketchbookLibrariesFolder() { + static public File getSketchbookLibrariesFolder() { File libdir = new File(getSketchbookFolder(), "libraries"); if (!libdir.exists()) { FileWriter freadme = null; @@ -341,7 +355,7 @@ static public UserLibraryFolder getSketchbookLibrariesFolder() { IOUtils.closeQuietly(freadme); } } - return new UserLibraryFolder(libdir, Location.SKETCHBOOK); + return libdir; } static public String getSketchbookPath() { @@ -371,12 +385,13 @@ static public String getSketchbookPath() { return sketchbookPath; } - public static TargetBoard getTargetBoard() { - TargetPlatform targetPlatform = getTargetPlatform(); - if (targetPlatform == null) - return null; + public static Optional getTargetBoard() { + Optional targetPlatform = getTargetPlatform(); + if (!targetPlatform.isPresent()) { + return Optional.empty(); + } String boardId = PreferencesData.get("board"); - return targetPlatform.getBoard(boardId); + return Optional.ofNullable(targetPlatform.get().getBoard(boardId)); } /** @@ -385,8 +400,8 @@ public static TargetBoard getTargetBoard() { * @param packageName * @return */ - static public TargetPackage getTargetPackage(String packageName) { - return packages.get(packageName); + static public Optional getTargetPackage(String packageName) { + return Optional.ofNullable(packages.get(packageName)); } /** @@ -394,7 +409,7 @@ static public TargetPackage getTargetPackage(String packageName) { * * @return */ - static public TargetPlatform getTargetPlatform() { + static public Optional getTargetPlatform() { String packageName = PreferencesData.get("target_package"); String platformName = PreferencesData.get("target_platform"); return getTargetPlatform(packageName, platformName); @@ -407,12 +422,12 @@ static public TargetPlatform getTargetPlatform() { * @param platformName * @return */ - static public TargetPlatform getTargetPlatform(String packageName, - String platformName) { - TargetPackage p = packages.get(packageName); - if (p == null) - return null; - return p.get(platformName); + static public Optional getTargetPlatform(String packageName, String platformName) { + Optional p = getTargetPackage(packageName); + if (!p.isPresent()) { + return Optional.empty(); + } + return Optional.ofNullable(p.get().get(platformName)); } static public File getToolsFolder() { @@ -496,13 +511,8 @@ static public void initPackages() throws Exception { loadHardware(getSketchbookHardwareFolder()); createToolPreferences(indexer.getInstalledTools(), true); - librariesIndexer = new LibrariesIndexer(getSettingsFolder()); - try { - librariesIndexer.parseIndex(); - } catch (JsonProcessingException e) { - File librariesIndexFile = librariesIndexer.getIndexFile(); - librariesIndexFile.delete(); - } + librariesIndexer = new LibrariesIndexer(BaseNoGui.getArduinoCoreService()); + librariesIndexer.regenerateIndex(); if (discoveryManager == null) { discoveryManager = new DiscoveryManager(packages); @@ -644,39 +654,13 @@ public static boolean isIDEInstalledIntoSettingsFolder() { static public void onBoardOrPortChange() { examplesFolder = getContentFile("examples"); toolsFolder = getContentFile("tools"); - librariesFolders = new ArrayList<>(); - - // Add IDE libraries folder - librariesFolders.add(new UserLibraryFolder(getContentFile("libraries"), Location.IDE_BUILTIN)); - - TargetPlatform targetPlatform = getTargetPlatform(); - if (targetPlatform != null) { - String core = getBoardPreferences().get("build.core", "arduino"); - if (core.contains(":")) { - String referencedCore = core.split(":")[0]; - TargetPlatform referencedPlatform = getTargetPlatform(referencedCore, targetPlatform.getId()); - if (referencedPlatform != null) { - File referencedPlatformFolder = referencedPlatform.getFolder(); - // Add libraries folder for the referenced platform - File folder = new File(referencedPlatformFolder, "libraries"); - librariesFolders.add(new UserLibraryFolder(folder, Location.REFERENCED_CORE)); - } - } - File platformFolder = targetPlatform.getFolder(); - // Add libraries folder for the selected platform - File folder = new File(platformFolder, "libraries"); - librariesFolders.add(new UserLibraryFolder(folder, Location.CORE)); - } - - // Add libraries folder for the sketchbook - librariesFolders.add(getSketchbookLibrariesFolder()); + Optional targetPlatform = getTargetPlatform(); // Scan for libraries in each library folder. // Libraries located in the latest folders on the list can override // other libraries with the same name. - librariesIndexer.setLibrariesFolders(librariesFolders); - if (getTargetPlatform() != null) { - librariesIndexer.setArchitecturePriority(getTargetPlatform().getId()); + if (targetPlatform.isPresent()) { + librariesIndexer.setArchitecturePriority(targetPlatform.get().getId()); } librariesIndexer.rescanLibraries(); diff --git a/arduino-core/src/processing/app/helpers/BoardCloudResolver.java b/arduino-core/src/processing/app/helpers/BoardCloudResolver.java index 8fa6f96da14..e7b2f442811 100644 --- a/arduino-core/src/processing/app/helpers/BoardCloudResolver.java +++ b/arduino-core/src/processing/app/helpers/BoardCloudResolver.java @@ -107,30 +107,37 @@ public String getName() { return name; } + @SuppressWarnings("unused") public void setName(String tmp) { name = tmp; } + @SuppressWarnings("unused") public String getFqbn() { return fqbn; } + @SuppressWarnings("unused") public void setFqbn(String fqbn) { this.fqbn = fqbn; } + @SuppressWarnings("unused") public String getArchitecture() { return architecture; } + @SuppressWarnings("unused") public void setArchitecture(String tmp) { architecture = tmp; } + @SuppressWarnings("unused") public String getId() { return id; } + @SuppressWarnings("unused") public void setId(String tmp) { id = tmp; } diff --git a/arduino-core/src/processing/app/helpers/CommandlineParser.java b/arduino-core/src/processing/app/helpers/CommandlineParser.java index 4c8b3a241b4..714cd6f1c6d 100644 --- a/arduino-core/src/processing/app/helpers/CommandlineParser.java +++ b/arduino-core/src/processing/app/helpers/CommandlineParser.java @@ -232,13 +232,13 @@ private void processBoardArgument(String selectBoard) { BaseNoGui.showError(null, I18n.format(tr("{0}: Invalid board name, it should be of the form \"package:arch:board\" or \"package:arch:board:options\""), selectBoard), 3); } - TargetPackage targetPackage = BaseNoGui.getTargetPackage(split[0]); - if (targetPackage == null) { + Optional targetPackage = BaseNoGui.getTargetPackage(split[0]); + if (!targetPackage.isPresent()) { BaseNoGui.showError(null, I18n.format(tr("{0}: Unknown package"), split[0]), 3); return; } - TargetPlatform targetPlatform = targetPackage.get(split[1]); + TargetPlatform targetPlatform = targetPackage.get().get(split[1]); if (targetPlatform == null) { BaseNoGui.showError(null, I18n.format(tr("{0}: Unknown architecture"), split[1]), 3); return; diff --git a/arduino-core/src/processing/app/packages/LegacyUserLibrary.java b/arduino-core/src/processing/app/packages/LegacyUserLibrary.java deleted file mode 100644 index a62b942ebdb..00000000000 --- a/arduino-core/src/processing/app/packages/LegacyUserLibrary.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * This file is part of Arduino. - * - * Copyright 2014 Arduino LLC (http://www.arduino.cc/) - * - * Arduino is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * As a special exception, you may use this file as part of a free software - * library without restriction. Specifically, if other files instantiate - * templates or use macros or inline functions from this file, or you compile - * this file and link it with other files to produce an executable, this - * file does not by itself cause the resulting executable to be covered by - * the GNU General Public License. This exception does not however - * invalidate any other reasons why the executable file might be covered by - * the GNU General Public License. - */ -package processing.app.packages; - -import java.util.Arrays; -import java.util.List; - -public class LegacyUserLibrary extends UserLibrary { - - private String name; - - public static LegacyUserLibrary create(UserLibraryFolder folderDesc) { - // construct an old style library - LegacyUserLibrary res = new LegacyUserLibrary(); - res.installedFolder = folderDesc.folder; - res.layout = LibraryLayout.FLAT; - res.name = folderDesc.folder.getName(); - res.setTypes(Arrays.asList("Contributed")); - res.setCategory("Uncategorized"); - res.location = folderDesc.location; - return res; - } - - @Override - public String getName() { - return name; - } - - @Override - public List getArchitectures() { - return Arrays.asList("*"); - } - - @Override - public String toString() { - return "LegacyLibrary:" + name + "\n"; - } - -} diff --git a/arduino-core/src/processing/app/packages/UserLibrary.java b/arduino-core/src/processing/app/packages/UserLibrary.java index c1625b88a01..8a3405269a3 100644 --- a/arduino-core/src/processing/app/packages/UserLibrary.java +++ b/arduino-core/src/processing/app/packages/UserLibrary.java @@ -28,25 +28,12 @@ */ package processing.app.packages; -import static processing.app.I18n.format; -import static processing.app.I18n.tr; - import java.io.File; -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Paths; import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; -import java.util.Optional; - -import com.github.zafarkhaja.semver.Version; +import java.util.Collection; -import cc.arduino.Constants; -import cc.arduino.contributions.VersionHelper; -import cc.arduino.contributions.libraries.ContributedLibraryDependency; -import processing.app.helpers.PreferencesMap; -import processing.app.packages.UserLibraryFolder.Location; +import cc.arduino.cli.commands.Lib.LibraryLayout; +import cc.arduino.cli.commands.Lib.LibraryLocation; public class UserLibrary { @@ -59,130 +46,45 @@ public class UserLibrary { private String website; private String category; private String license; - private List architectures; - private List types = new ArrayList<>(); - private List declaredTypes; + private Collection architectures; + private Collection types = new ArrayList<>(); + private Collection declaredTypes; private boolean onGoingDevelopment; - private List includes; + private Collection includes; protected File installedFolder; - protected Location location; - - public static UserLibrary create(UserLibraryFolder libFolderDesc) throws IOException { - File libFolder = libFolderDesc.folder; - Location location = libFolderDesc.location; - - // Parse metadata - File propertiesFile = new File(libFolder, "library.properties"); - PreferencesMap properties = new PreferencesMap(); - properties.load(propertiesFile); - - // Library sanity checks - // --------------------- - - // Compatibility with 1.5 rev.1 libraries: - // "email" field changed to "maintainer" - if (!properties.containsKey("maintainer") && properties.containsKey("email")) { - properties.put("maintainer", properties.get("email")); - } - - // Compatibility with 1.5 rev.1 libraries: - // "arch" folder no longer supported - File archFolder = new File(libFolder, "arch"); - if (archFolder.isDirectory()) - throw new IOException("'arch' folder is no longer supported! See http://goo.gl/gfFJzU for more information"); - - // Check mandatory properties - for (String p : Constants.LIBRARY_MANDATORY_PROPERTIES) - if (!properties.containsKey(p)) - throw new IOException("Missing '" + p + "' from library"); - - // Check layout - LibraryLayout layout; - File srcFolder = new File(libFolder, "src"); - - if (srcFolder.exists() && srcFolder.isDirectory()) { - // Layout with a single "src" folder and recursive compilation - layout = LibraryLayout.RECURSIVE; - } else { - // Layout with source code on library's root and "utility" folders - layout = LibraryLayout.FLAT; - } - - // Warn if root folder contains development leftovers - File[] files = libFolder.listFiles(); - if (files == null) { - throw new IOException("Unable to list files of library in " + libFolder); - } - - // Extract metadata info - String architectures = properties.get("architectures"); - if (architectures == null) - architectures = "*"; // defaults to "any" - List archs = new ArrayList<>(); - for (String arch : architectures.split(",")) - archs.add(arch.trim()); - - String category = properties.get("category"); - if (category == null) { - category = "Uncategorized"; - } - if (!Constants.LIBRARY_CATEGORIES.contains(category)) { - category = "Uncategorized"; - } - - String license = properties.get("license"); - if (license == null) { - license = "Unspecified"; - } - String types = properties.get("types"); - if (types == null) { - types = "Contributed"; - } - List typesList = new LinkedList<>(); - for (String type : types.split(",")) { - typesList.add(type.trim()); - } - - List includes = null; - if (properties.containsKey("includes") && !properties.get("includes").trim().isEmpty()) { - includes = new ArrayList<>(); - for (String i : properties.get("includes").split(",")) - includes.add(i.trim()); - } - - String declaredVersion = properties.get("version").trim(); - Optional version = VersionHelper.valueOf(declaredVersion); - if (!version.isPresent()) { - System.out.println( - format(tr("Invalid version '{0}' for library in: {1}"), declaredVersion, libFolder.getAbsolutePath())); - } - - UserLibrary res = new UserLibrary(); - res.installedFolder = libFolder; - res.name = properties.get("name").trim(); - res.version = version.isPresent() ? version.get().toString() : declaredVersion; - res.author = properties.get("author").trim(); - res.maintainer = properties.get("maintainer").trim(); - res.sentence = properties.get("sentence").trim(); - res.paragraph = properties.get("paragraph").trim(); - res.website = properties.get("url").trim(); - res.category = category.trim(); - res.license = license.trim(); - res.architectures = archs; - res.layout = layout; - res.declaredTypes = typesList; - res.onGoingDevelopment = Files.exists(Paths.get(libFolder.getAbsolutePath(), Constants.LIBRARY_DEVELOPMENT_FLAG_FILE)); - res.includes = includes; - res.location = location; - return res; + protected LibraryLocation location; + + public UserLibrary(File installedFolder, String name, String version, + String author, String maintainer, String sentence, + String paraghraph, String website, String category, + String license, Collection architectures, + LibraryLayout layout, Collection declaredTypes, + boolean onGoingDevelopment, Collection includes, + LibraryLocation location) { + this.installedFolder = installedFolder; + this.name = name; + this.version = version; + this.author = author; + this.maintainer = maintainer; + this.sentence = sentence; + this.paragraph = paraghraph; + this.website = website; + this.category = category; + this.license = license; + this.architectures = architectures; + this.layout = layout; + this.declaredTypes = declaredTypes; + this.onGoingDevelopment = onGoingDevelopment; + this.includes = includes; + this.location = location; } public String getName() { return name; } - public List getArchitectures() { + public Collection getArchitectures() { return architectures; } @@ -206,11 +108,11 @@ public String getCategory() { return category; } - public List getTypes() { + public Collection getTypes() { return types; } - public void setTypes(List types) { + public void setTypes(Collection types) { this.types = types; } @@ -230,11 +132,7 @@ public String getMaintainer() { return maintainer; } - public List getRequires() { - return null; - } - - public List getDeclaredTypes() { + public Collection getDeclaredTypes() { return declaredTypes; } @@ -242,37 +140,29 @@ public boolean onGoingDevelopment() { return onGoingDevelopment; } - public List getIncludes() { + public Collection getIncludes() { return includes; } - protected enum LibraryLayout { - FLAT, RECURSIVE - } - protected LibraryLayout layout; public File getSrcFolder() { switch (layout) { - case FLAT: + case flat_layout: return installedFolder; - case RECURSIVE: + case recursive_layout: return new File(installedFolder, "src"); default: return null; // Keep compiler happy :-( } } - public boolean useRecursion() { - return (layout == LibraryLayout.RECURSIVE); - } - - public Location getLocation() { + public LibraryLocation getLocation() { return location; } public boolean isIDEBuiltIn() { - return getLocation() == Location.IDE_BUILTIN; + return getLocation().equals(LibraryLocation.ide_builtin); } @Override diff --git a/arduino-core/src/processing/app/packages/UserLibraryFolder.java b/arduino-core/src/processing/app/packages/UserLibraryFolder.java deleted file mode 100644 index 53371a21323..00000000000 --- a/arduino-core/src/processing/app/packages/UserLibraryFolder.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * This file is part of Arduino. - * - * Copyright 2017 Arduino AG (http://www.arduino.cc/) - * - * Arduino is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * As a special exception, you may use this file as part of a free software - * library without restriction. Specifically, if other files instantiate - * templates or use macros or inline functions from this file, or you compile - * this file and link it with other files to produce an executable, this - * file does not by itself cause the resulting executable to be covered by - * the GNU General Public License. This exception does not however - * invalidate any other reasons why the executable file might be covered by - * the GNU General Public License. - */ - -package processing.app.packages; - -import java.io.File; - -public class UserLibraryFolder { - - public enum Location { - SKETCHBOOK, CORE, REFERENCED_CORE, IDE_BUILTIN, - } - - public File folder; - - public Location location; - - public UserLibraryFolder(File folder, Location location) { - this.folder = folder; - this.location = location; - } - -} diff --git a/arduino-core/src/processing/app/packages/UserLibraryPriorityComparator.java b/arduino-core/src/processing/app/packages/UserLibraryPriorityComparator.java index fe64ba1aa6e..313a0ea4d5f 100644 --- a/arduino-core/src/processing/app/packages/UserLibraryPriorityComparator.java +++ b/arduino-core/src/processing/app/packages/UserLibraryPriorityComparator.java @@ -32,16 +32,16 @@ import java.util.HashMap; import java.util.Map; -import processing.app.packages.UserLibraryFolder.Location; +import cc.arduino.cli.commands.Lib.LibraryLocation; public class UserLibraryPriorityComparator implements Comparator { - private final static Map priorities = new HashMap<>(); + private final static Map priorities = new HashMap<>(); static { - priorities.put(Location.SKETCHBOOK, 4); - priorities.put(Location.CORE, 3); - priorities.put(Location.REFERENCED_CORE, 2); - priorities.put(Location.IDE_BUILTIN, 1); + priorities.put(LibraryLocation.user, 4); + priorities.put(LibraryLocation.platform_builtin, 3); + priorities.put(LibraryLocation.referenced_platform_builtin, 2); + priorities.put(LibraryLocation.ide_builtin, 1); } private String arch; diff --git a/build/arduino-cli_0.11.0-rc1-62-g72c9655f_Linux_32bit.tar.gz.sha b/build/arduino-cli_0.11.0-rc1-62-g72c9655f_Linux_32bit.tar.gz.sha new file mode 100644 index 00000000000..acf37ff33c1 --- /dev/null +++ b/build/arduino-cli_0.11.0-rc1-62-g72c9655f_Linux_32bit.tar.gz.sha @@ -0,0 +1 @@ +b7983aec0711548a31880fc3349f3aa9b9cf257c diff --git a/build/arduino-cli_0.11.0-rc1-62-g72c9655f_Linux_64bit.tar.gz.sha b/build/arduino-cli_0.11.0-rc1-62-g72c9655f_Linux_64bit.tar.gz.sha new file mode 100644 index 00000000000..63c07a861fb --- /dev/null +++ b/build/arduino-cli_0.11.0-rc1-62-g72c9655f_Linux_64bit.tar.gz.sha @@ -0,0 +1 @@ +d1a985649285e55df0cb97745895be313e905252 diff --git a/build/arduino-cli_0.11.0-rc1-62-g72c9655f_Linux_ARM64.tar.gz.sha b/build/arduino-cli_0.11.0-rc1-62-g72c9655f_Linux_ARM64.tar.gz.sha new file mode 100644 index 00000000000..1bbccf9eff3 --- /dev/null +++ b/build/arduino-cli_0.11.0-rc1-62-g72c9655f_Linux_ARM64.tar.gz.sha @@ -0,0 +1 @@ +9afbd0999d8ff0e54fe6210b159ded52cd46a652 diff --git a/build/arduino-cli_0.11.0-rc1-62-g72c9655f_Linux_ARMv7.tar.gz.sha b/build/arduino-cli_0.11.0-rc1-62-g72c9655f_Linux_ARMv7.tar.gz.sha new file mode 100644 index 00000000000..1ac415de04f --- /dev/null +++ b/build/arduino-cli_0.11.0-rc1-62-g72c9655f_Linux_ARMv7.tar.gz.sha @@ -0,0 +1 @@ +36b183a4e71d7742ebf348a951ff75f143c9bb3a diff --git a/build/arduino-cli_0.11.0-rc1-62-g72c9655f_Windows_32bit.zip.sha b/build/arduino-cli_0.11.0-rc1-62-g72c9655f_Windows_32bit.zip.sha new file mode 100644 index 00000000000..4be767439fe --- /dev/null +++ b/build/arduino-cli_0.11.0-rc1-62-g72c9655f_Windows_32bit.zip.sha @@ -0,0 +1 @@ +683d55bf3b6e770c0ad218d5753825e373cb3c58 diff --git a/build/arduino-cli_0.11.0-rc1-62-g72c9655f_macOS_64bit.tar.gz.sha b/build/arduino-cli_0.11.0-rc1-62-g72c9655f_macOS_64bit.tar.gz.sha new file mode 100644 index 00000000000..da003362e7c --- /dev/null +++ b/build/arduino-cli_0.11.0-rc1-62-g72c9655f_macOS_64bit.tar.gz.sha @@ -0,0 +1 @@ +224f2927b91ddc5b124044e5c83614d478622690 diff --git a/build/build.xml b/build/build.xml index 3936b7b3375..17540477265 100644 --- a/build/build.xml +++ b/build/build.xml @@ -25,6 +25,13 @@ + + + + + + + @@ -100,6 +107,7 @@ + @@ -111,7 +119,9 @@ + + @@ -492,6 +502,7 @@ + @@ -714,6 +725,7 @@ + @@ -756,6 +768,7 @@ + @@ -774,6 +787,7 @@ + @@ -792,6 +806,7 @@ + @@ -840,6 +855,20 @@ + + + + + + + + + + + + + + @@ -1089,12 +1118,27 @@ + + + + + + + + + + + + + + + diff --git a/build/update_arduino_cli.sh b/build/update_arduino_cli.sh new file mode 100755 index 00000000000..cadf24450f1 --- /dev/null +++ b/build/update_arduino_cli.sh @@ -0,0 +1,20 @@ +#!/bin/bash -ex + +VERSION=$1 +if [ -z $VERSION ]; then + echo Please specify an arduino-cli version + exit 1 +fi + +git rm arduino-cli*.sha -f +rm -f arduino-cli_${VERSION}* + +for VARIANT in Linux_32bit.tar.gz Linux_64bit.tar.gz Linux_ARM64.tar.gz macOS_64bit.tar.gz Linux_ARMv7.tar.gz Windows_32bit.zip; do + wget https://downloads.arduino.cc/arduino-cli/arduino-cli_${VERSION}_${VARIANT} + shasum arduino-cli_${VERSION}_${VARIANT} | cut -d " " -f 1 > arduino-cli_${VERSION}_${VARIANT}.sha + git add arduino-cli_${VERSION}_${VARIANT}.sha +done + +sed -i "s/\\(ARDUINO-CLI-VERSION\" value=\\)\"\\(.*\\)\"/\\1\"${VERSION}\"/" build.xml +git add build.xml +