index
int64
repo_id
string
file_path
string
content
string
0
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform/functions/TransformerFunctionUrlDecode.java
package ai.bizone.jsontransform.functions; import ai.bizone.jsontransform.functions.common.*; import ai.bizone.jsontransform.functions.common.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import java.util.Map; public class TransformerFunctionUrlDecode extends TransformerFunction { static final Logger log = LoggerFactory.getLogger(TransformerFunctionUrlDecode.class); public TransformerFunctionUrlDecode() { super(FunctionDescription.of( Map.of( "charset", ArgumentType.of(ArgType.String).position(0).defaultValue("UTF-8") ) )); } @Override public Object apply(FunctionContext context) { var str = context.getString(null); if (str == null) { return null; } try { var charset = context.getEnum("charset"); return URLDecoder.decode(str, charset); } catch (UnsupportedEncodingException e) { log.warn(context.getAlias() + " failed", e); return null; } } }
0
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform/functions/TransformerFunctionUrlEncode.java
package ai.bizone.jsontransform.functions; import ai.bizone.jsontransform.functions.common.*; import ai.bizone.jsontransform.functions.common.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import java.util.Map; public class TransformerFunctionUrlEncode extends TransformerFunction { static final Logger log = LoggerFactory.getLogger(TransformerFunctionUrlEncode.class); public TransformerFunctionUrlEncode() { super(FunctionDescription.of( Map.of( "charset", ArgumentType.of(ArgType.String).position(0).defaultValue("UTF-8") ) )); } @Override public Object apply(FunctionContext context) { var str = context.getString(null); if (str == null) { return null; } try { var charset = context.getEnum("charset"); return URLEncoder.encode(str, charset); } catch (UnsupportedEncodingException e) { log.warn(context.getAlias() + " failed", e); return null; } } }
0
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform/functions/TransformerFunctionUuid.java
package ai.bizone.jsontransform.functions; import ai.bizone.jsontransform.functions.common.*; import ai.bizone.jsontransform.functions.common.*; import ai.bizone.shortuuid.ShortUuid; import ai.bizone.shortuuid.UuidConverter; import java.util.Map; import java.util.UUID; public class TransformerFunctionUuid extends TransformerFunction { public TransformerFunctionUuid() { super(FunctionDescription.of( Map.of( "format", ArgumentType.of(ArgType.String).position(0).defaultValue("CANONICAL"), "namespace", ArgumentType.of(ArgType.String).position(1) ) )); } @Override public Object apply(FunctionContext context) { var value = context.getUnwrapped(null); if (value == null) { return null; } var format = context.getEnum("format"); if ("V3".equals(format) || "V5".equals(format)) { var name = context.getAsString(value); var namespaceValue = context.get("namespace"); var namespace = namespaceValue == null ? null : namespaceValue instanceof UUID uu ? uu : UUID.fromString(context.getAsString(namespaceValue)); return UuidConverter.namedByVersion("V3".equals(format) ? 3 : 5, namespace, name).toString(); } var uuid = value instanceof UUID uu ? uu : UUID.fromString(context.getAsString(value)); return switch (format) { case "N", "NO_HYPHENS" -> uuid.toString().replace("-", ""); case "B62", "BASE62" -> ShortUuid.toShortUuid(uuid, true); case "B64", "BASE64" -> UuidConverter.toBase64(uuid); case "B36", "BASE36" -> ShortUuid.toShortUuid(uuid, false); default -> uuid.toString(); }; } }
0
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform/functions/TransformerFunctionValue.java
package ai.bizone.jsontransform.functions; import ai.bizone.jsontransform.functions.common.FunctionContext; import ai.bizone.jsontransform.functions.common.TransformerFunction; import ai.bizone.jsontransform.JsonElementStreamer; /* * For tests * * @see TransformerFunctionValueTest */ public class TransformerFunctionValue extends TransformerFunction { public TransformerFunctionValue() { super(); } @Override public Object apply(FunctionContext context) { var result = context.get(null, true); if (result instanceof JsonElementStreamer streamer) { result = streamer.toJsonArray(); } if (context.getAdapter().isTruthy(result)) { return result; } return null; } }
0
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform/functions/TransformerFunctionWrap.java
package ai.bizone.jsontransform.functions; import ai.bizone.jsontransform.functions.common.*; import ai.bizone.jsontransform.functions.common.*; import java.util.Map; import java.util.Optional; public class TransformerFunctionWrap extends TransformerFunction { public TransformerFunctionWrap() { super(FunctionDescription.of( Map.of( "prefix", ArgumentType.of(ArgType.String).position(0).defaultValue(""), "suffix", ArgumentType.of(ArgType.String).position(1).defaultValue("") ) )); } @Override public Object apply(FunctionContext context) { var res = context.getString(null); if (res == null) return null; return Optional.ofNullable(context.getString("prefix")).orElse("") + res + Optional.ofNullable(context.getString("suffix")).orElse(""); } }
0
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform/functions/TransformerFunctionXml.java
package ai.bizone.jsontransform.functions; import ai.bizone.jsontransform.functions.common.*; import ai.bizone.jsontransform.functions.common.*; import ai.bizone.jsontransform.formats.xml.XmlFormat; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.Map; public class TransformerFunctionXml extends TransformerFunction { static final Logger logger = LoggerFactory.getLogger(TransformerFunctionXml.class); public TransformerFunctionXml() { super(FunctionDescription.of( Map.of( "root", ArgumentType.of(ArgType.String).position(0), "xslt", ArgumentType.of(ArgType.String).position(1), "indent", ArgumentType.of(ArgType.Boolean).position(2).defaultValue(false) ) )); } @Override public Object apply(FunctionContext context) { var obj = context.getJsonElement(null); if (obj == null) return null; try { var rootName = context.getString("root"); // TODO: how to create the format once? var xml = new XmlFormat(context.getAdapter()).obj2xml(obj, rootName); var xslt = context.getString("xslt"); if (xslt != null && !xslt.isBlank()) { var transformer = XmlFormat.createXSLTTransformer(xslt); xml = XmlFormat.xmlTransform(xml, transformer); } if (context.getBoolean("indent")) { xml = XmlFormat.indentXml(xml); } return xml; } catch (Exception e) { logger.warn(context.getAlias() + " failed", e); return null; } } }
0
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform/functions/TransformerFunctionXmlParse.java
package ai.bizone.jsontransform.functions; import ai.bizone.jsontransform.functions.common.*; import ai.bizone.jsontransform.functions.common.*; import ai.bizone.jsontransform.formats.xml.XmlFormat; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.Map; import java.util.stream.Collectors; public class TransformerFunctionXmlParse extends TransformerFunction { static final Logger logger = LoggerFactory.getLogger(TransformerFunctionXmlParse.class); public TransformerFunctionXmlParse() { super(FunctionDescription.of( Map.of( "keep_strings", ArgumentType.of(ArgType.Boolean).position(0).defaultValue(false), "cdata_tag_name", ArgumentType.of(ArgType.String).position(1).defaultValue("$content"), "convert_nil_to_null", ArgumentType.of(ArgType.Boolean).position(2).defaultValue(false), "force_list", ArgumentType.of(ArgType.Array).position(3) ) )); } @Override public Object apply(FunctionContext context) { var xml = context.getString(null); if (xml == null) return null; try { var keepStrings = context.getBoolean("keep_strings"); var cDataTagName = context.getString("cdata_tag_name"); var convertNilAttributeToNull = context.getBoolean("convert_nil_to_null"); var forceList = context.getJsonArray("force_list"); var adapter = context.getAdapter(); return new XmlFormat(adapter, null, keepStrings, cDataTagName, convertNilAttributeToNull, null, forceList == null ? null : adapter.stream(forceList) .map(context::getAsString) .collect(Collectors.toSet()) ).deserialize(xml); } catch (Exception e) { logger.warn(context.getAlias() + " failed", e); return null; } } }
0
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform/functions/TransformerFunctionXor.java
package ai.bizone.jsontransform.functions; import ai.bizone.jsontransform.functions.common.FunctionContext; import ai.bizone.jsontransform.functions.common.TransformerFunction; public class TransformerFunctionXor extends TransformerFunction { public TransformerFunctionXor() { super(); } @Override public Object apply(FunctionContext context) { var value = context.getJsonElementStreamer(null); var adapter = context.getAdapter(); return value.stream().filter(adapter::isTruthy).count() == 1; } }
0
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform/functions/TransformerFunctionYaml.java
package ai.bizone.jsontransform.functions; import ai.bizone.jsontransform.functions.common.FunctionContext; import ai.bizone.jsontransform.functions.common.TransformerFunction; import ai.bizone.jsontransform.formats.yaml.YamlFormat; public class TransformerFunctionYaml extends TransformerFunction { public TransformerFunctionYaml() { super(); } @Override public Object apply(FunctionContext context) { return new YamlFormat(context.getAdapter()).serialize(context.getUnwrapped(null, true)); } }
0
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform/functions/TransformerFunctionYamlParse.java
package ai.bizone.jsontransform.functions; import ai.bizone.jsontransform.functions.common.FunctionContext; import ai.bizone.jsontransform.functions.common.TransformerFunction; import ai.bizone.jsontransform.formats.yaml.YamlFormat; public class TransformerFunctionYamlParse extends TransformerFunction { public TransformerFunctionYamlParse() { super(); } @Override public Object apply(FunctionContext context) { return new YamlFormat(context.getAdapter()).deserialize(context.getString(null)); } }
0
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform/functions
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform/functions/common/ArgType.java
package ai.bizone.jsontransform.functions.common; /** * The type of argument that a function can accept or return. */ public enum ArgType { Boolean, String, Number, Array, Object, Any }
0
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform/functions
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform/functions/common/ArgumentType.java
package ai.bizone.jsontransform.functions.common; public class ArgumentType { public ArgType type; public int position = -1; public Object defaultValue = null; public static ArgumentType of(ArgType type) { var arg = new ArgumentType(); arg.type = type; return arg; } public ArgumentType position(int position) { this.position = position; return this; } public ArgumentType defaultValue(Object defaultValue) { this.defaultValue = defaultValue; return this; } }
0
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform/functions
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform/functions/common/CompareBy.java
package ai.bizone.jsontransform.functions.common; import ai.bizone.jsontransform.adapters.JsonAdapter; import java.util.Comparator; import java.util.List; public class CompareBy { public List<Object> by; public Object value; public CompareBy(Object value) { this.value = value; } public static Comparator<CompareBy> createByComparator( JsonAdapter<?, ?, ?> adapter, int index, String type) { Comparator<CompareBy> comparator; if (type == null || "AUTO".equalsIgnoreCase(type)) { comparator = (CompareBy a, CompareBy b) -> { var result = adapter.compareTo(a.by.get(index), b.by.get(index)); if (result == null) return 0; return result; }; } else { comparator = switch (type.toUpperCase()) { case "NUMBER" -> Comparator.comparing((CompareBy tup) -> adapter.getNumberAsBigDecimal(tup.by.get(index))); case "BOOLEAN" -> Comparator.comparing((CompareBy tup) -> adapter.getBoolean(tup.by.get(index))); //case "STRING" default -> Comparator.comparing((CompareBy tup) -> { var val = tup.by.get(index); // null keys and empty string are treated the same return adapter.isNull(val) ? "" : adapter.getAsString(val); }); }; } return comparator; } }
0
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform/functions
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform/functions/common/FunctionContext.java
package ai.bizone.jsontransform.functions.common; import ai.bizone.jsontransform.JsonTransformerUtils; import ai.bizone.jsontransform.ParameterResolver; import ai.bizone.jsontransform.adapters.JsonAdapter; import ai.bizone.jsontransform.JsonElementStreamer; import ai.bizone.jsontransform.JsonTransformerFunction; import java.math.BigDecimal; import java.util.Map; import java.util.Objects; import java.util.stream.Collectors; public abstract class FunctionContext { protected final String CONTEXT_KEY = "context"; protected final String DOUBLE_HASH_CURRENT = "##current"; protected final String DOUBLE_HASH_INDEX = "##index"; protected final String DOLLAR = "$"; protected final String path; /** * The function's name as it appeared in the transformer (e.g. "$$filter") */ protected final String alias; protected final TransformerFunction function; protected final ParameterResolver resolver; protected final JsonTransformerFunction extractor; protected final JsonAdapter<?, ?, ?> adapter; public FunctionContext(String path, JsonAdapter<?, ?, ?> jsonAdapter, String alias, TransformerFunction function, ParameterResolver resolver, JsonTransformerFunction extractor, Object definition) { this.adapter = jsonAdapter; this.path = path; this.alias = alias; this.function = function; this.extractor = extractor; if (definition == null) { this.resolver = resolver; } else { this.resolver = recalcResolver(definition, resolver, extractor); } } public FunctionContext(String path, JsonAdapter<?, ?, ?> jsonAdapter, String alias, TransformerFunction function, ParameterResolver resolver, JsonTransformerFunction extractor) { this(path, jsonAdapter, alias, function, resolver, extractor, null); } private ParameterResolver recalcResolver(Object definition, ParameterResolver resolver, JsonTransformerFunction extractor) { if (adapter.has(definition, CONTEXT_KEY)) { var contextElement = adapter.get(definition, CONTEXT_KEY); if (adapter.isJsonObject(contextElement)) { var addCtx = adapter.entrySet(contextElement).stream().collect( Collectors.toMap( Map.Entry::getKey, kv -> adapter.getDocumentContext(extractor.transform(path + JsonTransformerUtils.toObjectFieldPath(adapter, kv.getKey()),kv.getValue(), resolver, false)) ) ); return name -> { for (var key : addCtx.keySet()) { if (pathOfVar(key, name)) { return addCtx.get(key).read(DOLLAR + name.substring(key.length())); } } return resolver.get(name); }; } } return resolver; } /** * Check if the specified path is of the specified variable * @param var variable name * @param path path to check * @return true if the path is of the variable */ public static boolean pathOfVar(String var, String path){ return Objects.equals(path, var) || path.startsWith(var + ".") || path.startsWith(var + "["); } public String getAlias() { return alias; } public String getPath() { return alias; } public ParameterResolver getResolver() { return resolver; } public abstract boolean has(String name); public abstract Object get(String name, boolean transform); public Object get(String name) { return get(name, true); } public String getPathFor(String name) { return this.path; } public String getPathFor(int index) { return this.path + "[" + index + "]"; } public JsonAdapter<?,?,?> getAdapter() { return adapter; } public String getAsString(Object value) { return adapter.getAsString(value); } public Object getUnwrapped(String name, boolean reduceBigDecimals) { var value = get(name, true); if (value instanceof JsonElementStreamer streamer) { value = streamer.toJsonArray(); } return adapter.unwrap(value, reduceBigDecimals); } public Object getUnwrapped(String name) { return getUnwrapped(name, false); } public Object getJsonElement(String name, boolean transform) { var value = get(name, transform); if (value instanceof JsonElementStreamer streamer) { value = streamer.toJsonArray(); } return adapter.wrap(value); } public Object getJsonElement(String name) { return getJsonElement(name, true); } public Boolean getBoolean(String name, boolean transform) { var value = get(name, transform); if (value == null) { return null; } if (value instanceof Boolean b) { return b; } var str = getAsString(value); if (str == null) return null; return Boolean.parseBoolean(str.trim()); } public Boolean getBoolean(String name) { return getBoolean(name, true); } public String getString(String name, boolean transform) { var value = get(name, transform); if (value == null) { return null; } if (value instanceof JsonElementStreamer streamer) { value = streamer.toJsonArray(); } return getAsString(value); } public String getString(String name) { return getString(name, true); } public String getEnum(String name, boolean transform) { var value = getString(name, transform); if (value == null) return null; return value.trim().toUpperCase(); } public String getEnum(String name) { return getEnum(name, true); } public Integer getInteger(String name, boolean transform) { var value = get(name, transform); if (value == null) { return null; } if (value instanceof Number n) { return n.intValue(); } if (adapter.isJsonNumber(value)) { return adapter.getNumber(value).intValue(); } var str = getAsString(value); if (str == null) return null; str = str.trim(); if (str.isEmpty()) return null; return new BigDecimal(str).intValue(); } public Integer getInteger(String name){ return getInteger(name, true); } public Long getLong(String name, boolean transform) { var value = get(name, transform); if (value == null) { return null; } if (value instanceof Number n) { return n.longValue(); } if (adapter.isJsonNumber(value)) { return adapter.getNumber(value).longValue(); } var str = getAsString(value); if (str == null) return null; str = str.trim(); if (str.isEmpty()) return null; return new BigDecimal(str).longValue(); } public Long getLong(String name){ return getLong(name, true); } public BigDecimal getBigDecimal(String name, boolean transform) { var value = get(name, transform); if (value == null) { return null; } if (value instanceof BigDecimal b) { return b; } if (adapter.isJsonNumber(value)) { return adapter.getNumberAsBigDecimal(value); } var str = getAsString(value); if (str == null) return null; str = str.trim(); if (str.isEmpty()) return null; return new BigDecimal(str); } public BigDecimal getBigDecimal(String name){ return getBigDecimal(name, true); } public Object getJsonArray(String name, boolean transform) { var value = get(name, transform); if (value instanceof JsonElementStreamer jes) { return jes.toJsonArray(); } var el = adapter.wrap(value); if (!adapter.isJsonArray(el)) return null; return el; } public Object getJsonArray(String name) { return getJsonArray(name, true); } /** * Use this method instead of getJsonArray if you plan on iterating over the array * The pros of using this method are * - That it will not transform all the array to a single (possibly huge) array in memory * - It lazy transforms the array elements, so if there is short-circuiting, some transformations might be prevented * @return JsonElementStreamer */ public JsonElementStreamer getJsonElementStreamer(String name) { var transformed = false; var value = get(name, false); if (value instanceof JsonElementStreamer jes) { return jes; } // in case val is already an array we don't transform it to prevent evaluation of its result values // so if is not an array, we must transform it and check after-wards (not lazy anymore) if (!adapter.isJsonArray(value)) { value = extractor.transform(getPathFor(name), adapter.wrap(value), resolver, true); if (value instanceof JsonElementStreamer jes) { return jes; } transformed = true; } // check if initially or after transformation we got an array if (adapter.isJsonArray(value)) { return JsonElementStreamer.fromJsonArray(this, value, transformed); } return null; } // TODO: replace this with something public Object transform(Object definition){ return extractor.transform(path, definition, resolver, false); } public Object transform(String path, Object definition){ return extractor.transform(path, definition, resolver, false); } public Object transform(String path, Object definition, boolean allowReturningStreams){ return extractor.transform(path, definition, resolver, allowReturningStreams); } public Object transformItem(Object definition, Object current) { var currentContext = adapter.getDocumentContext(current); ParameterResolver itemResolver = name -> pathOfVar(DOUBLE_HASH_CURRENT, name) ? currentContext.read(DOLLAR + name.substring(9)) : resolver.get(name); return extractor.transform("$", definition, itemResolver, false); } public Object transformItem(Object definition, Object current, Integer index) { var currentContext = adapter.getDocumentContext(current); ParameterResolver itemResolver = name -> DOUBLE_HASH_INDEX.equals(name) ? adapter.wrap(index) : pathOfVar(DOUBLE_HASH_CURRENT, name) ? currentContext.read(DOLLAR + name.substring(9)) : resolver.get(name); return extractor.transform("$", definition, itemResolver, false); } public Object transformItem(Object definition, Object current, Integer index, String additionalName, Object additional) { var currentContext = adapter.getDocumentContext(current); var additionalContext = adapter.getDocumentContext(additional); ParameterResolver itemResolver = name -> DOUBLE_HASH_INDEX.equals(name) ? adapter.wrap(index) : pathOfVar(DOUBLE_HASH_CURRENT, name) ? currentContext.read(DOLLAR + name.substring(9)) : pathOfVar(additionalName, name) ? additionalContext.read(DOLLAR + name.substring(additionalName.length())) : resolver.get(name); return extractor.transform("$", definition, itemResolver, false); } public Object transformItem(Object definition, Object current, Integer index, Map<String, Object> additionalContexts) { var currentContext = adapter.getDocumentContext(current); var addCtx = additionalContexts.keySet().stream().collect( Collectors.toMap(key -> key, key -> adapter.getDocumentContext(additionalContexts.get(key)))); ParameterResolver itemResolver = name -> { if (DOUBLE_HASH_INDEX.equals(name)) return adapter.wrap(index); if (pathOfVar(DOUBLE_HASH_CURRENT, name)) return currentContext.read("$" + name.substring(9)); for (var key : additionalContexts.keySet()) { if (pathOfVar(key, name)) { return addCtx.get(key).read(DOLLAR + name.substring(key.length())); } } return resolver.get(name); }; return extractor.transform("$", definition, itemResolver, false); } }
0
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform/functions
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform/functions/common/FunctionDescription.java
package ai.bizone.jsontransform.functions.common; import java.util.Map; public class FunctionDescription { private final Map<String, ArgumentType> arguments; FunctionDescription(Map<String, ArgumentType> arguments) { this.arguments = arguments; } public static FunctionDescription of(Map<String, ArgumentType> arguments) { return new FunctionDescription(arguments); } public Map<String, ArgumentType> getArguments() { return arguments; } }
0
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform/functions
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform/functions/common/FunctionHelpers.java
package ai.bizone.jsontransform.functions.common; import ai.bizone.jsontransform.adapters.JsonAdapter; import java.math.BigDecimal; import java.math.MathContext; import java.math.RoundingMode; import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; import java.util.Comparator; import java.util.Locale; import java.util.function.Supplier; public class FunctionHelpers { public static Locale DEFAULT_LOCALE = Locale.US; // analog to en-US public static int NO_SCALE = -1; // We try to fit into Decimal128 which supports 34 decimal digits of precision // so in principle, we allow 19 digits for the whole number and 15 for the fraction public static int MAX_SCALE = 15; public static RoundingMode MAX_SCALE_ROUNDING = RoundingMode.HALF_UP; public static MathContext DEFAULT_MATH_CONTEXT = new MathContext(34, MAX_SCALE_ROUNDING); public static boolean isNullOrEmpty(String value) { return value == null || value.isEmpty(); } public static DecimalFormat getDecimalFormatter(Locale locale, String pattern, String groupingSymbol, String decimalSymbol) { DecimalFormatSymbols symbols; var noGrouping = isNullOrEmpty(groupingSymbol); var noDecimal = isNullOrEmpty(decimalSymbol); if (noGrouping && noDecimal) { symbols = DecimalFormatSymbols.getInstance(locale); } else { symbols = new DecimalFormatSymbols(locale); if (!noGrouping) { symbols.setGroupingSeparator(groupingSymbol.charAt(0)); } if (!noDecimal) { symbols.setDecimalSeparator(decimalSymbol.charAt(0)); } } return new DecimalFormat(pattern, symbols); } public static Object nullableBigDecimalJsonPrimitive(JsonAdapter<?, ?, ?> adapter, Supplier<BigDecimal> numberSupplier) { BigDecimal number; try { number = numberSupplier.get(); } catch (NumberFormatException e) { number = null; } return number == null ? adapter.jsonNull() : adapter.wrap(number); } public static Comparator<Object> createComparator(JsonAdapter<?, ?, ?> adapter, String type) { return type == null || "AUTO".equals(type) ? adapter.comparator() : switch (type) { case "NUMBER" -> Comparator.comparing(adapter::getNumberAsBigDecimal); case "BOOLEAN" -> Comparator.comparing(adapter::getBoolean); //case "string" default -> Comparator.comparing(adapter::getAsString); }; } }
0
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform/functions
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform/functions/common/InlineFunctionContext.java
package ai.bizone.jsontransform.functions.common; import ai.bizone.jsontransform.JsonTransformerFunction; import ai.bizone.jsontransform.ParameterResolver; import ai.bizone.jsontransform.adapters.JsonAdapter; import java.util.ArrayList; public class InlineFunctionContext extends FunctionContext { protected final String stringInput; protected final ArrayList<Object> args; public InlineFunctionContext(String path, String input, ArrayList<Object> args, JsonAdapter<?, ?, ?> jsonAdapter, String functionKey, TransformerFunction function, ParameterResolver resolver, JsonTransformerFunction extractor) { super(path, jsonAdapter, functionKey, function, resolver, extractor, null); this.stringInput = input; this.args = args; } @Override public boolean has(String name) { var argument = function.getArgument(name); return name == null || (argument != null && argument.position > -1 && args != null && args.size() > argument.position); } @Override public Object get(String name, boolean transform) { var argument = function.getArgument(name); if (name != null && (argument == null || argument.position < 0 || args == null || args.size() <= argument.position)) { return function.getDefaultValue(name); } var argValue = name == null ? stringInput : args.get(argument.position); if (argValue instanceof String s && transform) { return extractor.transform(getPathFor(name), adapter.wrap(s), resolver, true); } if (adapter.is(argValue)) { return transform ? extractor.transform(getPathFor(name), argValue, resolver, true) : argValue; } return argValue; } @Override public String getPathFor(String name) { return path + (name == null ? "" : "(" + name + ")"); } }
0
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform/functions
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform/functions/common/InlineFunctionTokenizer.java
package ai.bizone.jsontransform.functions.common; import java.util.ArrayList; import java.util.List; import java.util.Map; public class InlineFunctionTokenizer { public record InlineFunctionArgToken(String value, int index, int length) { } public record TokenizedInlineFunction(String name, int keyLength, List<InlineFunctionArgToken> args, InlineFunctionArgToken input) { } private static final Map<Character, String> JSON_ESCAPE_CHARACTERS = Map.of( 'b', "\b", 'f', "\f", 'n', "\n", 'r', "\r", 't', "\t", 'v', "\u000B" // vertical tab ); public static TokenizedInlineFunction tokenize(String input) { if (input == null || !input.startsWith("$$")) { return null; } int i = 2; int len = input.length(); int nameStart = i; while (i < len && Character.toString(input.charAt(i)).matches("[\\w-]")) { i++; } String functionName = input.substring(nameStart, i); if (functionName.isEmpty()) { return null; // syntax error, no function name found } int keyLength = i; List<InlineFunctionArgToken> args = null; if (i < len && input.charAt(i) == '(') { i++; args = new ArrayList<>(); StringBuilder current = new StringBuilder(); int currentStart = i; boolean inQuote = false; boolean escape = false; boolean finished = false; for (; i < len; i++) { char ch = input.charAt(i); if (escape) { String escapedChar = JSON_ESCAPE_CHARACTERS.get(ch); if (escapedChar == null) { if (ch == 'u' || ch == 'x') { try { int width = ch == 'u' ? 4 : 2; String hex = input.substring(i + 1, i + 1 + width); int codePoint = Integer.parseInt(hex, 16); escapedChar = new String(Character.toChars(codePoint)); i += width; } catch (Exception e) { return null; } } else { escapedChar = String.valueOf(ch); } } current.append(escapedChar); escape = false; continue; } if (ch == '\\' && inQuote) { escape = true; continue; } if (ch == '\'') { if (inQuote) { while (i + 1 < len && input.charAt(i + 1) == ' ') { i++; } } else if (current.toString().trim().isEmpty()) { current.setLength(0); } inQuote = !inQuote; continue; } if (!inQuote && (ch == ',' || ch == ')')) { int length = i - currentStart; args.add(new InlineFunctionArgToken(length > 0 ? current.toString() : null, currentStart, length)); current.setLength(0); currentStart = i + 1; if (ch == ')') { i++; finished = true; break; } } else { current.append(ch); } } if (!finished || (i < len && input.charAt(i) != ':')) { return null; } } InlineFunctionArgToken fnInput = null; if (i < len && input.charAt(i) == ':') { i++; String inputValue = input.substring(i); fnInput = new InlineFunctionArgToken(inputValue, i, input.length() - i); } return new TokenizedInlineFunction(functionName, keyLength, args, fnInput); } }
0
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform/functions
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform/functions/common/ObjectFunctionContext.java
package ai.bizone.jsontransform.functions.common; import ai.bizone.jsontransform.JsonTransformerUtils; import ai.bizone.jsontransform.JsonTransformerFunction; import ai.bizone.jsontransform.ParameterResolver; import ai.bizone.jsontransform.adapters.JsonAdapter; public class ObjectFunctionContext extends FunctionContext { private final Object definition; public ObjectFunctionContext(String path, Object definition, JsonAdapter<?, ?, ?> adapter, String functionKey, TransformerFunction function, ParameterResolver resolver, JsonTransformerFunction extractor) { super(path, adapter, functionKey, function, resolver, extractor, definition); this.definition = definition; } @Override public boolean has(String name) { return adapter.has(definition, name); } @Override public Object get(String name, boolean transform) { var el = adapter.get(definition, name == null ? alias : name); if (adapter.isNull(el)) { return function.getDefaultValue(name); } return transform ? extractor.transform(getPathFor(name), el, resolver, true) : el; } @Override public String getPathFor(String name) { return path + JsonTransformerUtils.toObjectFieldPath(adapter, name == null ? getAlias() : name); } }
0
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform/functions
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform/functions/common/TransformerFunction.java
package ai.bizone.jsontransform.functions.common; import java.util.Collections; import java.util.HashMap; import java.util.Map; /** * Base class for all transformer functions. */ public abstract class TransformerFunction { private final Map<String, Object> defaultValues; private final FunctionDescription description; public TransformerFunction(FunctionDescription description) { this.description = description; this.defaultValues = new HashMap<>(); var args = description.getArguments(); for (var arg : args.keySet()) { this.defaultValues.put(arg, args.get(arg).defaultValue); } } public TransformerFunction() { this(FunctionDescription.of(Collections.emptyMap())); } /** * Apply the function to the given context. * @param context the context * @return the result of the function */ public abstract Object apply(FunctionContext context); /** * Get the argument type for the given name. * @param name the name of the argument (null will return the primary argument) * @return the argument type or null if not found */ public ArgumentType getArgument(String name) { if (name == null) return null; return description.getArguments().get(name); } /** * Get the arguments for this function. * @return the function arguments */ public Map<String, ArgumentType> getArguments() { return description.getArguments(); } /** * Get the default value for the given argument name. * @param name the argument name * @return the default value or null if not found */ public Object getDefaultValue(String name) { if (name == null) return null; return defaultValues.get(name); } }
0
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform/manipulation/JsonPatch.java
package ai.bizone.jsontransform.manipulation; import ai.bizone.jsontransform.adapters.JsonAdapter; /** * JavaScript Object Notation (JSON) Patch (RFC-6902) implementation * over a generic JSON implementation */ public class JsonPatch { private final JsonAdapter<?, ?, ?> adapter; private final JsonPointer jsonPointer; public JsonPatch(JsonAdapter<?, ?, ?> adapter) { this.adapter = adapter; this.jsonPointer = new JsonPointer(adapter); } public Object patch(Object ops, Object source) { if (!adapter.isJsonObject(source) && !adapter.isJsonArray(ops)) { throw new IllegalArgumentException("Invalid source argument (an object or array is required)"); } if (ops == null || adapter.size(ops) == 0) { return source; } var result = adapter.clone(source); for (var operation : adapter.asIterable(ops)) { if (!adapter.isJsonObject(operation)) { throw new IllegalArgumentException("Invalid operation: " + operation); } result = perform(operation, result); } return result; } private Object getRequiredValueArgument(Object operation, String context) { if (!adapter.has(operation, "value")) { throw new IllegalArgumentException(context + " - Missing argument \"value\""); } return adapter.get(operation, "value"); } private String getRequiredStringArgument(Object operation, String arg, String context) { var el = adapter.get(operation, arg); if (!adapter.isJsonString(el)) { throw new IllegalArgumentException(context + " - Invalid argument \"" + arg + "\" = " + (el == null ? "null" : el)); } return adapter.getAsString(el); } private String getRequiredPathArgument(Object operation, String arg, String context) { var path = getRequiredStringArgument(operation, arg, context); if (!path.isEmpty() && path.charAt(0) != '/') { throw new IllegalArgumentException(context + " - Invalid argument \"" + arg + "\" = " + path); } return path; } private Object perform(Object operation, Object doc) { var op = getRequiredStringArgument(operation, "op", "JsonPatch.perform"); var path = getRequiredPathArgument(operation, "path", op); var result = doc; switch (op) { case "add" -> { var value = getRequiredValueArgument(operation, op); result = jsonPointer.set(doc, path, value, true); } case "remove" -> { var pathValue = jsonPointer.get(doc, path); if (pathValue == null) { throw new RuntimeException("remove - Path location MUST exist"); } jsonPointer.remove(doc, path); } case "replace" -> { var value = getRequiredValueArgument(operation, op); if (jsonPointer.get(doc, path) == null) { throw new RuntimeException("replace - Target location MUST exist"); } result = jsonPointer.set(doc, path, value); } case "move" -> { String from = getRequiredPathArgument(operation, "from", op); var fromValue = jsonPointer.get(doc, from); if (fromValue == null) { throw new RuntimeException("move - From location MUST exist"); } jsonPointer.remove(doc, from); result = jsonPointer.set(doc, path, fromValue, true); } case "copy" -> { var from = getRequiredPathArgument(operation, "from", op); var fromValue = jsonPointer.get(doc, from); if (fromValue == null) { throw new RuntimeException("copy - From location MUST exist"); } result = jsonPointer.set(doc, path, fromValue, true); } case "test" -> { var value = getRequiredValueArgument(operation, op); if (!adapter.areEqual(jsonPointer.get(doc, path), value)) { throw new RuntimeException("test - The value does not equal value from path"); } } default -> throw new IllegalArgumentException("Invalid argument \"op\" = " + op); } return result; } }
0
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform/manipulation/JsonPointer.java
package ai.bizone.jsontransform.manipulation; import ai.bizone.jsontransform.adapters.JsonAdapter; import java.util.Arrays; import java.util.List; import java.util.Objects; import java.util.regex.Pattern; import java.util.stream.Collectors; /** * Various JSON mutations for a generic JSON implementation based on * JavaScript Object Notation (JSON) Pointer (RFC-6901) */ public class JsonPointer { private static final Pattern IndexPattern = Pattern.compile("^(0|[1-9]\\d*|-)$"); private final JsonAdapter<?, ?, ?> adapter; public JsonPointer(JsonAdapter<?, ?, ?> adapter) { this.adapter = adapter; } public static String unescape(String str) { return str.replace("~1", "/").replace("~0", "~"); } public static List<String> parse(String pointer) { if (pointer == null) { return null; // throw? } var tokens = Arrays.stream((!pointer.isEmpty() && pointer.charAt(0) == '/' ? pointer.substring(1) : pointer) .split("/")) .map(JsonPointer::unescape) .collect(Collectors.toList()); if (pointer.length() > 1 && pointer.charAt(pointer.length() - 1) == '/') { tokens.add(""); } return tokens; } public Object get(Object obj, String pointer) { if (Objects.equals(pointer, "")) { return obj; } var tokens = parse(pointer); if (tokens == null) { return null; // throw? } for (String s : tokens) { var token = unescape(s); if (adapter.isJsonObject(obj) && adapter.has(obj, token)) { obj = adapter.get(obj, token); } else { int tokenIndex; try { tokenIndex = Integer.parseUnsignedInt(token); } catch (NumberFormatException ignored) { return null; } if (adapter.isJsonArray(obj) && adapter.size(obj) > tokenIndex) { obj = adapter.get(obj, tokenIndex); } else { return null; } } } return obj; } public Object set(Object obj, String pointer, Object value) { return set(obj, pointer, value, false); } public Object set(Object obj, String pointer, Object value, boolean insert) { if (Objects.equals(pointer, "")) { return value; } var result = obj; var refTokens = parse(pointer); if (refTokens == null) { throw new RuntimeException("Invalid pointer " + pointer); } if (refTokens.isEmpty()) { throw new RuntimeException("Can not set the root object"); } var nextTok = refTokens.get(0); for (var i = 0; i < refTokens.size() - 1; ++i) { var tok = refTokens.get(i); if (Objects.equals(tok, "-") && adapter.isJsonArray(obj)) { tok = String.valueOf(adapter.size(obj)); } nextTok = refTokens.get(i + 1); if (adapter.isJsonObject(obj)) { var jo = obj; if (!adapter.has(jo, tok)) { obj = IndexPattern.matcher(nextTok).matches() ? adapter.createArray() : adapter.createObject(); adapter.add(jo, tok, obj); } else { obj = adapter.get(jo, tok); } } else if (adapter.isJsonArray(obj)) { var ja = obj; int intTok = Integer.parseUnsignedInt(tok); if (adapter.size(ja) <= intTok) { obj = IndexPattern.matcher(nextTok).matches() ? adapter.createArray() : adapter.createObject(); adapter.set(ja, intTok, obj); } else { obj = adapter.get(obj, intTok); } } } if (adapter.isJsonObject(obj)) { adapter.add(obj, nextTok, value); } else if (adapter.isJsonArray(obj)) { var ja = obj; // rename if (Objects.equals(nextTok, "-")) { adapter.add(ja, value); } else { var intTok = Integer.parseUnsignedInt(nextTok); if (insert) { adapter.add(ja, adapter.jsonNull()); // move over all elements starting from intTok for (var j = adapter.size(ja) - 1; j > intTok; j--) { adapter.set(ja, j, adapter.get(ja, j - 1)); } } // set the right index with the value adapter.set(ja, intTok, value); } } return result; } /** * @return The original object after removal. */ public Object remove(Object obj, String pointer) { return remove(obj, pointer, true); } /** * @return If `returnDocument` is true, the original object after removal, otherwise, the element removed. */ public Object remove(Object obj, String pointer, boolean returnDocument) { var doc = obj; var refTokens = parse(pointer); if (refTokens == null) { throw new RuntimeException("Invalid pointer " + pointer); } if (refTokens.isEmpty()) { throw new RuntimeException("Can not set the root object"); } var nextTok = refTokens.get(0); for (var i = 0; i < refTokens.size() - 1; ++i) { var tok = refTokens.get(i); if (Objects.equals(tok, "-") && adapter.isJsonArray(obj)) { tok = String.valueOf(adapter.size(obj)); } nextTok = refTokens.get(i + 1); if (adapter.isJsonObject(obj)) { var jo = obj; if (!adapter.has(jo, tok)) { obj = IndexPattern.matcher(nextTok).matches() ? adapter.createArray() : adapter.createObject(); adapter.add(jo, tok, obj); } else { obj = adapter.get(jo, tok); } } else if (adapter.isJsonArray(obj)) { var ja = obj; int intTok = Integer.parseUnsignedInt(tok); if (adapter.size(ja) <= intTok) { obj = IndexPattern.matcher(nextTok).matches() ? adapter.createArray() : adapter.createObject(); adapter.set(ja, intTok, obj); } else { obj = adapter.get(ja, intTok); } } } if (adapter.isJsonObject(obj)) { var removed = adapter.remove(obj, nextTok); return returnDocument ? doc : removed; } else if (adapter.isJsonArray(obj)) { var size = adapter.size(obj); if (Objects.equals(nextTok, "-")) { if (size > 0) { var removed = adapter.remove(obj, size - 1); return returnDocument ? doc : removed; } } else { var intTok = Integer.parseUnsignedInt(nextTok); if (size > intTok) { var removed = adapter.remove(obj, intTok); return returnDocument ? doc : removed; } } } return null; } }
0
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform/template/ParameterDefaultResolveOptions.java
package ai.bizone.jsontransform.template; /** * Resolving types for parameter default values */ public enum ParameterDefaultResolveOptions { /** * Each instance of a parameter is resolved to its explicit default */ UNIQUE, /** * The first default found for the parameter is used by all */ FIRST_VALUE, /** * The last default found is used by all */ LAST_VALUE }
0
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform/template/TemplateParameter.java
package ai.bizone.jsontransform.template; import ai.bizone.jsontransform.ParameterResolver; import ai.bizone.jsontransform.*; import ai.bizone.jsontransform.adapters.JsonAdapter; public class TemplateParameter { private final String name; private String mDefault; String getDefault() { return mDefault; } void setDefault(String value) { mDefault = value; } TemplateParameter(String name, String defaultValue) { this.name = name; mDefault = defaultValue == null ? "" : defaultValue; } String getStringValue(ParameterResolver resolver, JsonAdapter<?,?,?> adapter) { if (resolver == null) { return null; } var val = resolver.get(name); if (name.startsWith("$$") && (name.equals(val) || val == null)) { var x = new TextTemplateJsonTransformer(adapter); val = x.transformString(adapter.wrap(name), resolver); } return val == null || adapter.isNull(val) ? mDefault : adapter.getAsString(val).replace("{", "\\{"); } }
0
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform/template/TextTemplate.java
package ai.bizone.jsontransform.template; import ai.bizone.jsontransform.JsonTransformerConfiguration; import ai.bizone.jsontransform.ParameterResolver; import ai.bizone.jsontransform.adapters.JsonAdapter; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.*; import java.util.regex.Pattern; /** * @author Suriel * A string template engine */ public class TextTemplate { private final static Map<String, TextTemplate> cached = new HashMap<>(); private final static int STATE_TEXT = 0; private final static int STATE_PARAM_NAME = 1; private final static int STATE_PARAM_DEFAULT = 2; private final static Pattern UNESCAPED_OPEN_CURLY_BRACKET = Pattern.compile("(?s)(?<!\\\\)\\{"); private final LinkedList<TemplateParameter> templateParameters = new LinkedList<>(); private final ParameterDefaultResolveOptions defaultResolver; /** * internal list of values */ private final LinkedList<Object> values = new LinkedList<>(); /** * Creates a new memory template for a Text * * @param template The template text */ public TextTemplate(String template) { this(template, ParameterDefaultResolveOptions.UNIQUE); } /** * Creates a new memory template for a string * * @param template The template text * @param defaultResolver defines how the template should resolve parameter default values */ public TextTemplate(String template, ParameterDefaultResolveOptions defaultResolver) { this.defaultResolver = defaultResolver; parse(template, defaultResolver); } /** * Exposes a read only list to inspect the list of parameters * * @return a list of parameters in the template */ public List<TemplateParameter> getParameters() { return Collections.unmodifiableList(templateParameters); } /** * gets or creates a template from the cache * * @param template the command to parse * @param defaultResolver defines how the template should resolve parameter default values * @return a new text template */ public static TextTemplate get(String template, ParameterDefaultResolveOptions defaultResolver) { TextTemplate tpl; var key = ParameterDefaultResolveOptions.UNIQUE.equals(defaultResolver) ? template // the common case : defaultResolver.toString() + "{" + template ; synchronized (cached) { tpl = cached.get(key); } if (tpl == null) { tpl = new TextTemplate(template, defaultResolver); synchronized (cached) { cached.put(key, tpl); } } return tpl; } public static TextTemplate get(String template) { return get(template, ParameterDefaultResolveOptions.UNIQUE); } private void parse(String template, ParameterDefaultResolveOptions defaultResolver) { int curleyOpen = 0; var buffer = new StringBuilder(template.length()); var state = 0; //internal storage for found params var templateParams = new HashMap<String, TemplateParameter>(); String pName = null, pValue = null; for (int i = 0; i < template.length(); i++) { char c = template.charAt(i); switch (c) { case '\\': if (i + 1 < template.length()) { var nextChar = template.charAt(i + 1); if (nextChar == '{') { i++; // skip backslash buffer.append("\\{"); continue; } if (nextChar == '}' && state != STATE_TEXT) { i++; // skip backslash buffer.append("\\}"); continue; } } break; case '{': curleyOpen++; if (state == STATE_TEXT) { //start of parameter flush old if (!buffer.isEmpty()) { values.addLast(buffer.toString()); buffer.delete(0, buffer.length()); } state = STATE_PARAM_NAME; //we don't need to add to buffer continue; } break; case '}': // if there is no open bracket, then treat it as a regular character if (curleyOpen > 0) { curleyOpen--; if (curleyOpen == 0) { // close off switch (state) { case STATE_PARAM_NAME: pName = buffer.toString().replace("\\{", "{"); break; case STATE_PARAM_DEFAULT: pValue = buffer.toString(); break; } buffer.delete(0, buffer.length()); state = STATE_TEXT; if (!pName.isEmpty()) { TemplateParameter tParam; if (defaultResolver != ParameterDefaultResolveOptions.UNIQUE && templateParams.containsKey(pName)) { tParam = templateParams.get(pName); if (pValue != null) { if (tParam.getDefault() == null || defaultResolver == ParameterDefaultResolveOptions.LAST_VALUE) { tParam.setDefault(pValue); } } } else { tParam = new TemplateParameter(pName, pValue); templateParams.put(pName, tParam); } templateParameters.add(tParam); values.addLast(tParam); } pName = pValue = null; continue; } } break; case ',': if (state == STATE_PARAM_NAME) { state = STATE_PARAM_DEFAULT; pName = buffer.toString(); buffer.delete(0, buffer.length()); continue; } } // must be a valid char buffer.append(c); } if (!buffer.isEmpty()) values.add(buffer.toString()); } String internalRender(ParameterResolver resolver, JsonAdapter<?,?,?> adapter, Boolean urlEncodeParameters) { StringBuilder sb = new StringBuilder(); for (Object value : values) { if (value instanceof String s) { sb.append(s); } else if (value instanceof TemplateParameter param) { var renderedValue = param.getStringValue(resolver, adapter); sb.append( Boolean.TRUE.equals(urlEncodeParameters) && !UNESCAPED_OPEN_CURLY_BRACKET.matcher(renderedValue).find() ? URLEncoder.encode(renderedValue, StandardCharsets.UTF_8) : renderedValue); } } return sb.toString(); } /** * Renders the template after inserting the parameters * * @param resolver A resolver to extract parameter values * @param adapter The adapter to use for rendering * @param urlEncodeParameters if true, the parameters will be URL encoded * @return a string with its parameters replaced */ public String render(ParameterResolver resolver, JsonAdapter<?,?,?> adapter, Boolean urlEncodeParameters) { var res = internalRender(resolver, adapter, urlEncodeParameters); while (UNESCAPED_OPEN_CURLY_BRACKET.matcher(res).find()) { res = get(res, defaultResolver).internalRender(resolver, adapter, urlEncodeParameters); } // unescape return urlEncodeParameters ? res.replace("%5C%7B", "%7B").replace("%5C%7D", "%7D") : res.replace("\\{", "{").replace("\\}", "}"); } public String render(ParameterResolver resolver) { return render(resolver, JsonTransformerConfiguration.get().getAdapter(), false); } public String render(ParameterResolver resolver, JsonAdapter<?,?,?> adapter) { return render(resolver, adapter, false); } public String render(ParameterResolver resolver, Boolean urlEncodeParameters) { return render(resolver, JsonTransformerConfiguration.get().getAdapter(), urlEncodeParameters); } public static Map<String, String> mapOf(String... parameters){ if (parameters != null && (parameters.length % 2) != 0) { throw new VerifyError("Parameters must by an even array built as key value pairs"); } Map<String, String> paramsMap = new HashMap<>(); if (parameters != null) { for (int i = 0; i < parameters.length; i += 2) { paramsMap.put(parameters[i], parameters[i + 1]); } } return Collections.unmodifiableMap(paramsMap); } /** * Renders the template after inserting the parameters * * @param parameters An even array of parameters built as name value pairs * @return a string with its parameters replaced */ public String render(String... parameters) { return render(mapOf(parameters)); } /** * Renders the template after inserting the parameters * * @param resolver A map with the parameter names as keys * @return a string with its parameters replaced */ public String render(Map<String, ?> resolver) { return render(ParameterResolver.fromMap(resolver)); } public static String render(String template, ParameterResolver resolver, ParameterDefaultResolveOptions defaultResolver, Boolean urlEncodeParameters) { return get(template, defaultResolver).render(resolver, urlEncodeParameters); } public static String render(String template, Map<String, ?> resolver, ParameterDefaultResolveOptions defaultResolver) { return render(template, ParameterResolver.fromMap(resolver), defaultResolver, false); } public static String render(String template, ParameterResolver resolver, Boolean urlEncodeParameters) { return render(template, resolver, ParameterDefaultResolveOptions.UNIQUE, urlEncodeParameters); } public static String render(String template, Map<String, ?> resolver, Boolean urlEncodeParameters) { return render(template, ParameterResolver.fromMap(resolver), ParameterDefaultResolveOptions.UNIQUE, urlEncodeParameters); } public static String render(String template, ParameterResolver resolver) { return render(template, resolver, ParameterDefaultResolveOptions.UNIQUE, false); } public static String render(String template, Map<String, ?> resolver) { return render(template, ParameterResolver.fromMap(resolver), ParameterDefaultResolveOptions.UNIQUE, false); } }
0
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform
java-sources/ai/bizone/json-transform/1.3.1/ai/bizone/jsontransform/template/TextTemplateJsonTransformer.java
package ai.bizone.jsontransform.template; import ai.bizone.jsontransform.JsonTransformer; import ai.bizone.jsontransform.ParameterResolver; import ai.bizone.jsontransform.adapters.JsonAdapter; public class TextTemplateJsonTransformer extends JsonTransformer { public TextTemplateJsonTransformer(JsonAdapter<?, ?, ?> adapter) { super(null, adapter); } public Object transformString(Object definition, ParameterResolver resolver) { return fromJsonPrimitive("$", definition, resolver, false); } }
0
java-sources/ai/bizone/short-uuid/1.0.0/ai/bizone
java-sources/ai/bizone/short-uuid/1.0.0/ai/bizone/shortuuid/Base36Or62.java
package ai.bizone.shortuuid; import java.math.BigInteger; import java.util.regex.Pattern; import java.util.stream.IntStream; import static java.util.Objects.requireNonNull; /** * Base36Or62 is a utility class that provides methods to encode and decode numbers using Base36 or Base62 encoding. */ public class Base36Or62 { private static final BigInteger BASE_62 = BigInteger.valueOf(62); private static final String DIGITS_62 = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; private static final String DIGITS_62_REGEX = "[" + DIGITS_62 + "]*"; private static final BigInteger BASE_36 = BigInteger.valueOf(36); private static final String DIGITS_36 = "0123456789abcdefghijklmnopqrstuvwxyz"; private static final String DIGITS_36_REGEX = "[" + DIGITS_36 + "]*"; /** * Encodes a number using Base36 encoding. * * @param number a positive integer * @param base62 whether to use Base62 or Base36 * @return a Base36 string * * @throws IllegalArgumentException if <code>number</code> is a negative integer */ static String encode(BigInteger number, boolean base62) { if (number.compareTo(BigInteger.ZERO) < 0) { throw new IllegalArgumentException("number must not be negative"); } var base = base62 ? BASE_62 : BASE_36; var digits = base62 ? DIGITS_62 : DIGITS_36; StringBuilder result = new StringBuilder(); while (number.compareTo(BigInteger.ZERO) > 0) { var divMod = number.divideAndRemainder(base); number = divMod[0]; result.insert(0, digits.charAt(divMod[1].intValue())); } return (result.length() == 0) ? digits.substring(0, 1) : result.toString(); } /** * Decodes a string using Base36 encoding. * * @param string a Base36 string * @param base62 whether to use Base62 or Base36 * @param bitLimit amount of bits the number is allowed to have * @return a positive integer * * @throws IllegalArgumentException if <code>string</code> is empty */ static BigInteger decode(final String string, boolean base62, int bitLimit) { requireNonNull(string, "Decoded string must not be null"); if (string.length() == 0) { throw new IllegalArgumentException(String.format("String '%s' must not be empty", string)); } var base = base62 ? BASE_62 : BASE_36; var digits = base62 ? DIGITS_62 : DIGITS_36; var regexp = base62 ? DIGITS_62_REGEX : DIGITS_36_REGEX; if (!Pattern.matches(regexp, string)) { throw new IllegalArgumentException(String.format("String '%s' contains illegal characters, only '%s' are allowed", string, digits)); } return IntStream.range(0, string.length()) .mapToObj(index -> BigInteger .valueOf(digits.indexOf(string.charAt(string.length() - index - 1))) .multiply(base.pow(index)) ) .reduce(BigInteger.ZERO, (acc, value) -> { var sum = acc.add(value); if (bitLimit > 0 && sum.bitLength() > bitLimit) { throw new IllegalArgumentException(String.format("String '%s' contains more than %d bit information", string, bitLimit)); } return sum; }); } }
0
java-sources/ai/bizone/short-uuid/1.0.0/ai/bizone
java-sources/ai/bizone/short-uuid/1.0.0/ai/bizone/shortuuid/ShortUuid.java
package ai.bizone.shortuuid; import java.math.BigInteger; import java.util.UUID; /** * ShortUuid is a class that can be used to encode and decode UUIDs to a shorter string representation. */ public class ShortUuid { private final static int UUID_BITS = 128; /** * Create a ShortUuid * * @param caseSensitive whether the id can be case-sensitive (in this case use a larger base to encode the id) * @return ShortUuid encoded UUID */ public static String random(boolean caseSensitive) { return toShortUuid(UUID.randomUUID(), caseSensitive); } /** * Encode UUID to ShortUuid * * @param uuid UUID to be encoded * @param caseSensitive whether the id can be case-sensitive (in this case use a larger base to encode the id) * @return ShortUuid encoded UUID */ public static String toShortUuid(UUID uuid, boolean caseSensitive) { BigInteger pair = UuidConverter.toBigInteger(uuid); return Base36Or62.encode(pair, caseSensitive); } /** * Decode ShortUuid to UUID * * @param shortId encoded UUID * @param caseSensitive whether the id can be case-sensitive (in this case use a larger base to encode the id) * @return decoded UUID */ public static UUID toUuid(String shortId, boolean caseSensitive) { BigInteger decoded = Base36Or62.decode(shortId, caseSensitive, UUID_BITS); return UuidConverter.fromBigInteger(decoded); } /** * Try to shorten an identifier, if it is a UUID it will be converted to Base36. * Otherwise, all non-alphanumeric characters will be removed * * @param id An identifier to short * @param caseSensitive whether the id can be case-sensitive (in this case use a larger base to encode the id) * @return The shortened string */ public static String tryShorteningId(String id, boolean caseSensitive) { var uuid = UuidConverter.tryParseUUID(id); if (uuid != null) { return ShortUuid.toShortUuid(uuid, caseSensitive); } else { return id.replaceAll("[^A-Za-z0-9]+", ""); } } }
0
java-sources/ai/bizone/short-uuid/1.0.0/ai/bizone
java-sources/ai/bizone/short-uuid/1.0.0/ai/bizone/shortuuid/UuidConverter.java
package ai.bizone.shortuuid; import java.math.BigInteger; import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.Base64; import java.util.UUID; /** * UuidConverter is a class that can be used to convert UUIDs to and from different representations. * Including generation of named UUIDs (v3 and v5). */ public class UuidConverter { private static final Base64.Encoder BASE64_URL_ENCODER = Base64.getUrlEncoder().withoutPadding(); /** * Try to parse a string as a UUID. * @param suspectedUUID String to be parsed * @return a UUID or null */ public static UUID tryParseUUID(String suspectedUUID) { try{ return UUID.fromString(suspectedUUID); } catch (IllegalArgumentException exception){ return null; } } /** * Convert a UUID to a BigInteger. * @param uuid (required) * @return a BigInteger */ public static BigInteger toBigInteger(UUID uuid) { return new BigInteger(uuid.toString().replace("-", ""), 16); } /** * Convert a UUID to a Base64 string. * @param uuid (required) * @return a Base64 string */ public static String toBase64(UUID uuid) { var bb = ByteBuffer.wrap(new byte[16]); bb.putLong(uuid.getMostSignificantBits()); bb.putLong(uuid.getLeastSignificantBits()); return BASE64_URL_ENCODER.encodeToString(bb.array()); } /** * Convert a UUID to a BigInteger. * @param uuidAsBigInt (required) * @return a UUID */ public static UUID fromBigInteger(BigInteger uuidAsBigInt) { var paddedBigIntAsHex = String .format("%1$" + 32 + "s", uuidAsBigInt.toString(16)) .replace(' ', '0'); return UUID.fromString(paddedBigIntAsHex.replaceAll( "^(.{8})(.{4})(.{4})(.{4})(.{12})$", "$1-$2-$3-$4-$5" )); } /** * Convert a UUID to a Base64 string. * @param base64 (required) * @return a UUID */ public static UUID fromBase64(String base64) { var decoded = Base64.getUrlDecoder().decode(base64); var bb = ByteBuffer.wrap(decoded); var mostSigBits = bb.getLong(); var leastSigBits = bb.getLong(); return new UUID(mostSigBits, leastSigBits); } /** * Generate a name-based UUID (v3 or v5) using the specified version and name. * @param version 3 or 5 * @param name (required) * @return a name-based UUID */ public static UUID namedByVersion(int version, String name) { return namedByVersion(version, null, name); } /** * Generate a name-based UUID (v3 or v5) using the specified version, namespace, and name. * @param version 3 or 5 * @param namespace (optional) * @param name (required) * @return a name-based UUID */ public static UUID namedByVersion(int version, UUID namespace, String name) { MessageDigest hasher; try { if (version == 3) { hasher = MessageDigest.getInstance("MD5"); } else if (version == 5) { hasher = MessageDigest.getInstance("SHA-1"); } else { throw new NoSuchAlgorithmException(); } } catch (NoSuchAlgorithmException e) { throw new RuntimeException(e); } if (namespace != null) { var ns = ByteBuffer.allocate(16); ns.putLong(namespace.getMostSignificantBits()); ns.putLong(namespace.getLeastSignificantBits()); hasher.update(ns.array()); } hasher.update(name.getBytes(StandardCharsets.UTF_8)); var hash = ByteBuffer.wrap(hasher.digest()); final long msb = (hash.getLong() & 0xffffffffffff0fffL) | (version & 0x0f) << 12; final long lsb = (hash.getLong() & 0x3fffffffffffffffL) | 0x8000000000000000L; return new UUID(msb, lsb); } }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/AckRequest.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; /** * Protobuf type {@code blipai.deckard.AckRequest} */ public final class AckRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:blipai.deckard.AckRequest) AckRequestOrBuilder { private static final long serialVersionUID = 0L; // Use AckRequest.newBuilder() to construct. private AckRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private AckRequest() { id_ = ""; queue_ = ""; reason_ = ""; breakpoint_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new AckRequest(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_AckRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_AckRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.AckRequest.class, ai.blip.deckard.AckRequest.Builder.class); } public static final int ID_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object id_ = ""; /** * <pre> * ID of the message * </pre> * * <code>string id = 1;</code> * @return The id. */ @java.lang.Override 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; } } /** * <pre> * ID of the message * </pre> * * <code>string id = 1;</code> * @return The bytes for id. */ @java.lang.Override 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 QUEUE_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object queue_ = ""; /** * <pre> * Queue where this message is stored * </pre> * * <code>string queue = 2;</code> * @return The queue. */ @java.lang.Override public java.lang.String getQueue() { java.lang.Object ref = queue_; 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(); queue_ = s; return s; } } /** * <pre> * Queue where this message is stored * </pre> * * <code>string queue = 2;</code> * @return The bytes for queue. */ @java.lang.Override public com.google.protobuf.ByteString getQueueBytes() { java.lang.Object ref = queue_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); queue_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int REASON_FIELD_NUMBER = 5; @SuppressWarnings("serial") private volatile java.lang.Object reason_ = ""; /** * <pre> * Reason of this result. * * Useful for audit, mostly on 'nack' signals. * </pre> * * <code>string reason = 5;</code> * @return The reason. */ @java.lang.Override public java.lang.String getReason() { java.lang.Object ref = reason_; 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(); reason_ = s; return s; } } /** * <pre> * Reason of this result. * * Useful for audit, mostly on 'nack' signals. * </pre> * * <code>string reason = 5;</code> * @return The bytes for reason. */ @java.lang.Override public com.google.protobuf.ByteString getReasonBytes() { java.lang.Object ref = reason_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); reason_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SCORE_SUBTRACT_FIELD_NUMBER = 3; private double scoreSubtract_ = 0D; /** * <pre> * This field is deprecated and will be removed in the future. If you need to change the message score, use the 'score' field. * * The value to subtract the score and increase final message priority. * For example if you want to make this message to have a higher priority you can set 10000 which will represent 10s of score benefit in the default score algorithm. * If you want to penalize the message you can send a negative number. * * IMPORTANT: The message will not be locked by, in the example, 10 seconds. This field is used only to increase or decrease the message priority in the priority queue. * * This field is used only for ack requests (since in nack requests the message will return with the lowest score to the queue). * It will be ignored if used at the same time of 'score' or 'lock_ms' fields. * </pre> * * <code>double score_subtract = 3 [deprecated = true];</code> * @deprecated blipai.deckard.AckRequest.score_subtract is deprecated. * See proto/deckard_service.proto;l=352 * @return The scoreSubtract. */ @java.lang.Override @java.lang.Deprecated public double getScoreSubtract() { return scoreSubtract_; } public static final int BREAKPOINT_FIELD_NUMBER = 4; @SuppressWarnings("serial") private volatile java.lang.Object breakpoint_ = ""; /** * <pre> * Breakpoint is a field to be used as an auxiliar field for some specific use cases. * For example if you need to keep a record of the last result processing a message, or want to iteract with a pagination system. * * Examples: imagine a message representing a web news portal and you want to navigate through the articles. This field could be used to store the last visited article id. * Or imagine a message representing a user and you want to iterate through the user's publications pages. This field could be used to store the last page number you visited. * </pre> * * <code>string breakpoint = 4;</code> * @return The breakpoint. */ @java.lang.Override public java.lang.String getBreakpoint() { java.lang.Object ref = breakpoint_; 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(); breakpoint_ = s; return s; } } /** * <pre> * Breakpoint is a field to be used as an auxiliar field for some specific use cases. * For example if you need to keep a record of the last result processing a message, or want to iteract with a pagination system. * * Examples: imagine a message representing a web news portal and you want to navigate through the articles. This field could be used to store the last visited article id. * Or imagine a message representing a user and you want to iterate through the user's publications pages. This field could be used to store the last page number you visited. * </pre> * * <code>string breakpoint = 4;</code> * @return The bytes for breakpoint. */ @java.lang.Override public com.google.protobuf.ByteString getBreakpointBytes() { java.lang.Object ref = breakpoint_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); breakpoint_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int LOCK_MS_FIELD_NUMBER = 6; private long lockMs_ = 0L; /** * <pre> * Time in milliseconds to lock a message before returning it to the queue. * For NACK requests the message will be locked before returning to first position in the priority queue. You can change this behavior using the 'score' field. * * For ACK requests the message will be locked before returning to last position in the priority queue. You can change this behavior using the 'score' field. * * IMPORTANT: Deckard checks for locked messages in a 1-second precision meaning the lock have a second precision and not milliseconds. * This field is in milliseconds because all duration units on deckard are expressed in milliseconds and the default score algorithm uses milliseconds as well. * </pre> * * <code>int64 lock_ms = 6;</code> * @return The lockMs. */ @java.lang.Override public long getLockMs() { return lockMs_; } public static final int REMOVEMESSAGE_FIELD_NUMBER = 7; private boolean removeMessage_ = false; /** * <pre> * Whether the message should be removed when acked/nacked * </pre> * * <code>bool removeMessage = 7;</code> * @return The removeMessage. */ @java.lang.Override public boolean getRemoveMessage() { return removeMessage_; } public static final int SCORE_FIELD_NUMBER = 10; private double score_ = 0D; /** * <pre> * Sets the score of the message when ACKed, to override the default score algorithm. * * If used at the same time with the 'lock_ms' attribute, the message will be locked for the specified time and then returned to the queue with the specified score. * * For ACK requests, if the score is not provided (or set to 0), the message will return to the queue with the default score algorithm which is the current timestamp in milliseconds. * * For NACKs requests, if the score is not provided (or set to 0), the message will return to the queue with the minimum score accepted by Deckard which is 0. * * Negative values will be converted to 0, which is how to set the highest priority to a message in a ACK/NACK request. * * REMEMBER: the maximum score accepted by Deckard is 9007199254740992 and the minimum is 0, so values outside this range will be capped. * </pre> * * <code>double score = 10;</code> * @return The score. */ @java.lang.Override public double getScore() { return score_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queue_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, queue_); } if (java.lang.Double.doubleToRawLongBits(scoreSubtract_) != 0) { output.writeDouble(3, scoreSubtract_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(breakpoint_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, breakpoint_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reason_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, reason_); } if (lockMs_ != 0L) { output.writeInt64(6, lockMs_); } if (removeMessage_ != false) { output.writeBool(7, removeMessage_); } if (java.lang.Double.doubleToRawLongBits(score_) != 0) { output.writeDouble(10, score_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queue_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, queue_); } if (java.lang.Double.doubleToRawLongBits(scoreSubtract_) != 0) { size += com.google.protobuf.CodedOutputStream .computeDoubleSize(3, scoreSubtract_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(breakpoint_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, breakpoint_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reason_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, reason_); } if (lockMs_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(6, lockMs_); } if (removeMessage_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(7, removeMessage_); } if (java.lang.Double.doubleToRawLongBits(score_) != 0) { size += com.google.protobuf.CodedOutputStream .computeDoubleSize(10, score_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof ai.blip.deckard.AckRequest)) { return super.equals(obj); } ai.blip.deckard.AckRequest other = (ai.blip.deckard.AckRequest) obj; if (!getId() .equals(other.getId())) return false; if (!getQueue() .equals(other.getQueue())) return false; if (!getReason() .equals(other.getReason())) return false; if (java.lang.Double.doubleToLongBits(getScoreSubtract()) != java.lang.Double.doubleToLongBits( other.getScoreSubtract())) return false; if (!getBreakpoint() .equals(other.getBreakpoint())) return false; if (getLockMs() != other.getLockMs()) return false; if (getRemoveMessage() != other.getRemoveMessage()) return false; if (java.lang.Double.doubleToLongBits(getScore()) != java.lang.Double.doubleToLongBits( other.getScore())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + ID_FIELD_NUMBER; hash = (53 * hash) + getId().hashCode(); hash = (37 * hash) + QUEUE_FIELD_NUMBER; hash = (53 * hash) + getQueue().hashCode(); hash = (37 * hash) + REASON_FIELD_NUMBER; hash = (53 * hash) + getReason().hashCode(); hash = (37 * hash) + SCORE_SUBTRACT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( java.lang.Double.doubleToLongBits(getScoreSubtract())); hash = (37 * hash) + BREAKPOINT_FIELD_NUMBER; hash = (53 * hash) + getBreakpoint().hashCode(); hash = (37 * hash) + LOCK_MS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getLockMs()); hash = (37 * hash) + REMOVEMESSAGE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getRemoveMessage()); hash = (37 * hash) + SCORE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( java.lang.Double.doubleToLongBits(getScore())); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static ai.blip.deckard.AckRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.AckRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.AckRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.AckRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.AckRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.AckRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.AckRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.AckRequest 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 ai.blip.deckard.AckRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ai.blip.deckard.AckRequest 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 ai.blip.deckard.AckRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.AckRequest 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(ai.blip.deckard.AckRequest 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 blipai.deckard.AckRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:blipai.deckard.AckRequest) ai.blip.deckard.AckRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_AckRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_AckRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.AckRequest.class, ai.blip.deckard.AckRequest.Builder.class); } // Construct using ai.blip.deckard.AckRequest.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; id_ = ""; queue_ = ""; reason_ = ""; scoreSubtract_ = 0D; breakpoint_ = ""; lockMs_ = 0L; removeMessage_ = false; score_ = 0D; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_AckRequest_descriptor; } @java.lang.Override public ai.blip.deckard.AckRequest getDefaultInstanceForType() { return ai.blip.deckard.AckRequest.getDefaultInstance(); } @java.lang.Override public ai.blip.deckard.AckRequest build() { ai.blip.deckard.AckRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public ai.blip.deckard.AckRequest buildPartial() { ai.blip.deckard.AckRequest result = new ai.blip.deckard.AckRequest(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(ai.blip.deckard.AckRequest result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.id_ = id_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.queue_ = queue_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.reason_ = reason_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.scoreSubtract_ = scoreSubtract_; } if (((from_bitField0_ & 0x00000010) != 0)) { result.breakpoint_ = breakpoint_; } if (((from_bitField0_ & 0x00000020) != 0)) { result.lockMs_ = lockMs_; } if (((from_bitField0_ & 0x00000040) != 0)) { result.removeMessage_ = removeMessage_; } if (((from_bitField0_ & 0x00000080) != 0)) { result.score_ = score_; } } @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 ai.blip.deckard.AckRequest) { return mergeFrom((ai.blip.deckard.AckRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ai.blip.deckard.AckRequest other) { if (other == ai.blip.deckard.AckRequest.getDefaultInstance()) return this; if (!other.getId().isEmpty()) { id_ = other.id_; bitField0_ |= 0x00000001; onChanged(); } if (!other.getQueue().isEmpty()) { queue_ = other.queue_; bitField0_ |= 0x00000002; onChanged(); } if (!other.getReason().isEmpty()) { reason_ = other.reason_; bitField0_ |= 0x00000004; onChanged(); } if (other.getScoreSubtract() != 0D) { setScoreSubtract(other.getScoreSubtract()); } if (!other.getBreakpoint().isEmpty()) { breakpoint_ = other.breakpoint_; bitField0_ |= 0x00000010; onChanged(); } if (other.getLockMs() != 0L) { setLockMs(other.getLockMs()); } if (other.getRemoveMessage() != false) { setRemoveMessage(other.getRemoveMessage()); } if (other.getScore() != 0D) { setScore(other.getScore()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { id_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 18: { queue_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 case 25: { scoreSubtract_ = input.readDouble(); bitField0_ |= 0x00000008; break; } // case 25 case 34: { breakpoint_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000010; break; } // case 34 case 42: { reason_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000004; break; } // case 42 case 48: { lockMs_ = input.readInt64(); bitField0_ |= 0x00000020; break; } // case 48 case 56: { removeMessage_ = input.readBool(); bitField0_ |= 0x00000040; break; } // case 56 case 81: { score_ = input.readDouble(); bitField0_ |= 0x00000080; break; } // case 81 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object id_ = ""; /** * <pre> * ID of the message * </pre> * * <code>string id = 1;</code> * @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; } } /** * <pre> * ID of the message * </pre> * * <code>string id = 1;</code> * @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; } } /** * <pre> * ID of the message * </pre> * * <code>string id = 1;</code> * @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; bitField0_ |= 0x00000001; onChanged(); return this; } /** * <pre> * ID of the message * </pre> * * <code>string id = 1;</code> * @return This builder for chaining. */ public Builder clearId() { id_ = getDefaultInstance().getId(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * <pre> * ID of the message * </pre> * * <code>string id = 1;</code> * @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; bitField0_ |= 0x00000001; onChanged(); return this; } private java.lang.Object queue_ = ""; /** * <pre> * Queue where this message is stored * </pre> * * <code>string queue = 2;</code> * @return The queue. */ public java.lang.String getQueue() { java.lang.Object ref = queue_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); queue_ = s; return s; } else { return (java.lang.String) ref; } } /** * <pre> * Queue where this message is stored * </pre> * * <code>string queue = 2;</code> * @return The bytes for queue. */ public com.google.protobuf.ByteString getQueueBytes() { java.lang.Object ref = queue_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); queue_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Queue where this message is stored * </pre> * * <code>string queue = 2;</code> * @param value The queue to set. * @return This builder for chaining. */ public Builder setQueue( java.lang.String value) { if (value == null) { throw new NullPointerException(); } queue_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * <pre> * Queue where this message is stored * </pre> * * <code>string queue = 2;</code> * @return This builder for chaining. */ public Builder clearQueue() { queue_ = getDefaultInstance().getQueue(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * <pre> * Queue where this message is stored * </pre> * * <code>string queue = 2;</code> * @param value The bytes for queue to set. * @return This builder for chaining. */ public Builder setQueueBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); queue_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } private java.lang.Object reason_ = ""; /** * <pre> * Reason of this result. * * Useful for audit, mostly on 'nack' signals. * </pre> * * <code>string reason = 5;</code> * @return The reason. */ public java.lang.String getReason() { java.lang.Object ref = reason_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); reason_ = s; return s; } else { return (java.lang.String) ref; } } /** * <pre> * Reason of this result. * * Useful for audit, mostly on 'nack' signals. * </pre> * * <code>string reason = 5;</code> * @return The bytes for reason. */ public com.google.protobuf.ByteString getReasonBytes() { java.lang.Object ref = reason_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); reason_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Reason of this result. * * Useful for audit, mostly on 'nack' signals. * </pre> * * <code>string reason = 5;</code> * @param value The reason to set. * @return This builder for chaining. */ public Builder setReason( java.lang.String value) { if (value == null) { throw new NullPointerException(); } reason_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** * <pre> * Reason of this result. * * Useful for audit, mostly on 'nack' signals. * </pre> * * <code>string reason = 5;</code> * @return This builder for chaining. */ public Builder clearReason() { reason_ = getDefaultInstance().getReason(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } /** * <pre> * Reason of this result. * * Useful for audit, mostly on 'nack' signals. * </pre> * * <code>string reason = 5;</code> * @param value The bytes for reason to set. * @return This builder for chaining. */ public Builder setReasonBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); reason_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } private double scoreSubtract_ ; /** * <pre> * This field is deprecated and will be removed in the future. If you need to change the message score, use the 'score' field. * * The value to subtract the score and increase final message priority. * For example if you want to make this message to have a higher priority you can set 10000 which will represent 10s of score benefit in the default score algorithm. * If you want to penalize the message you can send a negative number. * * IMPORTANT: The message will not be locked by, in the example, 10 seconds. This field is used only to increase or decrease the message priority in the priority queue. * * This field is used only for ack requests (since in nack requests the message will return with the lowest score to the queue). * It will be ignored if used at the same time of 'score' or 'lock_ms' fields. * </pre> * * <code>double score_subtract = 3 [deprecated = true];</code> * @deprecated blipai.deckard.AckRequest.score_subtract is deprecated. * See proto/deckard_service.proto;l=352 * @return The scoreSubtract. */ @java.lang.Override @java.lang.Deprecated public double getScoreSubtract() { return scoreSubtract_; } /** * <pre> * This field is deprecated and will be removed in the future. If you need to change the message score, use the 'score' field. * * The value to subtract the score and increase final message priority. * For example if you want to make this message to have a higher priority you can set 10000 which will represent 10s of score benefit in the default score algorithm. * If you want to penalize the message you can send a negative number. * * IMPORTANT: The message will not be locked by, in the example, 10 seconds. This field is used only to increase or decrease the message priority in the priority queue. * * This field is used only for ack requests (since in nack requests the message will return with the lowest score to the queue). * It will be ignored if used at the same time of 'score' or 'lock_ms' fields. * </pre> * * <code>double score_subtract = 3 [deprecated = true];</code> * @deprecated blipai.deckard.AckRequest.score_subtract is deprecated. * See proto/deckard_service.proto;l=352 * @param value The scoreSubtract to set. * @return This builder for chaining. */ @java.lang.Deprecated public Builder setScoreSubtract(double value) { scoreSubtract_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** * <pre> * This field is deprecated and will be removed in the future. If you need to change the message score, use the 'score' field. * * The value to subtract the score and increase final message priority. * For example if you want to make this message to have a higher priority you can set 10000 which will represent 10s of score benefit in the default score algorithm. * If you want to penalize the message you can send a negative number. * * IMPORTANT: The message will not be locked by, in the example, 10 seconds. This field is used only to increase or decrease the message priority in the priority queue. * * This field is used only for ack requests (since in nack requests the message will return with the lowest score to the queue). * It will be ignored if used at the same time of 'score' or 'lock_ms' fields. * </pre> * * <code>double score_subtract = 3 [deprecated = true];</code> * @deprecated blipai.deckard.AckRequest.score_subtract is deprecated. * See proto/deckard_service.proto;l=352 * @return This builder for chaining. */ @java.lang.Deprecated public Builder clearScoreSubtract() { bitField0_ = (bitField0_ & ~0x00000008); scoreSubtract_ = 0D; onChanged(); return this; } private java.lang.Object breakpoint_ = ""; /** * <pre> * Breakpoint is a field to be used as an auxiliar field for some specific use cases. * For example if you need to keep a record of the last result processing a message, or want to iteract with a pagination system. * * Examples: imagine a message representing a web news portal and you want to navigate through the articles. This field could be used to store the last visited article id. * Or imagine a message representing a user and you want to iterate through the user's publications pages. This field could be used to store the last page number you visited. * </pre> * * <code>string breakpoint = 4;</code> * @return The breakpoint. */ public java.lang.String getBreakpoint() { java.lang.Object ref = breakpoint_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); breakpoint_ = s; return s; } else { return (java.lang.String) ref; } } /** * <pre> * Breakpoint is a field to be used as an auxiliar field for some specific use cases. * For example if you need to keep a record of the last result processing a message, or want to iteract with a pagination system. * * Examples: imagine a message representing a web news portal and you want to navigate through the articles. This field could be used to store the last visited article id. * Or imagine a message representing a user and you want to iterate through the user's publications pages. This field could be used to store the last page number you visited. * </pre> * * <code>string breakpoint = 4;</code> * @return The bytes for breakpoint. */ public com.google.protobuf.ByteString getBreakpointBytes() { java.lang.Object ref = breakpoint_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); breakpoint_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Breakpoint is a field to be used as an auxiliar field for some specific use cases. * For example if you need to keep a record of the last result processing a message, or want to iteract with a pagination system. * * Examples: imagine a message representing a web news portal and you want to navigate through the articles. This field could be used to store the last visited article id. * Or imagine a message representing a user and you want to iterate through the user's publications pages. This field could be used to store the last page number you visited. * </pre> * * <code>string breakpoint = 4;</code> * @param value The breakpoint to set. * @return This builder for chaining. */ public Builder setBreakpoint( java.lang.String value) { if (value == null) { throw new NullPointerException(); } breakpoint_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** * <pre> * Breakpoint is a field to be used as an auxiliar field for some specific use cases. * For example if you need to keep a record of the last result processing a message, or want to iteract with a pagination system. * * Examples: imagine a message representing a web news portal and you want to navigate through the articles. This field could be used to store the last visited article id. * Or imagine a message representing a user and you want to iterate through the user's publications pages. This field could be used to store the last page number you visited. * </pre> * * <code>string breakpoint = 4;</code> * @return This builder for chaining. */ public Builder clearBreakpoint() { breakpoint_ = getDefaultInstance().getBreakpoint(); bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } /** * <pre> * Breakpoint is a field to be used as an auxiliar field for some specific use cases. * For example if you need to keep a record of the last result processing a message, or want to iteract with a pagination system. * * Examples: imagine a message representing a web news portal and you want to navigate through the articles. This field could be used to store the last visited article id. * Or imagine a message representing a user and you want to iterate through the user's publications pages. This field could be used to store the last page number you visited. * </pre> * * <code>string breakpoint = 4;</code> * @param value The bytes for breakpoint to set. * @return This builder for chaining. */ public Builder setBreakpointBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); breakpoint_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } private long lockMs_ ; /** * <pre> * Time in milliseconds to lock a message before returning it to the queue. * For NACK requests the message will be locked before returning to first position in the priority queue. You can change this behavior using the 'score' field. * * For ACK requests the message will be locked before returning to last position in the priority queue. You can change this behavior using the 'score' field. * * IMPORTANT: Deckard checks for locked messages in a 1-second precision meaning the lock have a second precision and not milliseconds. * This field is in milliseconds because all duration units on deckard are expressed in milliseconds and the default score algorithm uses milliseconds as well. * </pre> * * <code>int64 lock_ms = 6;</code> * @return The lockMs. */ @java.lang.Override public long getLockMs() { return lockMs_; } /** * <pre> * Time in milliseconds to lock a message before returning it to the queue. * For NACK requests the message will be locked before returning to first position in the priority queue. You can change this behavior using the 'score' field. * * For ACK requests the message will be locked before returning to last position in the priority queue. You can change this behavior using the 'score' field. * * IMPORTANT: Deckard checks for locked messages in a 1-second precision meaning the lock have a second precision and not milliseconds. * This field is in milliseconds because all duration units on deckard are expressed in milliseconds and the default score algorithm uses milliseconds as well. * </pre> * * <code>int64 lock_ms = 6;</code> * @param value The lockMs to set. * @return This builder for chaining. */ public Builder setLockMs(long value) { lockMs_ = value; bitField0_ |= 0x00000020; onChanged(); return this; } /** * <pre> * Time in milliseconds to lock a message before returning it to the queue. * For NACK requests the message will be locked before returning to first position in the priority queue. You can change this behavior using the 'score' field. * * For ACK requests the message will be locked before returning to last position in the priority queue. You can change this behavior using the 'score' field. * * IMPORTANT: Deckard checks for locked messages in a 1-second precision meaning the lock have a second precision and not milliseconds. * This field is in milliseconds because all duration units on deckard are expressed in milliseconds and the default score algorithm uses milliseconds as well. * </pre> * * <code>int64 lock_ms = 6;</code> * @return This builder for chaining. */ public Builder clearLockMs() { bitField0_ = (bitField0_ & ~0x00000020); lockMs_ = 0L; onChanged(); return this; } private boolean removeMessage_ ; /** * <pre> * Whether the message should be removed when acked/nacked * </pre> * * <code>bool removeMessage = 7;</code> * @return The removeMessage. */ @java.lang.Override public boolean getRemoveMessage() { return removeMessage_; } /** * <pre> * Whether the message should be removed when acked/nacked * </pre> * * <code>bool removeMessage = 7;</code> * @param value The removeMessage to set. * @return This builder for chaining. */ public Builder setRemoveMessage(boolean value) { removeMessage_ = value; bitField0_ |= 0x00000040; onChanged(); return this; } /** * <pre> * Whether the message should be removed when acked/nacked * </pre> * * <code>bool removeMessage = 7;</code> * @return This builder for chaining. */ public Builder clearRemoveMessage() { bitField0_ = (bitField0_ & ~0x00000040); removeMessage_ = false; onChanged(); return this; } private double score_ ; /** * <pre> * Sets the score of the message when ACKed, to override the default score algorithm. * * If used at the same time with the 'lock_ms' attribute, the message will be locked for the specified time and then returned to the queue with the specified score. * * For ACK requests, if the score is not provided (or set to 0), the message will return to the queue with the default score algorithm which is the current timestamp in milliseconds. * * For NACKs requests, if the score is not provided (or set to 0), the message will return to the queue with the minimum score accepted by Deckard which is 0. * * Negative values will be converted to 0, which is how to set the highest priority to a message in a ACK/NACK request. * * REMEMBER: the maximum score accepted by Deckard is 9007199254740992 and the minimum is 0, so values outside this range will be capped. * </pre> * * <code>double score = 10;</code> * @return The score. */ @java.lang.Override public double getScore() { return score_; } /** * <pre> * Sets the score of the message when ACKed, to override the default score algorithm. * * If used at the same time with the 'lock_ms' attribute, the message will be locked for the specified time and then returned to the queue with the specified score. * * For ACK requests, if the score is not provided (or set to 0), the message will return to the queue with the default score algorithm which is the current timestamp in milliseconds. * * For NACKs requests, if the score is not provided (or set to 0), the message will return to the queue with the minimum score accepted by Deckard which is 0. * * Negative values will be converted to 0, which is how to set the highest priority to a message in a ACK/NACK request. * * REMEMBER: the maximum score accepted by Deckard is 9007199254740992 and the minimum is 0, so values outside this range will be capped. * </pre> * * <code>double score = 10;</code> * @param value The score to set. * @return This builder for chaining. */ public Builder setScore(double value) { score_ = value; bitField0_ |= 0x00000080; onChanged(); return this; } /** * <pre> * Sets the score of the message when ACKed, to override the default score algorithm. * * If used at the same time with the 'lock_ms' attribute, the message will be locked for the specified time and then returned to the queue with the specified score. * * For ACK requests, if the score is not provided (or set to 0), the message will return to the queue with the default score algorithm which is the current timestamp in milliseconds. * * For NACKs requests, if the score is not provided (or set to 0), the message will return to the queue with the minimum score accepted by Deckard which is 0. * * Negative values will be converted to 0, which is how to set the highest priority to a message in a ACK/NACK request. * * REMEMBER: the maximum score accepted by Deckard is 9007199254740992 and the minimum is 0, so values outside this range will be capped. * </pre> * * <code>double score = 10;</code> * @return This builder for chaining. */ public Builder clearScore() { bitField0_ = (bitField0_ & ~0x00000080); score_ = 0D; 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:blipai.deckard.AckRequest) } // @@protoc_insertion_point(class_scope:blipai.deckard.AckRequest) private static final ai.blip.deckard.AckRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ai.blip.deckard.AckRequest(); } public static ai.blip.deckard.AckRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<AckRequest> PARSER = new com.google.protobuf.AbstractParser<AckRequest>() { @java.lang.Override public AckRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser<AckRequest> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<AckRequest> getParserForType() { return PARSER; } @java.lang.Override public ai.blip.deckard.AckRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/AckRequestOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; public interface AckRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:blipai.deckard.AckRequest) com.google.protobuf.MessageOrBuilder { /** * <pre> * ID of the message * </pre> * * <code>string id = 1;</code> * @return The id. */ java.lang.String getId(); /** * <pre> * ID of the message * </pre> * * <code>string id = 1;</code> * @return The bytes for id. */ com.google.protobuf.ByteString getIdBytes(); /** * <pre> * Queue where this message is stored * </pre> * * <code>string queue = 2;</code> * @return The queue. */ java.lang.String getQueue(); /** * <pre> * Queue where this message is stored * </pre> * * <code>string queue = 2;</code> * @return The bytes for queue. */ com.google.protobuf.ByteString getQueueBytes(); /** * <pre> * Reason of this result. * * Useful for audit, mostly on 'nack' signals. * </pre> * * <code>string reason = 5;</code> * @return The reason. */ java.lang.String getReason(); /** * <pre> * Reason of this result. * * Useful for audit, mostly on 'nack' signals. * </pre> * * <code>string reason = 5;</code> * @return The bytes for reason. */ com.google.protobuf.ByteString getReasonBytes(); /** * <pre> * This field is deprecated and will be removed in the future. If you need to change the message score, use the 'score' field. * * The value to subtract the score and increase final message priority. * For example if you want to make this message to have a higher priority you can set 10000 which will represent 10s of score benefit in the default score algorithm. * If you want to penalize the message you can send a negative number. * * IMPORTANT: The message will not be locked by, in the example, 10 seconds. This field is used only to increase or decrease the message priority in the priority queue. * * This field is used only for ack requests (since in nack requests the message will return with the lowest score to the queue). * It will be ignored if used at the same time of 'score' or 'lock_ms' fields. * </pre> * * <code>double score_subtract = 3 [deprecated = true];</code> * @deprecated blipai.deckard.AckRequest.score_subtract is deprecated. * See proto/deckard_service.proto;l=352 * @return The scoreSubtract. */ @java.lang.Deprecated double getScoreSubtract(); /** * <pre> * Breakpoint is a field to be used as an auxiliar field for some specific use cases. * For example if you need to keep a record of the last result processing a message, or want to iteract with a pagination system. * * Examples: imagine a message representing a web news portal and you want to navigate through the articles. This field could be used to store the last visited article id. * Or imagine a message representing a user and you want to iterate through the user's publications pages. This field could be used to store the last page number you visited. * </pre> * * <code>string breakpoint = 4;</code> * @return The breakpoint. */ java.lang.String getBreakpoint(); /** * <pre> * Breakpoint is a field to be used as an auxiliar field for some specific use cases. * For example if you need to keep a record of the last result processing a message, or want to iteract with a pagination system. * * Examples: imagine a message representing a web news portal and you want to navigate through the articles. This field could be used to store the last visited article id. * Or imagine a message representing a user and you want to iterate through the user's publications pages. This field could be used to store the last page number you visited. * </pre> * * <code>string breakpoint = 4;</code> * @return The bytes for breakpoint. */ com.google.protobuf.ByteString getBreakpointBytes(); /** * <pre> * Time in milliseconds to lock a message before returning it to the queue. * For NACK requests the message will be locked before returning to first position in the priority queue. You can change this behavior using the 'score' field. * * For ACK requests the message will be locked before returning to last position in the priority queue. You can change this behavior using the 'score' field. * * IMPORTANT: Deckard checks for locked messages in a 1-second precision meaning the lock have a second precision and not milliseconds. * This field is in milliseconds because all duration units on deckard are expressed in milliseconds and the default score algorithm uses milliseconds as well. * </pre> * * <code>int64 lock_ms = 6;</code> * @return The lockMs. */ long getLockMs(); /** * <pre> * Whether the message should be removed when acked/nacked * </pre> * * <code>bool removeMessage = 7;</code> * @return The removeMessage. */ boolean getRemoveMessage(); /** * <pre> * Sets the score of the message when ACKed, to override the default score algorithm. * * If used at the same time with the 'lock_ms' attribute, the message will be locked for the specified time and then returned to the queue with the specified score. * * For ACK requests, if the score is not provided (or set to 0), the message will return to the queue with the default score algorithm which is the current timestamp in milliseconds. * * For NACKs requests, if the score is not provided (or set to 0), the message will return to the queue with the minimum score accepted by Deckard which is 0. * * Negative values will be converted to 0, which is how to set the highest priority to a message in a ACK/NACK request. * * REMEMBER: the maximum score accepted by Deckard is 9007199254740992 and the minimum is 0, so values outside this range will be capped. * </pre> * * <code>double score = 10;</code> * @return The score. */ double getScore(); }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/AckResponse.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; /** * Protobuf type {@code blipai.deckard.AckResponse} */ public final class AckResponse extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:blipai.deckard.AckResponse) AckResponseOrBuilder { private static final long serialVersionUID = 0L; // Use AckResponse.newBuilder() to construct. private AckResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private AckResponse() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new AckResponse(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_AckResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_AckResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.AckResponse.class, ai.blip.deckard.AckResponse.Builder.class); } private int bitField0_; public static final int SUCCESS_FIELD_NUMBER = 1; private boolean success_ = false; /** * <code>bool success = 1;</code> * @return The success. */ @java.lang.Override public boolean getSuccess() { return success_; } public static final int REMOVAL_RESPONSE_FIELD_NUMBER = 2; private ai.blip.deckard.RemoveResponse removalResponse_; /** * <pre> * The removal response if the message's removal was requested * </pre> * * <code>.blipai.deckard.RemoveResponse removal_response = 2;</code> * @return Whether the removalResponse field is set. */ @java.lang.Override public boolean hasRemovalResponse() { return ((bitField0_ & 0x00000001) != 0); } /** * <pre> * The removal response if the message's removal was requested * </pre> * * <code>.blipai.deckard.RemoveResponse removal_response = 2;</code> * @return The removalResponse. */ @java.lang.Override public ai.blip.deckard.RemoveResponse getRemovalResponse() { return removalResponse_ == null ? ai.blip.deckard.RemoveResponse.getDefaultInstance() : removalResponse_; } /** * <pre> * The removal response if the message's removal was requested * </pre> * * <code>.blipai.deckard.RemoveResponse removal_response = 2;</code> */ @java.lang.Override public ai.blip.deckard.RemoveResponseOrBuilder getRemovalResponseOrBuilder() { return removalResponse_ == null ? ai.blip.deckard.RemoveResponse.getDefaultInstance() : removalResponse_; } 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 (success_ != false) { output.writeBool(1, success_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getRemovalResponse()); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (success_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(1, success_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getRemovalResponse()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof ai.blip.deckard.AckResponse)) { return super.equals(obj); } ai.blip.deckard.AckResponse other = (ai.blip.deckard.AckResponse) obj; if (getSuccess() != other.getSuccess()) return false; if (hasRemovalResponse() != other.hasRemovalResponse()) return false; if (hasRemovalResponse()) { if (!getRemovalResponse() .equals(other.getRemovalResponse())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getSuccess()); if (hasRemovalResponse()) { hash = (37 * hash) + REMOVAL_RESPONSE_FIELD_NUMBER; hash = (53 * hash) + getRemovalResponse().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static ai.blip.deckard.AckResponse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.AckResponse parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.AckResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.AckResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.AckResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.AckResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.AckResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.AckResponse 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 ai.blip.deckard.AckResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ai.blip.deckard.AckResponse 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 ai.blip.deckard.AckResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.AckResponse 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(ai.blip.deckard.AckResponse 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 blipai.deckard.AckResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:blipai.deckard.AckResponse) ai.blip.deckard.AckResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_AckResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_AckResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.AckResponse.class, ai.blip.deckard.AckResponse.Builder.class); } // Construct using ai.blip.deckard.AckResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getRemovalResponseFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; success_ = false; removalResponse_ = null; if (removalResponseBuilder_ != null) { removalResponseBuilder_.dispose(); removalResponseBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_AckResponse_descriptor; } @java.lang.Override public ai.blip.deckard.AckResponse getDefaultInstanceForType() { return ai.blip.deckard.AckResponse.getDefaultInstance(); } @java.lang.Override public ai.blip.deckard.AckResponse build() { ai.blip.deckard.AckResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public ai.blip.deckard.AckResponse buildPartial() { ai.blip.deckard.AckResponse result = new ai.blip.deckard.AckResponse(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(ai.blip.deckard.AckResponse result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.success_ = success_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000002) != 0)) { result.removalResponse_ = removalResponseBuilder_ == null ? removalResponse_ : removalResponseBuilder_.build(); to_bitField0_ |= 0x00000001; } result.bitField0_ |= to_bitField0_; } @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 ai.blip.deckard.AckResponse) { return mergeFrom((ai.blip.deckard.AckResponse)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ai.blip.deckard.AckResponse other) { if (other == ai.blip.deckard.AckResponse.getDefaultInstance()) return this; if (other.getSuccess() != false) { setSuccess(other.getSuccess()); } if (other.hasRemovalResponse()) { mergeRemovalResponse(other.getRemovalResponse()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { success_ = input.readBool(); bitField0_ |= 0x00000001; break; } // case 8 case 18: { input.readMessage( getRemovalResponseFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private boolean success_ ; /** * <code>bool success = 1;</code> * @return The success. */ @java.lang.Override public boolean getSuccess() { return success_; } /** * <code>bool success = 1;</code> * @param value The success to set. * @return This builder for chaining. */ public Builder setSuccess(boolean value) { success_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * <code>bool success = 1;</code> * @return This builder for chaining. */ public Builder clearSuccess() { bitField0_ = (bitField0_ & ~0x00000001); success_ = false; onChanged(); return this; } private ai.blip.deckard.RemoveResponse removalResponse_; private com.google.protobuf.SingleFieldBuilderV3< ai.blip.deckard.RemoveResponse, ai.blip.deckard.RemoveResponse.Builder, ai.blip.deckard.RemoveResponseOrBuilder> removalResponseBuilder_; /** * <pre> * The removal response if the message's removal was requested * </pre> * * <code>.blipai.deckard.RemoveResponse removal_response = 2;</code> * @return Whether the removalResponse field is set. */ public boolean hasRemovalResponse() { return ((bitField0_ & 0x00000002) != 0); } /** * <pre> * The removal response if the message's removal was requested * </pre> * * <code>.blipai.deckard.RemoveResponse removal_response = 2;</code> * @return The removalResponse. */ public ai.blip.deckard.RemoveResponse getRemovalResponse() { if (removalResponseBuilder_ == null) { return removalResponse_ == null ? ai.blip.deckard.RemoveResponse.getDefaultInstance() : removalResponse_; } else { return removalResponseBuilder_.getMessage(); } } /** * <pre> * The removal response if the message's removal was requested * </pre> * * <code>.blipai.deckard.RemoveResponse removal_response = 2;</code> */ public Builder setRemovalResponse(ai.blip.deckard.RemoveResponse value) { if (removalResponseBuilder_ == null) { if (value == null) { throw new NullPointerException(); } removalResponse_ = value; } else { removalResponseBuilder_.setMessage(value); } bitField0_ |= 0x00000002; onChanged(); return this; } /** * <pre> * The removal response if the message's removal was requested * </pre> * * <code>.blipai.deckard.RemoveResponse removal_response = 2;</code> */ public Builder setRemovalResponse( ai.blip.deckard.RemoveResponse.Builder builderForValue) { if (removalResponseBuilder_ == null) { removalResponse_ = builderForValue.build(); } else { removalResponseBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; onChanged(); return this; } /** * <pre> * The removal response if the message's removal was requested * </pre> * * <code>.blipai.deckard.RemoveResponse removal_response = 2;</code> */ public Builder mergeRemovalResponse(ai.blip.deckard.RemoveResponse value) { if (removalResponseBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0) && removalResponse_ != null && removalResponse_ != ai.blip.deckard.RemoveResponse.getDefaultInstance()) { getRemovalResponseBuilder().mergeFrom(value); } else { removalResponse_ = value; } } else { removalResponseBuilder_.mergeFrom(value); } if (removalResponse_ != null) { bitField0_ |= 0x00000002; onChanged(); } return this; } /** * <pre> * The removal response if the message's removal was requested * </pre> * * <code>.blipai.deckard.RemoveResponse removal_response = 2;</code> */ public Builder clearRemovalResponse() { bitField0_ = (bitField0_ & ~0x00000002); removalResponse_ = null; if (removalResponseBuilder_ != null) { removalResponseBuilder_.dispose(); removalResponseBuilder_ = null; } onChanged(); return this; } /** * <pre> * The removal response if the message's removal was requested * </pre> * * <code>.blipai.deckard.RemoveResponse removal_response = 2;</code> */ public ai.blip.deckard.RemoveResponse.Builder getRemovalResponseBuilder() { bitField0_ |= 0x00000002; onChanged(); return getRemovalResponseFieldBuilder().getBuilder(); } /** * <pre> * The removal response if the message's removal was requested * </pre> * * <code>.blipai.deckard.RemoveResponse removal_response = 2;</code> */ public ai.blip.deckard.RemoveResponseOrBuilder getRemovalResponseOrBuilder() { if (removalResponseBuilder_ != null) { return removalResponseBuilder_.getMessageOrBuilder(); } else { return removalResponse_ == null ? ai.blip.deckard.RemoveResponse.getDefaultInstance() : removalResponse_; } } /** * <pre> * The removal response if the message's removal was requested * </pre> * * <code>.blipai.deckard.RemoveResponse removal_response = 2;</code> */ private com.google.protobuf.SingleFieldBuilderV3< ai.blip.deckard.RemoveResponse, ai.blip.deckard.RemoveResponse.Builder, ai.blip.deckard.RemoveResponseOrBuilder> getRemovalResponseFieldBuilder() { if (removalResponseBuilder_ == null) { removalResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< ai.blip.deckard.RemoveResponse, ai.blip.deckard.RemoveResponse.Builder, ai.blip.deckard.RemoveResponseOrBuilder>( getRemovalResponse(), getParentForChildren(), isClean()); removalResponse_ = null; } return removalResponseBuilder_; } @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:blipai.deckard.AckResponse) } // @@protoc_insertion_point(class_scope:blipai.deckard.AckResponse) private static final ai.blip.deckard.AckResponse DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ai.blip.deckard.AckResponse(); } public static ai.blip.deckard.AckResponse getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<AckResponse> PARSER = new com.google.protobuf.AbstractParser<AckResponse>() { @java.lang.Override public AckResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser<AckResponse> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<AckResponse> getParserForType() { return PARSER; } @java.lang.Override public ai.blip.deckard.AckResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/AckResponseOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; public interface AckResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:blipai.deckard.AckResponse) com.google.protobuf.MessageOrBuilder { /** * <code>bool success = 1;</code> * @return The success. */ boolean getSuccess(); /** * <pre> * The removal response if the message's removal was requested * </pre> * * <code>.blipai.deckard.RemoveResponse removal_response = 2;</code> * @return Whether the removalResponse field is set. */ boolean hasRemovalResponse(); /** * <pre> * The removal response if the message's removal was requested * </pre> * * <code>.blipai.deckard.RemoveResponse removal_response = 2;</code> * @return The removalResponse. */ ai.blip.deckard.RemoveResponse getRemovalResponse(); /** * <pre> * The removal response if the message's removal was requested * </pre> * * <code>.blipai.deckard.RemoveResponse removal_response = 2;</code> */ ai.blip.deckard.RemoveResponseOrBuilder getRemovalResponseOrBuilder(); }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/AddMessage.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; /** * Protobuf type {@code blipai.deckard.AddMessage} */ public final class AddMessage extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:blipai.deckard.AddMessage) AddMessageOrBuilder { private static final long serialVersionUID = 0L; // Use AddMessage.newBuilder() to construct. private AddMessage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private AddMessage() { id_ = ""; stringPayload_ = ""; queue_ = ""; description_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new AddMessage(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_AddMessage_descriptor; } @SuppressWarnings({"rawtypes"}) @java.lang.Override protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 10: return internalGetPayload(); case 11: return internalGetMetadata(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_AddMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.AddMessage.class, ai.blip.deckard.AddMessage.Builder.class); } public static final int ID_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object id_ = ""; /** * <pre> * Unique id of this message * </pre> * * <code>string id = 1;</code> * @return The id. */ @java.lang.Override 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; } } /** * <pre> * Unique id of this message * </pre> * * <code>string id = 1;</code> * @return The bytes for id. */ @java.lang.Override 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 PAYLOAD_FIELD_NUMBER = 10; private static final class PayloadDefaultEntryHolder { static final com.google.protobuf.MapEntry< java.lang.String, com.google.protobuf.Any> defaultEntry = com.google.protobuf.MapEntry .<java.lang.String, com.google.protobuf.Any>newDefaultInstance( ai.blip.deckard.DeckardService.internal_static_blipai_deckard_AddMessage_PayloadEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.MESSAGE, com.google.protobuf.Any.getDefaultInstance()); } @SuppressWarnings("serial") private com.google.protobuf.MapField< java.lang.String, com.google.protobuf.Any> payload_; private com.google.protobuf.MapField<java.lang.String, com.google.protobuf.Any> internalGetPayload() { if (payload_ == null) { return com.google.protobuf.MapField.emptyMapField( PayloadDefaultEntryHolder.defaultEntry); } return payload_; } public int getPayloadCount() { return internalGetPayload().getMap().size(); } /** * <pre> * A payload map with formatted data to be stored and used by clients. * </pre> * * <code>map&lt;string, .google.protobuf.Any&gt; payload = 10;</code> */ @java.lang.Override public boolean containsPayload( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetPayload().getMap().containsKey(key); } /** * Use {@link #getPayloadMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map<java.lang.String, com.google.protobuf.Any> getPayload() { return getPayloadMap(); } /** * <pre> * A payload map with formatted data to be stored and used by clients. * </pre> * * <code>map&lt;string, .google.protobuf.Any&gt; payload = 10;</code> */ @java.lang.Override public java.util.Map<java.lang.String, com.google.protobuf.Any> getPayloadMap() { return internalGetPayload().getMap(); } /** * <pre> * A payload map with formatted data to be stored and used by clients. * </pre> * * <code>map&lt;string, .google.protobuf.Any&gt; payload = 10;</code> */ @java.lang.Override public /* nullable */ com.google.protobuf.Any getPayloadOrDefault( java.lang.String key, /* nullable */ com.google.protobuf.Any defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map<java.lang.String, com.google.protobuf.Any> map = internalGetPayload().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** * <pre> * A payload map with formatted data to be stored and used by clients. * </pre> * * <code>map&lt;string, .google.protobuf.Any&gt; payload = 10;</code> */ @java.lang.Override public com.google.protobuf.Any getPayloadOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map<java.lang.String, com.google.protobuf.Any> map = internalGetPayload().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public static final int STRING_PAYLOAD_FIELD_NUMBER = 3; @SuppressWarnings("serial") private volatile java.lang.Object stringPayload_ = ""; /** * <pre> * Non-formatted string payload. * This field can be used to store simple string data instead of using the payload field. * </pre> * * <code>string string_payload = 3;</code> * @return The stringPayload. */ @java.lang.Override public java.lang.String getStringPayload() { java.lang.Object ref = stringPayload_; 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(); stringPayload_ = s; return s; } } /** * <pre> * Non-formatted string payload. * This field can be used to store simple string data instead of using the payload field. * </pre> * * <code>string string_payload = 3;</code> * @return The bytes for stringPayload. */ @java.lang.Override public com.google.protobuf.ByteString getStringPayloadBytes() { java.lang.Object ref = stringPayload_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); stringPayload_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int METADATA_FIELD_NUMBER = 11; private static final class MetadataDefaultEntryHolder { static final com.google.protobuf.MapEntry< java.lang.String, java.lang.String> defaultEntry = com.google.protobuf.MapEntry .<java.lang.String, java.lang.String>newDefaultInstance( ai.blip.deckard.DeckardService.internal_static_blipai_deckard_AddMessage_MetadataEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.STRING, ""); } @SuppressWarnings("serial") private com.google.protobuf.MapField< java.lang.String, java.lang.String> metadata_; private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetMetadata() { if (metadata_ == null) { return com.google.protobuf.MapField.emptyMapField( MetadataDefaultEntryHolder.defaultEntry); } return metadata_; } public int getMetadataCount() { return internalGetMetadata().getMap().size(); } /** * <pre> * Metadata is a map of string to be used as a key-value store. * It is a simple way to store data that is not part of the message payload. * </pre> * * <code>map&lt;string, string&gt; metadata = 11;</code> */ @java.lang.Override public boolean containsMetadata( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetMetadata().getMap().containsKey(key); } /** * Use {@link #getMetadataMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map<java.lang.String, java.lang.String> getMetadata() { return getMetadataMap(); } /** * <pre> * Metadata is a map of string to be used as a key-value store. * It is a simple way to store data that is not part of the message payload. * </pre> * * <code>map&lt;string, string&gt; metadata = 11;</code> */ @java.lang.Override public java.util.Map<java.lang.String, java.lang.String> getMetadataMap() { return internalGetMetadata().getMap(); } /** * <pre> * Metadata is a map of string to be used as a key-value store. * It is a simple way to store data that is not part of the message payload. * </pre> * * <code>map&lt;string, string&gt; metadata = 11;</code> */ @java.lang.Override public /* nullable */ java.lang.String getMetadataOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map<java.lang.String, java.lang.String> map = internalGetMetadata().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** * <pre> * Metadata is a map of string to be used as a key-value store. * It is a simple way to store data that is not part of the message payload. * </pre> * * <code>map&lt;string, string&gt; metadata = 11;</code> */ @java.lang.Override public java.lang.String getMetadataOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map<java.lang.String, java.lang.String> map = internalGetMetadata().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public static final int QUEUE_FIELD_NUMBER = 4; @SuppressWarnings("serial") private volatile java.lang.Object queue_ = ""; /** * <pre> * *Name of the queue to add this message * *Suggestion: to better observability, provide the name of the application using colon as the separator. Example: &lt;application_name&gt;:&lt;queue_name&gt; * *You may also add a queue prefix to the queue name using two colons as the separator. Example: &lt;application_name&gt;:&lt;queue_prefix&gt;::&lt;queue_name&gt; * </pre> * * <code>string queue = 4;</code> * @return The queue. */ @java.lang.Override public java.lang.String getQueue() { java.lang.Object ref = queue_; 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(); queue_ = s; return s; } } /** * <pre> * *Name of the queue to add this message * *Suggestion: to better observability, provide the name of the application using colon as the separator. Example: &lt;application_name&gt;:&lt;queue_name&gt; * *You may also add a queue prefix to the queue name using two colons as the separator. Example: &lt;application_name&gt;:&lt;queue_prefix&gt;::&lt;queue_name&gt; * </pre> * * <code>string queue = 4;</code> * @return The bytes for queue. */ @java.lang.Override public com.google.protobuf.ByteString getQueueBytes() { java.lang.Object ref = queue_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); queue_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int TIMELESS_FIELD_NUMBER = 6; private boolean timeless_ = false; /** * <pre> * Indicate this message will never expire and will only be deleted from the queue if explicitly removed. * </pre> * * <code>bool timeless = 6;</code> * @return The timeless. */ @java.lang.Override public boolean getTimeless() { return timeless_; } public static final int TTL_MINUTES_FIELD_NUMBER = 7; private long ttlMinutes_ = 0L; /** * <pre> * TTL is the amount of time in minutes this message will live in the queue. * TTL is not a exact time, the message may live a little longer than the specified TTL. * </pre> * * <code>int64 ttl_minutes = 7;</code> * @return The ttlMinutes. */ @java.lang.Override public long getTtlMinutes() { return ttlMinutes_; } public static final int DESCRIPTION_FIELD_NUMBER = 8; @SuppressWarnings("serial") private volatile java.lang.Object description_ = ""; /** * <pre> * Description of the message, this should be used as a human readable string to be used in diagnostics. * </pre> * * <code>string description = 8;</code> * @return The description. */ @java.lang.Override public java.lang.String getDescription() { java.lang.Object ref = description_; 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(); description_ = s; return s; } } /** * <pre> * Description of the message, this should be used as a human readable string to be used in diagnostics. * </pre> * * <code>string description = 8;</code> * @return The bytes for description. */ @java.lang.Override public com.google.protobuf.ByteString getDescriptionBytes() { java.lang.Object ref = description_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); description_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SCORE_FIELD_NUMBER = 12; private double score_ = 0D; /** * <pre> * Score represents the priority score the message currently have in the queue. * The score is used to determine the order of the messages returned in a pull request. * The lower the score, the higher the priority. * * If the score is not set (or set to 0), the score will be set with the current timestamp in milliseconds at the moment of the message creation. * * The maximum score accepted by Deckard is 9007199254740992 and the minimum is 0 * Negative scores will be converted to 0, adding the message with the lowest score (and highest priority) * </pre> * * <code>double score = 12;</code> * @return The score. */ @java.lang.Override public double getScore() { return score_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stringPayload_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, stringPayload_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queue_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, queue_); } if (timeless_ != false) { output.writeBool(6, timeless_); } if (ttlMinutes_ != 0L) { output.writeInt64(7, ttlMinutes_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 8, description_); } com.google.protobuf.GeneratedMessageV3 .serializeStringMapTo( output, internalGetPayload(), PayloadDefaultEntryHolder.defaultEntry, 10); com.google.protobuf.GeneratedMessageV3 .serializeStringMapTo( output, internalGetMetadata(), MetadataDefaultEntryHolder.defaultEntry, 11); if (java.lang.Double.doubleToRawLongBits(score_) != 0) { output.writeDouble(12, score_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stringPayload_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, stringPayload_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queue_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, queue_); } if (timeless_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(6, timeless_); } if (ttlMinutes_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(7, ttlMinutes_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, description_); } for (java.util.Map.Entry<java.lang.String, com.google.protobuf.Any> entry : internalGetPayload().getMap().entrySet()) { com.google.protobuf.MapEntry<java.lang.String, com.google.protobuf.Any> payload__ = PayloadDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream .computeMessageSize(10, payload__); } for (java.util.Map.Entry<java.lang.String, java.lang.String> entry : internalGetMetadata().getMap().entrySet()) { com.google.protobuf.MapEntry<java.lang.String, java.lang.String> metadata__ = MetadataDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream .computeMessageSize(11, metadata__); } if (java.lang.Double.doubleToRawLongBits(score_) != 0) { size += com.google.protobuf.CodedOutputStream .computeDoubleSize(12, score_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof ai.blip.deckard.AddMessage)) { return super.equals(obj); } ai.blip.deckard.AddMessage other = (ai.blip.deckard.AddMessage) obj; if (!getId() .equals(other.getId())) return false; if (!internalGetPayload().equals( other.internalGetPayload())) return false; if (!getStringPayload() .equals(other.getStringPayload())) return false; if (!internalGetMetadata().equals( other.internalGetMetadata())) return false; if (!getQueue() .equals(other.getQueue())) return false; if (getTimeless() != other.getTimeless()) return false; if (getTtlMinutes() != other.getTtlMinutes()) return false; if (!getDescription() .equals(other.getDescription())) return false; if (java.lang.Double.doubleToLongBits(getScore()) != java.lang.Double.doubleToLongBits( other.getScore())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + ID_FIELD_NUMBER; hash = (53 * hash) + getId().hashCode(); if (!internalGetPayload().getMap().isEmpty()) { hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; hash = (53 * hash) + internalGetPayload().hashCode(); } hash = (37 * hash) + STRING_PAYLOAD_FIELD_NUMBER; hash = (53 * hash) + getStringPayload().hashCode(); if (!internalGetMetadata().getMap().isEmpty()) { hash = (37 * hash) + METADATA_FIELD_NUMBER; hash = (53 * hash) + internalGetMetadata().hashCode(); } hash = (37 * hash) + QUEUE_FIELD_NUMBER; hash = (53 * hash) + getQueue().hashCode(); hash = (37 * hash) + TIMELESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getTimeless()); hash = (37 * hash) + TTL_MINUTES_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getTtlMinutes()); hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getDescription().hashCode(); hash = (37 * hash) + SCORE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( java.lang.Double.doubleToLongBits(getScore())); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static ai.blip.deckard.AddMessage parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.AddMessage parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.AddMessage parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.AddMessage parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.AddMessage parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.AddMessage parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.AddMessage parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.AddMessage 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 ai.blip.deckard.AddMessage parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ai.blip.deckard.AddMessage 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 ai.blip.deckard.AddMessage parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.AddMessage 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(ai.blip.deckard.AddMessage 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 blipai.deckard.AddMessage} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:blipai.deckard.AddMessage) ai.blip.deckard.AddMessageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_AddMessage_descriptor; } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 10: return internalGetPayload(); case 11: return internalGetMetadata(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( int number) { switch (number) { case 10: return internalGetMutablePayload(); case 11: return internalGetMutableMetadata(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_AddMessage_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.AddMessage.class, ai.blip.deckard.AddMessage.Builder.class); } // Construct using ai.blip.deckard.AddMessage.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; id_ = ""; internalGetMutablePayload().clear(); stringPayload_ = ""; internalGetMutableMetadata().clear(); queue_ = ""; timeless_ = false; ttlMinutes_ = 0L; description_ = ""; score_ = 0D; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_AddMessage_descriptor; } @java.lang.Override public ai.blip.deckard.AddMessage getDefaultInstanceForType() { return ai.blip.deckard.AddMessage.getDefaultInstance(); } @java.lang.Override public ai.blip.deckard.AddMessage build() { ai.blip.deckard.AddMessage result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public ai.blip.deckard.AddMessage buildPartial() { ai.blip.deckard.AddMessage result = new ai.blip.deckard.AddMessage(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(ai.blip.deckard.AddMessage result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.id_ = id_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.payload_ = internalGetPayload().build(PayloadDefaultEntryHolder.defaultEntry); } if (((from_bitField0_ & 0x00000004) != 0)) { result.stringPayload_ = stringPayload_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.metadata_ = internalGetMetadata(); result.metadata_.makeImmutable(); } if (((from_bitField0_ & 0x00000010) != 0)) { result.queue_ = queue_; } if (((from_bitField0_ & 0x00000020) != 0)) { result.timeless_ = timeless_; } if (((from_bitField0_ & 0x00000040) != 0)) { result.ttlMinutes_ = ttlMinutes_; } if (((from_bitField0_ & 0x00000080) != 0)) { result.description_ = description_; } if (((from_bitField0_ & 0x00000100) != 0)) { result.score_ = score_; } } @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 ai.blip.deckard.AddMessage) { return mergeFrom((ai.blip.deckard.AddMessage)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ai.blip.deckard.AddMessage other) { if (other == ai.blip.deckard.AddMessage.getDefaultInstance()) return this; if (!other.getId().isEmpty()) { id_ = other.id_; bitField0_ |= 0x00000001; onChanged(); } internalGetMutablePayload().mergeFrom( other.internalGetPayload()); bitField0_ |= 0x00000002; if (!other.getStringPayload().isEmpty()) { stringPayload_ = other.stringPayload_; bitField0_ |= 0x00000004; onChanged(); } internalGetMutableMetadata().mergeFrom( other.internalGetMetadata()); bitField0_ |= 0x00000008; if (!other.getQueue().isEmpty()) { queue_ = other.queue_; bitField0_ |= 0x00000010; onChanged(); } if (other.getTimeless() != false) { setTimeless(other.getTimeless()); } if (other.getTtlMinutes() != 0L) { setTtlMinutes(other.getTtlMinutes()); } if (!other.getDescription().isEmpty()) { description_ = other.description_; bitField0_ |= 0x00000080; onChanged(); } if (other.getScore() != 0D) { setScore(other.getScore()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { id_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 26: { stringPayload_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000004; break; } // case 26 case 34: { queue_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000010; break; } // case 34 case 48: { timeless_ = input.readBool(); bitField0_ |= 0x00000020; break; } // case 48 case 56: { ttlMinutes_ = input.readInt64(); bitField0_ |= 0x00000040; break; } // case 56 case 66: { description_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000080; break; } // case 66 case 82: { com.google.protobuf.MapEntry<java.lang.String, com.google.protobuf.Any> payload__ = input.readMessage( PayloadDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutablePayload().ensureBuilderMap().put( payload__.getKey(), payload__.getValue()); bitField0_ |= 0x00000002; break; } // case 82 case 90: { com.google.protobuf.MapEntry<java.lang.String, java.lang.String> metadata__ = input.readMessage( MetadataDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutableMetadata().getMutableMap().put( metadata__.getKey(), metadata__.getValue()); bitField0_ |= 0x00000008; break; } // case 90 case 97: { score_ = input.readDouble(); bitField0_ |= 0x00000100; break; } // case 97 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object id_ = ""; /** * <pre> * Unique id of this message * </pre> * * <code>string id = 1;</code> * @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; } } /** * <pre> * Unique id of this message * </pre> * * <code>string id = 1;</code> * @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; } } /** * <pre> * Unique id of this message * </pre> * * <code>string id = 1;</code> * @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; bitField0_ |= 0x00000001; onChanged(); return this; } /** * <pre> * Unique id of this message * </pre> * * <code>string id = 1;</code> * @return This builder for chaining. */ public Builder clearId() { id_ = getDefaultInstance().getId(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * <pre> * Unique id of this message * </pre> * * <code>string id = 1;</code> * @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; bitField0_ |= 0x00000001; onChanged(); return this; } private static final class PayloadConverter implements com.google.protobuf.MapFieldBuilder.Converter<java.lang.String, com.google.protobuf.AnyOrBuilder, com.google.protobuf.Any> { @java.lang.Override public com.google.protobuf.Any build(com.google.protobuf.AnyOrBuilder val) { if (val instanceof com.google.protobuf.Any) { return (com.google.protobuf.Any) val; } return ((com.google.protobuf.Any.Builder) val).build(); } @java.lang.Override public com.google.protobuf.MapEntry<java.lang.String, com.google.protobuf.Any> defaultEntry() { return PayloadDefaultEntryHolder.defaultEntry; } }; private static final PayloadConverter payloadConverter = new PayloadConverter(); private com.google.protobuf.MapFieldBuilder< java.lang.String, com.google.protobuf.AnyOrBuilder, com.google.protobuf.Any, com.google.protobuf.Any.Builder> payload_; private com.google.protobuf.MapFieldBuilder<java.lang.String, com.google.protobuf.AnyOrBuilder, com.google.protobuf.Any, com.google.protobuf.Any.Builder> internalGetPayload() { if (payload_ == null) { return new com.google.protobuf.MapFieldBuilder<>(payloadConverter); } return payload_; } private com.google.protobuf.MapFieldBuilder<java.lang.String, com.google.protobuf.AnyOrBuilder, com.google.protobuf.Any, com.google.protobuf.Any.Builder> internalGetMutablePayload() { if (payload_ == null) { payload_ = new com.google.protobuf.MapFieldBuilder<>(payloadConverter); } bitField0_ |= 0x00000002; onChanged(); return payload_; } public int getPayloadCount() { return internalGetPayload().ensureBuilderMap().size(); } /** * <pre> * A payload map with formatted data to be stored and used by clients. * </pre> * * <code>map&lt;string, .google.protobuf.Any&gt; payload = 10;</code> */ @java.lang.Override public boolean containsPayload( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetPayload().ensureBuilderMap().containsKey(key); } /** * Use {@link #getPayloadMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map<java.lang.String, com.google.protobuf.Any> getPayload() { return getPayloadMap(); } /** * <pre> * A payload map with formatted data to be stored and used by clients. * </pre> * * <code>map&lt;string, .google.protobuf.Any&gt; payload = 10;</code> */ @java.lang.Override public java.util.Map<java.lang.String, com.google.protobuf.Any> getPayloadMap() { return internalGetPayload().getImmutableMap(); } /** * <pre> * A payload map with formatted data to be stored and used by clients. * </pre> * * <code>map&lt;string, .google.protobuf.Any&gt; payload = 10;</code> */ @java.lang.Override public /* nullable */ com.google.protobuf.Any getPayloadOrDefault( java.lang.String key, /* nullable */ com.google.protobuf.Any defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map<java.lang.String, com.google.protobuf.AnyOrBuilder> map = internalGetMutablePayload().ensureBuilderMap(); return map.containsKey(key) ? payloadConverter.build(map.get(key)) : defaultValue; } /** * <pre> * A payload map with formatted data to be stored and used by clients. * </pre> * * <code>map&lt;string, .google.protobuf.Any&gt; payload = 10;</code> */ @java.lang.Override public com.google.protobuf.Any getPayloadOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map<java.lang.String, com.google.protobuf.AnyOrBuilder> map = internalGetMutablePayload().ensureBuilderMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return payloadConverter.build(map.get(key)); } public Builder clearPayload() { bitField0_ = (bitField0_ & ~0x00000002); internalGetMutablePayload().clear(); return this; } /** * <pre> * A payload map with formatted data to be stored and used by clients. * </pre> * * <code>map&lt;string, .google.protobuf.Any&gt; payload = 10;</code> */ public Builder removePayload( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } internalGetMutablePayload().ensureBuilderMap() .remove(key); return this; } /** * Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map<java.lang.String, com.google.protobuf.Any> getMutablePayload() { bitField0_ |= 0x00000002; return internalGetMutablePayload().ensureMessageMap(); } /** * <pre> * A payload map with formatted data to be stored and used by clients. * </pre> * * <code>map&lt;string, .google.protobuf.Any&gt; payload = 10;</code> */ public Builder putPayload( java.lang.String key, com.google.protobuf.Any value) { if (key == null) { throw new NullPointerException("map key"); } if (value == null) { throw new NullPointerException("map value"); } internalGetMutablePayload().ensureBuilderMap() .put(key, value); bitField0_ |= 0x00000002; return this; } /** * <pre> * A payload map with formatted data to be stored and used by clients. * </pre> * * <code>map&lt;string, .google.protobuf.Any&gt; payload = 10;</code> */ public Builder putAllPayload( java.util.Map<java.lang.String, com.google.protobuf.Any> values) { for (java.util.Map.Entry<java.lang.String, com.google.protobuf.Any> e : values.entrySet()) { if (e.getKey() == null || e.getValue() == null) { throw new NullPointerException(); } } internalGetMutablePayload().ensureBuilderMap() .putAll(values); bitField0_ |= 0x00000002; return this; } /** * <pre> * A payload map with formatted data to be stored and used by clients. * </pre> * * <code>map&lt;string, .google.protobuf.Any&gt; payload = 10;</code> */ public com.google.protobuf.Any.Builder putPayloadBuilderIfAbsent( java.lang.String key) { java.util.Map<java.lang.String, com.google.protobuf.AnyOrBuilder> builderMap = internalGetMutablePayload().ensureBuilderMap(); com.google.protobuf.AnyOrBuilder entry = builderMap.get(key); if (entry == null) { entry = com.google.protobuf.Any.newBuilder(); builderMap.put(key, entry); } if (entry instanceof com.google.protobuf.Any) { entry = ((com.google.protobuf.Any) entry).toBuilder(); builderMap.put(key, entry); } return (com.google.protobuf.Any.Builder) entry; } private java.lang.Object stringPayload_ = ""; /** * <pre> * Non-formatted string payload. * This field can be used to store simple string data instead of using the payload field. * </pre> * * <code>string string_payload = 3;</code> * @return The stringPayload. */ public java.lang.String getStringPayload() { java.lang.Object ref = stringPayload_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); stringPayload_ = s; return s; } else { return (java.lang.String) ref; } } /** * <pre> * Non-formatted string payload. * This field can be used to store simple string data instead of using the payload field. * </pre> * * <code>string string_payload = 3;</code> * @return The bytes for stringPayload. */ public com.google.protobuf.ByteString getStringPayloadBytes() { java.lang.Object ref = stringPayload_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); stringPayload_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Non-formatted string payload. * This field can be used to store simple string data instead of using the payload field. * </pre> * * <code>string string_payload = 3;</code> * @param value The stringPayload to set. * @return This builder for chaining. */ public Builder setStringPayload( java.lang.String value) { if (value == null) { throw new NullPointerException(); } stringPayload_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** * <pre> * Non-formatted string payload. * This field can be used to store simple string data instead of using the payload field. * </pre> * * <code>string string_payload = 3;</code> * @return This builder for chaining. */ public Builder clearStringPayload() { stringPayload_ = getDefaultInstance().getStringPayload(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } /** * <pre> * Non-formatted string payload. * This field can be used to store simple string data instead of using the payload field. * </pre> * * <code>string string_payload = 3;</code> * @param value The bytes for stringPayload to set. * @return This builder for chaining. */ public Builder setStringPayloadBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); stringPayload_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } private com.google.protobuf.MapField< java.lang.String, java.lang.String> metadata_; private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetMetadata() { if (metadata_ == null) { return com.google.protobuf.MapField.emptyMapField( MetadataDefaultEntryHolder.defaultEntry); } return metadata_; } private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetMutableMetadata() { if (metadata_ == null) { metadata_ = com.google.protobuf.MapField.newMapField( MetadataDefaultEntryHolder.defaultEntry); } if (!metadata_.isMutable()) { metadata_ = metadata_.copy(); } bitField0_ |= 0x00000008; onChanged(); return metadata_; } public int getMetadataCount() { return internalGetMetadata().getMap().size(); } /** * <pre> * Metadata is a map of string to be used as a key-value store. * It is a simple way to store data that is not part of the message payload. * </pre> * * <code>map&lt;string, string&gt; metadata = 11;</code> */ @java.lang.Override public boolean containsMetadata( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetMetadata().getMap().containsKey(key); } /** * Use {@link #getMetadataMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map<java.lang.String, java.lang.String> getMetadata() { return getMetadataMap(); } /** * <pre> * Metadata is a map of string to be used as a key-value store. * It is a simple way to store data that is not part of the message payload. * </pre> * * <code>map&lt;string, string&gt; metadata = 11;</code> */ @java.lang.Override public java.util.Map<java.lang.String, java.lang.String> getMetadataMap() { return internalGetMetadata().getMap(); } /** * <pre> * Metadata is a map of string to be used as a key-value store. * It is a simple way to store data that is not part of the message payload. * </pre> * * <code>map&lt;string, string&gt; metadata = 11;</code> */ @java.lang.Override public /* nullable */ java.lang.String getMetadataOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map<java.lang.String, java.lang.String> map = internalGetMetadata().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** * <pre> * Metadata is a map of string to be used as a key-value store. * It is a simple way to store data that is not part of the message payload. * </pre> * * <code>map&lt;string, string&gt; metadata = 11;</code> */ @java.lang.Override public java.lang.String getMetadataOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map<java.lang.String, java.lang.String> map = internalGetMetadata().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearMetadata() { bitField0_ = (bitField0_ & ~0x00000008); internalGetMutableMetadata().getMutableMap() .clear(); return this; } /** * <pre> * Metadata is a map of string to be used as a key-value store. * It is a simple way to store data that is not part of the message payload. * </pre> * * <code>map&lt;string, string&gt; metadata = 11;</code> */ public Builder removeMetadata( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } internalGetMutableMetadata().getMutableMap() .remove(key); return this; } /** * Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map<java.lang.String, java.lang.String> getMutableMetadata() { bitField0_ |= 0x00000008; return internalGetMutableMetadata().getMutableMap(); } /** * <pre> * Metadata is a map of string to be used as a key-value store. * It is a simple way to store data that is not part of the message payload. * </pre> * * <code>map&lt;string, string&gt; metadata = 11;</code> */ public Builder putMetadata( java.lang.String key, java.lang.String value) { if (key == null) { throw new NullPointerException("map key"); } if (value == null) { throw new NullPointerException("map value"); } internalGetMutableMetadata().getMutableMap() .put(key, value); bitField0_ |= 0x00000008; return this; } /** * <pre> * Metadata is a map of string to be used as a key-value store. * It is a simple way to store data that is not part of the message payload. * </pre> * * <code>map&lt;string, string&gt; metadata = 11;</code> */ public Builder putAllMetadata( java.util.Map<java.lang.String, java.lang.String> values) { internalGetMutableMetadata().getMutableMap() .putAll(values); bitField0_ |= 0x00000008; return this; } private java.lang.Object queue_ = ""; /** * <pre> * *Name of the queue to add this message * *Suggestion: to better observability, provide the name of the application using colon as the separator. Example: &lt;application_name&gt;:&lt;queue_name&gt; * *You may also add a queue prefix to the queue name using two colons as the separator. Example: &lt;application_name&gt;:&lt;queue_prefix&gt;::&lt;queue_name&gt; * </pre> * * <code>string queue = 4;</code> * @return The queue. */ public java.lang.String getQueue() { java.lang.Object ref = queue_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); queue_ = s; return s; } else { return (java.lang.String) ref; } } /** * <pre> * *Name of the queue to add this message * *Suggestion: to better observability, provide the name of the application using colon as the separator. Example: &lt;application_name&gt;:&lt;queue_name&gt; * *You may also add a queue prefix to the queue name using two colons as the separator. Example: &lt;application_name&gt;:&lt;queue_prefix&gt;::&lt;queue_name&gt; * </pre> * * <code>string queue = 4;</code> * @return The bytes for queue. */ public com.google.protobuf.ByteString getQueueBytes() { java.lang.Object ref = queue_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); queue_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * *Name of the queue to add this message * *Suggestion: to better observability, provide the name of the application using colon as the separator. Example: &lt;application_name&gt;:&lt;queue_name&gt; * *You may also add a queue prefix to the queue name using two colons as the separator. Example: &lt;application_name&gt;:&lt;queue_prefix&gt;::&lt;queue_name&gt; * </pre> * * <code>string queue = 4;</code> * @param value The queue to set. * @return This builder for chaining. */ public Builder setQueue( java.lang.String value) { if (value == null) { throw new NullPointerException(); } queue_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** * <pre> * *Name of the queue to add this message * *Suggestion: to better observability, provide the name of the application using colon as the separator. Example: &lt;application_name&gt;:&lt;queue_name&gt; * *You may also add a queue prefix to the queue name using two colons as the separator. Example: &lt;application_name&gt;:&lt;queue_prefix&gt;::&lt;queue_name&gt; * </pre> * * <code>string queue = 4;</code> * @return This builder for chaining. */ public Builder clearQueue() { queue_ = getDefaultInstance().getQueue(); bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } /** * <pre> * *Name of the queue to add this message * *Suggestion: to better observability, provide the name of the application using colon as the separator. Example: &lt;application_name&gt;:&lt;queue_name&gt; * *You may also add a queue prefix to the queue name using two colons as the separator. Example: &lt;application_name&gt;:&lt;queue_prefix&gt;::&lt;queue_name&gt; * </pre> * * <code>string queue = 4;</code> * @param value The bytes for queue to set. * @return This builder for chaining. */ public Builder setQueueBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); queue_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } private boolean timeless_ ; /** * <pre> * Indicate this message will never expire and will only be deleted from the queue if explicitly removed. * </pre> * * <code>bool timeless = 6;</code> * @return The timeless. */ @java.lang.Override public boolean getTimeless() { return timeless_; } /** * <pre> * Indicate this message will never expire and will only be deleted from the queue if explicitly removed. * </pre> * * <code>bool timeless = 6;</code> * @param value The timeless to set. * @return This builder for chaining. */ public Builder setTimeless(boolean value) { timeless_ = value; bitField0_ |= 0x00000020; onChanged(); return this; } /** * <pre> * Indicate this message will never expire and will only be deleted from the queue if explicitly removed. * </pre> * * <code>bool timeless = 6;</code> * @return This builder for chaining. */ public Builder clearTimeless() { bitField0_ = (bitField0_ & ~0x00000020); timeless_ = false; onChanged(); return this; } private long ttlMinutes_ ; /** * <pre> * TTL is the amount of time in minutes this message will live in the queue. * TTL is not a exact time, the message may live a little longer than the specified TTL. * </pre> * * <code>int64 ttl_minutes = 7;</code> * @return The ttlMinutes. */ @java.lang.Override public long getTtlMinutes() { return ttlMinutes_; } /** * <pre> * TTL is the amount of time in minutes this message will live in the queue. * TTL is not a exact time, the message may live a little longer than the specified TTL. * </pre> * * <code>int64 ttl_minutes = 7;</code> * @param value The ttlMinutes to set. * @return This builder for chaining. */ public Builder setTtlMinutes(long value) { ttlMinutes_ = value; bitField0_ |= 0x00000040; onChanged(); return this; } /** * <pre> * TTL is the amount of time in minutes this message will live in the queue. * TTL is not a exact time, the message may live a little longer than the specified TTL. * </pre> * * <code>int64 ttl_minutes = 7;</code> * @return This builder for chaining. */ public Builder clearTtlMinutes() { bitField0_ = (bitField0_ & ~0x00000040); ttlMinutes_ = 0L; onChanged(); return this; } private java.lang.Object description_ = ""; /** * <pre> * Description of the message, this should be used as a human readable string to be used in diagnostics. * </pre> * * <code>string description = 8;</code> * @return The description. */ public java.lang.String getDescription() { java.lang.Object ref = description_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); description_ = s; return s; } else { return (java.lang.String) ref; } } /** * <pre> * Description of the message, this should be used as a human readable string to be used in diagnostics. * </pre> * * <code>string description = 8;</code> * @return The bytes for description. */ public com.google.protobuf.ByteString getDescriptionBytes() { java.lang.Object ref = description_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); description_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Description of the message, this should be used as a human readable string to be used in diagnostics. * </pre> * * <code>string description = 8;</code> * @param value The description to set. * @return This builder for chaining. */ public Builder setDescription( java.lang.String value) { if (value == null) { throw new NullPointerException(); } description_ = value; bitField0_ |= 0x00000080; onChanged(); return this; } /** * <pre> * Description of the message, this should be used as a human readable string to be used in diagnostics. * </pre> * * <code>string description = 8;</code> * @return This builder for chaining. */ public Builder clearDescription() { description_ = getDefaultInstance().getDescription(); bitField0_ = (bitField0_ & ~0x00000080); onChanged(); return this; } /** * <pre> * Description of the message, this should be used as a human readable string to be used in diagnostics. * </pre> * * <code>string description = 8;</code> * @param value The bytes for description to set. * @return This builder for chaining. */ public Builder setDescriptionBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); description_ = value; bitField0_ |= 0x00000080; onChanged(); return this; } private double score_ ; /** * <pre> * Score represents the priority score the message currently have in the queue. * The score is used to determine the order of the messages returned in a pull request. * The lower the score, the higher the priority. * * If the score is not set (or set to 0), the score will be set with the current timestamp in milliseconds at the moment of the message creation. * * The maximum score accepted by Deckard is 9007199254740992 and the minimum is 0 * Negative scores will be converted to 0, adding the message with the lowest score (and highest priority) * </pre> * * <code>double score = 12;</code> * @return The score. */ @java.lang.Override public double getScore() { return score_; } /** * <pre> * Score represents the priority score the message currently have in the queue. * The score is used to determine the order of the messages returned in a pull request. * The lower the score, the higher the priority. * * If the score is not set (or set to 0), the score will be set with the current timestamp in milliseconds at the moment of the message creation. * * The maximum score accepted by Deckard is 9007199254740992 and the minimum is 0 * Negative scores will be converted to 0, adding the message with the lowest score (and highest priority) * </pre> * * <code>double score = 12;</code> * @param value The score to set. * @return This builder for chaining. */ public Builder setScore(double value) { score_ = value; bitField0_ |= 0x00000100; onChanged(); return this; } /** * <pre> * Score represents the priority score the message currently have in the queue. * The score is used to determine the order of the messages returned in a pull request. * The lower the score, the higher the priority. * * If the score is not set (or set to 0), the score will be set with the current timestamp in milliseconds at the moment of the message creation. * * The maximum score accepted by Deckard is 9007199254740992 and the minimum is 0 * Negative scores will be converted to 0, adding the message with the lowest score (and highest priority) * </pre> * * <code>double score = 12;</code> * @return This builder for chaining. */ public Builder clearScore() { bitField0_ = (bitField0_ & ~0x00000100); score_ = 0D; 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:blipai.deckard.AddMessage) } // @@protoc_insertion_point(class_scope:blipai.deckard.AddMessage) private static final ai.blip.deckard.AddMessage DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ai.blip.deckard.AddMessage(); } public static ai.blip.deckard.AddMessage getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<AddMessage> PARSER = new com.google.protobuf.AbstractParser<AddMessage>() { @java.lang.Override public AddMessage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser<AddMessage> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<AddMessage> getParserForType() { return PARSER; } @java.lang.Override public ai.blip.deckard.AddMessage getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/AddMessageOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; public interface AddMessageOrBuilder extends // @@protoc_insertion_point(interface_extends:blipai.deckard.AddMessage) com.google.protobuf.MessageOrBuilder { /** * <pre> * Unique id of this message * </pre> * * <code>string id = 1;</code> * @return The id. */ java.lang.String getId(); /** * <pre> * Unique id of this message * </pre> * * <code>string id = 1;</code> * @return The bytes for id. */ com.google.protobuf.ByteString getIdBytes(); /** * <pre> * A payload map with formatted data to be stored and used by clients. * </pre> * * <code>map&lt;string, .google.protobuf.Any&gt; payload = 10;</code> */ int getPayloadCount(); /** * <pre> * A payload map with formatted data to be stored and used by clients. * </pre> * * <code>map&lt;string, .google.protobuf.Any&gt; payload = 10;</code> */ boolean containsPayload( java.lang.String key); /** * Use {@link #getPayloadMap()} instead. */ @java.lang.Deprecated java.util.Map<java.lang.String, com.google.protobuf.Any> getPayload(); /** * <pre> * A payload map with formatted data to be stored and used by clients. * </pre> * * <code>map&lt;string, .google.protobuf.Any&gt; payload = 10;</code> */ java.util.Map<java.lang.String, com.google.protobuf.Any> getPayloadMap(); /** * <pre> * A payload map with formatted data to be stored and used by clients. * </pre> * * <code>map&lt;string, .google.protobuf.Any&gt; payload = 10;</code> */ /* nullable */ com.google.protobuf.Any getPayloadOrDefault( java.lang.String key, /* nullable */ com.google.protobuf.Any defaultValue); /** * <pre> * A payload map with formatted data to be stored and used by clients. * </pre> * * <code>map&lt;string, .google.protobuf.Any&gt; payload = 10;</code> */ com.google.protobuf.Any getPayloadOrThrow( java.lang.String key); /** * <pre> * Non-formatted string payload. * This field can be used to store simple string data instead of using the payload field. * </pre> * * <code>string string_payload = 3;</code> * @return The stringPayload. */ java.lang.String getStringPayload(); /** * <pre> * Non-formatted string payload. * This field can be used to store simple string data instead of using the payload field. * </pre> * * <code>string string_payload = 3;</code> * @return The bytes for stringPayload. */ com.google.protobuf.ByteString getStringPayloadBytes(); /** * <pre> * Metadata is a map of string to be used as a key-value store. * It is a simple way to store data that is not part of the message payload. * </pre> * * <code>map&lt;string, string&gt; metadata = 11;</code> */ int getMetadataCount(); /** * <pre> * Metadata is a map of string to be used as a key-value store. * It is a simple way to store data that is not part of the message payload. * </pre> * * <code>map&lt;string, string&gt; metadata = 11;</code> */ boolean containsMetadata( java.lang.String key); /** * Use {@link #getMetadataMap()} instead. */ @java.lang.Deprecated java.util.Map<java.lang.String, java.lang.String> getMetadata(); /** * <pre> * Metadata is a map of string to be used as a key-value store. * It is a simple way to store data that is not part of the message payload. * </pre> * * <code>map&lt;string, string&gt; metadata = 11;</code> */ java.util.Map<java.lang.String, java.lang.String> getMetadataMap(); /** * <pre> * Metadata is a map of string to be used as a key-value store. * It is a simple way to store data that is not part of the message payload. * </pre> * * <code>map&lt;string, string&gt; metadata = 11;</code> */ /* nullable */ java.lang.String getMetadataOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue); /** * <pre> * Metadata is a map of string to be used as a key-value store. * It is a simple way to store data that is not part of the message payload. * </pre> * * <code>map&lt;string, string&gt; metadata = 11;</code> */ java.lang.String getMetadataOrThrow( java.lang.String key); /** * <pre> * *Name of the queue to add this message * *Suggestion: to better observability, provide the name of the application using colon as the separator. Example: &lt;application_name&gt;:&lt;queue_name&gt; * *You may also add a queue prefix to the queue name using two colons as the separator. Example: &lt;application_name&gt;:&lt;queue_prefix&gt;::&lt;queue_name&gt; * </pre> * * <code>string queue = 4;</code> * @return The queue. */ java.lang.String getQueue(); /** * <pre> * *Name of the queue to add this message * *Suggestion: to better observability, provide the name of the application using colon as the separator. Example: &lt;application_name&gt;:&lt;queue_name&gt; * *You may also add a queue prefix to the queue name using two colons as the separator. Example: &lt;application_name&gt;:&lt;queue_prefix&gt;::&lt;queue_name&gt; * </pre> * * <code>string queue = 4;</code> * @return The bytes for queue. */ com.google.protobuf.ByteString getQueueBytes(); /** * <pre> * Indicate this message will never expire and will only be deleted from the queue if explicitly removed. * </pre> * * <code>bool timeless = 6;</code> * @return The timeless. */ boolean getTimeless(); /** * <pre> * TTL is the amount of time in minutes this message will live in the queue. * TTL is not a exact time, the message may live a little longer than the specified TTL. * </pre> * * <code>int64 ttl_minutes = 7;</code> * @return The ttlMinutes. */ long getTtlMinutes(); /** * <pre> * Description of the message, this should be used as a human readable string to be used in diagnostics. * </pre> * * <code>string description = 8;</code> * @return The description. */ java.lang.String getDescription(); /** * <pre> * Description of the message, this should be used as a human readable string to be used in diagnostics. * </pre> * * <code>string description = 8;</code> * @return The bytes for description. */ com.google.protobuf.ByteString getDescriptionBytes(); /** * <pre> * Score represents the priority score the message currently have in the queue. * The score is used to determine the order of the messages returned in a pull request. * The lower the score, the higher the priority. * * If the score is not set (or set to 0), the score will be set with the current timestamp in milliseconds at the moment of the message creation. * * The maximum score accepted by Deckard is 9007199254740992 and the minimum is 0 * Negative scores will be converted to 0, adding the message with the lowest score (and highest priority) * </pre> * * <code>double score = 12;</code> * @return The score. */ double getScore(); }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/AddRequest.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; /** * Protobuf type {@code blipai.deckard.AddRequest} */ public final class AddRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:blipai.deckard.AddRequest) AddRequestOrBuilder { private static final long serialVersionUID = 0L; // Use AddRequest.newBuilder() to construct. private AddRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private AddRequest() { messages_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new AddRequest(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_AddRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_AddRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.AddRequest.class, ai.blip.deckard.AddRequest.Builder.class); } public static final int MESSAGES_FIELD_NUMBER = 1; @SuppressWarnings("serial") private java.util.List<ai.blip.deckard.AddMessage> messages_; /** * <pre> * List of messages to be added * </pre> * * <code>repeated .blipai.deckard.AddMessage messages = 1;</code> */ @java.lang.Override public java.util.List<ai.blip.deckard.AddMessage> getMessagesList() { return messages_; } /** * <pre> * List of messages to be added * </pre> * * <code>repeated .blipai.deckard.AddMessage messages = 1;</code> */ @java.lang.Override public java.util.List<? extends ai.blip.deckard.AddMessageOrBuilder> getMessagesOrBuilderList() { return messages_; } /** * <pre> * List of messages to be added * </pre> * * <code>repeated .blipai.deckard.AddMessage messages = 1;</code> */ @java.lang.Override public int getMessagesCount() { return messages_.size(); } /** * <pre> * List of messages to be added * </pre> * * <code>repeated .blipai.deckard.AddMessage messages = 1;</code> */ @java.lang.Override public ai.blip.deckard.AddMessage getMessages(int index) { return messages_.get(index); } /** * <pre> * List of messages to be added * </pre> * * <code>repeated .blipai.deckard.AddMessage messages = 1;</code> */ @java.lang.Override public ai.blip.deckard.AddMessageOrBuilder getMessagesOrBuilder( int index) { return messages_.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 < messages_.size(); i++) { output.writeMessage(1, messages_.get(i)); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; for (int i = 0; i < messages_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, messages_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof ai.blip.deckard.AddRequest)) { return super.equals(obj); } ai.blip.deckard.AddRequest other = (ai.blip.deckard.AddRequest) obj; if (!getMessagesList() .equals(other.getMessagesList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (getMessagesCount() > 0) { hash = (37 * hash) + MESSAGES_FIELD_NUMBER; hash = (53 * hash) + getMessagesList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static ai.blip.deckard.AddRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.AddRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.AddRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.AddRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.AddRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.AddRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.AddRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.AddRequest 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 ai.blip.deckard.AddRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ai.blip.deckard.AddRequest 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 ai.blip.deckard.AddRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.AddRequest 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(ai.blip.deckard.AddRequest 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 blipai.deckard.AddRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:blipai.deckard.AddRequest) ai.blip.deckard.AddRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_AddRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_AddRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.AddRequest.class, ai.blip.deckard.AddRequest.Builder.class); } // Construct using ai.blip.deckard.AddRequest.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; if (messagesBuilder_ == null) { messages_ = java.util.Collections.emptyList(); } else { messages_ = null; messagesBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_AddRequest_descriptor; } @java.lang.Override public ai.blip.deckard.AddRequest getDefaultInstanceForType() { return ai.blip.deckard.AddRequest.getDefaultInstance(); } @java.lang.Override public ai.blip.deckard.AddRequest build() { ai.blip.deckard.AddRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public ai.blip.deckard.AddRequest buildPartial() { ai.blip.deckard.AddRequest result = new ai.blip.deckard.AddRequest(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields(ai.blip.deckard.AddRequest result) { if (messagesBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { messages_ = java.util.Collections.unmodifiableList(messages_); bitField0_ = (bitField0_ & ~0x00000001); } result.messages_ = messages_; } else { result.messages_ = messagesBuilder_.build(); } } private void buildPartial0(ai.blip.deckard.AddRequest result) { int from_bitField0_ = bitField0_; } @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 ai.blip.deckard.AddRequest) { return mergeFrom((ai.blip.deckard.AddRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ai.blip.deckard.AddRequest other) { if (other == ai.blip.deckard.AddRequest.getDefaultInstance()) return this; if (messagesBuilder_ == null) { if (!other.messages_.isEmpty()) { if (messages_.isEmpty()) { messages_ = other.messages_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureMessagesIsMutable(); messages_.addAll(other.messages_); } onChanged(); } } else { if (!other.messages_.isEmpty()) { if (messagesBuilder_.isEmpty()) { messagesBuilder_.dispose(); messagesBuilder_ = null; messages_ = other.messages_; bitField0_ = (bitField0_ & ~0x00000001); messagesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getMessagesFieldBuilder() : null; } else { messagesBuilder_.addAllMessages(other.messages_); } } } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { ai.blip.deckard.AddMessage m = input.readMessage( ai.blip.deckard.AddMessage.parser(), extensionRegistry); if (messagesBuilder_ == null) { ensureMessagesIsMutable(); messages_.add(m); } else { messagesBuilder_.addMessage(m); } break; } // case 10 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.util.List<ai.blip.deckard.AddMessage> messages_ = java.util.Collections.emptyList(); private void ensureMessagesIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { messages_ = new java.util.ArrayList<ai.blip.deckard.AddMessage>(messages_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< ai.blip.deckard.AddMessage, ai.blip.deckard.AddMessage.Builder, ai.blip.deckard.AddMessageOrBuilder> messagesBuilder_; /** * <pre> * List of messages to be added * </pre> * * <code>repeated .blipai.deckard.AddMessage messages = 1;</code> */ public java.util.List<ai.blip.deckard.AddMessage> getMessagesList() { if (messagesBuilder_ == null) { return java.util.Collections.unmodifiableList(messages_); } else { return messagesBuilder_.getMessageList(); } } /** * <pre> * List of messages to be added * </pre> * * <code>repeated .blipai.deckard.AddMessage messages = 1;</code> */ public int getMessagesCount() { if (messagesBuilder_ == null) { return messages_.size(); } else { return messagesBuilder_.getCount(); } } /** * <pre> * List of messages to be added * </pre> * * <code>repeated .blipai.deckard.AddMessage messages = 1;</code> */ public ai.blip.deckard.AddMessage getMessages(int index) { if (messagesBuilder_ == null) { return messages_.get(index); } else { return messagesBuilder_.getMessage(index); } } /** * <pre> * List of messages to be added * </pre> * * <code>repeated .blipai.deckard.AddMessage messages = 1;</code> */ public Builder setMessages( int index, ai.blip.deckard.AddMessage value) { if (messagesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureMessagesIsMutable(); messages_.set(index, value); onChanged(); } else { messagesBuilder_.setMessage(index, value); } return this; } /** * <pre> * List of messages to be added * </pre> * * <code>repeated .blipai.deckard.AddMessage messages = 1;</code> */ public Builder setMessages( int index, ai.blip.deckard.AddMessage.Builder builderForValue) { if (messagesBuilder_ == null) { ensureMessagesIsMutable(); messages_.set(index, builderForValue.build()); onChanged(); } else { messagesBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * <pre> * List of messages to be added * </pre> * * <code>repeated .blipai.deckard.AddMessage messages = 1;</code> */ public Builder addMessages(ai.blip.deckard.AddMessage value) { if (messagesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureMessagesIsMutable(); messages_.add(value); onChanged(); } else { messagesBuilder_.addMessage(value); } return this; } /** * <pre> * List of messages to be added * </pre> * * <code>repeated .blipai.deckard.AddMessage messages = 1;</code> */ public Builder addMessages( int index, ai.blip.deckard.AddMessage value) { if (messagesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureMessagesIsMutable(); messages_.add(index, value); onChanged(); } else { messagesBuilder_.addMessage(index, value); } return this; } /** * <pre> * List of messages to be added * </pre> * * <code>repeated .blipai.deckard.AddMessage messages = 1;</code> */ public Builder addMessages( ai.blip.deckard.AddMessage.Builder builderForValue) { if (messagesBuilder_ == null) { ensureMessagesIsMutable(); messages_.add(builderForValue.build()); onChanged(); } else { messagesBuilder_.addMessage(builderForValue.build()); } return this; } /** * <pre> * List of messages to be added * </pre> * * <code>repeated .blipai.deckard.AddMessage messages = 1;</code> */ public Builder addMessages( int index, ai.blip.deckard.AddMessage.Builder builderForValue) { if (messagesBuilder_ == null) { ensureMessagesIsMutable(); messages_.add(index, builderForValue.build()); onChanged(); } else { messagesBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * <pre> * List of messages to be added * </pre> * * <code>repeated .blipai.deckard.AddMessage messages = 1;</code> */ public Builder addAllMessages( java.lang.Iterable<? extends ai.blip.deckard.AddMessage> values) { if (messagesBuilder_ == null) { ensureMessagesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, messages_); onChanged(); } else { messagesBuilder_.addAllMessages(values); } return this; } /** * <pre> * List of messages to be added * </pre> * * <code>repeated .blipai.deckard.AddMessage messages = 1;</code> */ public Builder clearMessages() { if (messagesBuilder_ == null) { messages_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { messagesBuilder_.clear(); } return this; } /** * <pre> * List of messages to be added * </pre> * * <code>repeated .blipai.deckard.AddMessage messages = 1;</code> */ public Builder removeMessages(int index) { if (messagesBuilder_ == null) { ensureMessagesIsMutable(); messages_.remove(index); onChanged(); } else { messagesBuilder_.remove(index); } return this; } /** * <pre> * List of messages to be added * </pre> * * <code>repeated .blipai.deckard.AddMessage messages = 1;</code> */ public ai.blip.deckard.AddMessage.Builder getMessagesBuilder( int index) { return getMessagesFieldBuilder().getBuilder(index); } /** * <pre> * List of messages to be added * </pre> * * <code>repeated .blipai.deckard.AddMessage messages = 1;</code> */ public ai.blip.deckard.AddMessageOrBuilder getMessagesOrBuilder( int index) { if (messagesBuilder_ == null) { return messages_.get(index); } else { return messagesBuilder_.getMessageOrBuilder(index); } } /** * <pre> * List of messages to be added * </pre> * * <code>repeated .blipai.deckard.AddMessage messages = 1;</code> */ public java.util.List<? extends ai.blip.deckard.AddMessageOrBuilder> getMessagesOrBuilderList() { if (messagesBuilder_ != null) { return messagesBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(messages_); } } /** * <pre> * List of messages to be added * </pre> * * <code>repeated .blipai.deckard.AddMessage messages = 1;</code> */ public ai.blip.deckard.AddMessage.Builder addMessagesBuilder() { return getMessagesFieldBuilder().addBuilder( ai.blip.deckard.AddMessage.getDefaultInstance()); } /** * <pre> * List of messages to be added * </pre> * * <code>repeated .blipai.deckard.AddMessage messages = 1;</code> */ public ai.blip.deckard.AddMessage.Builder addMessagesBuilder( int index) { return getMessagesFieldBuilder().addBuilder( index, ai.blip.deckard.AddMessage.getDefaultInstance()); } /** * <pre> * List of messages to be added * </pre> * * <code>repeated .blipai.deckard.AddMessage messages = 1;</code> */ public java.util.List<ai.blip.deckard.AddMessage.Builder> getMessagesBuilderList() { return getMessagesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< ai.blip.deckard.AddMessage, ai.blip.deckard.AddMessage.Builder, ai.blip.deckard.AddMessageOrBuilder> getMessagesFieldBuilder() { if (messagesBuilder_ == null) { messagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< ai.blip.deckard.AddMessage, ai.blip.deckard.AddMessage.Builder, ai.blip.deckard.AddMessageOrBuilder>( messages_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); messages_ = null; } return messagesBuilder_; } @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:blipai.deckard.AddRequest) } // @@protoc_insertion_point(class_scope:blipai.deckard.AddRequest) private static final ai.blip.deckard.AddRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ai.blip.deckard.AddRequest(); } public static ai.blip.deckard.AddRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<AddRequest> PARSER = new com.google.protobuf.AbstractParser<AddRequest>() { @java.lang.Override public AddRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser<AddRequest> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<AddRequest> getParserForType() { return PARSER; } @java.lang.Override public ai.blip.deckard.AddRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/AddRequestOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; public interface AddRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:blipai.deckard.AddRequest) com.google.protobuf.MessageOrBuilder { /** * <pre> * List of messages to be added * </pre> * * <code>repeated .blipai.deckard.AddMessage messages = 1;</code> */ java.util.List<ai.blip.deckard.AddMessage> getMessagesList(); /** * <pre> * List of messages to be added * </pre> * * <code>repeated .blipai.deckard.AddMessage messages = 1;</code> */ ai.blip.deckard.AddMessage getMessages(int index); /** * <pre> * List of messages to be added * </pre> * * <code>repeated .blipai.deckard.AddMessage messages = 1;</code> */ int getMessagesCount(); /** * <pre> * List of messages to be added * </pre> * * <code>repeated .blipai.deckard.AddMessage messages = 1;</code> */ java.util.List<? extends ai.blip.deckard.AddMessageOrBuilder> getMessagesOrBuilderList(); /** * <pre> * List of messages to be added * </pre> * * <code>repeated .blipai.deckard.AddMessage messages = 1;</code> */ ai.blip.deckard.AddMessageOrBuilder getMessagesOrBuilder( int index); }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/AddResponse.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; /** * Protobuf type {@code blipai.deckard.AddResponse} */ public final class AddResponse extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:blipai.deckard.AddResponse) AddResponseOrBuilder { private static final long serialVersionUID = 0L; // Use AddResponse.newBuilder() to construct. private AddResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private AddResponse() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new AddResponse(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_AddResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_AddResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.AddResponse.class, ai.blip.deckard.AddResponse.Builder.class); } public static final int CREATED_COUNT_FIELD_NUMBER = 1; private long createdCount_ = 0L; /** * <pre> * Number of created messages * </pre> * * <code>int64 created_count = 1;</code> * @return The createdCount. */ @java.lang.Override public long getCreatedCount() { return createdCount_; } public static final int UPDATED_COUNT_FIELD_NUMBER = 2; private long updatedCount_ = 0L; /** * <pre> * Number of updated messages * </pre> * * <code>int64 updated_count = 2;</code> * @return The updatedCount. */ @java.lang.Override public long getUpdatedCount() { return updatedCount_; } 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 (createdCount_ != 0L) { output.writeInt64(1, createdCount_); } if (updatedCount_ != 0L) { output.writeInt64(2, updatedCount_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (createdCount_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(1, createdCount_); } if (updatedCount_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(2, updatedCount_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof ai.blip.deckard.AddResponse)) { return super.equals(obj); } ai.blip.deckard.AddResponse other = (ai.blip.deckard.AddResponse) obj; if (getCreatedCount() != other.getCreatedCount()) return false; if (getUpdatedCount() != other.getUpdatedCount()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + CREATED_COUNT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getCreatedCount()); hash = (37 * hash) + UPDATED_COUNT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getUpdatedCount()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static ai.blip.deckard.AddResponse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.AddResponse parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.AddResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.AddResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.AddResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.AddResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.AddResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.AddResponse 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 ai.blip.deckard.AddResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ai.blip.deckard.AddResponse 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 ai.blip.deckard.AddResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.AddResponse 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(ai.blip.deckard.AddResponse 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 blipai.deckard.AddResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:blipai.deckard.AddResponse) ai.blip.deckard.AddResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_AddResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_AddResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.AddResponse.class, ai.blip.deckard.AddResponse.Builder.class); } // Construct using ai.blip.deckard.AddResponse.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; createdCount_ = 0L; updatedCount_ = 0L; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_AddResponse_descriptor; } @java.lang.Override public ai.blip.deckard.AddResponse getDefaultInstanceForType() { return ai.blip.deckard.AddResponse.getDefaultInstance(); } @java.lang.Override public ai.blip.deckard.AddResponse build() { ai.blip.deckard.AddResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public ai.blip.deckard.AddResponse buildPartial() { ai.blip.deckard.AddResponse result = new ai.blip.deckard.AddResponse(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(ai.blip.deckard.AddResponse result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.createdCount_ = createdCount_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.updatedCount_ = updatedCount_; } } @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 ai.blip.deckard.AddResponse) { return mergeFrom((ai.blip.deckard.AddResponse)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ai.blip.deckard.AddResponse other) { if (other == ai.blip.deckard.AddResponse.getDefaultInstance()) return this; if (other.getCreatedCount() != 0L) { setCreatedCount(other.getCreatedCount()); } if (other.getUpdatedCount() != 0L) { setUpdatedCount(other.getUpdatedCount()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { createdCount_ = input.readInt64(); bitField0_ |= 0x00000001; break; } // case 8 case 16: { updatedCount_ = input.readInt64(); bitField0_ |= 0x00000002; break; } // case 16 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private long createdCount_ ; /** * <pre> * Number of created messages * </pre> * * <code>int64 created_count = 1;</code> * @return The createdCount. */ @java.lang.Override public long getCreatedCount() { return createdCount_; } /** * <pre> * Number of created messages * </pre> * * <code>int64 created_count = 1;</code> * @param value The createdCount to set. * @return This builder for chaining. */ public Builder setCreatedCount(long value) { createdCount_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * <pre> * Number of created messages * </pre> * * <code>int64 created_count = 1;</code> * @return This builder for chaining. */ public Builder clearCreatedCount() { bitField0_ = (bitField0_ & ~0x00000001); createdCount_ = 0L; onChanged(); return this; } private long updatedCount_ ; /** * <pre> * Number of updated messages * </pre> * * <code>int64 updated_count = 2;</code> * @return The updatedCount. */ @java.lang.Override public long getUpdatedCount() { return updatedCount_; } /** * <pre> * Number of updated messages * </pre> * * <code>int64 updated_count = 2;</code> * @param value The updatedCount to set. * @return This builder for chaining. */ public Builder setUpdatedCount(long value) { updatedCount_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * <pre> * Number of updated messages * </pre> * * <code>int64 updated_count = 2;</code> * @return This builder for chaining. */ public Builder clearUpdatedCount() { bitField0_ = (bitField0_ & ~0x00000002); updatedCount_ = 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:blipai.deckard.AddResponse) } // @@protoc_insertion_point(class_scope:blipai.deckard.AddResponse) private static final ai.blip.deckard.AddResponse DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ai.blip.deckard.AddResponse(); } public static ai.blip.deckard.AddResponse getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<AddResponse> PARSER = new com.google.protobuf.AbstractParser<AddResponse>() { @java.lang.Override public AddResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser<AddResponse> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<AddResponse> getParserForType() { return PARSER; } @java.lang.Override public ai.blip.deckard.AddResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/AddResponseOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; public interface AddResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:blipai.deckard.AddResponse) com.google.protobuf.MessageOrBuilder { /** * <pre> * Number of created messages * </pre> * * <code>int64 created_count = 1;</code> * @return The createdCount. */ long getCreatedCount(); /** * <pre> * Number of updated messages * </pre> * * <code>int64 updated_count = 2;</code> * @return The updatedCount. */ long getUpdatedCount(); }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/CountRequest.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; /** * Protobuf type {@code blipai.deckard.CountRequest} */ public final class CountRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:blipai.deckard.CountRequest) CountRequestOrBuilder { private static final long serialVersionUID = 0L; // Use CountRequest.newBuilder() to construct. private CountRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private CountRequest() { queue_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new CountRequest(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_CountRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_CountRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.CountRequest.class, ai.blip.deckard.CountRequest.Builder.class); } public static final int QUEUE_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object queue_ = ""; /** * <code>string queue = 1;</code> * @return The queue. */ @java.lang.Override public java.lang.String getQueue() { java.lang.Object ref = queue_; 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(); queue_ = s; return s; } } /** * <code>string queue = 1;</code> * @return The bytes for queue. */ @java.lang.Override public com.google.protobuf.ByteString getQueueBytes() { java.lang.Object ref = queue_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); queue_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queue_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, queue_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queue_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, queue_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof ai.blip.deckard.CountRequest)) { return super.equals(obj); } ai.blip.deckard.CountRequest other = (ai.blip.deckard.CountRequest) obj; if (!getQueue() .equals(other.getQueue())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + QUEUE_FIELD_NUMBER; hash = (53 * hash) + getQueue().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static ai.blip.deckard.CountRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.CountRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.CountRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.CountRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.CountRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.CountRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.CountRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.CountRequest 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 ai.blip.deckard.CountRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ai.blip.deckard.CountRequest 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 ai.blip.deckard.CountRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.CountRequest 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(ai.blip.deckard.CountRequest 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 blipai.deckard.CountRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:blipai.deckard.CountRequest) ai.blip.deckard.CountRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_CountRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_CountRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.CountRequest.class, ai.blip.deckard.CountRequest.Builder.class); } // Construct using ai.blip.deckard.CountRequest.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; queue_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_CountRequest_descriptor; } @java.lang.Override public ai.blip.deckard.CountRequest getDefaultInstanceForType() { return ai.blip.deckard.CountRequest.getDefaultInstance(); } @java.lang.Override public ai.blip.deckard.CountRequest build() { ai.blip.deckard.CountRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public ai.blip.deckard.CountRequest buildPartial() { ai.blip.deckard.CountRequest result = new ai.blip.deckard.CountRequest(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(ai.blip.deckard.CountRequest result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.queue_ = queue_; } } @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 ai.blip.deckard.CountRequest) { return mergeFrom((ai.blip.deckard.CountRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ai.blip.deckard.CountRequest other) { if (other == ai.blip.deckard.CountRequest.getDefaultInstance()) return this; if (!other.getQueue().isEmpty()) { queue_ = other.queue_; bitField0_ |= 0x00000001; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { queue_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object queue_ = ""; /** * <code>string queue = 1;</code> * @return The queue. */ public java.lang.String getQueue() { java.lang.Object ref = queue_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); queue_ = s; return s; } else { return (java.lang.String) ref; } } /** * <code>string queue = 1;</code> * @return The bytes for queue. */ public com.google.protobuf.ByteString getQueueBytes() { java.lang.Object ref = queue_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); queue_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>string queue = 1;</code> * @param value The queue to set. * @return This builder for chaining. */ public Builder setQueue( java.lang.String value) { if (value == null) { throw new NullPointerException(); } queue_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * <code>string queue = 1;</code> * @return This builder for chaining. */ public Builder clearQueue() { queue_ = getDefaultInstance().getQueue(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * <code>string queue = 1;</code> * @param value The bytes for queue to set. * @return This builder for chaining. */ public Builder setQueueBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); queue_ = value; bitField0_ |= 0x00000001; 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:blipai.deckard.CountRequest) } // @@protoc_insertion_point(class_scope:blipai.deckard.CountRequest) private static final ai.blip.deckard.CountRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ai.blip.deckard.CountRequest(); } public static ai.blip.deckard.CountRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<CountRequest> PARSER = new com.google.protobuf.AbstractParser<CountRequest>() { @java.lang.Override public CountRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser<CountRequest> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<CountRequest> getParserForType() { return PARSER; } @java.lang.Override public ai.blip.deckard.CountRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/CountRequestOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; public interface CountRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:blipai.deckard.CountRequest) com.google.protobuf.MessageOrBuilder { /** * <code>string queue = 1;</code> * @return The queue. */ java.lang.String getQueue(); /** * <code>string queue = 1;</code> * @return The bytes for queue. */ com.google.protobuf.ByteString getQueueBytes(); }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/CountResponse.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; /** * Protobuf type {@code blipai.deckard.CountResponse} */ public final class CountResponse extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:blipai.deckard.CountResponse) CountResponseOrBuilder { private static final long serialVersionUID = 0L; // Use CountResponse.newBuilder() to construct. private CountResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private CountResponse() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new CountResponse(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_CountResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_CountResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.CountResponse.class, ai.blip.deckard.CountResponse.Builder.class); } public static final int COUNT_FIELD_NUMBER = 1; private long count_ = 0L; /** * <code>int64 count = 1;</code> * @return The count. */ @java.lang.Override public long getCount() { return count_; } 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 (count_ != 0L) { output.writeInt64(1, count_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (count_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(1, count_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof ai.blip.deckard.CountResponse)) { return super.equals(obj); } ai.blip.deckard.CountResponse other = (ai.blip.deckard.CountResponse) obj; if (getCount() != other.getCount()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + COUNT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getCount()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static ai.blip.deckard.CountResponse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.CountResponse parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.CountResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.CountResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.CountResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.CountResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.CountResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.CountResponse 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 ai.blip.deckard.CountResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ai.blip.deckard.CountResponse 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 ai.blip.deckard.CountResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.CountResponse 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(ai.blip.deckard.CountResponse 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 blipai.deckard.CountResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:blipai.deckard.CountResponse) ai.blip.deckard.CountResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_CountResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_CountResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.CountResponse.class, ai.blip.deckard.CountResponse.Builder.class); } // Construct using ai.blip.deckard.CountResponse.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; count_ = 0L; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_CountResponse_descriptor; } @java.lang.Override public ai.blip.deckard.CountResponse getDefaultInstanceForType() { return ai.blip.deckard.CountResponse.getDefaultInstance(); } @java.lang.Override public ai.blip.deckard.CountResponse build() { ai.blip.deckard.CountResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public ai.blip.deckard.CountResponse buildPartial() { ai.blip.deckard.CountResponse result = new ai.blip.deckard.CountResponse(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(ai.blip.deckard.CountResponse result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.count_ = count_; } } @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 ai.blip.deckard.CountResponse) { return mergeFrom((ai.blip.deckard.CountResponse)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ai.blip.deckard.CountResponse other) { if (other == ai.blip.deckard.CountResponse.getDefaultInstance()) return this; if (other.getCount() != 0L) { setCount(other.getCount()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { count_ = input.readInt64(); bitField0_ |= 0x00000001; break; } // case 8 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private long count_ ; /** * <code>int64 count = 1;</code> * @return The count. */ @java.lang.Override public long getCount() { return count_; } /** * <code>int64 count = 1;</code> * @param value The count to set. * @return This builder for chaining. */ public Builder setCount(long value) { count_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * <code>int64 count = 1;</code> * @return This builder for chaining. */ public Builder clearCount() { bitField0_ = (bitField0_ & ~0x00000001); count_ = 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:blipai.deckard.CountResponse) } // @@protoc_insertion_point(class_scope:blipai.deckard.CountResponse) private static final ai.blip.deckard.CountResponse DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ai.blip.deckard.CountResponse(); } public static ai.blip.deckard.CountResponse getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<CountResponse> PARSER = new com.google.protobuf.AbstractParser<CountResponse>() { @java.lang.Override public CountResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser<CountResponse> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<CountResponse> getParserForType() { return PARSER; } @java.lang.Override public ai.blip.deckard.CountResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/CountResponseOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; public interface CountResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:blipai.deckard.CountResponse) com.google.protobuf.MessageOrBuilder { /** * <code>int64 count = 1;</code> * @return The count. */ long getCount(); }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/DeckardGrpc.java
package ai.blip.deckard; import static io.grpc.MethodDescriptor.generateFullMethodName; /** */ @javax.annotation.Generated( value = "by gRPC proto compiler (version 1.68.3)", comments = "Source: proto/deckard_service.proto") @io.grpc.stub.annotations.GrpcGenerated public final class DeckardGrpc { private DeckardGrpc() {} public static final java.lang.String SERVICE_NAME = "blipai.deckard.Deckard"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor<ai.blip.deckard.AddRequest, ai.blip.deckard.AddResponse> getAddMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "Add", requestType = ai.blip.deckard.AddRequest.class, responseType = ai.blip.deckard.AddResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor<ai.blip.deckard.AddRequest, ai.blip.deckard.AddResponse> getAddMethod() { io.grpc.MethodDescriptor<ai.blip.deckard.AddRequest, ai.blip.deckard.AddResponse> getAddMethod; if ((getAddMethod = DeckardGrpc.getAddMethod) == null) { synchronized (DeckardGrpc.class) { if ((getAddMethod = DeckardGrpc.getAddMethod) == null) { DeckardGrpc.getAddMethod = getAddMethod = io.grpc.MethodDescriptor.<ai.blip.deckard.AddRequest, ai.blip.deckard.AddResponse>newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Add")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ai.blip.deckard.AddRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ai.blip.deckard.AddResponse.getDefaultInstance())) .setSchemaDescriptor(new DeckardMethodDescriptorSupplier("Add")) .build(); } } } return getAddMethod; } private static volatile io.grpc.MethodDescriptor<ai.blip.deckard.PullRequest, ai.blip.deckard.PullResponse> getPullMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "Pull", requestType = ai.blip.deckard.PullRequest.class, responseType = ai.blip.deckard.PullResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor<ai.blip.deckard.PullRequest, ai.blip.deckard.PullResponse> getPullMethod() { io.grpc.MethodDescriptor<ai.blip.deckard.PullRequest, ai.blip.deckard.PullResponse> getPullMethod; if ((getPullMethod = DeckardGrpc.getPullMethod) == null) { synchronized (DeckardGrpc.class) { if ((getPullMethod = DeckardGrpc.getPullMethod) == null) { DeckardGrpc.getPullMethod = getPullMethod = io.grpc.MethodDescriptor.<ai.blip.deckard.PullRequest, ai.blip.deckard.PullResponse>newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Pull")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ai.blip.deckard.PullRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ai.blip.deckard.PullResponse.getDefaultInstance())) .setSchemaDescriptor(new DeckardMethodDescriptorSupplier("Pull")) .build(); } } } return getPullMethod; } private static volatile io.grpc.MethodDescriptor<ai.blip.deckard.AckRequest, ai.blip.deckard.AckResponse> getAckMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "Ack", requestType = ai.blip.deckard.AckRequest.class, responseType = ai.blip.deckard.AckResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor<ai.blip.deckard.AckRequest, ai.blip.deckard.AckResponse> getAckMethod() { io.grpc.MethodDescriptor<ai.blip.deckard.AckRequest, ai.blip.deckard.AckResponse> getAckMethod; if ((getAckMethod = DeckardGrpc.getAckMethod) == null) { synchronized (DeckardGrpc.class) { if ((getAckMethod = DeckardGrpc.getAckMethod) == null) { DeckardGrpc.getAckMethod = getAckMethod = io.grpc.MethodDescriptor.<ai.blip.deckard.AckRequest, ai.blip.deckard.AckResponse>newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Ack")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ai.blip.deckard.AckRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ai.blip.deckard.AckResponse.getDefaultInstance())) .setSchemaDescriptor(new DeckardMethodDescriptorSupplier("Ack")) .build(); } } } return getAckMethod; } private static volatile io.grpc.MethodDescriptor<ai.blip.deckard.AckRequest, ai.blip.deckard.AckResponse> getNackMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "Nack", requestType = ai.blip.deckard.AckRequest.class, responseType = ai.blip.deckard.AckResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor<ai.blip.deckard.AckRequest, ai.blip.deckard.AckResponse> getNackMethod() { io.grpc.MethodDescriptor<ai.blip.deckard.AckRequest, ai.blip.deckard.AckResponse> getNackMethod; if ((getNackMethod = DeckardGrpc.getNackMethod) == null) { synchronized (DeckardGrpc.class) { if ((getNackMethod = DeckardGrpc.getNackMethod) == null) { DeckardGrpc.getNackMethod = getNackMethod = io.grpc.MethodDescriptor.<ai.blip.deckard.AckRequest, ai.blip.deckard.AckResponse>newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Nack")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ai.blip.deckard.AckRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ai.blip.deckard.AckResponse.getDefaultInstance())) .setSchemaDescriptor(new DeckardMethodDescriptorSupplier("Nack")) .build(); } } } return getNackMethod; } private static volatile io.grpc.MethodDescriptor<ai.blip.deckard.CountRequest, ai.blip.deckard.CountResponse> getCountMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "Count", requestType = ai.blip.deckard.CountRequest.class, responseType = ai.blip.deckard.CountResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor<ai.blip.deckard.CountRequest, ai.blip.deckard.CountResponse> getCountMethod() { io.grpc.MethodDescriptor<ai.blip.deckard.CountRequest, ai.blip.deckard.CountResponse> getCountMethod; if ((getCountMethod = DeckardGrpc.getCountMethod) == null) { synchronized (DeckardGrpc.class) { if ((getCountMethod = DeckardGrpc.getCountMethod) == null) { DeckardGrpc.getCountMethod = getCountMethod = io.grpc.MethodDescriptor.<ai.blip.deckard.CountRequest, ai.blip.deckard.CountResponse>newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Count")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ai.blip.deckard.CountRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ai.blip.deckard.CountResponse.getDefaultInstance())) .setSchemaDescriptor(new DeckardMethodDescriptorSupplier("Count")) .build(); } } } return getCountMethod; } private static volatile io.grpc.MethodDescriptor<ai.blip.deckard.RemoveRequest, ai.blip.deckard.RemoveResponse> getRemoveMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "Remove", requestType = ai.blip.deckard.RemoveRequest.class, responseType = ai.blip.deckard.RemoveResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor<ai.blip.deckard.RemoveRequest, ai.blip.deckard.RemoveResponse> getRemoveMethod() { io.grpc.MethodDescriptor<ai.blip.deckard.RemoveRequest, ai.blip.deckard.RemoveResponse> getRemoveMethod; if ((getRemoveMethod = DeckardGrpc.getRemoveMethod) == null) { synchronized (DeckardGrpc.class) { if ((getRemoveMethod = DeckardGrpc.getRemoveMethod) == null) { DeckardGrpc.getRemoveMethod = getRemoveMethod = io.grpc.MethodDescriptor.<ai.blip.deckard.RemoveRequest, ai.blip.deckard.RemoveResponse>newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Remove")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ai.blip.deckard.RemoveRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ai.blip.deckard.RemoveResponse.getDefaultInstance())) .setSchemaDescriptor(new DeckardMethodDescriptorSupplier("Remove")) .build(); } } } return getRemoveMethod; } private static volatile io.grpc.MethodDescriptor<ai.blip.deckard.FlushRequest, ai.blip.deckard.FlushResponse> getFlushMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "Flush", requestType = ai.blip.deckard.FlushRequest.class, responseType = ai.blip.deckard.FlushResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor<ai.blip.deckard.FlushRequest, ai.blip.deckard.FlushResponse> getFlushMethod() { io.grpc.MethodDescriptor<ai.blip.deckard.FlushRequest, ai.blip.deckard.FlushResponse> getFlushMethod; if ((getFlushMethod = DeckardGrpc.getFlushMethod) == null) { synchronized (DeckardGrpc.class) { if ((getFlushMethod = DeckardGrpc.getFlushMethod) == null) { DeckardGrpc.getFlushMethod = getFlushMethod = io.grpc.MethodDescriptor.<ai.blip.deckard.FlushRequest, ai.blip.deckard.FlushResponse>newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "Flush")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ai.blip.deckard.FlushRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ai.blip.deckard.FlushResponse.getDefaultInstance())) .setSchemaDescriptor(new DeckardMethodDescriptorSupplier("Flush")) .build(); } } } return getFlushMethod; } private static volatile io.grpc.MethodDescriptor<ai.blip.deckard.GetByIdRequest, ai.blip.deckard.GetByIdResponse> getGetByIdMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "GetById", requestType = ai.blip.deckard.GetByIdRequest.class, responseType = ai.blip.deckard.GetByIdResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor<ai.blip.deckard.GetByIdRequest, ai.blip.deckard.GetByIdResponse> getGetByIdMethod() { io.grpc.MethodDescriptor<ai.blip.deckard.GetByIdRequest, ai.blip.deckard.GetByIdResponse> getGetByIdMethod; if ((getGetByIdMethod = DeckardGrpc.getGetByIdMethod) == null) { synchronized (DeckardGrpc.class) { if ((getGetByIdMethod = DeckardGrpc.getGetByIdMethod) == null) { DeckardGrpc.getGetByIdMethod = getGetByIdMethod = io.grpc.MethodDescriptor.<ai.blip.deckard.GetByIdRequest, ai.blip.deckard.GetByIdResponse>newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetById")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ai.blip.deckard.GetByIdRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ai.blip.deckard.GetByIdResponse.getDefaultInstance())) .setSchemaDescriptor(new DeckardMethodDescriptorSupplier("GetById")) .build(); } } } return getGetByIdMethod; } private static volatile io.grpc.MethodDescriptor<ai.blip.deckard.EditQueueRequest, ai.blip.deckard.EditQueueResponse> getEditQueueMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "EditQueue", requestType = ai.blip.deckard.EditQueueRequest.class, responseType = ai.blip.deckard.EditQueueResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor<ai.blip.deckard.EditQueueRequest, ai.blip.deckard.EditQueueResponse> getEditQueueMethod() { io.grpc.MethodDescriptor<ai.blip.deckard.EditQueueRequest, ai.blip.deckard.EditQueueResponse> getEditQueueMethod; if ((getEditQueueMethod = DeckardGrpc.getEditQueueMethod) == null) { synchronized (DeckardGrpc.class) { if ((getEditQueueMethod = DeckardGrpc.getEditQueueMethod) == null) { DeckardGrpc.getEditQueueMethod = getEditQueueMethod = io.grpc.MethodDescriptor.<ai.blip.deckard.EditQueueRequest, ai.blip.deckard.EditQueueResponse>newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "EditQueue")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ai.blip.deckard.EditQueueRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ai.blip.deckard.EditQueueResponse.getDefaultInstance())) .setSchemaDescriptor(new DeckardMethodDescriptorSupplier("EditQueue")) .build(); } } } return getEditQueueMethod; } private static volatile io.grpc.MethodDescriptor<ai.blip.deckard.GetQueueRequest, ai.blip.deckard.GetQueueResponse> getGetQueueMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "GetQueue", requestType = ai.blip.deckard.GetQueueRequest.class, responseType = ai.blip.deckard.GetQueueResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor<ai.blip.deckard.GetQueueRequest, ai.blip.deckard.GetQueueResponse> getGetQueueMethod() { io.grpc.MethodDescriptor<ai.blip.deckard.GetQueueRequest, ai.blip.deckard.GetQueueResponse> getGetQueueMethod; if ((getGetQueueMethod = DeckardGrpc.getGetQueueMethod) == null) { synchronized (DeckardGrpc.class) { if ((getGetQueueMethod = DeckardGrpc.getGetQueueMethod) == null) { DeckardGrpc.getGetQueueMethod = getGetQueueMethod = io.grpc.MethodDescriptor.<ai.blip.deckard.GetQueueRequest, ai.blip.deckard.GetQueueResponse>newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetQueue")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ai.blip.deckard.GetQueueRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( ai.blip.deckard.GetQueueResponse.getDefaultInstance())) .setSchemaDescriptor(new DeckardMethodDescriptorSupplier("GetQueue")) .build(); } } } return getGetQueueMethod; } /** * Creates a new async stub that supports all call types for the service */ public static DeckardStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory<DeckardStub> factory = new io.grpc.stub.AbstractStub.StubFactory<DeckardStub>() { @java.lang.Override public DeckardStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new DeckardStub(channel, callOptions); } }; return DeckardStub.newStub(factory, channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static DeckardBlockingStub newBlockingStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory<DeckardBlockingStub> factory = new io.grpc.stub.AbstractStub.StubFactory<DeckardBlockingStub>() { @java.lang.Override public DeckardBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new DeckardBlockingStub(channel, callOptions); } }; return DeckardBlockingStub.newStub(factory, channel); } /** * Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static DeckardFutureStub newFutureStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory<DeckardFutureStub> factory = new io.grpc.stub.AbstractStub.StubFactory<DeckardFutureStub>() { @java.lang.Override public DeckardFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new DeckardFutureStub(channel, callOptions); } }; return DeckardFutureStub.newStub(factory, channel); } /** */ public interface AsyncService { /** * <pre> * Adds messages to the queue. If any message already exists (same id and queue) it will be updated * </pre> */ default void add(ai.blip.deckard.AddRequest request, io.grpc.stub.StreamObserver<ai.blip.deckard.AddResponse> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAddMethod(), responseObserver); } /** * <pre> * Pulls messages from the queue * </pre> */ default void pull(ai.blip.deckard.PullRequest request, io.grpc.stub.StreamObserver<ai.blip.deckard.PullResponse> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPullMethod(), responseObserver); } /** * <pre> * Acks a message, marking it as successfully processed * </pre> */ default void ack(ai.blip.deckard.AckRequest request, io.grpc.stub.StreamObserver<ai.blip.deckard.AckResponse> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAckMethod(), responseObserver); } /** * <pre> * Nacks a message, marking it as not processed * </pre> */ default void nack(ai.blip.deckard.AckRequest request, io.grpc.stub.StreamObserver<ai.blip.deckard.AckResponse> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getNackMethod(), responseObserver); } /** * <pre> * Counts number of messages on queue based on a filter request * </pre> */ default void count(ai.blip.deckard.CountRequest request, io.grpc.stub.StreamObserver<ai.blip.deckard.CountResponse> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCountMethod(), responseObserver); } /** * <pre> * Removes one or many messages from the queue based on its ids * </pre> */ default void remove(ai.blip.deckard.RemoveRequest request, io.grpc.stub.StreamObserver<ai.blip.deckard.RemoveResponse> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveMethod(), responseObserver); } /** * <pre> * Discards all deckard data from storage and cache. * This request is only available if deckard instance is configured with MEMORY cache and storage. * </pre> */ default void flush(ai.blip.deckard.FlushRequest request, io.grpc.stub.StreamObserver<ai.blip.deckard.FlushResponse> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getFlushMethod(), responseObserver); } /** * <pre> * Gets a message from a specific queue using its id * CAUTION: this should be used mainly for diagnostics and debugging purposes since it will be direct operation on the storage system * </pre> */ default void getById(ai.blip.deckard.GetByIdRequest request, io.grpc.stub.StreamObserver<ai.blip.deckard.GetByIdResponse> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetByIdMethod(), responseObserver); } /** * <pre> * Edits a queue configuration * </pre> */ default void editQueue(ai.blip.deckard.EditQueueRequest request, io.grpc.stub.StreamObserver<ai.blip.deckard.EditQueueResponse> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getEditQueueMethod(), responseObserver); } /** * <pre> * Gets the current configuration for a queue * </pre> */ default void getQueue(ai.blip.deckard.GetQueueRequest request, io.grpc.stub.StreamObserver<ai.blip.deckard.GetQueueResponse> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetQueueMethod(), responseObserver); } } /** * Base class for the server implementation of the service Deckard. */ public static abstract class DeckardImplBase implements io.grpc.BindableService, AsyncService { @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return DeckardGrpc.bindService(this); } } /** * A stub to allow clients to do asynchronous rpc calls to service Deckard. */ public static final class DeckardStub extends io.grpc.stub.AbstractAsyncStub<DeckardStub> { private DeckardStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected DeckardStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new DeckardStub(channel, callOptions); } /** * <pre> * Adds messages to the queue. If any message already exists (same id and queue) it will be updated * </pre> */ public void add(ai.blip.deckard.AddRequest request, io.grpc.stub.StreamObserver<ai.blip.deckard.AddResponse> responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getAddMethod(), getCallOptions()), request, responseObserver); } /** * <pre> * Pulls messages from the queue * </pre> */ public void pull(ai.blip.deckard.PullRequest request, io.grpc.stub.StreamObserver<ai.blip.deckard.PullResponse> responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getPullMethod(), getCallOptions()), request, responseObserver); } /** * <pre> * Acks a message, marking it as successfully processed * </pre> */ public void ack(ai.blip.deckard.AckRequest request, io.grpc.stub.StreamObserver<ai.blip.deckard.AckResponse> responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getAckMethod(), getCallOptions()), request, responseObserver); } /** * <pre> * Nacks a message, marking it as not processed * </pre> */ public void nack(ai.blip.deckard.AckRequest request, io.grpc.stub.StreamObserver<ai.blip.deckard.AckResponse> responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getNackMethod(), getCallOptions()), request, responseObserver); } /** * <pre> * Counts number of messages on queue based on a filter request * </pre> */ public void count(ai.blip.deckard.CountRequest request, io.grpc.stub.StreamObserver<ai.blip.deckard.CountResponse> responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getCountMethod(), getCallOptions()), request, responseObserver); } /** * <pre> * Removes one or many messages from the queue based on its ids * </pre> */ public void remove(ai.blip.deckard.RemoveRequest request, io.grpc.stub.StreamObserver<ai.blip.deckard.RemoveResponse> responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getRemoveMethod(), getCallOptions()), request, responseObserver); } /** * <pre> * Discards all deckard data from storage and cache. * This request is only available if deckard instance is configured with MEMORY cache and storage. * </pre> */ public void flush(ai.blip.deckard.FlushRequest request, io.grpc.stub.StreamObserver<ai.blip.deckard.FlushResponse> responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getFlushMethod(), getCallOptions()), request, responseObserver); } /** * <pre> * Gets a message from a specific queue using its id * CAUTION: this should be used mainly for diagnostics and debugging purposes since it will be direct operation on the storage system * </pre> */ public void getById(ai.blip.deckard.GetByIdRequest request, io.grpc.stub.StreamObserver<ai.blip.deckard.GetByIdResponse> responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getGetByIdMethod(), getCallOptions()), request, responseObserver); } /** * <pre> * Edits a queue configuration * </pre> */ public void editQueue(ai.blip.deckard.EditQueueRequest request, io.grpc.stub.StreamObserver<ai.blip.deckard.EditQueueResponse> responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getEditQueueMethod(), getCallOptions()), request, responseObserver); } /** * <pre> * Gets the current configuration for a queue * </pre> */ public void getQueue(ai.blip.deckard.GetQueueRequest request, io.grpc.stub.StreamObserver<ai.blip.deckard.GetQueueResponse> responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getGetQueueMethod(), getCallOptions()), request, responseObserver); } } /** * A stub to allow clients to do synchronous rpc calls to service Deckard. */ public static final class DeckardBlockingStub extends io.grpc.stub.AbstractBlockingStub<DeckardBlockingStub> { private DeckardBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected DeckardBlockingStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new DeckardBlockingStub(channel, callOptions); } /** * <pre> * Adds messages to the queue. If any message already exists (same id and queue) it will be updated * </pre> */ public ai.blip.deckard.AddResponse add(ai.blip.deckard.AddRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getAddMethod(), getCallOptions(), request); } /** * <pre> * Pulls messages from the queue * </pre> */ public ai.blip.deckard.PullResponse pull(ai.blip.deckard.PullRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getPullMethod(), getCallOptions(), request); } /** * <pre> * Acks a message, marking it as successfully processed * </pre> */ public ai.blip.deckard.AckResponse ack(ai.blip.deckard.AckRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getAckMethod(), getCallOptions(), request); } /** * <pre> * Nacks a message, marking it as not processed * </pre> */ public ai.blip.deckard.AckResponse nack(ai.blip.deckard.AckRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getNackMethod(), getCallOptions(), request); } /** * <pre> * Counts number of messages on queue based on a filter request * </pre> */ public ai.blip.deckard.CountResponse count(ai.blip.deckard.CountRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getCountMethod(), getCallOptions(), request); } /** * <pre> * Removes one or many messages from the queue based on its ids * </pre> */ public ai.blip.deckard.RemoveResponse remove(ai.blip.deckard.RemoveRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getRemoveMethod(), getCallOptions(), request); } /** * <pre> * Discards all deckard data from storage and cache. * This request is only available if deckard instance is configured with MEMORY cache and storage. * </pre> */ public ai.blip.deckard.FlushResponse flush(ai.blip.deckard.FlushRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getFlushMethod(), getCallOptions(), request); } /** * <pre> * Gets a message from a specific queue using its id * CAUTION: this should be used mainly for diagnostics and debugging purposes since it will be direct operation on the storage system * </pre> */ public ai.blip.deckard.GetByIdResponse getById(ai.blip.deckard.GetByIdRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getGetByIdMethod(), getCallOptions(), request); } /** * <pre> * Edits a queue configuration * </pre> */ public ai.blip.deckard.EditQueueResponse editQueue(ai.blip.deckard.EditQueueRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getEditQueueMethod(), getCallOptions(), request); } /** * <pre> * Gets the current configuration for a queue * </pre> */ public ai.blip.deckard.GetQueueResponse getQueue(ai.blip.deckard.GetQueueRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getGetQueueMethod(), getCallOptions(), request); } } /** * A stub to allow clients to do ListenableFuture-style rpc calls to service Deckard. */ public static final class DeckardFutureStub extends io.grpc.stub.AbstractFutureStub<DeckardFutureStub> { private DeckardFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected DeckardFutureStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new DeckardFutureStub(channel, callOptions); } /** * <pre> * Adds messages to the queue. If any message already exists (same id and queue) it will be updated * </pre> */ public com.google.common.util.concurrent.ListenableFuture<ai.blip.deckard.AddResponse> add( ai.blip.deckard.AddRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getAddMethod(), getCallOptions()), request); } /** * <pre> * Pulls messages from the queue * </pre> */ public com.google.common.util.concurrent.ListenableFuture<ai.blip.deckard.PullResponse> pull( ai.blip.deckard.PullRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getPullMethod(), getCallOptions()), request); } /** * <pre> * Acks a message, marking it as successfully processed * </pre> */ public com.google.common.util.concurrent.ListenableFuture<ai.blip.deckard.AckResponse> ack( ai.blip.deckard.AckRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getAckMethod(), getCallOptions()), request); } /** * <pre> * Nacks a message, marking it as not processed * </pre> */ public com.google.common.util.concurrent.ListenableFuture<ai.blip.deckard.AckResponse> nack( ai.blip.deckard.AckRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getNackMethod(), getCallOptions()), request); } /** * <pre> * Counts number of messages on queue based on a filter request * </pre> */ public com.google.common.util.concurrent.ListenableFuture<ai.blip.deckard.CountResponse> count( ai.blip.deckard.CountRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getCountMethod(), getCallOptions()), request); } /** * <pre> * Removes one or many messages from the queue based on its ids * </pre> */ public com.google.common.util.concurrent.ListenableFuture<ai.blip.deckard.RemoveResponse> remove( ai.blip.deckard.RemoveRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getRemoveMethod(), getCallOptions()), request); } /** * <pre> * Discards all deckard data from storage and cache. * This request is only available if deckard instance is configured with MEMORY cache and storage. * </pre> */ public com.google.common.util.concurrent.ListenableFuture<ai.blip.deckard.FlushResponse> flush( ai.blip.deckard.FlushRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getFlushMethod(), getCallOptions()), request); } /** * <pre> * Gets a message from a specific queue using its id * CAUTION: this should be used mainly for diagnostics and debugging purposes since it will be direct operation on the storage system * </pre> */ public com.google.common.util.concurrent.ListenableFuture<ai.blip.deckard.GetByIdResponse> getById( ai.blip.deckard.GetByIdRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getGetByIdMethod(), getCallOptions()), request); } /** * <pre> * Edits a queue configuration * </pre> */ public com.google.common.util.concurrent.ListenableFuture<ai.blip.deckard.EditQueueResponse> editQueue( ai.blip.deckard.EditQueueRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getEditQueueMethod(), getCallOptions()), request); } /** * <pre> * Gets the current configuration for a queue * </pre> */ public com.google.common.util.concurrent.ListenableFuture<ai.blip.deckard.GetQueueResponse> getQueue( ai.blip.deckard.GetQueueRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getGetQueueMethod(), getCallOptions()), request); } } private static final int METHODID_ADD = 0; private static final int METHODID_PULL = 1; private static final int METHODID_ACK = 2; private static final int METHODID_NACK = 3; private static final int METHODID_COUNT = 4; private static final int METHODID_REMOVE = 5; private static final int METHODID_FLUSH = 6; private static final int METHODID_GET_BY_ID = 7; private static final int METHODID_EDIT_QUEUE = 8; private static final int METHODID_GET_QUEUE = 9; private static final class MethodHandlers<Req, Resp> implements io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>, io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>, io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>, io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> { private final AsyncService serviceImpl; private final int methodId; MethodHandlers(AsyncService 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<Resp> responseObserver) { switch (methodId) { case METHODID_ADD: serviceImpl.add((ai.blip.deckard.AddRequest) request, (io.grpc.stub.StreamObserver<ai.blip.deckard.AddResponse>) responseObserver); break; case METHODID_PULL: serviceImpl.pull((ai.blip.deckard.PullRequest) request, (io.grpc.stub.StreamObserver<ai.blip.deckard.PullResponse>) responseObserver); break; case METHODID_ACK: serviceImpl.ack((ai.blip.deckard.AckRequest) request, (io.grpc.stub.StreamObserver<ai.blip.deckard.AckResponse>) responseObserver); break; case METHODID_NACK: serviceImpl.nack((ai.blip.deckard.AckRequest) request, (io.grpc.stub.StreamObserver<ai.blip.deckard.AckResponse>) responseObserver); break; case METHODID_COUNT: serviceImpl.count((ai.blip.deckard.CountRequest) request, (io.grpc.stub.StreamObserver<ai.blip.deckard.CountResponse>) responseObserver); break; case METHODID_REMOVE: serviceImpl.remove((ai.blip.deckard.RemoveRequest) request, (io.grpc.stub.StreamObserver<ai.blip.deckard.RemoveResponse>) responseObserver); break; case METHODID_FLUSH: serviceImpl.flush((ai.blip.deckard.FlushRequest) request, (io.grpc.stub.StreamObserver<ai.blip.deckard.FlushResponse>) responseObserver); break; case METHODID_GET_BY_ID: serviceImpl.getById((ai.blip.deckard.GetByIdRequest) request, (io.grpc.stub.StreamObserver<ai.blip.deckard.GetByIdResponse>) responseObserver); break; case METHODID_EDIT_QUEUE: serviceImpl.editQueue((ai.blip.deckard.EditQueueRequest) request, (io.grpc.stub.StreamObserver<ai.blip.deckard.EditQueueResponse>) responseObserver); break; case METHODID_GET_QUEUE: serviceImpl.getQueue((ai.blip.deckard.GetQueueRequest) request, (io.grpc.stub.StreamObserver<ai.blip.deckard.GetQueueResponse>) responseObserver); break; default: throw new AssertionError(); } } @java.lang.Override @java.lang.SuppressWarnings("unchecked") public io.grpc.stub.StreamObserver<Req> invoke( io.grpc.stub.StreamObserver<Resp> responseObserver) { switch (methodId) { default: throw new AssertionError(); } } } public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( getAddMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< ai.blip.deckard.AddRequest, ai.blip.deckard.AddResponse>( service, METHODID_ADD))) .addMethod( getPullMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< ai.blip.deckard.PullRequest, ai.blip.deckard.PullResponse>( service, METHODID_PULL))) .addMethod( getAckMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< ai.blip.deckard.AckRequest, ai.blip.deckard.AckResponse>( service, METHODID_ACK))) .addMethod( getNackMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< ai.blip.deckard.AckRequest, ai.blip.deckard.AckResponse>( service, METHODID_NACK))) .addMethod( getCountMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< ai.blip.deckard.CountRequest, ai.blip.deckard.CountResponse>( service, METHODID_COUNT))) .addMethod( getRemoveMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< ai.blip.deckard.RemoveRequest, ai.blip.deckard.RemoveResponse>( service, METHODID_REMOVE))) .addMethod( getFlushMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< ai.blip.deckard.FlushRequest, ai.blip.deckard.FlushResponse>( service, METHODID_FLUSH))) .addMethod( getGetByIdMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< ai.blip.deckard.GetByIdRequest, ai.blip.deckard.GetByIdResponse>( service, METHODID_GET_BY_ID))) .addMethod( getEditQueueMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< ai.blip.deckard.EditQueueRequest, ai.blip.deckard.EditQueueResponse>( service, METHODID_EDIT_QUEUE))) .addMethod( getGetQueueMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< ai.blip.deckard.GetQueueRequest, ai.blip.deckard.GetQueueResponse>( service, METHODID_GET_QUEUE))) .build(); } private static abstract class DeckardBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { DeckardBaseDescriptorSupplier() {} @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { return ai.blip.deckard.DeckardService.getDescriptor(); } @java.lang.Override public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { return getFileDescriptor().findServiceByName("Deckard"); } } private static final class DeckardFileDescriptorSupplier extends DeckardBaseDescriptorSupplier { DeckardFileDescriptorSupplier() {} } private static final class DeckardMethodDescriptorSupplier extends DeckardBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { private final java.lang.String methodName; DeckardMethodDescriptorSupplier(java.lang.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 (DeckardGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new DeckardFileDescriptorSupplier()) .addMethod(getAddMethod()) .addMethod(getPullMethod()) .addMethod(getAckMethod()) .addMethod(getNackMethod()) .addMethod(getCountMethod()) .addMethod(getRemoveMethod()) .addMethod(getFlushMethod()) .addMethod(getGetByIdMethod()) .addMethod(getEditQueueMethod()) .addMethod(getGetQueueMethod()) .build(); } } } return result; } }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/DeckardService.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; public final class DeckardService { private DeckardService() {} public static void registerAllExtensions( com.google.protobuf.ExtensionRegistryLite registry) { } public static void registerAllExtensions( com.google.protobuf.ExtensionRegistry registry) { registerAllExtensions( (com.google.protobuf.ExtensionRegistryLite) registry); } static final com.google.protobuf.Descriptors.Descriptor internal_static_blipai_deckard_GetByIdRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_blipai_deckard_GetByIdRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_blipai_deckard_GetByIdResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_blipai_deckard_GetByIdResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_blipai_deckard_GetByIdResponse_HumanReadablePayloadEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_blipai_deckard_GetByIdResponse_HumanReadablePayloadEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_blipai_deckard_RemoveRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_blipai_deckard_RemoveRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_blipai_deckard_RemoveResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_blipai_deckard_RemoveResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_blipai_deckard_PullRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_blipai_deckard_PullRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_blipai_deckard_PullResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_blipai_deckard_PullResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_blipai_deckard_Message_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_blipai_deckard_Message_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_blipai_deckard_Message_PayloadEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_blipai_deckard_Message_PayloadEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_blipai_deckard_Message_MetadataEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_blipai_deckard_Message_MetadataEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_blipai_deckard_MessageDiagnostics_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_blipai_deckard_MessageDiagnostics_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_blipai_deckard_CountRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_blipai_deckard_CountRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_blipai_deckard_CountResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_blipai_deckard_CountResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_blipai_deckard_AddRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_blipai_deckard_AddRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_blipai_deckard_AddMessage_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_blipai_deckard_AddMessage_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_blipai_deckard_AddMessage_PayloadEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_blipai_deckard_AddMessage_PayloadEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_blipai_deckard_AddMessage_MetadataEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_blipai_deckard_AddMessage_MetadataEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_blipai_deckard_AddResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_blipai_deckard_AddResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_blipai_deckard_EditQueueRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_blipai_deckard_EditQueueRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_blipai_deckard_EditQueueResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_blipai_deckard_EditQueueResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_blipai_deckard_QueueConfiguration_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_blipai_deckard_QueueConfiguration_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_blipai_deckard_GetQueueRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_blipai_deckard_GetQueueRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_blipai_deckard_GetQueueResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_blipai_deckard_GetQueueResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_blipai_deckard_AckRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_blipai_deckard_AckRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_blipai_deckard_AckResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_blipai_deckard_AckResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_blipai_deckard_FlushRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_blipai_deckard_FlushRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_blipai_deckard_FlushResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_blipai_deckard_FlushResponse_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\033proto/deckard_service.proto\022\016blipai.de" + "ckard\032\031google/protobuf/any.proto\"+\n\016GetB" + "yIdRequest\022\r\n\005queue\030\001 \001(\t\022\n\n\002id\030\002 \001(\t\"\342\001" + "\n\017GetByIdResponse\022(\n\007message\030\001 \001(\0132\027.bli" + "pai.deckard.Message\022Y\n\026human_readable_pa" + "yload\030\003 \003(\01329.blipai.deckard.GetByIdResp" + "onse.HumanReadablePayloadEntry\022\r\n\005found\030" + "\002 \001(\010\032;\n\031HumanReadablePayloadEntry\022\013\n\003ke" + "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"+\n\rRemoveRequ" + "est\022\013\n\003ids\030\001 \003(\t\022\r\n\005queue\030\002 \001(\t\">\n\016Remov" + "eResponse\022\024\n\014cacheRemoved\030\001 \001(\003\022\026\n\016stora" + "geRemoved\030\002 \001(\003\"\205\001\n\013PullRequest\022\r\n\005queue" + "\030\001 \001(\t\022\016\n\006amount\030\002 \001(\005\022\030\n\014score_filter\030\003" + " \001(\003B\002\030\001\022\021\n\tmax_score\030\004 \001(\001\022\021\n\tmin_score" + "\030\005 \001(\001\022\027\n\017ack_deadline_ms\030\006 \001(\003\"9\n\014PullR" + "esponse\022)\n\010messages\030\001 \003(\0132\027.blipai.decka" + "rd.Message\"\224\003\n\007Message\022\n\n\002id\030\001 \001(\t\022\023\n\013de" + "scription\030\002 \001(\t\022\r\n\005queue\030\003 \001(\t\0225\n\007payloa" + "d\030\010 \003(\0132$.blipai.deckard.Message.Payload" + "Entry\0227\n\010metadata\030\004 \003(\0132%.blipai.deckard" + ".Message.MetadataEntry\022\026\n\016string_payload" + "\030\005 \001(\t\022\r\n\005score\030\006 \001(\001\022\022\n\nbreakpoint\030\007 \001(" + "\t\0227\n\013diagnostics\030\t \001(\0132\".blipai.deckard." + "MessageDiagnostics\032D\n\014PayloadEntry\022\013\n\003ke" + "y\030\001 \001(\t\022#\n\005value\030\002 \001(\0132\024.google.protobuf" + ".Any:\0028\001\032/\n\rMetadataEntry\022\013\n\003key\030\001 \001(\t\022\r" + "\n\005value\030\002 \001(\t:\0028\001\"f\n\022MessageDiagnostics\022" + "\014\n\004acks\030\001 \001(\003\022\r\n\005nacks\030\002 \001(\003\022\030\n\020consecut" + "ive_acks\030\003 \001(\003\022\031\n\021consecutive_nacks\030\004 \001(" + "\003\"#\n\014CountRequest\022\r\n\005queue\030\001 \001(\tJ\004\010\002\020\003\"\036" + "\n\rCountResponse\022\r\n\005count\030\001 \001(\003\":\n\nAddReq" + "uest\022,\n\010messages\030\001 \003(\0132\032.blipai.deckard." + "AddMessage\"\211\003\n\nAddMessage\022\n\n\002id\030\001 \001(\t\0228\n" + "\007payload\030\n \003(\0132\'.blipai.deckard.AddMessa" + "ge.PayloadEntry\022\026\n\016string_payload\030\003 \001(\t\022" + ":\n\010metadata\030\013 \003(\0132(.blipai.deckard.AddMe" + "ssage.MetadataEntry\022\r\n\005queue\030\004 \001(\t\022\020\n\010ti" + "meless\030\006 \001(\010\022\023\n\013ttl_minutes\030\007 \001(\003\022\023\n\013des" + "cription\030\010 \001(\t\022\r\n\005score\030\014 \001(\001\032D\n\014Payload" + "Entry\022\013\n\003key\030\001 \001(\t\022#\n\005value\030\002 \001(\0132\024.goog" + "le.protobuf.Any:\0028\001\032/\n\rMetadataEntry\022\013\n\003" + "key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001J\004\010\005\020\006J\004\010\002\020\003" + "J\004\010\t\020\n\";\n\013AddResponse\022\025\n\rcreated_count\030\001" + " \001(\003\022\025\n\rupdated_count\030\002 \001(\003\"\\\n\020EditQueue" + "Request\022\r\n\005queue\030\001 \001(\t\0229\n\rconfiguration\030" + "\002 \001(\0132\".blipai.deckard.QueueConfiguratio" + "n\"3\n\021EditQueueResponse\022\r\n\005queue\030\001 \001(\t\022\017\n" + "\007success\030\002 \001(\010\"*\n\022QueueConfiguration\022\024\n\014" + "max_elements\030\001 \001(\003\" \n\017GetQueueRequest\022\r\n" + "\005queue\030\001 \001(\t\"\\\n\020GetQueueResponse\022\r\n\005queu" + "e\030\001 \001(\t\0229\n\rconfiguration\030\002 \001(\0132\".blipai." + "deckard.QueueConfiguration\"\236\001\n\nAckReques" + "t\022\n\n\002id\030\001 \001(\t\022\r\n\005queue\030\002 \001(\t\022\016\n\006reason\030\005" + " \001(\t\022\032\n\016score_subtract\030\003 \001(\001B\002\030\001\022\022\n\nbrea" + "kpoint\030\004 \001(\t\022\017\n\007lock_ms\030\006 \001(\003\022\025\n\rremoveM" + "essage\030\007 \001(\010\022\r\n\005score\030\n \001(\001\"X\n\013AckRespon" + "se\022\017\n\007success\030\001 \001(\010\0228\n\020removal_response\030" + "\002 \001(\0132\036.blipai.deckard.RemoveResponse\"\016\n" + "\014FlushRequest\" \n\rFlushResponse\022\017\n\007succes" + "s\030\001 \001(\0102\317\005\n\007Deckard\022>\n\003Add\022\032.blipai.deck" + "ard.AddRequest\032\033.blipai.deckard.AddRespo" + "nse\022A\n\004Pull\022\033.blipai.deckard.PullRequest" + "\032\034.blipai.deckard.PullResponse\022>\n\003Ack\022\032." + "blipai.deckard.AckRequest\032\033.blipai.decka" + "rd.AckResponse\022?\n\004Nack\022\032.blipai.deckard." + "AckRequest\032\033.blipai.deckard.AckResponse\022" + "D\n\005Count\022\034.blipai.deckard.CountRequest\032\035" + ".blipai.deckard.CountResponse\022G\n\006Remove\022" + "\035.blipai.deckard.RemoveRequest\032\036.blipai." + "deckard.RemoveResponse\022D\n\005Flush\022\034.blipai" + ".deckard.FlushRequest\032\035.blipai.deckard.F" + "lushResponse\022J\n\007GetById\022\036.blipai.deckard" + ".GetByIdRequest\032\037.blipai.deckard.GetById" + "Response\022P\n\tEditQueue\022 .blipai.deckard.E" + "ditQueueRequest\032!.blipai.deckard.EditQue" + "ueResponse\022M\n\010GetQueue\022\037.blipai.deckard." + "GetQueueRequest\032 .blipai.deckard.GetQueu" + "eResponseBA\n\017ai.blip.deckardP\001Z\032github.c" + "om/takenet/deckard\252\002\017Takenet.Deckardb\006pr" + "oto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.protobuf.AnyProto.getDescriptor(), }); internal_static_blipai_deckard_GetByIdRequest_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_blipai_deckard_GetByIdRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_blipai_deckard_GetByIdRequest_descriptor, new java.lang.String[] { "Queue", "Id", }); internal_static_blipai_deckard_GetByIdResponse_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_blipai_deckard_GetByIdResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_blipai_deckard_GetByIdResponse_descriptor, new java.lang.String[] { "Message", "HumanReadablePayload", "Found", }); internal_static_blipai_deckard_GetByIdResponse_HumanReadablePayloadEntry_descriptor = internal_static_blipai_deckard_GetByIdResponse_descriptor.getNestedTypes().get(0); internal_static_blipai_deckard_GetByIdResponse_HumanReadablePayloadEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_blipai_deckard_GetByIdResponse_HumanReadablePayloadEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_blipai_deckard_RemoveRequest_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_blipai_deckard_RemoveRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_blipai_deckard_RemoveRequest_descriptor, new java.lang.String[] { "Ids", "Queue", }); internal_static_blipai_deckard_RemoveResponse_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_blipai_deckard_RemoveResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_blipai_deckard_RemoveResponse_descriptor, new java.lang.String[] { "CacheRemoved", "StorageRemoved", }); internal_static_blipai_deckard_PullRequest_descriptor = getDescriptor().getMessageTypes().get(4); internal_static_blipai_deckard_PullRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_blipai_deckard_PullRequest_descriptor, new java.lang.String[] { "Queue", "Amount", "ScoreFilter", "MaxScore", "MinScore", "AckDeadlineMs", }); internal_static_blipai_deckard_PullResponse_descriptor = getDescriptor().getMessageTypes().get(5); internal_static_blipai_deckard_PullResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_blipai_deckard_PullResponse_descriptor, new java.lang.String[] { "Messages", }); internal_static_blipai_deckard_Message_descriptor = getDescriptor().getMessageTypes().get(6); internal_static_blipai_deckard_Message_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_blipai_deckard_Message_descriptor, new java.lang.String[] { "Id", "Description", "Queue", "Payload", "Metadata", "StringPayload", "Score", "Breakpoint", "Diagnostics", }); internal_static_blipai_deckard_Message_PayloadEntry_descriptor = internal_static_blipai_deckard_Message_descriptor.getNestedTypes().get(0); internal_static_blipai_deckard_Message_PayloadEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_blipai_deckard_Message_PayloadEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_blipai_deckard_Message_MetadataEntry_descriptor = internal_static_blipai_deckard_Message_descriptor.getNestedTypes().get(1); internal_static_blipai_deckard_Message_MetadataEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_blipai_deckard_Message_MetadataEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_blipai_deckard_MessageDiagnostics_descriptor = getDescriptor().getMessageTypes().get(7); internal_static_blipai_deckard_MessageDiagnostics_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_blipai_deckard_MessageDiagnostics_descriptor, new java.lang.String[] { "Acks", "Nacks", "ConsecutiveAcks", "ConsecutiveNacks", }); internal_static_blipai_deckard_CountRequest_descriptor = getDescriptor().getMessageTypes().get(8); internal_static_blipai_deckard_CountRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_blipai_deckard_CountRequest_descriptor, new java.lang.String[] { "Queue", }); internal_static_blipai_deckard_CountResponse_descriptor = getDescriptor().getMessageTypes().get(9); internal_static_blipai_deckard_CountResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_blipai_deckard_CountResponse_descriptor, new java.lang.String[] { "Count", }); internal_static_blipai_deckard_AddRequest_descriptor = getDescriptor().getMessageTypes().get(10); internal_static_blipai_deckard_AddRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_blipai_deckard_AddRequest_descriptor, new java.lang.String[] { "Messages", }); internal_static_blipai_deckard_AddMessage_descriptor = getDescriptor().getMessageTypes().get(11); internal_static_blipai_deckard_AddMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_blipai_deckard_AddMessage_descriptor, new java.lang.String[] { "Id", "Payload", "StringPayload", "Metadata", "Queue", "Timeless", "TtlMinutes", "Description", "Score", }); internal_static_blipai_deckard_AddMessage_PayloadEntry_descriptor = internal_static_blipai_deckard_AddMessage_descriptor.getNestedTypes().get(0); internal_static_blipai_deckard_AddMessage_PayloadEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_blipai_deckard_AddMessage_PayloadEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_blipai_deckard_AddMessage_MetadataEntry_descriptor = internal_static_blipai_deckard_AddMessage_descriptor.getNestedTypes().get(1); internal_static_blipai_deckard_AddMessage_MetadataEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_blipai_deckard_AddMessage_MetadataEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_blipai_deckard_AddResponse_descriptor = getDescriptor().getMessageTypes().get(12); internal_static_blipai_deckard_AddResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_blipai_deckard_AddResponse_descriptor, new java.lang.String[] { "CreatedCount", "UpdatedCount", }); internal_static_blipai_deckard_EditQueueRequest_descriptor = getDescriptor().getMessageTypes().get(13); internal_static_blipai_deckard_EditQueueRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_blipai_deckard_EditQueueRequest_descriptor, new java.lang.String[] { "Queue", "Configuration", }); internal_static_blipai_deckard_EditQueueResponse_descriptor = getDescriptor().getMessageTypes().get(14); internal_static_blipai_deckard_EditQueueResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_blipai_deckard_EditQueueResponse_descriptor, new java.lang.String[] { "Queue", "Success", }); internal_static_blipai_deckard_QueueConfiguration_descriptor = getDescriptor().getMessageTypes().get(15); internal_static_blipai_deckard_QueueConfiguration_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_blipai_deckard_QueueConfiguration_descriptor, new java.lang.String[] { "MaxElements", }); internal_static_blipai_deckard_GetQueueRequest_descriptor = getDescriptor().getMessageTypes().get(16); internal_static_blipai_deckard_GetQueueRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_blipai_deckard_GetQueueRequest_descriptor, new java.lang.String[] { "Queue", }); internal_static_blipai_deckard_GetQueueResponse_descriptor = getDescriptor().getMessageTypes().get(17); internal_static_blipai_deckard_GetQueueResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_blipai_deckard_GetQueueResponse_descriptor, new java.lang.String[] { "Queue", "Configuration", }); internal_static_blipai_deckard_AckRequest_descriptor = getDescriptor().getMessageTypes().get(18); internal_static_blipai_deckard_AckRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_blipai_deckard_AckRequest_descriptor, new java.lang.String[] { "Id", "Queue", "Reason", "ScoreSubtract", "Breakpoint", "LockMs", "RemoveMessage", "Score", }); internal_static_blipai_deckard_AckResponse_descriptor = getDescriptor().getMessageTypes().get(19); internal_static_blipai_deckard_AckResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_blipai_deckard_AckResponse_descriptor, new java.lang.String[] { "Success", "RemovalResponse", }); internal_static_blipai_deckard_FlushRequest_descriptor = getDescriptor().getMessageTypes().get(20); internal_static_blipai_deckard_FlushRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_blipai_deckard_FlushRequest_descriptor, new java.lang.String[] { }); internal_static_blipai_deckard_FlushResponse_descriptor = getDescriptor().getMessageTypes().get(21); internal_static_blipai_deckard_FlushResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_blipai_deckard_FlushResponse_descriptor, new java.lang.String[] { "Success", }); com.google.protobuf.AnyProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/EditQueueRequest.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; /** * Protobuf type {@code blipai.deckard.EditQueueRequest} */ public final class EditQueueRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:blipai.deckard.EditQueueRequest) EditQueueRequestOrBuilder { private static final long serialVersionUID = 0L; // Use EditQueueRequest.newBuilder() to construct. private EditQueueRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private EditQueueRequest() { queue_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new EditQueueRequest(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_EditQueueRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_EditQueueRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.EditQueueRequest.class, ai.blip.deckard.EditQueueRequest.Builder.class); } private int bitField0_; public static final int QUEUE_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object queue_ = ""; /** * <pre> * Name of the queue to be updated * This includes all prefixes and suffixes * </pre> * * <code>string queue = 1;</code> * @return The queue. */ @java.lang.Override public java.lang.String getQueue() { java.lang.Object ref = queue_; 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(); queue_ = s; return s; } } /** * <pre> * Name of the queue to be updated * This includes all prefixes and suffixes * </pre> * * <code>string queue = 1;</code> * @return The bytes for queue. */ @java.lang.Override public com.google.protobuf.ByteString getQueueBytes() { java.lang.Object ref = queue_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); queue_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int CONFIGURATION_FIELD_NUMBER = 2; private ai.blip.deckard.QueueConfiguration configuration_; /** * <pre> * Configuration to apply to the queue. It will always update the queue with the newer configuration. * Only available fields will be updated, meaning that previously configured fields will not be change unless you explicit set it. * If you want to change a configuration to its default value, manually set it to its default value following each field documentation. * </pre> * * <code>.blipai.deckard.QueueConfiguration configuration = 2;</code> * @return Whether the configuration field is set. */ @java.lang.Override public boolean hasConfiguration() { return ((bitField0_ & 0x00000001) != 0); } /** * <pre> * Configuration to apply to the queue. It will always update the queue with the newer configuration. * Only available fields will be updated, meaning that previously configured fields will not be change unless you explicit set it. * If you want to change a configuration to its default value, manually set it to its default value following each field documentation. * </pre> * * <code>.blipai.deckard.QueueConfiguration configuration = 2;</code> * @return The configuration. */ @java.lang.Override public ai.blip.deckard.QueueConfiguration getConfiguration() { return configuration_ == null ? ai.blip.deckard.QueueConfiguration.getDefaultInstance() : configuration_; } /** * <pre> * Configuration to apply to the queue. It will always update the queue with the newer configuration. * Only available fields will be updated, meaning that previously configured fields will not be change unless you explicit set it. * If you want to change a configuration to its default value, manually set it to its default value following each field documentation. * </pre> * * <code>.blipai.deckard.QueueConfiguration configuration = 2;</code> */ @java.lang.Override public ai.blip.deckard.QueueConfigurationOrBuilder getConfigurationOrBuilder() { return configuration_ == null ? ai.blip.deckard.QueueConfiguration.getDefaultInstance() : configuration_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queue_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, queue_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getConfiguration()); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queue_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, queue_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getConfiguration()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof ai.blip.deckard.EditQueueRequest)) { return super.equals(obj); } ai.blip.deckard.EditQueueRequest other = (ai.blip.deckard.EditQueueRequest) obj; if (!getQueue() .equals(other.getQueue())) return false; if (hasConfiguration() != other.hasConfiguration()) return false; if (hasConfiguration()) { if (!getConfiguration() .equals(other.getConfiguration())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + QUEUE_FIELD_NUMBER; hash = (53 * hash) + getQueue().hashCode(); if (hasConfiguration()) { hash = (37 * hash) + CONFIGURATION_FIELD_NUMBER; hash = (53 * hash) + getConfiguration().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static ai.blip.deckard.EditQueueRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.EditQueueRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.EditQueueRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.EditQueueRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.EditQueueRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.EditQueueRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.EditQueueRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.EditQueueRequest 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 ai.blip.deckard.EditQueueRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ai.blip.deckard.EditQueueRequest 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 ai.blip.deckard.EditQueueRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.EditQueueRequest 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(ai.blip.deckard.EditQueueRequest 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 blipai.deckard.EditQueueRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:blipai.deckard.EditQueueRequest) ai.blip.deckard.EditQueueRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_EditQueueRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_EditQueueRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.EditQueueRequest.class, ai.blip.deckard.EditQueueRequest.Builder.class); } // Construct using ai.blip.deckard.EditQueueRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getConfigurationFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; queue_ = ""; configuration_ = null; if (configurationBuilder_ != null) { configurationBuilder_.dispose(); configurationBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_EditQueueRequest_descriptor; } @java.lang.Override public ai.blip.deckard.EditQueueRequest getDefaultInstanceForType() { return ai.blip.deckard.EditQueueRequest.getDefaultInstance(); } @java.lang.Override public ai.blip.deckard.EditQueueRequest build() { ai.blip.deckard.EditQueueRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public ai.blip.deckard.EditQueueRequest buildPartial() { ai.blip.deckard.EditQueueRequest result = new ai.blip.deckard.EditQueueRequest(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(ai.blip.deckard.EditQueueRequest result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.queue_ = queue_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000002) != 0)) { result.configuration_ = configurationBuilder_ == null ? configuration_ : configurationBuilder_.build(); to_bitField0_ |= 0x00000001; } result.bitField0_ |= to_bitField0_; } @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 ai.blip.deckard.EditQueueRequest) { return mergeFrom((ai.blip.deckard.EditQueueRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ai.blip.deckard.EditQueueRequest other) { if (other == ai.blip.deckard.EditQueueRequest.getDefaultInstance()) return this; if (!other.getQueue().isEmpty()) { queue_ = other.queue_; bitField0_ |= 0x00000001; onChanged(); } if (other.hasConfiguration()) { mergeConfiguration(other.getConfiguration()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { queue_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 18: { input.readMessage( getConfigurationFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object queue_ = ""; /** * <pre> * Name of the queue to be updated * This includes all prefixes and suffixes * </pre> * * <code>string queue = 1;</code> * @return The queue. */ public java.lang.String getQueue() { java.lang.Object ref = queue_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); queue_ = s; return s; } else { return (java.lang.String) ref; } } /** * <pre> * Name of the queue to be updated * This includes all prefixes and suffixes * </pre> * * <code>string queue = 1;</code> * @return The bytes for queue. */ public com.google.protobuf.ByteString getQueueBytes() { java.lang.Object ref = queue_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); queue_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Name of the queue to be updated * This includes all prefixes and suffixes * </pre> * * <code>string queue = 1;</code> * @param value The queue to set. * @return This builder for chaining. */ public Builder setQueue( java.lang.String value) { if (value == null) { throw new NullPointerException(); } queue_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * <pre> * Name of the queue to be updated * This includes all prefixes and suffixes * </pre> * * <code>string queue = 1;</code> * @return This builder for chaining. */ public Builder clearQueue() { queue_ = getDefaultInstance().getQueue(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * <pre> * Name of the queue to be updated * This includes all prefixes and suffixes * </pre> * * <code>string queue = 1;</code> * @param value The bytes for queue to set. * @return This builder for chaining. */ public Builder setQueueBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); queue_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private ai.blip.deckard.QueueConfiguration configuration_; private com.google.protobuf.SingleFieldBuilderV3< ai.blip.deckard.QueueConfiguration, ai.blip.deckard.QueueConfiguration.Builder, ai.blip.deckard.QueueConfigurationOrBuilder> configurationBuilder_; /** * <pre> * Configuration to apply to the queue. It will always update the queue with the newer configuration. * Only available fields will be updated, meaning that previously configured fields will not be change unless you explicit set it. * If you want to change a configuration to its default value, manually set it to its default value following each field documentation. * </pre> * * <code>.blipai.deckard.QueueConfiguration configuration = 2;</code> * @return Whether the configuration field is set. */ public boolean hasConfiguration() { return ((bitField0_ & 0x00000002) != 0); } /** * <pre> * Configuration to apply to the queue. It will always update the queue with the newer configuration. * Only available fields will be updated, meaning that previously configured fields will not be change unless you explicit set it. * If you want to change a configuration to its default value, manually set it to its default value following each field documentation. * </pre> * * <code>.blipai.deckard.QueueConfiguration configuration = 2;</code> * @return The configuration. */ public ai.blip.deckard.QueueConfiguration getConfiguration() { if (configurationBuilder_ == null) { return configuration_ == null ? ai.blip.deckard.QueueConfiguration.getDefaultInstance() : configuration_; } else { return configurationBuilder_.getMessage(); } } /** * <pre> * Configuration to apply to the queue. It will always update the queue with the newer configuration. * Only available fields will be updated, meaning that previously configured fields will not be change unless you explicit set it. * If you want to change a configuration to its default value, manually set it to its default value following each field documentation. * </pre> * * <code>.blipai.deckard.QueueConfiguration configuration = 2;</code> */ public Builder setConfiguration(ai.blip.deckard.QueueConfiguration value) { if (configurationBuilder_ == null) { if (value == null) { throw new NullPointerException(); } configuration_ = value; } else { configurationBuilder_.setMessage(value); } bitField0_ |= 0x00000002; onChanged(); return this; } /** * <pre> * Configuration to apply to the queue. It will always update the queue with the newer configuration. * Only available fields will be updated, meaning that previously configured fields will not be change unless you explicit set it. * If you want to change a configuration to its default value, manually set it to its default value following each field documentation. * </pre> * * <code>.blipai.deckard.QueueConfiguration configuration = 2;</code> */ public Builder setConfiguration( ai.blip.deckard.QueueConfiguration.Builder builderForValue) { if (configurationBuilder_ == null) { configuration_ = builderForValue.build(); } else { configurationBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; onChanged(); return this; } /** * <pre> * Configuration to apply to the queue. It will always update the queue with the newer configuration. * Only available fields will be updated, meaning that previously configured fields will not be change unless you explicit set it. * If you want to change a configuration to its default value, manually set it to its default value following each field documentation. * </pre> * * <code>.blipai.deckard.QueueConfiguration configuration = 2;</code> */ public Builder mergeConfiguration(ai.blip.deckard.QueueConfiguration value) { if (configurationBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0) && configuration_ != null && configuration_ != ai.blip.deckard.QueueConfiguration.getDefaultInstance()) { getConfigurationBuilder().mergeFrom(value); } else { configuration_ = value; } } else { configurationBuilder_.mergeFrom(value); } if (configuration_ != null) { bitField0_ |= 0x00000002; onChanged(); } return this; } /** * <pre> * Configuration to apply to the queue. It will always update the queue with the newer configuration. * Only available fields will be updated, meaning that previously configured fields will not be change unless you explicit set it. * If you want to change a configuration to its default value, manually set it to its default value following each field documentation. * </pre> * * <code>.blipai.deckard.QueueConfiguration configuration = 2;</code> */ public Builder clearConfiguration() { bitField0_ = (bitField0_ & ~0x00000002); configuration_ = null; if (configurationBuilder_ != null) { configurationBuilder_.dispose(); configurationBuilder_ = null; } onChanged(); return this; } /** * <pre> * Configuration to apply to the queue. It will always update the queue with the newer configuration. * Only available fields will be updated, meaning that previously configured fields will not be change unless you explicit set it. * If you want to change a configuration to its default value, manually set it to its default value following each field documentation. * </pre> * * <code>.blipai.deckard.QueueConfiguration configuration = 2;</code> */ public ai.blip.deckard.QueueConfiguration.Builder getConfigurationBuilder() { bitField0_ |= 0x00000002; onChanged(); return getConfigurationFieldBuilder().getBuilder(); } /** * <pre> * Configuration to apply to the queue. It will always update the queue with the newer configuration. * Only available fields will be updated, meaning that previously configured fields will not be change unless you explicit set it. * If you want to change a configuration to its default value, manually set it to its default value following each field documentation. * </pre> * * <code>.blipai.deckard.QueueConfiguration configuration = 2;</code> */ public ai.blip.deckard.QueueConfigurationOrBuilder getConfigurationOrBuilder() { if (configurationBuilder_ != null) { return configurationBuilder_.getMessageOrBuilder(); } else { return configuration_ == null ? ai.blip.deckard.QueueConfiguration.getDefaultInstance() : configuration_; } } /** * <pre> * Configuration to apply to the queue. It will always update the queue with the newer configuration. * Only available fields will be updated, meaning that previously configured fields will not be change unless you explicit set it. * If you want to change a configuration to its default value, manually set it to its default value following each field documentation. * </pre> * * <code>.blipai.deckard.QueueConfiguration configuration = 2;</code> */ private com.google.protobuf.SingleFieldBuilderV3< ai.blip.deckard.QueueConfiguration, ai.blip.deckard.QueueConfiguration.Builder, ai.blip.deckard.QueueConfigurationOrBuilder> getConfigurationFieldBuilder() { if (configurationBuilder_ == null) { configurationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< ai.blip.deckard.QueueConfiguration, ai.blip.deckard.QueueConfiguration.Builder, ai.blip.deckard.QueueConfigurationOrBuilder>( getConfiguration(), getParentForChildren(), isClean()); configuration_ = null; } return configurationBuilder_; } @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:blipai.deckard.EditQueueRequest) } // @@protoc_insertion_point(class_scope:blipai.deckard.EditQueueRequest) private static final ai.blip.deckard.EditQueueRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ai.blip.deckard.EditQueueRequest(); } public static ai.blip.deckard.EditQueueRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<EditQueueRequest> PARSER = new com.google.protobuf.AbstractParser<EditQueueRequest>() { @java.lang.Override public EditQueueRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser<EditQueueRequest> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<EditQueueRequest> getParserForType() { return PARSER; } @java.lang.Override public ai.blip.deckard.EditQueueRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/EditQueueRequestOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; public interface EditQueueRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:blipai.deckard.EditQueueRequest) com.google.protobuf.MessageOrBuilder { /** * <pre> * Name of the queue to be updated * This includes all prefixes and suffixes * </pre> * * <code>string queue = 1;</code> * @return The queue. */ java.lang.String getQueue(); /** * <pre> * Name of the queue to be updated * This includes all prefixes and suffixes * </pre> * * <code>string queue = 1;</code> * @return The bytes for queue. */ com.google.protobuf.ByteString getQueueBytes(); /** * <pre> * Configuration to apply to the queue. It will always update the queue with the newer configuration. * Only available fields will be updated, meaning that previously configured fields will not be change unless you explicit set it. * If you want to change a configuration to its default value, manually set it to its default value following each field documentation. * </pre> * * <code>.blipai.deckard.QueueConfiguration configuration = 2;</code> * @return Whether the configuration field is set. */ boolean hasConfiguration(); /** * <pre> * Configuration to apply to the queue. It will always update the queue with the newer configuration. * Only available fields will be updated, meaning that previously configured fields will not be change unless you explicit set it. * If you want to change a configuration to its default value, manually set it to its default value following each field documentation. * </pre> * * <code>.blipai.deckard.QueueConfiguration configuration = 2;</code> * @return The configuration. */ ai.blip.deckard.QueueConfiguration getConfiguration(); /** * <pre> * Configuration to apply to the queue. It will always update the queue with the newer configuration. * Only available fields will be updated, meaning that previously configured fields will not be change unless you explicit set it. * If you want to change a configuration to its default value, manually set it to its default value following each field documentation. * </pre> * * <code>.blipai.deckard.QueueConfiguration configuration = 2;</code> */ ai.blip.deckard.QueueConfigurationOrBuilder getConfigurationOrBuilder(); }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/EditQueueResponse.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; /** * Protobuf type {@code blipai.deckard.EditQueueResponse} */ public final class EditQueueResponse extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:blipai.deckard.EditQueueResponse) EditQueueResponseOrBuilder { private static final long serialVersionUID = 0L; // Use EditQueueResponse.newBuilder() to construct. private EditQueueResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private EditQueueResponse() { queue_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new EditQueueResponse(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_EditQueueResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_EditQueueResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.EditQueueResponse.class, ai.blip.deckard.EditQueueResponse.Builder.class); } public static final int QUEUE_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object queue_ = ""; /** * <pre> * Name of the queue * </pre> * * <code>string queue = 1;</code> * @return The queue. */ @java.lang.Override public java.lang.String getQueue() { java.lang.Object ref = queue_; 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(); queue_ = s; return s; } } /** * <pre> * Name of the queue * </pre> * * <code>string queue = 1;</code> * @return The bytes for queue. */ @java.lang.Override public com.google.protobuf.ByteString getQueueBytes() { java.lang.Object ref = queue_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); queue_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SUCCESS_FIELD_NUMBER = 2; private boolean success_ = false; /** * <code>bool success = 2;</code> * @return The success. */ @java.lang.Override public boolean getSuccess() { return success_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queue_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, queue_); } if (success_ != false) { output.writeBool(2, success_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queue_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, queue_); } if (success_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(2, success_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof ai.blip.deckard.EditQueueResponse)) { return super.equals(obj); } ai.blip.deckard.EditQueueResponse other = (ai.blip.deckard.EditQueueResponse) obj; if (!getQueue() .equals(other.getQueue())) return false; if (getSuccess() != other.getSuccess()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + QUEUE_FIELD_NUMBER; hash = (53 * hash) + getQueue().hashCode(); hash = (37 * hash) + SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getSuccess()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static ai.blip.deckard.EditQueueResponse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.EditQueueResponse parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.EditQueueResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.EditQueueResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.EditQueueResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.EditQueueResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.EditQueueResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.EditQueueResponse 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 ai.blip.deckard.EditQueueResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ai.blip.deckard.EditQueueResponse 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 ai.blip.deckard.EditQueueResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.EditQueueResponse 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(ai.blip.deckard.EditQueueResponse 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 blipai.deckard.EditQueueResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:blipai.deckard.EditQueueResponse) ai.blip.deckard.EditQueueResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_EditQueueResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_EditQueueResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.EditQueueResponse.class, ai.blip.deckard.EditQueueResponse.Builder.class); } // Construct using ai.blip.deckard.EditQueueResponse.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; queue_ = ""; success_ = false; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_EditQueueResponse_descriptor; } @java.lang.Override public ai.blip.deckard.EditQueueResponse getDefaultInstanceForType() { return ai.blip.deckard.EditQueueResponse.getDefaultInstance(); } @java.lang.Override public ai.blip.deckard.EditQueueResponse build() { ai.blip.deckard.EditQueueResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public ai.blip.deckard.EditQueueResponse buildPartial() { ai.blip.deckard.EditQueueResponse result = new ai.blip.deckard.EditQueueResponse(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(ai.blip.deckard.EditQueueResponse result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.queue_ = queue_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.success_ = success_; } } @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 ai.blip.deckard.EditQueueResponse) { return mergeFrom((ai.blip.deckard.EditQueueResponse)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ai.blip.deckard.EditQueueResponse other) { if (other == ai.blip.deckard.EditQueueResponse.getDefaultInstance()) return this; if (!other.getQueue().isEmpty()) { queue_ = other.queue_; bitField0_ |= 0x00000001; onChanged(); } if (other.getSuccess() != false) { setSuccess(other.getSuccess()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { queue_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 16: { success_ = input.readBool(); bitField0_ |= 0x00000002; break; } // case 16 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object queue_ = ""; /** * <pre> * Name of the queue * </pre> * * <code>string queue = 1;</code> * @return The queue. */ public java.lang.String getQueue() { java.lang.Object ref = queue_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); queue_ = s; return s; } else { return (java.lang.String) ref; } } /** * <pre> * Name of the queue * </pre> * * <code>string queue = 1;</code> * @return The bytes for queue. */ public com.google.protobuf.ByteString getQueueBytes() { java.lang.Object ref = queue_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); queue_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Name of the queue * </pre> * * <code>string queue = 1;</code> * @param value The queue to set. * @return This builder for chaining. */ public Builder setQueue( java.lang.String value) { if (value == null) { throw new NullPointerException(); } queue_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * <pre> * Name of the queue * </pre> * * <code>string queue = 1;</code> * @return This builder for chaining. */ public Builder clearQueue() { queue_ = getDefaultInstance().getQueue(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * <pre> * Name of the queue * </pre> * * <code>string queue = 1;</code> * @param value The bytes for queue to set. * @return This builder for chaining. */ public Builder setQueueBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); queue_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private boolean success_ ; /** * <code>bool success = 2;</code> * @return The success. */ @java.lang.Override public boolean getSuccess() { return success_; } /** * <code>bool success = 2;</code> * @param value The success to set. * @return This builder for chaining. */ public Builder setSuccess(boolean value) { success_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * <code>bool success = 2;</code> * @return This builder for chaining. */ public Builder clearSuccess() { bitField0_ = (bitField0_ & ~0x00000002); success_ = 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:blipai.deckard.EditQueueResponse) } // @@protoc_insertion_point(class_scope:blipai.deckard.EditQueueResponse) private static final ai.blip.deckard.EditQueueResponse DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ai.blip.deckard.EditQueueResponse(); } public static ai.blip.deckard.EditQueueResponse getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<EditQueueResponse> PARSER = new com.google.protobuf.AbstractParser<EditQueueResponse>() { @java.lang.Override public EditQueueResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser<EditQueueResponse> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<EditQueueResponse> getParserForType() { return PARSER; } @java.lang.Override public ai.blip.deckard.EditQueueResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/EditQueueResponseOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; public interface EditQueueResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:blipai.deckard.EditQueueResponse) com.google.protobuf.MessageOrBuilder { /** * <pre> * Name of the queue * </pre> * * <code>string queue = 1;</code> * @return The queue. */ java.lang.String getQueue(); /** * <pre> * Name of the queue * </pre> * * <code>string queue = 1;</code> * @return The bytes for queue. */ com.google.protobuf.ByteString getQueueBytes(); /** * <code>bool success = 2;</code> * @return The success. */ boolean getSuccess(); }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/FlushRequest.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; /** * Protobuf type {@code blipai.deckard.FlushRequest} */ public final class FlushRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:blipai.deckard.FlushRequest) FlushRequestOrBuilder { private static final long serialVersionUID = 0L; // Use FlushRequest.newBuilder() to construct. private FlushRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private FlushRequest() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new FlushRequest(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_FlushRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_FlushRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.FlushRequest.class, ai.blip.deckard.FlushRequest.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 { getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof ai.blip.deckard.FlushRequest)) { return super.equals(obj); } ai.blip.deckard.FlushRequest other = (ai.blip.deckard.FlushRequest) obj; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static ai.blip.deckard.FlushRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.FlushRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.FlushRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.FlushRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.FlushRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.FlushRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.FlushRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.FlushRequest 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 ai.blip.deckard.FlushRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ai.blip.deckard.FlushRequest 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 ai.blip.deckard.FlushRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.FlushRequest 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(ai.blip.deckard.FlushRequest 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 blipai.deckard.FlushRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:blipai.deckard.FlushRequest) ai.blip.deckard.FlushRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_FlushRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_FlushRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.FlushRequest.class, ai.blip.deckard.FlushRequest.Builder.class); } // Construct using ai.blip.deckard.FlushRequest.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_FlushRequest_descriptor; } @java.lang.Override public ai.blip.deckard.FlushRequest getDefaultInstanceForType() { return ai.blip.deckard.FlushRequest.getDefaultInstance(); } @java.lang.Override public ai.blip.deckard.FlushRequest build() { ai.blip.deckard.FlushRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public ai.blip.deckard.FlushRequest buildPartial() { ai.blip.deckard.FlushRequest result = new ai.blip.deckard.FlushRequest(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 ai.blip.deckard.FlushRequest) { return mergeFrom((ai.blip.deckard.FlushRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ai.blip.deckard.FlushRequest other) { if (other == ai.blip.deckard.FlushRequest.getDefaultInstance()) return this; this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } @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:blipai.deckard.FlushRequest) } // @@protoc_insertion_point(class_scope:blipai.deckard.FlushRequest) private static final ai.blip.deckard.FlushRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ai.blip.deckard.FlushRequest(); } public static ai.blip.deckard.FlushRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<FlushRequest> PARSER = new com.google.protobuf.AbstractParser<FlushRequest>() { @java.lang.Override public FlushRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser<FlushRequest> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<FlushRequest> getParserForType() { return PARSER; } @java.lang.Override public ai.blip.deckard.FlushRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/FlushRequestOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; public interface FlushRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:blipai.deckard.FlushRequest) com.google.protobuf.MessageOrBuilder { }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/FlushResponse.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; /** * Protobuf type {@code blipai.deckard.FlushResponse} */ public final class FlushResponse extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:blipai.deckard.FlushResponse) FlushResponseOrBuilder { private static final long serialVersionUID = 0L; // Use FlushResponse.newBuilder() to construct. private FlushResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private FlushResponse() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new FlushResponse(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_FlushResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_FlushResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.FlushResponse.class, ai.blip.deckard.FlushResponse.Builder.class); } public static final int SUCCESS_FIELD_NUMBER = 1; private boolean success_ = false; /** * <code>bool success = 1;</code> * @return The success. */ @java.lang.Override public boolean getSuccess() { return success_; } 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 (success_ != false) { output.writeBool(1, success_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (success_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(1, success_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof ai.blip.deckard.FlushResponse)) { return super.equals(obj); } ai.blip.deckard.FlushResponse other = (ai.blip.deckard.FlushResponse) obj; if (getSuccess() != other.getSuccess()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getSuccess()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static ai.blip.deckard.FlushResponse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.FlushResponse parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.FlushResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.FlushResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.FlushResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.FlushResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.FlushResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.FlushResponse 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 ai.blip.deckard.FlushResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ai.blip.deckard.FlushResponse 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 ai.blip.deckard.FlushResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.FlushResponse 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(ai.blip.deckard.FlushResponse 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 blipai.deckard.FlushResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:blipai.deckard.FlushResponse) ai.blip.deckard.FlushResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_FlushResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_FlushResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.FlushResponse.class, ai.blip.deckard.FlushResponse.Builder.class); } // Construct using ai.blip.deckard.FlushResponse.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; success_ = false; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_FlushResponse_descriptor; } @java.lang.Override public ai.blip.deckard.FlushResponse getDefaultInstanceForType() { return ai.blip.deckard.FlushResponse.getDefaultInstance(); } @java.lang.Override public ai.blip.deckard.FlushResponse build() { ai.blip.deckard.FlushResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public ai.blip.deckard.FlushResponse buildPartial() { ai.blip.deckard.FlushResponse result = new ai.blip.deckard.FlushResponse(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(ai.blip.deckard.FlushResponse result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.success_ = success_; } } @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 ai.blip.deckard.FlushResponse) { return mergeFrom((ai.blip.deckard.FlushResponse)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ai.blip.deckard.FlushResponse other) { if (other == ai.blip.deckard.FlushResponse.getDefaultInstance()) return this; if (other.getSuccess() != false) { setSuccess(other.getSuccess()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { success_ = input.readBool(); bitField0_ |= 0x00000001; break; } // case 8 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private boolean success_ ; /** * <code>bool success = 1;</code> * @return The success. */ @java.lang.Override public boolean getSuccess() { return success_; } /** * <code>bool success = 1;</code> * @param value The success to set. * @return This builder for chaining. */ public Builder setSuccess(boolean value) { success_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * <code>bool success = 1;</code> * @return This builder for chaining. */ public Builder clearSuccess() { bitField0_ = (bitField0_ & ~0x00000001); success_ = 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:blipai.deckard.FlushResponse) } // @@protoc_insertion_point(class_scope:blipai.deckard.FlushResponse) private static final ai.blip.deckard.FlushResponse DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ai.blip.deckard.FlushResponse(); } public static ai.blip.deckard.FlushResponse getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<FlushResponse> PARSER = new com.google.protobuf.AbstractParser<FlushResponse>() { @java.lang.Override public FlushResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser<FlushResponse> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<FlushResponse> getParserForType() { return PARSER; } @java.lang.Override public ai.blip.deckard.FlushResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/FlushResponseOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; public interface FlushResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:blipai.deckard.FlushResponse) com.google.protobuf.MessageOrBuilder { /** * <code>bool success = 1;</code> * @return The success. */ boolean getSuccess(); }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/GetByIdRequest.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; /** * Protobuf type {@code blipai.deckard.GetByIdRequest} */ public final class GetByIdRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:blipai.deckard.GetByIdRequest) GetByIdRequestOrBuilder { private static final long serialVersionUID = 0L; // Use GetByIdRequest.newBuilder() to construct. private GetByIdRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private GetByIdRequest() { queue_ = ""; id_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new GetByIdRequest(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_GetByIdRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_GetByIdRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.GetByIdRequest.class, ai.blip.deckard.GetByIdRequest.Builder.class); } public static final int QUEUE_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object queue_ = ""; /** * <pre> * Name of the queue to get a message * </pre> * * <code>string queue = 1;</code> * @return The queue. */ @java.lang.Override public java.lang.String getQueue() { java.lang.Object ref = queue_; 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(); queue_ = s; return s; } } /** * <pre> * Name of the queue to get a message * </pre> * * <code>string queue = 1;</code> * @return The bytes for queue. */ @java.lang.Override public com.google.protobuf.ByteString getQueueBytes() { java.lang.Object ref = queue_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); queue_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int ID_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object id_ = ""; /** * <pre> * The message id * </pre> * * <code>string id = 2;</code> * @return The id. */ @java.lang.Override 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; } } /** * <pre> * The message id * </pre> * * <code>string id = 2;</code> * @return The bytes for id. */ @java.lang.Override 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; } } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queue_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, queue_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queue_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, queue_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof ai.blip.deckard.GetByIdRequest)) { return super.equals(obj); } ai.blip.deckard.GetByIdRequest other = (ai.blip.deckard.GetByIdRequest) obj; if (!getQueue() .equals(other.getQueue())) return false; if (!getId() .equals(other.getId())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + QUEUE_FIELD_NUMBER; hash = (53 * hash) + getQueue().hashCode(); hash = (37 * hash) + ID_FIELD_NUMBER; hash = (53 * hash) + getId().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static ai.blip.deckard.GetByIdRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.GetByIdRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.GetByIdRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.GetByIdRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.GetByIdRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.GetByIdRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.GetByIdRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.GetByIdRequest 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 ai.blip.deckard.GetByIdRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ai.blip.deckard.GetByIdRequest 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 ai.blip.deckard.GetByIdRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.GetByIdRequest 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(ai.blip.deckard.GetByIdRequest 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 blipai.deckard.GetByIdRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:blipai.deckard.GetByIdRequest) ai.blip.deckard.GetByIdRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_GetByIdRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_GetByIdRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.GetByIdRequest.class, ai.blip.deckard.GetByIdRequest.Builder.class); } // Construct using ai.blip.deckard.GetByIdRequest.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; queue_ = ""; id_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_GetByIdRequest_descriptor; } @java.lang.Override public ai.blip.deckard.GetByIdRequest getDefaultInstanceForType() { return ai.blip.deckard.GetByIdRequest.getDefaultInstance(); } @java.lang.Override public ai.blip.deckard.GetByIdRequest build() { ai.blip.deckard.GetByIdRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public ai.blip.deckard.GetByIdRequest buildPartial() { ai.blip.deckard.GetByIdRequest result = new ai.blip.deckard.GetByIdRequest(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(ai.blip.deckard.GetByIdRequest result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.queue_ = queue_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.id_ = id_; } } @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 ai.blip.deckard.GetByIdRequest) { return mergeFrom((ai.blip.deckard.GetByIdRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ai.blip.deckard.GetByIdRequest other) { if (other == ai.blip.deckard.GetByIdRequest.getDefaultInstance()) return this; if (!other.getQueue().isEmpty()) { queue_ = other.queue_; bitField0_ |= 0x00000001; onChanged(); } if (!other.getId().isEmpty()) { id_ = other.id_; bitField0_ |= 0x00000002; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { queue_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 18: { id_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object queue_ = ""; /** * <pre> * Name of the queue to get a message * </pre> * * <code>string queue = 1;</code> * @return The queue. */ public java.lang.String getQueue() { java.lang.Object ref = queue_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); queue_ = s; return s; } else { return (java.lang.String) ref; } } /** * <pre> * Name of the queue to get a message * </pre> * * <code>string queue = 1;</code> * @return The bytes for queue. */ public com.google.protobuf.ByteString getQueueBytes() { java.lang.Object ref = queue_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); queue_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Name of the queue to get a message * </pre> * * <code>string queue = 1;</code> * @param value The queue to set. * @return This builder for chaining. */ public Builder setQueue( java.lang.String value) { if (value == null) { throw new NullPointerException(); } queue_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * <pre> * Name of the queue to get a message * </pre> * * <code>string queue = 1;</code> * @return This builder for chaining. */ public Builder clearQueue() { queue_ = getDefaultInstance().getQueue(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * <pre> * Name of the queue to get a message * </pre> * * <code>string queue = 1;</code> * @param value The bytes for queue to set. * @return This builder for chaining. */ public Builder setQueueBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); queue_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private java.lang.Object id_ = ""; /** * <pre> * The message id * </pre> * * <code>string id = 2;</code> * @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; } } /** * <pre> * The message id * </pre> * * <code>string id = 2;</code> * @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; } } /** * <pre> * The message id * </pre> * * <code>string id = 2;</code> * @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; bitField0_ |= 0x00000002; onChanged(); return this; } /** * <pre> * The message id * </pre> * * <code>string id = 2;</code> * @return This builder for chaining. */ public Builder clearId() { id_ = getDefaultInstance().getId(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * <pre> * The message id * </pre> * * <code>string id = 2;</code> * @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; bitField0_ |= 0x00000002; 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:blipai.deckard.GetByIdRequest) } // @@protoc_insertion_point(class_scope:blipai.deckard.GetByIdRequest) private static final ai.blip.deckard.GetByIdRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ai.blip.deckard.GetByIdRequest(); } public static ai.blip.deckard.GetByIdRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<GetByIdRequest> PARSER = new com.google.protobuf.AbstractParser<GetByIdRequest>() { @java.lang.Override public GetByIdRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser<GetByIdRequest> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<GetByIdRequest> getParserForType() { return PARSER; } @java.lang.Override public ai.blip.deckard.GetByIdRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/GetByIdRequestOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; public interface GetByIdRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:blipai.deckard.GetByIdRequest) com.google.protobuf.MessageOrBuilder { /** * <pre> * Name of the queue to get a message * </pre> * * <code>string queue = 1;</code> * @return The queue. */ java.lang.String getQueue(); /** * <pre> * Name of the queue to get a message * </pre> * * <code>string queue = 1;</code> * @return The bytes for queue. */ com.google.protobuf.ByteString getQueueBytes(); /** * <pre> * The message id * </pre> * * <code>string id = 2;</code> * @return The id. */ java.lang.String getId(); /** * <pre> * The message id * </pre> * * <code>string id = 2;</code> * @return The bytes for id. */ com.google.protobuf.ByteString getIdBytes(); }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/GetByIdResponse.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; /** * Protobuf type {@code blipai.deckard.GetByIdResponse} */ public final class GetByIdResponse extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:blipai.deckard.GetByIdResponse) GetByIdResponseOrBuilder { private static final long serialVersionUID = 0L; // Use GetByIdResponse.newBuilder() to construct. private GetByIdResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private GetByIdResponse() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new GetByIdResponse(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_GetByIdResponse_descriptor; } @SuppressWarnings({"rawtypes"}) @java.lang.Override protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 3: return internalGetHumanReadablePayload(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_GetByIdResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.GetByIdResponse.class, ai.blip.deckard.GetByIdResponse.Builder.class); } private int bitField0_; public static final int MESSAGE_FIELD_NUMBER = 1; private ai.blip.deckard.Message message_; /** * <code>.blipai.deckard.Message message = 1;</code> * @return Whether the message field is set. */ @java.lang.Override public boolean hasMessage() { return ((bitField0_ & 0x00000001) != 0); } /** * <code>.blipai.deckard.Message message = 1;</code> * @return The message. */ @java.lang.Override public ai.blip.deckard.Message getMessage() { return message_ == null ? ai.blip.deckard.Message.getDefaultInstance() : message_; } /** * <code>.blipai.deckard.Message message = 1;</code> */ @java.lang.Override public ai.blip.deckard.MessageOrBuilder getMessageOrBuilder() { return message_ == null ? ai.blip.deckard.Message.getDefaultInstance() : message_; } public static final int HUMAN_READABLE_PAYLOAD_FIELD_NUMBER = 3; private static final class HumanReadablePayloadDefaultEntryHolder { static final com.google.protobuf.MapEntry< java.lang.String, java.lang.String> defaultEntry = com.google.protobuf.MapEntry .<java.lang.String, java.lang.String>newDefaultInstance( ai.blip.deckard.DeckardService.internal_static_blipai_deckard_GetByIdResponse_HumanReadablePayloadEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.STRING, ""); } @SuppressWarnings("serial") private com.google.protobuf.MapField< java.lang.String, java.lang.String> humanReadablePayload_; private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetHumanReadablePayload() { if (humanReadablePayload_ == null) { return com.google.protobuf.MapField.emptyMapField( HumanReadablePayloadDefaultEntryHolder.defaultEntry); } return humanReadablePayload_; } public int getHumanReadablePayloadCount() { return internalGetHumanReadablePayload().getMap().size(); } /** * <pre> * A human readable string data map of the message's payload. * * This represents the payload map as a JSON string representation, useful for debugging and diagnostics * </pre> * * <code>map&lt;string, string&gt; human_readable_payload = 3;</code> */ @java.lang.Override public boolean containsHumanReadablePayload( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetHumanReadablePayload().getMap().containsKey(key); } /** * Use {@link #getHumanReadablePayloadMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map<java.lang.String, java.lang.String> getHumanReadablePayload() { return getHumanReadablePayloadMap(); } /** * <pre> * A human readable string data map of the message's payload. * * This represents the payload map as a JSON string representation, useful for debugging and diagnostics * </pre> * * <code>map&lt;string, string&gt; human_readable_payload = 3;</code> */ @java.lang.Override public java.util.Map<java.lang.String, java.lang.String> getHumanReadablePayloadMap() { return internalGetHumanReadablePayload().getMap(); } /** * <pre> * A human readable string data map of the message's payload. * * This represents the payload map as a JSON string representation, useful for debugging and diagnostics * </pre> * * <code>map&lt;string, string&gt; human_readable_payload = 3;</code> */ @java.lang.Override public /* nullable */ java.lang.String getHumanReadablePayloadOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map<java.lang.String, java.lang.String> map = internalGetHumanReadablePayload().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** * <pre> * A human readable string data map of the message's payload. * * This represents the payload map as a JSON string representation, useful for debugging and diagnostics * </pre> * * <code>map&lt;string, string&gt; human_readable_payload = 3;</code> */ @java.lang.Override public java.lang.String getHumanReadablePayloadOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map<java.lang.String, java.lang.String> map = internalGetHumanReadablePayload().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public static final int FOUND_FIELD_NUMBER = 2; private boolean found_ = false; /** * <code>bool found = 2;</code> * @return The found. */ @java.lang.Override public boolean getFound() { return found_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getMessage()); } if (found_ != false) { output.writeBool(2, found_); } com.google.protobuf.GeneratedMessageV3 .serializeStringMapTo( output, internalGetHumanReadablePayload(), HumanReadablePayloadDefaultEntryHolder.defaultEntry, 3); getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getMessage()); } if (found_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(2, found_); } for (java.util.Map.Entry<java.lang.String, java.lang.String> entry : internalGetHumanReadablePayload().getMap().entrySet()) { com.google.protobuf.MapEntry<java.lang.String, java.lang.String> humanReadablePayload__ = HumanReadablePayloadDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, humanReadablePayload__); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof ai.blip.deckard.GetByIdResponse)) { return super.equals(obj); } ai.blip.deckard.GetByIdResponse other = (ai.blip.deckard.GetByIdResponse) obj; if (hasMessage() != other.hasMessage()) return false; if (hasMessage()) { if (!getMessage() .equals(other.getMessage())) return false; } if (!internalGetHumanReadablePayload().equals( other.internalGetHumanReadablePayload())) return false; if (getFound() != other.getFound()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasMessage()) { hash = (37 * hash) + MESSAGE_FIELD_NUMBER; hash = (53 * hash) + getMessage().hashCode(); } if (!internalGetHumanReadablePayload().getMap().isEmpty()) { hash = (37 * hash) + HUMAN_READABLE_PAYLOAD_FIELD_NUMBER; hash = (53 * hash) + internalGetHumanReadablePayload().hashCode(); } hash = (37 * hash) + FOUND_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getFound()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static ai.blip.deckard.GetByIdResponse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.GetByIdResponse parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.GetByIdResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.GetByIdResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.GetByIdResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.GetByIdResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.GetByIdResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.GetByIdResponse 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 ai.blip.deckard.GetByIdResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ai.blip.deckard.GetByIdResponse 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 ai.blip.deckard.GetByIdResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.GetByIdResponse 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(ai.blip.deckard.GetByIdResponse 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 blipai.deckard.GetByIdResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:blipai.deckard.GetByIdResponse) ai.blip.deckard.GetByIdResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_GetByIdResponse_descriptor; } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 3: return internalGetHumanReadablePayload(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( int number) { switch (number) { case 3: return internalGetMutableHumanReadablePayload(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_GetByIdResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.GetByIdResponse.class, ai.blip.deckard.GetByIdResponse.Builder.class); } // Construct using ai.blip.deckard.GetByIdResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getMessageFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; message_ = null; if (messageBuilder_ != null) { messageBuilder_.dispose(); messageBuilder_ = null; } internalGetMutableHumanReadablePayload().clear(); found_ = false; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_GetByIdResponse_descriptor; } @java.lang.Override public ai.blip.deckard.GetByIdResponse getDefaultInstanceForType() { return ai.blip.deckard.GetByIdResponse.getDefaultInstance(); } @java.lang.Override public ai.blip.deckard.GetByIdResponse build() { ai.blip.deckard.GetByIdResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public ai.blip.deckard.GetByIdResponse buildPartial() { ai.blip.deckard.GetByIdResponse result = new ai.blip.deckard.GetByIdResponse(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(ai.blip.deckard.GetByIdResponse result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.message_ = messageBuilder_ == null ? message_ : messageBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { result.humanReadablePayload_ = internalGetHumanReadablePayload(); result.humanReadablePayload_.makeImmutable(); } if (((from_bitField0_ & 0x00000004) != 0)) { result.found_ = found_; } result.bitField0_ |= to_bitField0_; } @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 ai.blip.deckard.GetByIdResponse) { return mergeFrom((ai.blip.deckard.GetByIdResponse)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ai.blip.deckard.GetByIdResponse other) { if (other == ai.blip.deckard.GetByIdResponse.getDefaultInstance()) return this; if (other.hasMessage()) { mergeMessage(other.getMessage()); } internalGetMutableHumanReadablePayload().mergeFrom( other.internalGetHumanReadablePayload()); bitField0_ |= 0x00000002; if (other.getFound() != false) { setFound(other.getFound()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { input.readMessage( getMessageFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 16: { found_ = input.readBool(); bitField0_ |= 0x00000004; break; } // case 16 case 26: { com.google.protobuf.MapEntry<java.lang.String, java.lang.String> humanReadablePayload__ = input.readMessage( HumanReadablePayloadDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutableHumanReadablePayload().getMutableMap().put( humanReadablePayload__.getKey(), humanReadablePayload__.getValue()); bitField0_ |= 0x00000002; break; } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private ai.blip.deckard.Message message_; private com.google.protobuf.SingleFieldBuilderV3< ai.blip.deckard.Message, ai.blip.deckard.Message.Builder, ai.blip.deckard.MessageOrBuilder> messageBuilder_; /** * <code>.blipai.deckard.Message message = 1;</code> * @return Whether the message field is set. */ public boolean hasMessage() { return ((bitField0_ & 0x00000001) != 0); } /** * <code>.blipai.deckard.Message message = 1;</code> * @return The message. */ public ai.blip.deckard.Message getMessage() { if (messageBuilder_ == null) { return message_ == null ? ai.blip.deckard.Message.getDefaultInstance() : message_; } else { return messageBuilder_.getMessage(); } } /** * <code>.blipai.deckard.Message message = 1;</code> */ public Builder setMessage(ai.blip.deckard.Message value) { if (messageBuilder_ == null) { if (value == null) { throw new NullPointerException(); } message_ = value; } else { messageBuilder_.setMessage(value); } bitField0_ |= 0x00000001; onChanged(); return this; } /** * <code>.blipai.deckard.Message message = 1;</code> */ public Builder setMessage( ai.blip.deckard.Message.Builder builderForValue) { if (messageBuilder_ == null) { message_ = builderForValue.build(); } else { messageBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; onChanged(); return this; } /** * <code>.blipai.deckard.Message message = 1;</code> */ public Builder mergeMessage(ai.blip.deckard.Message value) { if (messageBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0) && message_ != null && message_ != ai.blip.deckard.Message.getDefaultInstance()) { getMessageBuilder().mergeFrom(value); } else { message_ = value; } } else { messageBuilder_.mergeFrom(value); } if (message_ != null) { bitField0_ |= 0x00000001; onChanged(); } return this; } /** * <code>.blipai.deckard.Message message = 1;</code> */ public Builder clearMessage() { bitField0_ = (bitField0_ & ~0x00000001); message_ = null; if (messageBuilder_ != null) { messageBuilder_.dispose(); messageBuilder_ = null; } onChanged(); return this; } /** * <code>.blipai.deckard.Message message = 1;</code> */ public ai.blip.deckard.Message.Builder getMessageBuilder() { bitField0_ |= 0x00000001; onChanged(); return getMessageFieldBuilder().getBuilder(); } /** * <code>.blipai.deckard.Message message = 1;</code> */ public ai.blip.deckard.MessageOrBuilder getMessageOrBuilder() { if (messageBuilder_ != null) { return messageBuilder_.getMessageOrBuilder(); } else { return message_ == null ? ai.blip.deckard.Message.getDefaultInstance() : message_; } } /** * <code>.blipai.deckard.Message message = 1;</code> */ private com.google.protobuf.SingleFieldBuilderV3< ai.blip.deckard.Message, ai.blip.deckard.Message.Builder, ai.blip.deckard.MessageOrBuilder> getMessageFieldBuilder() { if (messageBuilder_ == null) { messageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< ai.blip.deckard.Message, ai.blip.deckard.Message.Builder, ai.blip.deckard.MessageOrBuilder>( getMessage(), getParentForChildren(), isClean()); message_ = null; } return messageBuilder_; } private com.google.protobuf.MapField< java.lang.String, java.lang.String> humanReadablePayload_; private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetHumanReadablePayload() { if (humanReadablePayload_ == null) { return com.google.protobuf.MapField.emptyMapField( HumanReadablePayloadDefaultEntryHolder.defaultEntry); } return humanReadablePayload_; } private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetMutableHumanReadablePayload() { if (humanReadablePayload_ == null) { humanReadablePayload_ = com.google.protobuf.MapField.newMapField( HumanReadablePayloadDefaultEntryHolder.defaultEntry); } if (!humanReadablePayload_.isMutable()) { humanReadablePayload_ = humanReadablePayload_.copy(); } bitField0_ |= 0x00000002; onChanged(); return humanReadablePayload_; } public int getHumanReadablePayloadCount() { return internalGetHumanReadablePayload().getMap().size(); } /** * <pre> * A human readable string data map of the message's payload. * * This represents the payload map as a JSON string representation, useful for debugging and diagnostics * </pre> * * <code>map&lt;string, string&gt; human_readable_payload = 3;</code> */ @java.lang.Override public boolean containsHumanReadablePayload( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetHumanReadablePayload().getMap().containsKey(key); } /** * Use {@link #getHumanReadablePayloadMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map<java.lang.String, java.lang.String> getHumanReadablePayload() { return getHumanReadablePayloadMap(); } /** * <pre> * A human readable string data map of the message's payload. * * This represents the payload map as a JSON string representation, useful for debugging and diagnostics * </pre> * * <code>map&lt;string, string&gt; human_readable_payload = 3;</code> */ @java.lang.Override public java.util.Map<java.lang.String, java.lang.String> getHumanReadablePayloadMap() { return internalGetHumanReadablePayload().getMap(); } /** * <pre> * A human readable string data map of the message's payload. * * This represents the payload map as a JSON string representation, useful for debugging and diagnostics * </pre> * * <code>map&lt;string, string&gt; human_readable_payload = 3;</code> */ @java.lang.Override public /* nullable */ java.lang.String getHumanReadablePayloadOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map<java.lang.String, java.lang.String> map = internalGetHumanReadablePayload().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** * <pre> * A human readable string data map of the message's payload. * * This represents the payload map as a JSON string representation, useful for debugging and diagnostics * </pre> * * <code>map&lt;string, string&gt; human_readable_payload = 3;</code> */ @java.lang.Override public java.lang.String getHumanReadablePayloadOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map<java.lang.String, java.lang.String> map = internalGetHumanReadablePayload().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearHumanReadablePayload() { bitField0_ = (bitField0_ & ~0x00000002); internalGetMutableHumanReadablePayload().getMutableMap() .clear(); return this; } /** * <pre> * A human readable string data map of the message's payload. * * This represents the payload map as a JSON string representation, useful for debugging and diagnostics * </pre> * * <code>map&lt;string, string&gt; human_readable_payload = 3;</code> */ public Builder removeHumanReadablePayload( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } internalGetMutableHumanReadablePayload().getMutableMap() .remove(key); return this; } /** * Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map<java.lang.String, java.lang.String> getMutableHumanReadablePayload() { bitField0_ |= 0x00000002; return internalGetMutableHumanReadablePayload().getMutableMap(); } /** * <pre> * A human readable string data map of the message's payload. * * This represents the payload map as a JSON string representation, useful for debugging and diagnostics * </pre> * * <code>map&lt;string, string&gt; human_readable_payload = 3;</code> */ public Builder putHumanReadablePayload( java.lang.String key, java.lang.String value) { if (key == null) { throw new NullPointerException("map key"); } if (value == null) { throw new NullPointerException("map value"); } internalGetMutableHumanReadablePayload().getMutableMap() .put(key, value); bitField0_ |= 0x00000002; return this; } /** * <pre> * A human readable string data map of the message's payload. * * This represents the payload map as a JSON string representation, useful for debugging and diagnostics * </pre> * * <code>map&lt;string, string&gt; human_readable_payload = 3;</code> */ public Builder putAllHumanReadablePayload( java.util.Map<java.lang.String, java.lang.String> values) { internalGetMutableHumanReadablePayload().getMutableMap() .putAll(values); bitField0_ |= 0x00000002; return this; } private boolean found_ ; /** * <code>bool found = 2;</code> * @return The found. */ @java.lang.Override public boolean getFound() { return found_; } /** * <code>bool found = 2;</code> * @param value The found to set. * @return This builder for chaining. */ public Builder setFound(boolean value) { found_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** * <code>bool found = 2;</code> * @return This builder for chaining. */ public Builder clearFound() { bitField0_ = (bitField0_ & ~0x00000004); found_ = 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:blipai.deckard.GetByIdResponse) } // @@protoc_insertion_point(class_scope:blipai.deckard.GetByIdResponse) private static final ai.blip.deckard.GetByIdResponse DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ai.blip.deckard.GetByIdResponse(); } public static ai.blip.deckard.GetByIdResponse getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<GetByIdResponse> PARSER = new com.google.protobuf.AbstractParser<GetByIdResponse>() { @java.lang.Override public GetByIdResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser<GetByIdResponse> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<GetByIdResponse> getParserForType() { return PARSER; } @java.lang.Override public ai.blip.deckard.GetByIdResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/GetByIdResponseOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; public interface GetByIdResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:blipai.deckard.GetByIdResponse) com.google.protobuf.MessageOrBuilder { /** * <code>.blipai.deckard.Message message = 1;</code> * @return Whether the message field is set. */ boolean hasMessage(); /** * <code>.blipai.deckard.Message message = 1;</code> * @return The message. */ ai.blip.deckard.Message getMessage(); /** * <code>.blipai.deckard.Message message = 1;</code> */ ai.blip.deckard.MessageOrBuilder getMessageOrBuilder(); /** * <pre> * A human readable string data map of the message's payload. * * This represents the payload map as a JSON string representation, useful for debugging and diagnostics * </pre> * * <code>map&lt;string, string&gt; human_readable_payload = 3;</code> */ int getHumanReadablePayloadCount(); /** * <pre> * A human readable string data map of the message's payload. * * This represents the payload map as a JSON string representation, useful for debugging and diagnostics * </pre> * * <code>map&lt;string, string&gt; human_readable_payload = 3;</code> */ boolean containsHumanReadablePayload( java.lang.String key); /** * Use {@link #getHumanReadablePayloadMap()} instead. */ @java.lang.Deprecated java.util.Map<java.lang.String, java.lang.String> getHumanReadablePayload(); /** * <pre> * A human readable string data map of the message's payload. * * This represents the payload map as a JSON string representation, useful for debugging and diagnostics * </pre> * * <code>map&lt;string, string&gt; human_readable_payload = 3;</code> */ java.util.Map<java.lang.String, java.lang.String> getHumanReadablePayloadMap(); /** * <pre> * A human readable string data map of the message's payload. * * This represents the payload map as a JSON string representation, useful for debugging and diagnostics * </pre> * * <code>map&lt;string, string&gt; human_readable_payload = 3;</code> */ /* nullable */ java.lang.String getHumanReadablePayloadOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue); /** * <pre> * A human readable string data map of the message's payload. * * This represents the payload map as a JSON string representation, useful for debugging and diagnostics * </pre> * * <code>map&lt;string, string&gt; human_readable_payload = 3;</code> */ java.lang.String getHumanReadablePayloadOrThrow( java.lang.String key); /** * <code>bool found = 2;</code> * @return The found. */ boolean getFound(); }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/GetQueueRequest.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; /** * Protobuf type {@code blipai.deckard.GetQueueRequest} */ public final class GetQueueRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:blipai.deckard.GetQueueRequest) GetQueueRequestOrBuilder { private static final long serialVersionUID = 0L; // Use GetQueueRequest.newBuilder() to construct. private GetQueueRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private GetQueueRequest() { queue_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new GetQueueRequest(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_GetQueueRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_GetQueueRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.GetQueueRequest.class, ai.blip.deckard.GetQueueRequest.Builder.class); } public static final int QUEUE_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object queue_ = ""; /** * <pre> * Name of the queue to be updated * This includes all prefixes and suffixes * </pre> * * <code>string queue = 1;</code> * @return The queue. */ @java.lang.Override public java.lang.String getQueue() { java.lang.Object ref = queue_; 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(); queue_ = s; return s; } } /** * <pre> * Name of the queue to be updated * This includes all prefixes and suffixes * </pre> * * <code>string queue = 1;</code> * @return The bytes for queue. */ @java.lang.Override public com.google.protobuf.ByteString getQueueBytes() { java.lang.Object ref = queue_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); queue_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queue_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, queue_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queue_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, queue_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof ai.blip.deckard.GetQueueRequest)) { return super.equals(obj); } ai.blip.deckard.GetQueueRequest other = (ai.blip.deckard.GetQueueRequest) obj; if (!getQueue() .equals(other.getQueue())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + QUEUE_FIELD_NUMBER; hash = (53 * hash) + getQueue().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static ai.blip.deckard.GetQueueRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.GetQueueRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.GetQueueRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.GetQueueRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.GetQueueRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.GetQueueRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.GetQueueRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.GetQueueRequest 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 ai.blip.deckard.GetQueueRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ai.blip.deckard.GetQueueRequest 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 ai.blip.deckard.GetQueueRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.GetQueueRequest 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(ai.blip.deckard.GetQueueRequest 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 blipai.deckard.GetQueueRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:blipai.deckard.GetQueueRequest) ai.blip.deckard.GetQueueRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_GetQueueRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_GetQueueRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.GetQueueRequest.class, ai.blip.deckard.GetQueueRequest.Builder.class); } // Construct using ai.blip.deckard.GetQueueRequest.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; queue_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_GetQueueRequest_descriptor; } @java.lang.Override public ai.blip.deckard.GetQueueRequest getDefaultInstanceForType() { return ai.blip.deckard.GetQueueRequest.getDefaultInstance(); } @java.lang.Override public ai.blip.deckard.GetQueueRequest build() { ai.blip.deckard.GetQueueRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public ai.blip.deckard.GetQueueRequest buildPartial() { ai.blip.deckard.GetQueueRequest result = new ai.blip.deckard.GetQueueRequest(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(ai.blip.deckard.GetQueueRequest result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.queue_ = queue_; } } @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 ai.blip.deckard.GetQueueRequest) { return mergeFrom((ai.blip.deckard.GetQueueRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ai.blip.deckard.GetQueueRequest other) { if (other == ai.blip.deckard.GetQueueRequest.getDefaultInstance()) return this; if (!other.getQueue().isEmpty()) { queue_ = other.queue_; bitField0_ |= 0x00000001; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { queue_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object queue_ = ""; /** * <pre> * Name of the queue to be updated * This includes all prefixes and suffixes * </pre> * * <code>string queue = 1;</code> * @return The queue. */ public java.lang.String getQueue() { java.lang.Object ref = queue_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); queue_ = s; return s; } else { return (java.lang.String) ref; } } /** * <pre> * Name of the queue to be updated * This includes all prefixes and suffixes * </pre> * * <code>string queue = 1;</code> * @return The bytes for queue. */ public com.google.protobuf.ByteString getQueueBytes() { java.lang.Object ref = queue_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); queue_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Name of the queue to be updated * This includes all prefixes and suffixes * </pre> * * <code>string queue = 1;</code> * @param value The queue to set. * @return This builder for chaining. */ public Builder setQueue( java.lang.String value) { if (value == null) { throw new NullPointerException(); } queue_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * <pre> * Name of the queue to be updated * This includes all prefixes and suffixes * </pre> * * <code>string queue = 1;</code> * @return This builder for chaining. */ public Builder clearQueue() { queue_ = getDefaultInstance().getQueue(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * <pre> * Name of the queue to be updated * This includes all prefixes and suffixes * </pre> * * <code>string queue = 1;</code> * @param value The bytes for queue to set. * @return This builder for chaining. */ public Builder setQueueBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); queue_ = value; bitField0_ |= 0x00000001; 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:blipai.deckard.GetQueueRequest) } // @@protoc_insertion_point(class_scope:blipai.deckard.GetQueueRequest) private static final ai.blip.deckard.GetQueueRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ai.blip.deckard.GetQueueRequest(); } public static ai.blip.deckard.GetQueueRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<GetQueueRequest> PARSER = new com.google.protobuf.AbstractParser<GetQueueRequest>() { @java.lang.Override public GetQueueRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser<GetQueueRequest> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<GetQueueRequest> getParserForType() { return PARSER; } @java.lang.Override public ai.blip.deckard.GetQueueRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/GetQueueRequestOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; public interface GetQueueRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:blipai.deckard.GetQueueRequest) com.google.protobuf.MessageOrBuilder { /** * <pre> * Name of the queue to be updated * This includes all prefixes and suffixes * </pre> * * <code>string queue = 1;</code> * @return The queue. */ java.lang.String getQueue(); /** * <pre> * Name of the queue to be updated * This includes all prefixes and suffixes * </pre> * * <code>string queue = 1;</code> * @return The bytes for queue. */ com.google.protobuf.ByteString getQueueBytes(); }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/GetQueueResponse.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; /** * Protobuf type {@code blipai.deckard.GetQueueResponse} */ public final class GetQueueResponse extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:blipai.deckard.GetQueueResponse) GetQueueResponseOrBuilder { private static final long serialVersionUID = 0L; // Use GetQueueResponse.newBuilder() to construct. private GetQueueResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private GetQueueResponse() { queue_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new GetQueueResponse(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_GetQueueResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_GetQueueResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.GetQueueResponse.class, ai.blip.deckard.GetQueueResponse.Builder.class); } private int bitField0_; public static final int QUEUE_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object queue_ = ""; /** * <pre> * Name of the queue * </pre> * * <code>string queue = 1;</code> * @return The queue. */ @java.lang.Override public java.lang.String getQueue() { java.lang.Object ref = queue_; 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(); queue_ = s; return s; } } /** * <pre> * Name of the queue * </pre> * * <code>string queue = 1;</code> * @return The bytes for queue. */ @java.lang.Override public com.google.protobuf.ByteString getQueueBytes() { java.lang.Object ref = queue_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); queue_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int CONFIGURATION_FIELD_NUMBER = 2; private ai.blip.deckard.QueueConfiguration configuration_; /** * <pre> * Configuration of the queue * </pre> * * <code>.blipai.deckard.QueueConfiguration configuration = 2;</code> * @return Whether the configuration field is set. */ @java.lang.Override public boolean hasConfiguration() { return ((bitField0_ & 0x00000001) != 0); } /** * <pre> * Configuration of the queue * </pre> * * <code>.blipai.deckard.QueueConfiguration configuration = 2;</code> * @return The configuration. */ @java.lang.Override public ai.blip.deckard.QueueConfiguration getConfiguration() { return configuration_ == null ? ai.blip.deckard.QueueConfiguration.getDefaultInstance() : configuration_; } /** * <pre> * Configuration of the queue * </pre> * * <code>.blipai.deckard.QueueConfiguration configuration = 2;</code> */ @java.lang.Override public ai.blip.deckard.QueueConfigurationOrBuilder getConfigurationOrBuilder() { return configuration_ == null ? ai.blip.deckard.QueueConfiguration.getDefaultInstance() : configuration_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queue_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, queue_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getConfiguration()); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queue_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, queue_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getConfiguration()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof ai.blip.deckard.GetQueueResponse)) { return super.equals(obj); } ai.blip.deckard.GetQueueResponse other = (ai.blip.deckard.GetQueueResponse) obj; if (!getQueue() .equals(other.getQueue())) return false; if (hasConfiguration() != other.hasConfiguration()) return false; if (hasConfiguration()) { if (!getConfiguration() .equals(other.getConfiguration())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + QUEUE_FIELD_NUMBER; hash = (53 * hash) + getQueue().hashCode(); if (hasConfiguration()) { hash = (37 * hash) + CONFIGURATION_FIELD_NUMBER; hash = (53 * hash) + getConfiguration().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static ai.blip.deckard.GetQueueResponse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.GetQueueResponse parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.GetQueueResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.GetQueueResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.GetQueueResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.GetQueueResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.GetQueueResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.GetQueueResponse 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 ai.blip.deckard.GetQueueResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ai.blip.deckard.GetQueueResponse 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 ai.blip.deckard.GetQueueResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.GetQueueResponse 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(ai.blip.deckard.GetQueueResponse 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 blipai.deckard.GetQueueResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:blipai.deckard.GetQueueResponse) ai.blip.deckard.GetQueueResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_GetQueueResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_GetQueueResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.GetQueueResponse.class, ai.blip.deckard.GetQueueResponse.Builder.class); } // Construct using ai.blip.deckard.GetQueueResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getConfigurationFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; queue_ = ""; configuration_ = null; if (configurationBuilder_ != null) { configurationBuilder_.dispose(); configurationBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_GetQueueResponse_descriptor; } @java.lang.Override public ai.blip.deckard.GetQueueResponse getDefaultInstanceForType() { return ai.blip.deckard.GetQueueResponse.getDefaultInstance(); } @java.lang.Override public ai.blip.deckard.GetQueueResponse build() { ai.blip.deckard.GetQueueResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public ai.blip.deckard.GetQueueResponse buildPartial() { ai.blip.deckard.GetQueueResponse result = new ai.blip.deckard.GetQueueResponse(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(ai.blip.deckard.GetQueueResponse result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.queue_ = queue_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000002) != 0)) { result.configuration_ = configurationBuilder_ == null ? configuration_ : configurationBuilder_.build(); to_bitField0_ |= 0x00000001; } result.bitField0_ |= to_bitField0_; } @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 ai.blip.deckard.GetQueueResponse) { return mergeFrom((ai.blip.deckard.GetQueueResponse)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ai.blip.deckard.GetQueueResponse other) { if (other == ai.blip.deckard.GetQueueResponse.getDefaultInstance()) return this; if (!other.getQueue().isEmpty()) { queue_ = other.queue_; bitField0_ |= 0x00000001; onChanged(); } if (other.hasConfiguration()) { mergeConfiguration(other.getConfiguration()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { queue_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 18: { input.readMessage( getConfigurationFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object queue_ = ""; /** * <pre> * Name of the queue * </pre> * * <code>string queue = 1;</code> * @return The queue. */ public java.lang.String getQueue() { java.lang.Object ref = queue_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); queue_ = s; return s; } else { return (java.lang.String) ref; } } /** * <pre> * Name of the queue * </pre> * * <code>string queue = 1;</code> * @return The bytes for queue. */ public com.google.protobuf.ByteString getQueueBytes() { java.lang.Object ref = queue_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); queue_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Name of the queue * </pre> * * <code>string queue = 1;</code> * @param value The queue to set. * @return This builder for chaining. */ public Builder setQueue( java.lang.String value) { if (value == null) { throw new NullPointerException(); } queue_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * <pre> * Name of the queue * </pre> * * <code>string queue = 1;</code> * @return This builder for chaining. */ public Builder clearQueue() { queue_ = getDefaultInstance().getQueue(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * <pre> * Name of the queue * </pre> * * <code>string queue = 1;</code> * @param value The bytes for queue to set. * @return This builder for chaining. */ public Builder setQueueBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); queue_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private ai.blip.deckard.QueueConfiguration configuration_; private com.google.protobuf.SingleFieldBuilderV3< ai.blip.deckard.QueueConfiguration, ai.blip.deckard.QueueConfiguration.Builder, ai.blip.deckard.QueueConfigurationOrBuilder> configurationBuilder_; /** * <pre> * Configuration of the queue * </pre> * * <code>.blipai.deckard.QueueConfiguration configuration = 2;</code> * @return Whether the configuration field is set. */ public boolean hasConfiguration() { return ((bitField0_ & 0x00000002) != 0); } /** * <pre> * Configuration of the queue * </pre> * * <code>.blipai.deckard.QueueConfiguration configuration = 2;</code> * @return The configuration. */ public ai.blip.deckard.QueueConfiguration getConfiguration() { if (configurationBuilder_ == null) { return configuration_ == null ? ai.blip.deckard.QueueConfiguration.getDefaultInstance() : configuration_; } else { return configurationBuilder_.getMessage(); } } /** * <pre> * Configuration of the queue * </pre> * * <code>.blipai.deckard.QueueConfiguration configuration = 2;</code> */ public Builder setConfiguration(ai.blip.deckard.QueueConfiguration value) { if (configurationBuilder_ == null) { if (value == null) { throw new NullPointerException(); } configuration_ = value; } else { configurationBuilder_.setMessage(value); } bitField0_ |= 0x00000002; onChanged(); return this; } /** * <pre> * Configuration of the queue * </pre> * * <code>.blipai.deckard.QueueConfiguration configuration = 2;</code> */ public Builder setConfiguration( ai.blip.deckard.QueueConfiguration.Builder builderForValue) { if (configurationBuilder_ == null) { configuration_ = builderForValue.build(); } else { configurationBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; onChanged(); return this; } /** * <pre> * Configuration of the queue * </pre> * * <code>.blipai.deckard.QueueConfiguration configuration = 2;</code> */ public Builder mergeConfiguration(ai.blip.deckard.QueueConfiguration value) { if (configurationBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0) && configuration_ != null && configuration_ != ai.blip.deckard.QueueConfiguration.getDefaultInstance()) { getConfigurationBuilder().mergeFrom(value); } else { configuration_ = value; } } else { configurationBuilder_.mergeFrom(value); } if (configuration_ != null) { bitField0_ |= 0x00000002; onChanged(); } return this; } /** * <pre> * Configuration of the queue * </pre> * * <code>.blipai.deckard.QueueConfiguration configuration = 2;</code> */ public Builder clearConfiguration() { bitField0_ = (bitField0_ & ~0x00000002); configuration_ = null; if (configurationBuilder_ != null) { configurationBuilder_.dispose(); configurationBuilder_ = null; } onChanged(); return this; } /** * <pre> * Configuration of the queue * </pre> * * <code>.blipai.deckard.QueueConfiguration configuration = 2;</code> */ public ai.blip.deckard.QueueConfiguration.Builder getConfigurationBuilder() { bitField0_ |= 0x00000002; onChanged(); return getConfigurationFieldBuilder().getBuilder(); } /** * <pre> * Configuration of the queue * </pre> * * <code>.blipai.deckard.QueueConfiguration configuration = 2;</code> */ public ai.blip.deckard.QueueConfigurationOrBuilder getConfigurationOrBuilder() { if (configurationBuilder_ != null) { return configurationBuilder_.getMessageOrBuilder(); } else { return configuration_ == null ? ai.blip.deckard.QueueConfiguration.getDefaultInstance() : configuration_; } } /** * <pre> * Configuration of the queue * </pre> * * <code>.blipai.deckard.QueueConfiguration configuration = 2;</code> */ private com.google.protobuf.SingleFieldBuilderV3< ai.blip.deckard.QueueConfiguration, ai.blip.deckard.QueueConfiguration.Builder, ai.blip.deckard.QueueConfigurationOrBuilder> getConfigurationFieldBuilder() { if (configurationBuilder_ == null) { configurationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< ai.blip.deckard.QueueConfiguration, ai.blip.deckard.QueueConfiguration.Builder, ai.blip.deckard.QueueConfigurationOrBuilder>( getConfiguration(), getParentForChildren(), isClean()); configuration_ = null; } return configurationBuilder_; } @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:blipai.deckard.GetQueueResponse) } // @@protoc_insertion_point(class_scope:blipai.deckard.GetQueueResponse) private static final ai.blip.deckard.GetQueueResponse DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ai.blip.deckard.GetQueueResponse(); } public static ai.blip.deckard.GetQueueResponse getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<GetQueueResponse> PARSER = new com.google.protobuf.AbstractParser<GetQueueResponse>() { @java.lang.Override public GetQueueResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser<GetQueueResponse> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<GetQueueResponse> getParserForType() { return PARSER; } @java.lang.Override public ai.blip.deckard.GetQueueResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/GetQueueResponseOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; public interface GetQueueResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:blipai.deckard.GetQueueResponse) com.google.protobuf.MessageOrBuilder { /** * <pre> * Name of the queue * </pre> * * <code>string queue = 1;</code> * @return The queue. */ java.lang.String getQueue(); /** * <pre> * Name of the queue * </pre> * * <code>string queue = 1;</code> * @return The bytes for queue. */ com.google.protobuf.ByteString getQueueBytes(); /** * <pre> * Configuration of the queue * </pre> * * <code>.blipai.deckard.QueueConfiguration configuration = 2;</code> * @return Whether the configuration field is set. */ boolean hasConfiguration(); /** * <pre> * Configuration of the queue * </pre> * * <code>.blipai.deckard.QueueConfiguration configuration = 2;</code> * @return The configuration. */ ai.blip.deckard.QueueConfiguration getConfiguration(); /** * <pre> * Configuration of the queue * </pre> * * <code>.blipai.deckard.QueueConfiguration configuration = 2;</code> */ ai.blip.deckard.QueueConfigurationOrBuilder getConfigurationOrBuilder(); }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/Message.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; /** * Protobuf type {@code blipai.deckard.Message} */ public final class Message extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:blipai.deckard.Message) MessageOrBuilder { private static final long serialVersionUID = 0L; // Use Message.newBuilder() to construct. private Message(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private Message() { id_ = ""; description_ = ""; queue_ = ""; stringPayload_ = ""; breakpoint_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new Message(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_Message_descriptor; } @SuppressWarnings({"rawtypes"}) @java.lang.Override protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 8: return internalGetPayload(); case 4: return internalGetMetadata(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_Message_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.Message.class, ai.blip.deckard.Message.Builder.class); } private int bitField0_; public static final int ID_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object id_ = ""; /** * <pre> * ID is an unique identifier inside a queue. * Any message with the same id and queue will be considered the same message. * </pre> * * <code>string id = 1;</code> * @return The id. */ @java.lang.Override 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; } } /** * <pre> * ID is an unique identifier inside a queue. * Any message with the same id and queue will be considered the same message. * </pre> * * <code>string id = 1;</code> * @return The bytes for id. */ @java.lang.Override 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 DESCRIPTION_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object description_ = ""; /** * <pre> * Description of the message, this should be used as a human readable string to be used in diagnostics. * </pre> * * <code>string description = 2;</code> * @return The description. */ @java.lang.Override public java.lang.String getDescription() { java.lang.Object ref = description_; 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(); description_ = s; return s; } } /** * <pre> * Description of the message, this should be used as a human readable string to be used in diagnostics. * </pre> * * <code>string description = 2;</code> * @return The bytes for description. */ @java.lang.Override public com.google.protobuf.ByteString getDescriptionBytes() { java.lang.Object ref = description_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); description_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int QUEUE_FIELD_NUMBER = 3; @SuppressWarnings("serial") private volatile java.lang.Object queue_ = ""; /** * <pre> * Full name of the queue this message belongs (including any prefixes) * </pre> * * <code>string queue = 3;</code> * @return The queue. */ @java.lang.Override public java.lang.String getQueue() { java.lang.Object ref = queue_; 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(); queue_ = s; return s; } } /** * <pre> * Full name of the queue this message belongs (including any prefixes) * </pre> * * <code>string queue = 3;</code> * @return The bytes for queue. */ @java.lang.Override public com.google.protobuf.ByteString getQueueBytes() { java.lang.Object ref = queue_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); queue_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int PAYLOAD_FIELD_NUMBER = 8; private static final class PayloadDefaultEntryHolder { static final com.google.protobuf.MapEntry< java.lang.String, com.google.protobuf.Any> defaultEntry = com.google.protobuf.MapEntry .<java.lang.String, com.google.protobuf.Any>newDefaultInstance( ai.blip.deckard.DeckardService.internal_static_blipai_deckard_Message_PayloadEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.MESSAGE, com.google.protobuf.Any.getDefaultInstance()); } @SuppressWarnings("serial") private com.google.protobuf.MapField< java.lang.String, com.google.protobuf.Any> payload_; private com.google.protobuf.MapField<java.lang.String, com.google.protobuf.Any> internalGetPayload() { if (payload_ == null) { return com.google.protobuf.MapField.emptyMapField( PayloadDefaultEntryHolder.defaultEntry); } return payload_; } public int getPayloadCount() { return internalGetPayload().getMap().size(); } /** * <pre> * A payload map with formatted data to be stored and used by clients. * </pre> * * <code>map&lt;string, .google.protobuf.Any&gt; payload = 8;</code> */ @java.lang.Override public boolean containsPayload( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetPayload().getMap().containsKey(key); } /** * Use {@link #getPayloadMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map<java.lang.String, com.google.protobuf.Any> getPayload() { return getPayloadMap(); } /** * <pre> * A payload map with formatted data to be stored and used by clients. * </pre> * * <code>map&lt;string, .google.protobuf.Any&gt; payload = 8;</code> */ @java.lang.Override public java.util.Map<java.lang.String, com.google.protobuf.Any> getPayloadMap() { return internalGetPayload().getMap(); } /** * <pre> * A payload map with formatted data to be stored and used by clients. * </pre> * * <code>map&lt;string, .google.protobuf.Any&gt; payload = 8;</code> */ @java.lang.Override public /* nullable */ com.google.protobuf.Any getPayloadOrDefault( java.lang.String key, /* nullable */ com.google.protobuf.Any defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map<java.lang.String, com.google.protobuf.Any> map = internalGetPayload().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** * <pre> * A payload map with formatted data to be stored and used by clients. * </pre> * * <code>map&lt;string, .google.protobuf.Any&gt; payload = 8;</code> */ @java.lang.Override public com.google.protobuf.Any getPayloadOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map<java.lang.String, com.google.protobuf.Any> map = internalGetPayload().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public static final int METADATA_FIELD_NUMBER = 4; private static final class MetadataDefaultEntryHolder { static final com.google.protobuf.MapEntry< java.lang.String, java.lang.String> defaultEntry = com.google.protobuf.MapEntry .<java.lang.String, java.lang.String>newDefaultInstance( ai.blip.deckard.DeckardService.internal_static_blipai_deckard_Message_MetadataEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.STRING, ""); } @SuppressWarnings("serial") private com.google.protobuf.MapField< java.lang.String, java.lang.String> metadata_; private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetMetadata() { if (metadata_ == null) { return com.google.protobuf.MapField.emptyMapField( MetadataDefaultEntryHolder.defaultEntry); } return metadata_; } public int getMetadataCount() { return internalGetMetadata().getMap().size(); } /** * <pre> * Metadata is a map of string to be used as a key-value store. * It is a simple way to store data that is not part of the message payload. * </pre> * * <code>map&lt;string, string&gt; metadata = 4;</code> */ @java.lang.Override public boolean containsMetadata( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetMetadata().getMap().containsKey(key); } /** * Use {@link #getMetadataMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map<java.lang.String, java.lang.String> getMetadata() { return getMetadataMap(); } /** * <pre> * Metadata is a map of string to be used as a key-value store. * It is a simple way to store data that is not part of the message payload. * </pre> * * <code>map&lt;string, string&gt; metadata = 4;</code> */ @java.lang.Override public java.util.Map<java.lang.String, java.lang.String> getMetadataMap() { return internalGetMetadata().getMap(); } /** * <pre> * Metadata is a map of string to be used as a key-value store. * It is a simple way to store data that is not part of the message payload. * </pre> * * <code>map&lt;string, string&gt; metadata = 4;</code> */ @java.lang.Override public /* nullable */ java.lang.String getMetadataOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map<java.lang.String, java.lang.String> map = internalGetMetadata().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** * <pre> * Metadata is a map of string to be used as a key-value store. * It is a simple way to store data that is not part of the message payload. * </pre> * * <code>map&lt;string, string&gt; metadata = 4;</code> */ @java.lang.Override public java.lang.String getMetadataOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map<java.lang.String, java.lang.String> map = internalGetMetadata().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public static final int STRING_PAYLOAD_FIELD_NUMBER = 5; @SuppressWarnings("serial") private volatile java.lang.Object stringPayload_ = ""; /** * <pre> * Message string payload. Is responsibility of the caller to know how to encode/decode to a useful format for its purpose. * This field can be used to store simple string data instead of using the payload field. * </pre> * * <code>string string_payload = 5;</code> * @return The stringPayload. */ @java.lang.Override public java.lang.String getStringPayload() { java.lang.Object ref = stringPayload_; 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(); stringPayload_ = s; return s; } } /** * <pre> * Message string payload. Is responsibility of the caller to know how to encode/decode to a useful format for its purpose. * This field can be used to store simple string data instead of using the payload field. * </pre> * * <code>string string_payload = 5;</code> * @return The bytes for stringPayload. */ @java.lang.Override public com.google.protobuf.ByteString getStringPayloadBytes() { java.lang.Object ref = stringPayload_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); stringPayload_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SCORE_FIELD_NUMBER = 6; private double score_ = 0D; /** * <pre> * Score represents the priority score the message currently have in the queue. * The lower the score, the higher the priority. * The maximum score accepted by Deckard is 9007199254740992 and the minimum is 0 * </pre> * * <code>double score = 6;</code> * @return The score. */ @java.lang.Override public double getScore() { return score_; } public static final int BREAKPOINT_FIELD_NUMBER = 7; @SuppressWarnings("serial") private volatile java.lang.Object breakpoint_ = ""; /** * <pre> * Breakpoint is a field to be used as an auxiliar field for some specific use cases. * For example if you need to keep a record of the last result processing a message, or want to iteract with a pagination system. * * Examples: imagine a message representing a web news portal and you want to navigate through the articles. This field could be used to store the last visited article id. * Or imagine a message representing a user and you want to iterate through the user's publications pages. This field could be used to store the last page number you visited. * </pre> * * <code>string breakpoint = 7;</code> * @return The breakpoint. */ @java.lang.Override public java.lang.String getBreakpoint() { java.lang.Object ref = breakpoint_; 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(); breakpoint_ = s; return s; } } /** * <pre> * Breakpoint is a field to be used as an auxiliar field for some specific use cases. * For example if you need to keep a record of the last result processing a message, or want to iteract with a pagination system. * * Examples: imagine a message representing a web news portal and you want to navigate through the articles. This field could be used to store the last visited article id. * Or imagine a message representing a user and you want to iterate through the user's publications pages. This field could be used to store the last page number you visited. * </pre> * * <code>string breakpoint = 7;</code> * @return The bytes for breakpoint. */ @java.lang.Override public com.google.protobuf.ByteString getBreakpointBytes() { java.lang.Object ref = breakpoint_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); breakpoint_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int DIAGNOSTICS_FIELD_NUMBER = 9; private ai.blip.deckard.MessageDiagnostics diagnostics_; /** * <pre> * Diagnostics is a field holding information about the message's usage. * It is useful to track how many times a message was ACKed or NACKed. * </pre> * * <code>.blipai.deckard.MessageDiagnostics diagnostics = 9;</code> * @return Whether the diagnostics field is set. */ @java.lang.Override public boolean hasDiagnostics() { return ((bitField0_ & 0x00000001) != 0); } /** * <pre> * Diagnostics is a field holding information about the message's usage. * It is useful to track how many times a message was ACKed or NACKed. * </pre> * * <code>.blipai.deckard.MessageDiagnostics diagnostics = 9;</code> * @return The diagnostics. */ @java.lang.Override public ai.blip.deckard.MessageDiagnostics getDiagnostics() { return diagnostics_ == null ? ai.blip.deckard.MessageDiagnostics.getDefaultInstance() : diagnostics_; } /** * <pre> * Diagnostics is a field holding information about the message's usage. * It is useful to track how many times a message was ACKed or NACKed. * </pre> * * <code>.blipai.deckard.MessageDiagnostics diagnostics = 9;</code> */ @java.lang.Override public ai.blip.deckard.MessageDiagnosticsOrBuilder getDiagnosticsOrBuilder() { return diagnostics_ == null ? ai.blip.deckard.MessageDiagnostics.getDefaultInstance() : diagnostics_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queue_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, queue_); } com.google.protobuf.GeneratedMessageV3 .serializeStringMapTo( output, internalGetMetadata(), MetadataDefaultEntryHolder.defaultEntry, 4); if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stringPayload_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, stringPayload_); } if (java.lang.Double.doubleToRawLongBits(score_) != 0) { output.writeDouble(6, score_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(breakpoint_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, breakpoint_); } com.google.protobuf.GeneratedMessageV3 .serializeStringMapTo( output, internalGetPayload(), PayloadDefaultEntryHolder.defaultEntry, 8); if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(9, getDiagnostics()); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queue_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, queue_); } for (java.util.Map.Entry<java.lang.String, java.lang.String> entry : internalGetMetadata().getMap().entrySet()) { com.google.protobuf.MapEntry<java.lang.String, java.lang.String> metadata__ = MetadataDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, metadata__); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stringPayload_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, stringPayload_); } if (java.lang.Double.doubleToRawLongBits(score_) != 0) { size += com.google.protobuf.CodedOutputStream .computeDoubleSize(6, score_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(breakpoint_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, breakpoint_); } for (java.util.Map.Entry<java.lang.String, com.google.protobuf.Any> entry : internalGetPayload().getMap().entrySet()) { com.google.protobuf.MapEntry<java.lang.String, com.google.protobuf.Any> payload__ = PayloadDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream .computeMessageSize(8, payload__); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(9, getDiagnostics()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof ai.blip.deckard.Message)) { return super.equals(obj); } ai.blip.deckard.Message other = (ai.blip.deckard.Message) obj; if (!getId() .equals(other.getId())) return false; if (!getDescription() .equals(other.getDescription())) return false; if (!getQueue() .equals(other.getQueue())) return false; if (!internalGetPayload().equals( other.internalGetPayload())) return false; if (!internalGetMetadata().equals( other.internalGetMetadata())) return false; if (!getStringPayload() .equals(other.getStringPayload())) return false; if (java.lang.Double.doubleToLongBits(getScore()) != java.lang.Double.doubleToLongBits( other.getScore())) return false; if (!getBreakpoint() .equals(other.getBreakpoint())) return false; if (hasDiagnostics() != other.hasDiagnostics()) return false; if (hasDiagnostics()) { if (!getDiagnostics() .equals(other.getDiagnostics())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + ID_FIELD_NUMBER; hash = (53 * hash) + getId().hashCode(); hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getDescription().hashCode(); hash = (37 * hash) + QUEUE_FIELD_NUMBER; hash = (53 * hash) + getQueue().hashCode(); if (!internalGetPayload().getMap().isEmpty()) { hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; hash = (53 * hash) + internalGetPayload().hashCode(); } if (!internalGetMetadata().getMap().isEmpty()) { hash = (37 * hash) + METADATA_FIELD_NUMBER; hash = (53 * hash) + internalGetMetadata().hashCode(); } hash = (37 * hash) + STRING_PAYLOAD_FIELD_NUMBER; hash = (53 * hash) + getStringPayload().hashCode(); hash = (37 * hash) + SCORE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( java.lang.Double.doubleToLongBits(getScore())); hash = (37 * hash) + BREAKPOINT_FIELD_NUMBER; hash = (53 * hash) + getBreakpoint().hashCode(); if (hasDiagnostics()) { hash = (37 * hash) + DIAGNOSTICS_FIELD_NUMBER; hash = (53 * hash) + getDiagnostics().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static ai.blip.deckard.Message parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.Message parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.Message parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.Message parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.Message parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.Message parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.Message parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.Message 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 ai.blip.deckard.Message parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ai.blip.deckard.Message 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 ai.blip.deckard.Message parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.Message 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(ai.blip.deckard.Message 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 blipai.deckard.Message} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:blipai.deckard.Message) ai.blip.deckard.MessageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_Message_descriptor; } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 8: return internalGetPayload(); case 4: return internalGetMetadata(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( int number) { switch (number) { case 8: return internalGetMutablePayload(); case 4: return internalGetMutableMetadata(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_Message_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.Message.class, ai.blip.deckard.Message.Builder.class); } // Construct using ai.blip.deckard.Message.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getDiagnosticsFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; id_ = ""; description_ = ""; queue_ = ""; internalGetMutablePayload().clear(); internalGetMutableMetadata().clear(); stringPayload_ = ""; score_ = 0D; breakpoint_ = ""; diagnostics_ = null; if (diagnosticsBuilder_ != null) { diagnosticsBuilder_.dispose(); diagnosticsBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_Message_descriptor; } @java.lang.Override public ai.blip.deckard.Message getDefaultInstanceForType() { return ai.blip.deckard.Message.getDefaultInstance(); } @java.lang.Override public ai.blip.deckard.Message build() { ai.blip.deckard.Message result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public ai.blip.deckard.Message buildPartial() { ai.blip.deckard.Message result = new ai.blip.deckard.Message(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(ai.blip.deckard.Message result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.id_ = id_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.description_ = description_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.queue_ = queue_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.payload_ = internalGetPayload().build(PayloadDefaultEntryHolder.defaultEntry); } if (((from_bitField0_ & 0x00000010) != 0)) { result.metadata_ = internalGetMetadata(); result.metadata_.makeImmutable(); } if (((from_bitField0_ & 0x00000020) != 0)) { result.stringPayload_ = stringPayload_; } if (((from_bitField0_ & 0x00000040) != 0)) { result.score_ = score_; } if (((from_bitField0_ & 0x00000080) != 0)) { result.breakpoint_ = breakpoint_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000100) != 0)) { result.diagnostics_ = diagnosticsBuilder_ == null ? diagnostics_ : diagnosticsBuilder_.build(); to_bitField0_ |= 0x00000001; } result.bitField0_ |= to_bitField0_; } @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 ai.blip.deckard.Message) { return mergeFrom((ai.blip.deckard.Message)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ai.blip.deckard.Message other) { if (other == ai.blip.deckard.Message.getDefaultInstance()) return this; if (!other.getId().isEmpty()) { id_ = other.id_; bitField0_ |= 0x00000001; onChanged(); } if (!other.getDescription().isEmpty()) { description_ = other.description_; bitField0_ |= 0x00000002; onChanged(); } if (!other.getQueue().isEmpty()) { queue_ = other.queue_; bitField0_ |= 0x00000004; onChanged(); } internalGetMutablePayload().mergeFrom( other.internalGetPayload()); bitField0_ |= 0x00000008; internalGetMutableMetadata().mergeFrom( other.internalGetMetadata()); bitField0_ |= 0x00000010; if (!other.getStringPayload().isEmpty()) { stringPayload_ = other.stringPayload_; bitField0_ |= 0x00000020; onChanged(); } if (other.getScore() != 0D) { setScore(other.getScore()); } if (!other.getBreakpoint().isEmpty()) { breakpoint_ = other.breakpoint_; bitField0_ |= 0x00000080; onChanged(); } if (other.hasDiagnostics()) { mergeDiagnostics(other.getDiagnostics()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { id_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 18: { description_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 case 26: { queue_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000004; break; } // case 26 case 34: { com.google.protobuf.MapEntry<java.lang.String, java.lang.String> metadata__ = input.readMessage( MetadataDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutableMetadata().getMutableMap().put( metadata__.getKey(), metadata__.getValue()); bitField0_ |= 0x00000010; break; } // case 34 case 42: { stringPayload_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000020; break; } // case 42 case 49: { score_ = input.readDouble(); bitField0_ |= 0x00000040; break; } // case 49 case 58: { breakpoint_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000080; break; } // case 58 case 66: { com.google.protobuf.MapEntry<java.lang.String, com.google.protobuf.Any> payload__ = input.readMessage( PayloadDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutablePayload().ensureBuilderMap().put( payload__.getKey(), payload__.getValue()); bitField0_ |= 0x00000008; break; } // case 66 case 74: { input.readMessage( getDiagnosticsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000100; break; } // case 74 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object id_ = ""; /** * <pre> * ID is an unique identifier inside a queue. * Any message with the same id and queue will be considered the same message. * </pre> * * <code>string id = 1;</code> * @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; } } /** * <pre> * ID is an unique identifier inside a queue. * Any message with the same id and queue will be considered the same message. * </pre> * * <code>string id = 1;</code> * @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; } } /** * <pre> * ID is an unique identifier inside a queue. * Any message with the same id and queue will be considered the same message. * </pre> * * <code>string id = 1;</code> * @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; bitField0_ |= 0x00000001; onChanged(); return this; } /** * <pre> * ID is an unique identifier inside a queue. * Any message with the same id and queue will be considered the same message. * </pre> * * <code>string id = 1;</code> * @return This builder for chaining. */ public Builder clearId() { id_ = getDefaultInstance().getId(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * <pre> * ID is an unique identifier inside a queue. * Any message with the same id and queue will be considered the same message. * </pre> * * <code>string id = 1;</code> * @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; bitField0_ |= 0x00000001; onChanged(); return this; } private java.lang.Object description_ = ""; /** * <pre> * Description of the message, this should be used as a human readable string to be used in diagnostics. * </pre> * * <code>string description = 2;</code> * @return The description. */ public java.lang.String getDescription() { java.lang.Object ref = description_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); description_ = s; return s; } else { return (java.lang.String) ref; } } /** * <pre> * Description of the message, this should be used as a human readable string to be used in diagnostics. * </pre> * * <code>string description = 2;</code> * @return The bytes for description. */ public com.google.protobuf.ByteString getDescriptionBytes() { java.lang.Object ref = description_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); description_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Description of the message, this should be used as a human readable string to be used in diagnostics. * </pre> * * <code>string description = 2;</code> * @param value The description to set. * @return This builder for chaining. */ public Builder setDescription( java.lang.String value) { if (value == null) { throw new NullPointerException(); } description_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * <pre> * Description of the message, this should be used as a human readable string to be used in diagnostics. * </pre> * * <code>string description = 2;</code> * @return This builder for chaining. */ public Builder clearDescription() { description_ = getDefaultInstance().getDescription(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * <pre> * Description of the message, this should be used as a human readable string to be used in diagnostics. * </pre> * * <code>string description = 2;</code> * @param value The bytes for description to set. * @return This builder for chaining. */ public Builder setDescriptionBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); description_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } private java.lang.Object queue_ = ""; /** * <pre> * Full name of the queue this message belongs (including any prefixes) * </pre> * * <code>string queue = 3;</code> * @return The queue. */ public java.lang.String getQueue() { java.lang.Object ref = queue_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); queue_ = s; return s; } else { return (java.lang.String) ref; } } /** * <pre> * Full name of the queue this message belongs (including any prefixes) * </pre> * * <code>string queue = 3;</code> * @return The bytes for queue. */ public com.google.protobuf.ByteString getQueueBytes() { java.lang.Object ref = queue_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); queue_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Full name of the queue this message belongs (including any prefixes) * </pre> * * <code>string queue = 3;</code> * @param value The queue to set. * @return This builder for chaining. */ public Builder setQueue( java.lang.String value) { if (value == null) { throw new NullPointerException(); } queue_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** * <pre> * Full name of the queue this message belongs (including any prefixes) * </pre> * * <code>string queue = 3;</code> * @return This builder for chaining. */ public Builder clearQueue() { queue_ = getDefaultInstance().getQueue(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } /** * <pre> * Full name of the queue this message belongs (including any prefixes) * </pre> * * <code>string queue = 3;</code> * @param value The bytes for queue to set. * @return This builder for chaining. */ public Builder setQueueBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); queue_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } private static final class PayloadConverter implements com.google.protobuf.MapFieldBuilder.Converter<java.lang.String, com.google.protobuf.AnyOrBuilder, com.google.protobuf.Any> { @java.lang.Override public com.google.protobuf.Any build(com.google.protobuf.AnyOrBuilder val) { if (val instanceof com.google.protobuf.Any) { return (com.google.protobuf.Any) val; } return ((com.google.protobuf.Any.Builder) val).build(); } @java.lang.Override public com.google.protobuf.MapEntry<java.lang.String, com.google.protobuf.Any> defaultEntry() { return PayloadDefaultEntryHolder.defaultEntry; } }; private static final PayloadConverter payloadConverter = new PayloadConverter(); private com.google.protobuf.MapFieldBuilder< java.lang.String, com.google.protobuf.AnyOrBuilder, com.google.protobuf.Any, com.google.protobuf.Any.Builder> payload_; private com.google.protobuf.MapFieldBuilder<java.lang.String, com.google.protobuf.AnyOrBuilder, com.google.protobuf.Any, com.google.protobuf.Any.Builder> internalGetPayload() { if (payload_ == null) { return new com.google.protobuf.MapFieldBuilder<>(payloadConverter); } return payload_; } private com.google.protobuf.MapFieldBuilder<java.lang.String, com.google.protobuf.AnyOrBuilder, com.google.protobuf.Any, com.google.protobuf.Any.Builder> internalGetMutablePayload() { if (payload_ == null) { payload_ = new com.google.protobuf.MapFieldBuilder<>(payloadConverter); } bitField0_ |= 0x00000008; onChanged(); return payload_; } public int getPayloadCount() { return internalGetPayload().ensureBuilderMap().size(); } /** * <pre> * A payload map with formatted data to be stored and used by clients. * </pre> * * <code>map&lt;string, .google.protobuf.Any&gt; payload = 8;</code> */ @java.lang.Override public boolean containsPayload( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetPayload().ensureBuilderMap().containsKey(key); } /** * Use {@link #getPayloadMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map<java.lang.String, com.google.protobuf.Any> getPayload() { return getPayloadMap(); } /** * <pre> * A payload map with formatted data to be stored and used by clients. * </pre> * * <code>map&lt;string, .google.protobuf.Any&gt; payload = 8;</code> */ @java.lang.Override public java.util.Map<java.lang.String, com.google.protobuf.Any> getPayloadMap() { return internalGetPayload().getImmutableMap(); } /** * <pre> * A payload map with formatted data to be stored and used by clients. * </pre> * * <code>map&lt;string, .google.protobuf.Any&gt; payload = 8;</code> */ @java.lang.Override public /* nullable */ com.google.protobuf.Any getPayloadOrDefault( java.lang.String key, /* nullable */ com.google.protobuf.Any defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map<java.lang.String, com.google.protobuf.AnyOrBuilder> map = internalGetMutablePayload().ensureBuilderMap(); return map.containsKey(key) ? payloadConverter.build(map.get(key)) : defaultValue; } /** * <pre> * A payload map with formatted data to be stored and used by clients. * </pre> * * <code>map&lt;string, .google.protobuf.Any&gt; payload = 8;</code> */ @java.lang.Override public com.google.protobuf.Any getPayloadOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map<java.lang.String, com.google.protobuf.AnyOrBuilder> map = internalGetMutablePayload().ensureBuilderMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return payloadConverter.build(map.get(key)); } public Builder clearPayload() { bitField0_ = (bitField0_ & ~0x00000008); internalGetMutablePayload().clear(); return this; } /** * <pre> * A payload map with formatted data to be stored and used by clients. * </pre> * * <code>map&lt;string, .google.protobuf.Any&gt; payload = 8;</code> */ public Builder removePayload( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } internalGetMutablePayload().ensureBuilderMap() .remove(key); return this; } /** * Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map<java.lang.String, com.google.protobuf.Any> getMutablePayload() { bitField0_ |= 0x00000008; return internalGetMutablePayload().ensureMessageMap(); } /** * <pre> * A payload map with formatted data to be stored and used by clients. * </pre> * * <code>map&lt;string, .google.protobuf.Any&gt; payload = 8;</code> */ public Builder putPayload( java.lang.String key, com.google.protobuf.Any value) { if (key == null) { throw new NullPointerException("map key"); } if (value == null) { throw new NullPointerException("map value"); } internalGetMutablePayload().ensureBuilderMap() .put(key, value); bitField0_ |= 0x00000008; return this; } /** * <pre> * A payload map with formatted data to be stored and used by clients. * </pre> * * <code>map&lt;string, .google.protobuf.Any&gt; payload = 8;</code> */ public Builder putAllPayload( java.util.Map<java.lang.String, com.google.protobuf.Any> values) { for (java.util.Map.Entry<java.lang.String, com.google.protobuf.Any> e : values.entrySet()) { if (e.getKey() == null || e.getValue() == null) { throw new NullPointerException(); } } internalGetMutablePayload().ensureBuilderMap() .putAll(values); bitField0_ |= 0x00000008; return this; } /** * <pre> * A payload map with formatted data to be stored and used by clients. * </pre> * * <code>map&lt;string, .google.protobuf.Any&gt; payload = 8;</code> */ public com.google.protobuf.Any.Builder putPayloadBuilderIfAbsent( java.lang.String key) { java.util.Map<java.lang.String, com.google.protobuf.AnyOrBuilder> builderMap = internalGetMutablePayload().ensureBuilderMap(); com.google.protobuf.AnyOrBuilder entry = builderMap.get(key); if (entry == null) { entry = com.google.protobuf.Any.newBuilder(); builderMap.put(key, entry); } if (entry instanceof com.google.protobuf.Any) { entry = ((com.google.protobuf.Any) entry).toBuilder(); builderMap.put(key, entry); } return (com.google.protobuf.Any.Builder) entry; } private com.google.protobuf.MapField< java.lang.String, java.lang.String> metadata_; private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetMetadata() { if (metadata_ == null) { return com.google.protobuf.MapField.emptyMapField( MetadataDefaultEntryHolder.defaultEntry); } return metadata_; } private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetMutableMetadata() { if (metadata_ == null) { metadata_ = com.google.protobuf.MapField.newMapField( MetadataDefaultEntryHolder.defaultEntry); } if (!metadata_.isMutable()) { metadata_ = metadata_.copy(); } bitField0_ |= 0x00000010; onChanged(); return metadata_; } public int getMetadataCount() { return internalGetMetadata().getMap().size(); } /** * <pre> * Metadata is a map of string to be used as a key-value store. * It is a simple way to store data that is not part of the message payload. * </pre> * * <code>map&lt;string, string&gt; metadata = 4;</code> */ @java.lang.Override public boolean containsMetadata( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetMetadata().getMap().containsKey(key); } /** * Use {@link #getMetadataMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map<java.lang.String, java.lang.String> getMetadata() { return getMetadataMap(); } /** * <pre> * Metadata is a map of string to be used as a key-value store. * It is a simple way to store data that is not part of the message payload. * </pre> * * <code>map&lt;string, string&gt; metadata = 4;</code> */ @java.lang.Override public java.util.Map<java.lang.String, java.lang.String> getMetadataMap() { return internalGetMetadata().getMap(); } /** * <pre> * Metadata is a map of string to be used as a key-value store. * It is a simple way to store data that is not part of the message payload. * </pre> * * <code>map&lt;string, string&gt; metadata = 4;</code> */ @java.lang.Override public /* nullable */ java.lang.String getMetadataOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map<java.lang.String, java.lang.String> map = internalGetMetadata().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** * <pre> * Metadata is a map of string to be used as a key-value store. * It is a simple way to store data that is not part of the message payload. * </pre> * * <code>map&lt;string, string&gt; metadata = 4;</code> */ @java.lang.Override public java.lang.String getMetadataOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map<java.lang.String, java.lang.String> map = internalGetMetadata().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearMetadata() { bitField0_ = (bitField0_ & ~0x00000010); internalGetMutableMetadata().getMutableMap() .clear(); return this; } /** * <pre> * Metadata is a map of string to be used as a key-value store. * It is a simple way to store data that is not part of the message payload. * </pre> * * <code>map&lt;string, string&gt; metadata = 4;</code> */ public Builder removeMetadata( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } internalGetMutableMetadata().getMutableMap() .remove(key); return this; } /** * Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map<java.lang.String, java.lang.String> getMutableMetadata() { bitField0_ |= 0x00000010; return internalGetMutableMetadata().getMutableMap(); } /** * <pre> * Metadata is a map of string to be used as a key-value store. * It is a simple way to store data that is not part of the message payload. * </pre> * * <code>map&lt;string, string&gt; metadata = 4;</code> */ public Builder putMetadata( java.lang.String key, java.lang.String value) { if (key == null) { throw new NullPointerException("map key"); } if (value == null) { throw new NullPointerException("map value"); } internalGetMutableMetadata().getMutableMap() .put(key, value); bitField0_ |= 0x00000010; return this; } /** * <pre> * Metadata is a map of string to be used as a key-value store. * It is a simple way to store data that is not part of the message payload. * </pre> * * <code>map&lt;string, string&gt; metadata = 4;</code> */ public Builder putAllMetadata( java.util.Map<java.lang.String, java.lang.String> values) { internalGetMutableMetadata().getMutableMap() .putAll(values); bitField0_ |= 0x00000010; return this; } private java.lang.Object stringPayload_ = ""; /** * <pre> * Message string payload. Is responsibility of the caller to know how to encode/decode to a useful format for its purpose. * This field can be used to store simple string data instead of using the payload field. * </pre> * * <code>string string_payload = 5;</code> * @return The stringPayload. */ public java.lang.String getStringPayload() { java.lang.Object ref = stringPayload_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); stringPayload_ = s; return s; } else { return (java.lang.String) ref; } } /** * <pre> * Message string payload. Is responsibility of the caller to know how to encode/decode to a useful format for its purpose. * This field can be used to store simple string data instead of using the payload field. * </pre> * * <code>string string_payload = 5;</code> * @return The bytes for stringPayload. */ public com.google.protobuf.ByteString getStringPayloadBytes() { java.lang.Object ref = stringPayload_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); stringPayload_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Message string payload. Is responsibility of the caller to know how to encode/decode to a useful format for its purpose. * This field can be used to store simple string data instead of using the payload field. * </pre> * * <code>string string_payload = 5;</code> * @param value The stringPayload to set. * @return This builder for chaining. */ public Builder setStringPayload( java.lang.String value) { if (value == null) { throw new NullPointerException(); } stringPayload_ = value; bitField0_ |= 0x00000020; onChanged(); return this; } /** * <pre> * Message string payload. Is responsibility of the caller to know how to encode/decode to a useful format for its purpose. * This field can be used to store simple string data instead of using the payload field. * </pre> * * <code>string string_payload = 5;</code> * @return This builder for chaining. */ public Builder clearStringPayload() { stringPayload_ = getDefaultInstance().getStringPayload(); bitField0_ = (bitField0_ & ~0x00000020); onChanged(); return this; } /** * <pre> * Message string payload. Is responsibility of the caller to know how to encode/decode to a useful format for its purpose. * This field can be used to store simple string data instead of using the payload field. * </pre> * * <code>string string_payload = 5;</code> * @param value The bytes for stringPayload to set. * @return This builder for chaining. */ public Builder setStringPayloadBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); stringPayload_ = value; bitField0_ |= 0x00000020; onChanged(); return this; } private double score_ ; /** * <pre> * Score represents the priority score the message currently have in the queue. * The lower the score, the higher the priority. * The maximum score accepted by Deckard is 9007199254740992 and the minimum is 0 * </pre> * * <code>double score = 6;</code> * @return The score. */ @java.lang.Override public double getScore() { return score_; } /** * <pre> * Score represents the priority score the message currently have in the queue. * The lower the score, the higher the priority. * The maximum score accepted by Deckard is 9007199254740992 and the minimum is 0 * </pre> * * <code>double score = 6;</code> * @param value The score to set. * @return This builder for chaining. */ public Builder setScore(double value) { score_ = value; bitField0_ |= 0x00000040; onChanged(); return this; } /** * <pre> * Score represents the priority score the message currently have in the queue. * The lower the score, the higher the priority. * The maximum score accepted by Deckard is 9007199254740992 and the minimum is 0 * </pre> * * <code>double score = 6;</code> * @return This builder for chaining. */ public Builder clearScore() { bitField0_ = (bitField0_ & ~0x00000040); score_ = 0D; onChanged(); return this; } private java.lang.Object breakpoint_ = ""; /** * <pre> * Breakpoint is a field to be used as an auxiliar field for some specific use cases. * For example if you need to keep a record of the last result processing a message, or want to iteract with a pagination system. * * Examples: imagine a message representing a web news portal and you want to navigate through the articles. This field could be used to store the last visited article id. * Or imagine a message representing a user and you want to iterate through the user's publications pages. This field could be used to store the last page number you visited. * </pre> * * <code>string breakpoint = 7;</code> * @return The breakpoint. */ public java.lang.String getBreakpoint() { java.lang.Object ref = breakpoint_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); breakpoint_ = s; return s; } else { return (java.lang.String) ref; } } /** * <pre> * Breakpoint is a field to be used as an auxiliar field for some specific use cases. * For example if you need to keep a record of the last result processing a message, or want to iteract with a pagination system. * * Examples: imagine a message representing a web news portal and you want to navigate through the articles. This field could be used to store the last visited article id. * Or imagine a message representing a user and you want to iterate through the user's publications pages. This field could be used to store the last page number you visited. * </pre> * * <code>string breakpoint = 7;</code> * @return The bytes for breakpoint. */ public com.google.protobuf.ByteString getBreakpointBytes() { java.lang.Object ref = breakpoint_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); breakpoint_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Breakpoint is a field to be used as an auxiliar field for some specific use cases. * For example if you need to keep a record of the last result processing a message, or want to iteract with a pagination system. * * Examples: imagine a message representing a web news portal and you want to navigate through the articles. This field could be used to store the last visited article id. * Or imagine a message representing a user and you want to iterate through the user's publications pages. This field could be used to store the last page number you visited. * </pre> * * <code>string breakpoint = 7;</code> * @param value The breakpoint to set. * @return This builder for chaining. */ public Builder setBreakpoint( java.lang.String value) { if (value == null) { throw new NullPointerException(); } breakpoint_ = value; bitField0_ |= 0x00000080; onChanged(); return this; } /** * <pre> * Breakpoint is a field to be used as an auxiliar field for some specific use cases. * For example if you need to keep a record of the last result processing a message, or want to iteract with a pagination system. * * Examples: imagine a message representing a web news portal and you want to navigate through the articles. This field could be used to store the last visited article id. * Or imagine a message representing a user and you want to iterate through the user's publications pages. This field could be used to store the last page number you visited. * </pre> * * <code>string breakpoint = 7;</code> * @return This builder for chaining. */ public Builder clearBreakpoint() { breakpoint_ = getDefaultInstance().getBreakpoint(); bitField0_ = (bitField0_ & ~0x00000080); onChanged(); return this; } /** * <pre> * Breakpoint is a field to be used as an auxiliar field for some specific use cases. * For example if you need to keep a record of the last result processing a message, or want to iteract with a pagination system. * * Examples: imagine a message representing a web news portal and you want to navigate through the articles. This field could be used to store the last visited article id. * Or imagine a message representing a user and you want to iterate through the user's publications pages. This field could be used to store the last page number you visited. * </pre> * * <code>string breakpoint = 7;</code> * @param value The bytes for breakpoint to set. * @return This builder for chaining. */ public Builder setBreakpointBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); breakpoint_ = value; bitField0_ |= 0x00000080; onChanged(); return this; } private ai.blip.deckard.MessageDiagnostics diagnostics_; private com.google.protobuf.SingleFieldBuilderV3< ai.blip.deckard.MessageDiagnostics, ai.blip.deckard.MessageDiagnostics.Builder, ai.blip.deckard.MessageDiagnosticsOrBuilder> diagnosticsBuilder_; /** * <pre> * Diagnostics is a field holding information about the message's usage. * It is useful to track how many times a message was ACKed or NACKed. * </pre> * * <code>.blipai.deckard.MessageDiagnostics diagnostics = 9;</code> * @return Whether the diagnostics field is set. */ public boolean hasDiagnostics() { return ((bitField0_ & 0x00000100) != 0); } /** * <pre> * Diagnostics is a field holding information about the message's usage. * It is useful to track how many times a message was ACKed or NACKed. * </pre> * * <code>.blipai.deckard.MessageDiagnostics diagnostics = 9;</code> * @return The diagnostics. */ public ai.blip.deckard.MessageDiagnostics getDiagnostics() { if (diagnosticsBuilder_ == null) { return diagnostics_ == null ? ai.blip.deckard.MessageDiagnostics.getDefaultInstance() : diagnostics_; } else { return diagnosticsBuilder_.getMessage(); } } /** * <pre> * Diagnostics is a field holding information about the message's usage. * It is useful to track how many times a message was ACKed or NACKed. * </pre> * * <code>.blipai.deckard.MessageDiagnostics diagnostics = 9;</code> */ public Builder setDiagnostics(ai.blip.deckard.MessageDiagnostics value) { if (diagnosticsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } diagnostics_ = value; } else { diagnosticsBuilder_.setMessage(value); } bitField0_ |= 0x00000100; onChanged(); return this; } /** * <pre> * Diagnostics is a field holding information about the message's usage. * It is useful to track how many times a message was ACKed or NACKed. * </pre> * * <code>.blipai.deckard.MessageDiagnostics diagnostics = 9;</code> */ public Builder setDiagnostics( ai.blip.deckard.MessageDiagnostics.Builder builderForValue) { if (diagnosticsBuilder_ == null) { diagnostics_ = builderForValue.build(); } else { diagnosticsBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000100; onChanged(); return this; } /** * <pre> * Diagnostics is a field holding information about the message's usage. * It is useful to track how many times a message was ACKed or NACKed. * </pre> * * <code>.blipai.deckard.MessageDiagnostics diagnostics = 9;</code> */ public Builder mergeDiagnostics(ai.blip.deckard.MessageDiagnostics value) { if (diagnosticsBuilder_ == null) { if (((bitField0_ & 0x00000100) != 0) && diagnostics_ != null && diagnostics_ != ai.blip.deckard.MessageDiagnostics.getDefaultInstance()) { getDiagnosticsBuilder().mergeFrom(value); } else { diagnostics_ = value; } } else { diagnosticsBuilder_.mergeFrom(value); } if (diagnostics_ != null) { bitField0_ |= 0x00000100; onChanged(); } return this; } /** * <pre> * Diagnostics is a field holding information about the message's usage. * It is useful to track how many times a message was ACKed or NACKed. * </pre> * * <code>.blipai.deckard.MessageDiagnostics diagnostics = 9;</code> */ public Builder clearDiagnostics() { bitField0_ = (bitField0_ & ~0x00000100); diagnostics_ = null; if (diagnosticsBuilder_ != null) { diagnosticsBuilder_.dispose(); diagnosticsBuilder_ = null; } onChanged(); return this; } /** * <pre> * Diagnostics is a field holding information about the message's usage. * It is useful to track how many times a message was ACKed or NACKed. * </pre> * * <code>.blipai.deckard.MessageDiagnostics diagnostics = 9;</code> */ public ai.blip.deckard.MessageDiagnostics.Builder getDiagnosticsBuilder() { bitField0_ |= 0x00000100; onChanged(); return getDiagnosticsFieldBuilder().getBuilder(); } /** * <pre> * Diagnostics is a field holding information about the message's usage. * It is useful to track how many times a message was ACKed or NACKed. * </pre> * * <code>.blipai.deckard.MessageDiagnostics diagnostics = 9;</code> */ public ai.blip.deckard.MessageDiagnosticsOrBuilder getDiagnosticsOrBuilder() { if (diagnosticsBuilder_ != null) { return diagnosticsBuilder_.getMessageOrBuilder(); } else { return diagnostics_ == null ? ai.blip.deckard.MessageDiagnostics.getDefaultInstance() : diagnostics_; } } /** * <pre> * Diagnostics is a field holding information about the message's usage. * It is useful to track how many times a message was ACKed or NACKed. * </pre> * * <code>.blipai.deckard.MessageDiagnostics diagnostics = 9;</code> */ private com.google.protobuf.SingleFieldBuilderV3< ai.blip.deckard.MessageDiagnostics, ai.blip.deckard.MessageDiagnostics.Builder, ai.blip.deckard.MessageDiagnosticsOrBuilder> getDiagnosticsFieldBuilder() { if (diagnosticsBuilder_ == null) { diagnosticsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< ai.blip.deckard.MessageDiagnostics, ai.blip.deckard.MessageDiagnostics.Builder, ai.blip.deckard.MessageDiagnosticsOrBuilder>( getDiagnostics(), getParentForChildren(), isClean()); diagnostics_ = null; } return diagnosticsBuilder_; } @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:blipai.deckard.Message) } // @@protoc_insertion_point(class_scope:blipai.deckard.Message) private static final ai.blip.deckard.Message DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ai.blip.deckard.Message(); } public static ai.blip.deckard.Message getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<Message> PARSER = new com.google.protobuf.AbstractParser<Message>() { @java.lang.Override public Message parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser<Message> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<Message> getParserForType() { return PARSER; } @java.lang.Override public ai.blip.deckard.Message getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/MessageDiagnostics.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; /** * Protobuf type {@code blipai.deckard.MessageDiagnostics} */ public final class MessageDiagnostics extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:blipai.deckard.MessageDiagnostics) MessageDiagnosticsOrBuilder { private static final long serialVersionUID = 0L; // Use MessageDiagnostics.newBuilder() to construct. private MessageDiagnostics(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private MessageDiagnostics() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new MessageDiagnostics(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_MessageDiagnostics_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_MessageDiagnostics_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.MessageDiagnostics.class, ai.blip.deckard.MessageDiagnostics.Builder.class); } public static final int ACKS_FIELD_NUMBER = 1; private long acks_ = 0L; /** * <pre> * Track total number of ACKs * </pre> * * <code>int64 acks = 1;</code> * @return The acks. */ @java.lang.Override public long getAcks() { return acks_; } public static final int NACKS_FIELD_NUMBER = 2; private long nacks_ = 0L; /** * <pre> * Track total number of NACKs * </pre> * * <code>int64 nacks = 2;</code> * @return The nacks. */ @java.lang.Override public long getNacks() { return nacks_; } public static final int CONSECUTIVE_ACKS_FIELD_NUMBER = 3; private long consecutiveAcks_ = 0L; /** * <pre> * Track number of consecutive ACKs * This field will reset to 0 when a NACK is received * </pre> * * <code>int64 consecutive_acks = 3;</code> * @return The consecutiveAcks. */ @java.lang.Override public long getConsecutiveAcks() { return consecutiveAcks_; } public static final int CONSECUTIVE_NACKS_FIELD_NUMBER = 4; private long consecutiveNacks_ = 0L; /** * <pre> * Track number of consecutive NACKs * This field will reset to 0 when an ACK is received * </pre> * * <code>int64 consecutive_nacks = 4;</code> * @return The consecutiveNacks. */ @java.lang.Override public long getConsecutiveNacks() { return consecutiveNacks_; } 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 (acks_ != 0L) { output.writeInt64(1, acks_); } if (nacks_ != 0L) { output.writeInt64(2, nacks_); } if (consecutiveAcks_ != 0L) { output.writeInt64(3, consecutiveAcks_); } if (consecutiveNacks_ != 0L) { output.writeInt64(4, consecutiveNacks_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (acks_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(1, acks_); } if (nacks_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(2, nacks_); } if (consecutiveAcks_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(3, consecutiveAcks_); } if (consecutiveNacks_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(4, consecutiveNacks_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof ai.blip.deckard.MessageDiagnostics)) { return super.equals(obj); } ai.blip.deckard.MessageDiagnostics other = (ai.blip.deckard.MessageDiagnostics) obj; if (getAcks() != other.getAcks()) return false; if (getNacks() != other.getNacks()) return false; if (getConsecutiveAcks() != other.getConsecutiveAcks()) return false; if (getConsecutiveNacks() != other.getConsecutiveNacks()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + ACKS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getAcks()); hash = (37 * hash) + NACKS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getNacks()); hash = (37 * hash) + CONSECUTIVE_ACKS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getConsecutiveAcks()); hash = (37 * hash) + CONSECUTIVE_NACKS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getConsecutiveNacks()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static ai.blip.deckard.MessageDiagnostics parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.MessageDiagnostics parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.MessageDiagnostics parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.MessageDiagnostics parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.MessageDiagnostics parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.MessageDiagnostics parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.MessageDiagnostics parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.MessageDiagnostics 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 ai.blip.deckard.MessageDiagnostics parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ai.blip.deckard.MessageDiagnostics 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 ai.blip.deckard.MessageDiagnostics parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.MessageDiagnostics 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(ai.blip.deckard.MessageDiagnostics 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 blipai.deckard.MessageDiagnostics} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:blipai.deckard.MessageDiagnostics) ai.blip.deckard.MessageDiagnosticsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_MessageDiagnostics_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_MessageDiagnostics_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.MessageDiagnostics.class, ai.blip.deckard.MessageDiagnostics.Builder.class); } // Construct using ai.blip.deckard.MessageDiagnostics.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; acks_ = 0L; nacks_ = 0L; consecutiveAcks_ = 0L; consecutiveNacks_ = 0L; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_MessageDiagnostics_descriptor; } @java.lang.Override public ai.blip.deckard.MessageDiagnostics getDefaultInstanceForType() { return ai.blip.deckard.MessageDiagnostics.getDefaultInstance(); } @java.lang.Override public ai.blip.deckard.MessageDiagnostics build() { ai.blip.deckard.MessageDiagnostics result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public ai.blip.deckard.MessageDiagnostics buildPartial() { ai.blip.deckard.MessageDiagnostics result = new ai.blip.deckard.MessageDiagnostics(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(ai.blip.deckard.MessageDiagnostics result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.acks_ = acks_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.nacks_ = nacks_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.consecutiveAcks_ = consecutiveAcks_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.consecutiveNacks_ = consecutiveNacks_; } } @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 ai.blip.deckard.MessageDiagnostics) { return mergeFrom((ai.blip.deckard.MessageDiagnostics)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ai.blip.deckard.MessageDiagnostics other) { if (other == ai.blip.deckard.MessageDiagnostics.getDefaultInstance()) return this; if (other.getAcks() != 0L) { setAcks(other.getAcks()); } if (other.getNacks() != 0L) { setNacks(other.getNacks()); } if (other.getConsecutiveAcks() != 0L) { setConsecutiveAcks(other.getConsecutiveAcks()); } if (other.getConsecutiveNacks() != 0L) { setConsecutiveNacks(other.getConsecutiveNacks()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { acks_ = input.readInt64(); bitField0_ |= 0x00000001; break; } // case 8 case 16: { nacks_ = input.readInt64(); bitField0_ |= 0x00000002; break; } // case 16 case 24: { consecutiveAcks_ = input.readInt64(); bitField0_ |= 0x00000004; break; } // case 24 case 32: { consecutiveNacks_ = input.readInt64(); bitField0_ |= 0x00000008; break; } // case 32 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private long acks_ ; /** * <pre> * Track total number of ACKs * </pre> * * <code>int64 acks = 1;</code> * @return The acks. */ @java.lang.Override public long getAcks() { return acks_; } /** * <pre> * Track total number of ACKs * </pre> * * <code>int64 acks = 1;</code> * @param value The acks to set. * @return This builder for chaining. */ public Builder setAcks(long value) { acks_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * <pre> * Track total number of ACKs * </pre> * * <code>int64 acks = 1;</code> * @return This builder for chaining. */ public Builder clearAcks() { bitField0_ = (bitField0_ & ~0x00000001); acks_ = 0L; onChanged(); return this; } private long nacks_ ; /** * <pre> * Track total number of NACKs * </pre> * * <code>int64 nacks = 2;</code> * @return The nacks. */ @java.lang.Override public long getNacks() { return nacks_; } /** * <pre> * Track total number of NACKs * </pre> * * <code>int64 nacks = 2;</code> * @param value The nacks to set. * @return This builder for chaining. */ public Builder setNacks(long value) { nacks_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * <pre> * Track total number of NACKs * </pre> * * <code>int64 nacks = 2;</code> * @return This builder for chaining. */ public Builder clearNacks() { bitField0_ = (bitField0_ & ~0x00000002); nacks_ = 0L; onChanged(); return this; } private long consecutiveAcks_ ; /** * <pre> * Track number of consecutive ACKs * This field will reset to 0 when a NACK is received * </pre> * * <code>int64 consecutive_acks = 3;</code> * @return The consecutiveAcks. */ @java.lang.Override public long getConsecutiveAcks() { return consecutiveAcks_; } /** * <pre> * Track number of consecutive ACKs * This field will reset to 0 when a NACK is received * </pre> * * <code>int64 consecutive_acks = 3;</code> * @param value The consecutiveAcks to set. * @return This builder for chaining. */ public Builder setConsecutiveAcks(long value) { consecutiveAcks_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** * <pre> * Track number of consecutive ACKs * This field will reset to 0 when a NACK is received * </pre> * * <code>int64 consecutive_acks = 3;</code> * @return This builder for chaining. */ public Builder clearConsecutiveAcks() { bitField0_ = (bitField0_ & ~0x00000004); consecutiveAcks_ = 0L; onChanged(); return this; } private long consecutiveNacks_ ; /** * <pre> * Track number of consecutive NACKs * This field will reset to 0 when an ACK is received * </pre> * * <code>int64 consecutive_nacks = 4;</code> * @return The consecutiveNacks. */ @java.lang.Override public long getConsecutiveNacks() { return consecutiveNacks_; } /** * <pre> * Track number of consecutive NACKs * This field will reset to 0 when an ACK is received * </pre> * * <code>int64 consecutive_nacks = 4;</code> * @param value The consecutiveNacks to set. * @return This builder for chaining. */ public Builder setConsecutiveNacks(long value) { consecutiveNacks_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** * <pre> * Track number of consecutive NACKs * This field will reset to 0 when an ACK is received * </pre> * * <code>int64 consecutive_nacks = 4;</code> * @return This builder for chaining. */ public Builder clearConsecutiveNacks() { bitField0_ = (bitField0_ & ~0x00000008); consecutiveNacks_ = 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:blipai.deckard.MessageDiagnostics) } // @@protoc_insertion_point(class_scope:blipai.deckard.MessageDiagnostics) private static final ai.blip.deckard.MessageDiagnostics DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ai.blip.deckard.MessageDiagnostics(); } public static ai.blip.deckard.MessageDiagnostics getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<MessageDiagnostics> PARSER = new com.google.protobuf.AbstractParser<MessageDiagnostics>() { @java.lang.Override public MessageDiagnostics parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser<MessageDiagnostics> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<MessageDiagnostics> getParserForType() { return PARSER; } @java.lang.Override public ai.blip.deckard.MessageDiagnostics getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/MessageDiagnosticsOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; public interface MessageDiagnosticsOrBuilder extends // @@protoc_insertion_point(interface_extends:blipai.deckard.MessageDiagnostics) com.google.protobuf.MessageOrBuilder { /** * <pre> * Track total number of ACKs * </pre> * * <code>int64 acks = 1;</code> * @return The acks. */ long getAcks(); /** * <pre> * Track total number of NACKs * </pre> * * <code>int64 nacks = 2;</code> * @return The nacks. */ long getNacks(); /** * <pre> * Track number of consecutive ACKs * This field will reset to 0 when a NACK is received * </pre> * * <code>int64 consecutive_acks = 3;</code> * @return The consecutiveAcks. */ long getConsecutiveAcks(); /** * <pre> * Track number of consecutive NACKs * This field will reset to 0 when an ACK is received * </pre> * * <code>int64 consecutive_nacks = 4;</code> * @return The consecutiveNacks. */ long getConsecutiveNacks(); }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/MessageOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; public interface MessageOrBuilder extends // @@protoc_insertion_point(interface_extends:blipai.deckard.Message) com.google.protobuf.MessageOrBuilder { /** * <pre> * ID is an unique identifier inside a queue. * Any message with the same id and queue will be considered the same message. * </pre> * * <code>string id = 1;</code> * @return The id. */ java.lang.String getId(); /** * <pre> * ID is an unique identifier inside a queue. * Any message with the same id and queue will be considered the same message. * </pre> * * <code>string id = 1;</code> * @return The bytes for id. */ com.google.protobuf.ByteString getIdBytes(); /** * <pre> * Description of the message, this should be used as a human readable string to be used in diagnostics. * </pre> * * <code>string description = 2;</code> * @return The description. */ java.lang.String getDescription(); /** * <pre> * Description of the message, this should be used as a human readable string to be used in diagnostics. * </pre> * * <code>string description = 2;</code> * @return The bytes for description. */ com.google.protobuf.ByteString getDescriptionBytes(); /** * <pre> * Full name of the queue this message belongs (including any prefixes) * </pre> * * <code>string queue = 3;</code> * @return The queue. */ java.lang.String getQueue(); /** * <pre> * Full name of the queue this message belongs (including any prefixes) * </pre> * * <code>string queue = 3;</code> * @return The bytes for queue. */ com.google.protobuf.ByteString getQueueBytes(); /** * <pre> * A payload map with formatted data to be stored and used by clients. * </pre> * * <code>map&lt;string, .google.protobuf.Any&gt; payload = 8;</code> */ int getPayloadCount(); /** * <pre> * A payload map with formatted data to be stored and used by clients. * </pre> * * <code>map&lt;string, .google.protobuf.Any&gt; payload = 8;</code> */ boolean containsPayload( java.lang.String key); /** * Use {@link #getPayloadMap()} instead. */ @java.lang.Deprecated java.util.Map<java.lang.String, com.google.protobuf.Any> getPayload(); /** * <pre> * A payload map with formatted data to be stored and used by clients. * </pre> * * <code>map&lt;string, .google.protobuf.Any&gt; payload = 8;</code> */ java.util.Map<java.lang.String, com.google.protobuf.Any> getPayloadMap(); /** * <pre> * A payload map with formatted data to be stored and used by clients. * </pre> * * <code>map&lt;string, .google.protobuf.Any&gt; payload = 8;</code> */ /* nullable */ com.google.protobuf.Any getPayloadOrDefault( java.lang.String key, /* nullable */ com.google.protobuf.Any defaultValue); /** * <pre> * A payload map with formatted data to be stored and used by clients. * </pre> * * <code>map&lt;string, .google.protobuf.Any&gt; payload = 8;</code> */ com.google.protobuf.Any getPayloadOrThrow( java.lang.String key); /** * <pre> * Metadata is a map of string to be used as a key-value store. * It is a simple way to store data that is not part of the message payload. * </pre> * * <code>map&lt;string, string&gt; metadata = 4;</code> */ int getMetadataCount(); /** * <pre> * Metadata is a map of string to be used as a key-value store. * It is a simple way to store data that is not part of the message payload. * </pre> * * <code>map&lt;string, string&gt; metadata = 4;</code> */ boolean containsMetadata( java.lang.String key); /** * Use {@link #getMetadataMap()} instead. */ @java.lang.Deprecated java.util.Map<java.lang.String, java.lang.String> getMetadata(); /** * <pre> * Metadata is a map of string to be used as a key-value store. * It is a simple way to store data that is not part of the message payload. * </pre> * * <code>map&lt;string, string&gt; metadata = 4;</code> */ java.util.Map<java.lang.String, java.lang.String> getMetadataMap(); /** * <pre> * Metadata is a map of string to be used as a key-value store. * It is a simple way to store data that is not part of the message payload. * </pre> * * <code>map&lt;string, string&gt; metadata = 4;</code> */ /* nullable */ java.lang.String getMetadataOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue); /** * <pre> * Metadata is a map of string to be used as a key-value store. * It is a simple way to store data that is not part of the message payload. * </pre> * * <code>map&lt;string, string&gt; metadata = 4;</code> */ java.lang.String getMetadataOrThrow( java.lang.String key); /** * <pre> * Message string payload. Is responsibility of the caller to know how to encode/decode to a useful format for its purpose. * This field can be used to store simple string data instead of using the payload field. * </pre> * * <code>string string_payload = 5;</code> * @return The stringPayload. */ java.lang.String getStringPayload(); /** * <pre> * Message string payload. Is responsibility of the caller to know how to encode/decode to a useful format for its purpose. * This field can be used to store simple string data instead of using the payload field. * </pre> * * <code>string string_payload = 5;</code> * @return The bytes for stringPayload. */ com.google.protobuf.ByteString getStringPayloadBytes(); /** * <pre> * Score represents the priority score the message currently have in the queue. * The lower the score, the higher the priority. * The maximum score accepted by Deckard is 9007199254740992 and the minimum is 0 * </pre> * * <code>double score = 6;</code> * @return The score. */ double getScore(); /** * <pre> * Breakpoint is a field to be used as an auxiliar field for some specific use cases. * For example if you need to keep a record of the last result processing a message, or want to iteract with a pagination system. * * Examples: imagine a message representing a web news portal and you want to navigate through the articles. This field could be used to store the last visited article id. * Or imagine a message representing a user and you want to iterate through the user's publications pages. This field could be used to store the last page number you visited. * </pre> * * <code>string breakpoint = 7;</code> * @return The breakpoint. */ java.lang.String getBreakpoint(); /** * <pre> * Breakpoint is a field to be used as an auxiliar field for some specific use cases. * For example if you need to keep a record of the last result processing a message, or want to iteract with a pagination system. * * Examples: imagine a message representing a web news portal and you want to navigate through the articles. This field could be used to store the last visited article id. * Or imagine a message representing a user and you want to iterate through the user's publications pages. This field could be used to store the last page number you visited. * </pre> * * <code>string breakpoint = 7;</code> * @return The bytes for breakpoint. */ com.google.protobuf.ByteString getBreakpointBytes(); /** * <pre> * Diagnostics is a field holding information about the message's usage. * It is useful to track how many times a message was ACKed or NACKed. * </pre> * * <code>.blipai.deckard.MessageDiagnostics diagnostics = 9;</code> * @return Whether the diagnostics field is set. */ boolean hasDiagnostics(); /** * <pre> * Diagnostics is a field holding information about the message's usage. * It is useful to track how many times a message was ACKed or NACKed. * </pre> * * <code>.blipai.deckard.MessageDiagnostics diagnostics = 9;</code> * @return The diagnostics. */ ai.blip.deckard.MessageDiagnostics getDiagnostics(); /** * <pre> * Diagnostics is a field holding information about the message's usage. * It is useful to track how many times a message was ACKed or NACKed. * </pre> * * <code>.blipai.deckard.MessageDiagnostics diagnostics = 9;</code> */ ai.blip.deckard.MessageDiagnosticsOrBuilder getDiagnosticsOrBuilder(); }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/PullRequest.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; /** * Protobuf type {@code blipai.deckard.PullRequest} */ public final class PullRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:blipai.deckard.PullRequest) PullRequestOrBuilder { private static final long serialVersionUID = 0L; // Use PullRequest.newBuilder() to construct. private PullRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private PullRequest() { queue_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new PullRequest(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_PullRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_PullRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.PullRequest.class, ai.blip.deckard.PullRequest.Builder.class); } public static final int QUEUE_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object queue_ = ""; /** * <pre> * Full name of the queue to pull messages (including any prefixes) * </pre> * * <code>string queue = 1;</code> * @return The queue. */ @java.lang.Override public java.lang.String getQueue() { java.lang.Object ref = queue_; 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(); queue_ = s; return s; } } /** * <pre> * Full name of the queue to pull messages (including any prefixes) * </pre> * * <code>string queue = 1;</code> * @return The bytes for queue. */ @java.lang.Override public com.google.protobuf.ByteString getQueueBytes() { java.lang.Object ref = queue_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); queue_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int AMOUNT_FIELD_NUMBER = 2; private int amount_ = 0; /** * <pre> * Number of messages to fetch. * Caution: as greater the amount, as more time it will take to process the request. * Max value is 1000 and the default value is 1 * </pre> * * <code>int32 amount = 2;</code> * @return The amount. */ @java.lang.Override public int getAmount() { return amount_; } public static final int SCORE_FILTER_FIELD_NUMBER = 3; private long scoreFilter_ = 0L; /** * <pre> * Prefer using the max_score field instead of this one. * This field is deprecated and will be removed in the future. * * The `score_filter` behaves differently than `max_score` field. * The `max_score` field is the upper threshold itself, but the `score_filter` will result in an upper score threshold of the current timestamp minus the score_filter value. * * Useful only when your queue's score is only based on the current timestamp to not return a message just moments after it was last used. * It will only return messages with score lower than the current timestamp minus the score_filter value. * * For example if your queue's score is only based on the current timestamp, this parameter will be the number of milliseconds a message must be in the queue before being returned. * </pre> * * <code>int64 score_filter = 3 [deprecated = true];</code> * @deprecated blipai.deckard.PullRequest.score_filter is deprecated. * See proto/deckard_service.proto;l=114 * @return The scoreFilter. */ @java.lang.Override @java.lang.Deprecated public long getScoreFilter() { return scoreFilter_; } public static final int MAX_SCORE_FIELD_NUMBER = 4; private double maxScore_ = 0D; /** * <pre> * Sets the upper threshold for the priority score of a message to be returned in the pull request. * * Only messages with a priority score equal to or lower than the max_score value will be returned. * * The maximum score accepted by Deckard is 9007199254740992, any value higher than this will be capped to the maximum score. * To set this value to the minimum score accepted by Deckard, use any negative number. * This parameter will be ignored if set to 0 (default value). * </pre> * * <code>double max_score = 4;</code> * @return The maxScore. */ @java.lang.Override public double getMaxScore() { return maxScore_; } public static final int MIN_SCORE_FIELD_NUMBER = 5; private double minScore_ = 0D; /** * <pre> * Sets the lower threshold for the priority score required for a message to be returned. * Only messages with a priority score equal to or higher than the min_score value will be returned. * The minimum score accepted by Deckard is 0 which is also the default value * </pre> * * <code>double min_score = 5;</code> * @return The minScore. */ @java.lang.Override public double getMinScore() { return minScore_; } public static final int ACK_DEADLINE_MS_FIELD_NUMBER = 6; private long ackDeadlineMs_ = 0L; /** * <pre> * Sets the amount of time in milliseconds a message will wait be available for processing before being returned to the queue if not ACKed. * The default value is 300000 (5 minutes). * </pre> * * <code>int64 ack_deadline_ms = 6;</code> * @return The ackDeadlineMs. */ @java.lang.Override public long getAckDeadlineMs() { return ackDeadlineMs_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queue_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, queue_); } if (amount_ != 0) { output.writeInt32(2, amount_); } if (scoreFilter_ != 0L) { output.writeInt64(3, scoreFilter_); } if (java.lang.Double.doubleToRawLongBits(maxScore_) != 0) { output.writeDouble(4, maxScore_); } if (java.lang.Double.doubleToRawLongBits(minScore_) != 0) { output.writeDouble(5, minScore_); } if (ackDeadlineMs_ != 0L) { output.writeInt64(6, ackDeadlineMs_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queue_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, queue_); } if (amount_ != 0) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(2, amount_); } if (scoreFilter_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(3, scoreFilter_); } if (java.lang.Double.doubleToRawLongBits(maxScore_) != 0) { size += com.google.protobuf.CodedOutputStream .computeDoubleSize(4, maxScore_); } if (java.lang.Double.doubleToRawLongBits(minScore_) != 0) { size += com.google.protobuf.CodedOutputStream .computeDoubleSize(5, minScore_); } if (ackDeadlineMs_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(6, ackDeadlineMs_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof ai.blip.deckard.PullRequest)) { return super.equals(obj); } ai.blip.deckard.PullRequest other = (ai.blip.deckard.PullRequest) obj; if (!getQueue() .equals(other.getQueue())) return false; if (getAmount() != other.getAmount()) return false; if (getScoreFilter() != other.getScoreFilter()) return false; if (java.lang.Double.doubleToLongBits(getMaxScore()) != java.lang.Double.doubleToLongBits( other.getMaxScore())) return false; if (java.lang.Double.doubleToLongBits(getMinScore()) != java.lang.Double.doubleToLongBits( other.getMinScore())) return false; if (getAckDeadlineMs() != other.getAckDeadlineMs()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + QUEUE_FIELD_NUMBER; hash = (53 * hash) + getQueue().hashCode(); hash = (37 * hash) + AMOUNT_FIELD_NUMBER; hash = (53 * hash) + getAmount(); hash = (37 * hash) + SCORE_FILTER_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getScoreFilter()); hash = (37 * hash) + MAX_SCORE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( java.lang.Double.doubleToLongBits(getMaxScore())); hash = (37 * hash) + MIN_SCORE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( java.lang.Double.doubleToLongBits(getMinScore())); hash = (37 * hash) + ACK_DEADLINE_MS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getAckDeadlineMs()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static ai.blip.deckard.PullRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.PullRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.PullRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.PullRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.PullRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.PullRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.PullRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.PullRequest 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 ai.blip.deckard.PullRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ai.blip.deckard.PullRequest 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 ai.blip.deckard.PullRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.PullRequest 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(ai.blip.deckard.PullRequest 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 blipai.deckard.PullRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:blipai.deckard.PullRequest) ai.blip.deckard.PullRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_PullRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_PullRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.PullRequest.class, ai.blip.deckard.PullRequest.Builder.class); } // Construct using ai.blip.deckard.PullRequest.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; queue_ = ""; amount_ = 0; scoreFilter_ = 0L; maxScore_ = 0D; minScore_ = 0D; ackDeadlineMs_ = 0L; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_PullRequest_descriptor; } @java.lang.Override public ai.blip.deckard.PullRequest getDefaultInstanceForType() { return ai.blip.deckard.PullRequest.getDefaultInstance(); } @java.lang.Override public ai.blip.deckard.PullRequest build() { ai.blip.deckard.PullRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public ai.blip.deckard.PullRequest buildPartial() { ai.blip.deckard.PullRequest result = new ai.blip.deckard.PullRequest(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(ai.blip.deckard.PullRequest result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.queue_ = queue_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.amount_ = amount_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.scoreFilter_ = scoreFilter_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.maxScore_ = maxScore_; } if (((from_bitField0_ & 0x00000010) != 0)) { result.minScore_ = minScore_; } if (((from_bitField0_ & 0x00000020) != 0)) { result.ackDeadlineMs_ = ackDeadlineMs_; } } @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 ai.blip.deckard.PullRequest) { return mergeFrom((ai.blip.deckard.PullRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ai.blip.deckard.PullRequest other) { if (other == ai.blip.deckard.PullRequest.getDefaultInstance()) return this; if (!other.getQueue().isEmpty()) { queue_ = other.queue_; bitField0_ |= 0x00000001; onChanged(); } if (other.getAmount() != 0) { setAmount(other.getAmount()); } if (other.getScoreFilter() != 0L) { setScoreFilter(other.getScoreFilter()); } if (other.getMaxScore() != 0D) { setMaxScore(other.getMaxScore()); } if (other.getMinScore() != 0D) { setMinScore(other.getMinScore()); } if (other.getAckDeadlineMs() != 0L) { setAckDeadlineMs(other.getAckDeadlineMs()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { queue_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 16: { amount_ = input.readInt32(); bitField0_ |= 0x00000002; break; } // case 16 case 24: { scoreFilter_ = input.readInt64(); bitField0_ |= 0x00000004; break; } // case 24 case 33: { maxScore_ = input.readDouble(); bitField0_ |= 0x00000008; break; } // case 33 case 41: { minScore_ = input.readDouble(); bitField0_ |= 0x00000010; break; } // case 41 case 48: { ackDeadlineMs_ = input.readInt64(); bitField0_ |= 0x00000020; break; } // case 48 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object queue_ = ""; /** * <pre> * Full name of the queue to pull messages (including any prefixes) * </pre> * * <code>string queue = 1;</code> * @return The queue. */ public java.lang.String getQueue() { java.lang.Object ref = queue_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); queue_ = s; return s; } else { return (java.lang.String) ref; } } /** * <pre> * Full name of the queue to pull messages (including any prefixes) * </pre> * * <code>string queue = 1;</code> * @return The bytes for queue. */ public com.google.protobuf.ByteString getQueueBytes() { java.lang.Object ref = queue_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); queue_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Full name of the queue to pull messages (including any prefixes) * </pre> * * <code>string queue = 1;</code> * @param value The queue to set. * @return This builder for chaining. */ public Builder setQueue( java.lang.String value) { if (value == null) { throw new NullPointerException(); } queue_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * <pre> * Full name of the queue to pull messages (including any prefixes) * </pre> * * <code>string queue = 1;</code> * @return This builder for chaining. */ public Builder clearQueue() { queue_ = getDefaultInstance().getQueue(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * <pre> * Full name of the queue to pull messages (including any prefixes) * </pre> * * <code>string queue = 1;</code> * @param value The bytes for queue to set. * @return This builder for chaining. */ public Builder setQueueBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); queue_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private int amount_ ; /** * <pre> * Number of messages to fetch. * Caution: as greater the amount, as more time it will take to process the request. * Max value is 1000 and the default value is 1 * </pre> * * <code>int32 amount = 2;</code> * @return The amount. */ @java.lang.Override public int getAmount() { return amount_; } /** * <pre> * Number of messages to fetch. * Caution: as greater the amount, as more time it will take to process the request. * Max value is 1000 and the default value is 1 * </pre> * * <code>int32 amount = 2;</code> * @param value The amount to set. * @return This builder for chaining. */ public Builder setAmount(int value) { amount_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * <pre> * Number of messages to fetch. * Caution: as greater the amount, as more time it will take to process the request. * Max value is 1000 and the default value is 1 * </pre> * * <code>int32 amount = 2;</code> * @return This builder for chaining. */ public Builder clearAmount() { bitField0_ = (bitField0_ & ~0x00000002); amount_ = 0; onChanged(); return this; } private long scoreFilter_ ; /** * <pre> * Prefer using the max_score field instead of this one. * This field is deprecated and will be removed in the future. * * The `score_filter` behaves differently than `max_score` field. * The `max_score` field is the upper threshold itself, but the `score_filter` will result in an upper score threshold of the current timestamp minus the score_filter value. * * Useful only when your queue's score is only based on the current timestamp to not return a message just moments after it was last used. * It will only return messages with score lower than the current timestamp minus the score_filter value. * * For example if your queue's score is only based on the current timestamp, this parameter will be the number of milliseconds a message must be in the queue before being returned. * </pre> * * <code>int64 score_filter = 3 [deprecated = true];</code> * @deprecated blipai.deckard.PullRequest.score_filter is deprecated. * See proto/deckard_service.proto;l=114 * @return The scoreFilter. */ @java.lang.Override @java.lang.Deprecated public long getScoreFilter() { return scoreFilter_; } /** * <pre> * Prefer using the max_score field instead of this one. * This field is deprecated and will be removed in the future. * * The `score_filter` behaves differently than `max_score` field. * The `max_score` field is the upper threshold itself, but the `score_filter` will result in an upper score threshold of the current timestamp minus the score_filter value. * * Useful only when your queue's score is only based on the current timestamp to not return a message just moments after it was last used. * It will only return messages with score lower than the current timestamp minus the score_filter value. * * For example if your queue's score is only based on the current timestamp, this parameter will be the number of milliseconds a message must be in the queue before being returned. * </pre> * * <code>int64 score_filter = 3 [deprecated = true];</code> * @deprecated blipai.deckard.PullRequest.score_filter is deprecated. * See proto/deckard_service.proto;l=114 * @param value The scoreFilter to set. * @return This builder for chaining. */ @java.lang.Deprecated public Builder setScoreFilter(long value) { scoreFilter_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** * <pre> * Prefer using the max_score field instead of this one. * This field is deprecated and will be removed in the future. * * The `score_filter` behaves differently than `max_score` field. * The `max_score` field is the upper threshold itself, but the `score_filter` will result in an upper score threshold of the current timestamp minus the score_filter value. * * Useful only when your queue's score is only based on the current timestamp to not return a message just moments after it was last used. * It will only return messages with score lower than the current timestamp minus the score_filter value. * * For example if your queue's score is only based on the current timestamp, this parameter will be the number of milliseconds a message must be in the queue before being returned. * </pre> * * <code>int64 score_filter = 3 [deprecated = true];</code> * @deprecated blipai.deckard.PullRequest.score_filter is deprecated. * See proto/deckard_service.proto;l=114 * @return This builder for chaining. */ @java.lang.Deprecated public Builder clearScoreFilter() { bitField0_ = (bitField0_ & ~0x00000004); scoreFilter_ = 0L; onChanged(); return this; } private double maxScore_ ; /** * <pre> * Sets the upper threshold for the priority score of a message to be returned in the pull request. * * Only messages with a priority score equal to or lower than the max_score value will be returned. * * The maximum score accepted by Deckard is 9007199254740992, any value higher than this will be capped to the maximum score. * To set this value to the minimum score accepted by Deckard, use any negative number. * This parameter will be ignored if set to 0 (default value). * </pre> * * <code>double max_score = 4;</code> * @return The maxScore. */ @java.lang.Override public double getMaxScore() { return maxScore_; } /** * <pre> * Sets the upper threshold for the priority score of a message to be returned in the pull request. * * Only messages with a priority score equal to or lower than the max_score value will be returned. * * The maximum score accepted by Deckard is 9007199254740992, any value higher than this will be capped to the maximum score. * To set this value to the minimum score accepted by Deckard, use any negative number. * This parameter will be ignored if set to 0 (default value). * </pre> * * <code>double max_score = 4;</code> * @param value The maxScore to set. * @return This builder for chaining. */ public Builder setMaxScore(double value) { maxScore_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** * <pre> * Sets the upper threshold for the priority score of a message to be returned in the pull request. * * Only messages with a priority score equal to or lower than the max_score value will be returned. * * The maximum score accepted by Deckard is 9007199254740992, any value higher than this will be capped to the maximum score. * To set this value to the minimum score accepted by Deckard, use any negative number. * This parameter will be ignored if set to 0 (default value). * </pre> * * <code>double max_score = 4;</code> * @return This builder for chaining. */ public Builder clearMaxScore() { bitField0_ = (bitField0_ & ~0x00000008); maxScore_ = 0D; onChanged(); return this; } private double minScore_ ; /** * <pre> * Sets the lower threshold for the priority score required for a message to be returned. * Only messages with a priority score equal to or higher than the min_score value will be returned. * The minimum score accepted by Deckard is 0 which is also the default value * </pre> * * <code>double min_score = 5;</code> * @return The minScore. */ @java.lang.Override public double getMinScore() { return minScore_; } /** * <pre> * Sets the lower threshold for the priority score required for a message to be returned. * Only messages with a priority score equal to or higher than the min_score value will be returned. * The minimum score accepted by Deckard is 0 which is also the default value * </pre> * * <code>double min_score = 5;</code> * @param value The minScore to set. * @return This builder for chaining. */ public Builder setMinScore(double value) { minScore_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** * <pre> * Sets the lower threshold for the priority score required for a message to be returned. * Only messages with a priority score equal to or higher than the min_score value will be returned. * The minimum score accepted by Deckard is 0 which is also the default value * </pre> * * <code>double min_score = 5;</code> * @return This builder for chaining. */ public Builder clearMinScore() { bitField0_ = (bitField0_ & ~0x00000010); minScore_ = 0D; onChanged(); return this; } private long ackDeadlineMs_ ; /** * <pre> * Sets the amount of time in milliseconds a message will wait be available for processing before being returned to the queue if not ACKed. * The default value is 300000 (5 minutes). * </pre> * * <code>int64 ack_deadline_ms = 6;</code> * @return The ackDeadlineMs. */ @java.lang.Override public long getAckDeadlineMs() { return ackDeadlineMs_; } /** * <pre> * Sets the amount of time in milliseconds a message will wait be available for processing before being returned to the queue if not ACKed. * The default value is 300000 (5 minutes). * </pre> * * <code>int64 ack_deadline_ms = 6;</code> * @param value The ackDeadlineMs to set. * @return This builder for chaining. */ public Builder setAckDeadlineMs(long value) { ackDeadlineMs_ = value; bitField0_ |= 0x00000020; onChanged(); return this; } /** * <pre> * Sets the amount of time in milliseconds a message will wait be available for processing before being returned to the queue if not ACKed. * The default value is 300000 (5 minutes). * </pre> * * <code>int64 ack_deadline_ms = 6;</code> * @return This builder for chaining. */ public Builder clearAckDeadlineMs() { bitField0_ = (bitField0_ & ~0x00000020); ackDeadlineMs_ = 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:blipai.deckard.PullRequest) } // @@protoc_insertion_point(class_scope:blipai.deckard.PullRequest) private static final ai.blip.deckard.PullRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ai.blip.deckard.PullRequest(); } public static ai.blip.deckard.PullRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<PullRequest> PARSER = new com.google.protobuf.AbstractParser<PullRequest>() { @java.lang.Override public PullRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser<PullRequest> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<PullRequest> getParserForType() { return PARSER; } @java.lang.Override public ai.blip.deckard.PullRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/PullRequestOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; public interface PullRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:blipai.deckard.PullRequest) com.google.protobuf.MessageOrBuilder { /** * <pre> * Full name of the queue to pull messages (including any prefixes) * </pre> * * <code>string queue = 1;</code> * @return The queue. */ java.lang.String getQueue(); /** * <pre> * Full name of the queue to pull messages (including any prefixes) * </pre> * * <code>string queue = 1;</code> * @return The bytes for queue. */ com.google.protobuf.ByteString getQueueBytes(); /** * <pre> * Number of messages to fetch. * Caution: as greater the amount, as more time it will take to process the request. * Max value is 1000 and the default value is 1 * </pre> * * <code>int32 amount = 2;</code> * @return The amount. */ int getAmount(); /** * <pre> * Prefer using the max_score field instead of this one. * This field is deprecated and will be removed in the future. * * The `score_filter` behaves differently than `max_score` field. * The `max_score` field is the upper threshold itself, but the `score_filter` will result in an upper score threshold of the current timestamp minus the score_filter value. * * Useful only when your queue's score is only based on the current timestamp to not return a message just moments after it was last used. * It will only return messages with score lower than the current timestamp minus the score_filter value. * * For example if your queue's score is only based on the current timestamp, this parameter will be the number of milliseconds a message must be in the queue before being returned. * </pre> * * <code>int64 score_filter = 3 [deprecated = true];</code> * @deprecated blipai.deckard.PullRequest.score_filter is deprecated. * See proto/deckard_service.proto;l=114 * @return The scoreFilter. */ @java.lang.Deprecated long getScoreFilter(); /** * <pre> * Sets the upper threshold for the priority score of a message to be returned in the pull request. * * Only messages with a priority score equal to or lower than the max_score value will be returned. * * The maximum score accepted by Deckard is 9007199254740992, any value higher than this will be capped to the maximum score. * To set this value to the minimum score accepted by Deckard, use any negative number. * This parameter will be ignored if set to 0 (default value). * </pre> * * <code>double max_score = 4;</code> * @return The maxScore. */ double getMaxScore(); /** * <pre> * Sets the lower threshold for the priority score required for a message to be returned. * Only messages with a priority score equal to or higher than the min_score value will be returned. * The minimum score accepted by Deckard is 0 which is also the default value * </pre> * * <code>double min_score = 5;</code> * @return The minScore. */ double getMinScore(); /** * <pre> * Sets the amount of time in milliseconds a message will wait be available for processing before being returned to the queue if not ACKed. * The default value is 300000 (5 minutes). * </pre> * * <code>int64 ack_deadline_ms = 6;</code> * @return The ackDeadlineMs. */ long getAckDeadlineMs(); }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/PullResponse.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; /** * Protobuf type {@code blipai.deckard.PullResponse} */ public final class PullResponse extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:blipai.deckard.PullResponse) PullResponseOrBuilder { private static final long serialVersionUID = 0L; // Use PullResponse.newBuilder() to construct. private PullResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private PullResponse() { messages_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new PullResponse(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_PullResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_PullResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.PullResponse.class, ai.blip.deckard.PullResponse.Builder.class); } public static final int MESSAGES_FIELD_NUMBER = 1; @SuppressWarnings("serial") private java.util.List<ai.blip.deckard.Message> messages_; /** * <pre> * List of returned messages * </pre> * * <code>repeated .blipai.deckard.Message messages = 1;</code> */ @java.lang.Override public java.util.List<ai.blip.deckard.Message> getMessagesList() { return messages_; } /** * <pre> * List of returned messages * </pre> * * <code>repeated .blipai.deckard.Message messages = 1;</code> */ @java.lang.Override public java.util.List<? extends ai.blip.deckard.MessageOrBuilder> getMessagesOrBuilderList() { return messages_; } /** * <pre> * List of returned messages * </pre> * * <code>repeated .blipai.deckard.Message messages = 1;</code> */ @java.lang.Override public int getMessagesCount() { return messages_.size(); } /** * <pre> * List of returned messages * </pre> * * <code>repeated .blipai.deckard.Message messages = 1;</code> */ @java.lang.Override public ai.blip.deckard.Message getMessages(int index) { return messages_.get(index); } /** * <pre> * List of returned messages * </pre> * * <code>repeated .blipai.deckard.Message messages = 1;</code> */ @java.lang.Override public ai.blip.deckard.MessageOrBuilder getMessagesOrBuilder( int index) { return messages_.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 < messages_.size(); i++) { output.writeMessage(1, messages_.get(i)); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; for (int i = 0; i < messages_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, messages_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof ai.blip.deckard.PullResponse)) { return super.equals(obj); } ai.blip.deckard.PullResponse other = (ai.blip.deckard.PullResponse) obj; if (!getMessagesList() .equals(other.getMessagesList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (getMessagesCount() > 0) { hash = (37 * hash) + MESSAGES_FIELD_NUMBER; hash = (53 * hash) + getMessagesList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static ai.blip.deckard.PullResponse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.PullResponse parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.PullResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.PullResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.PullResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.PullResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.PullResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.PullResponse 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 ai.blip.deckard.PullResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ai.blip.deckard.PullResponse 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 ai.blip.deckard.PullResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.PullResponse 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(ai.blip.deckard.PullResponse 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 blipai.deckard.PullResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:blipai.deckard.PullResponse) ai.blip.deckard.PullResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_PullResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_PullResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.PullResponse.class, ai.blip.deckard.PullResponse.Builder.class); } // Construct using ai.blip.deckard.PullResponse.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; if (messagesBuilder_ == null) { messages_ = java.util.Collections.emptyList(); } else { messages_ = null; messagesBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_PullResponse_descriptor; } @java.lang.Override public ai.blip.deckard.PullResponse getDefaultInstanceForType() { return ai.blip.deckard.PullResponse.getDefaultInstance(); } @java.lang.Override public ai.blip.deckard.PullResponse build() { ai.blip.deckard.PullResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public ai.blip.deckard.PullResponse buildPartial() { ai.blip.deckard.PullResponse result = new ai.blip.deckard.PullResponse(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields(ai.blip.deckard.PullResponse result) { if (messagesBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { messages_ = java.util.Collections.unmodifiableList(messages_); bitField0_ = (bitField0_ & ~0x00000001); } result.messages_ = messages_; } else { result.messages_ = messagesBuilder_.build(); } } private void buildPartial0(ai.blip.deckard.PullResponse result) { int from_bitField0_ = bitField0_; } @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 ai.blip.deckard.PullResponse) { return mergeFrom((ai.blip.deckard.PullResponse)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ai.blip.deckard.PullResponse other) { if (other == ai.blip.deckard.PullResponse.getDefaultInstance()) return this; if (messagesBuilder_ == null) { if (!other.messages_.isEmpty()) { if (messages_.isEmpty()) { messages_ = other.messages_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureMessagesIsMutable(); messages_.addAll(other.messages_); } onChanged(); } } else { if (!other.messages_.isEmpty()) { if (messagesBuilder_.isEmpty()) { messagesBuilder_.dispose(); messagesBuilder_ = null; messages_ = other.messages_; bitField0_ = (bitField0_ & ~0x00000001); messagesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getMessagesFieldBuilder() : null; } else { messagesBuilder_.addAllMessages(other.messages_); } } } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { ai.blip.deckard.Message m = input.readMessage( ai.blip.deckard.Message.parser(), extensionRegistry); if (messagesBuilder_ == null) { ensureMessagesIsMutable(); messages_.add(m); } else { messagesBuilder_.addMessage(m); } break; } // case 10 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.util.List<ai.blip.deckard.Message> messages_ = java.util.Collections.emptyList(); private void ensureMessagesIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { messages_ = new java.util.ArrayList<ai.blip.deckard.Message>(messages_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< ai.blip.deckard.Message, ai.blip.deckard.Message.Builder, ai.blip.deckard.MessageOrBuilder> messagesBuilder_; /** * <pre> * List of returned messages * </pre> * * <code>repeated .blipai.deckard.Message messages = 1;</code> */ public java.util.List<ai.blip.deckard.Message> getMessagesList() { if (messagesBuilder_ == null) { return java.util.Collections.unmodifiableList(messages_); } else { return messagesBuilder_.getMessageList(); } } /** * <pre> * List of returned messages * </pre> * * <code>repeated .blipai.deckard.Message messages = 1;</code> */ public int getMessagesCount() { if (messagesBuilder_ == null) { return messages_.size(); } else { return messagesBuilder_.getCount(); } } /** * <pre> * List of returned messages * </pre> * * <code>repeated .blipai.deckard.Message messages = 1;</code> */ public ai.blip.deckard.Message getMessages(int index) { if (messagesBuilder_ == null) { return messages_.get(index); } else { return messagesBuilder_.getMessage(index); } } /** * <pre> * List of returned messages * </pre> * * <code>repeated .blipai.deckard.Message messages = 1;</code> */ public Builder setMessages( int index, ai.blip.deckard.Message value) { if (messagesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureMessagesIsMutable(); messages_.set(index, value); onChanged(); } else { messagesBuilder_.setMessage(index, value); } return this; } /** * <pre> * List of returned messages * </pre> * * <code>repeated .blipai.deckard.Message messages = 1;</code> */ public Builder setMessages( int index, ai.blip.deckard.Message.Builder builderForValue) { if (messagesBuilder_ == null) { ensureMessagesIsMutable(); messages_.set(index, builderForValue.build()); onChanged(); } else { messagesBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * <pre> * List of returned messages * </pre> * * <code>repeated .blipai.deckard.Message messages = 1;</code> */ public Builder addMessages(ai.blip.deckard.Message value) { if (messagesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureMessagesIsMutable(); messages_.add(value); onChanged(); } else { messagesBuilder_.addMessage(value); } return this; } /** * <pre> * List of returned messages * </pre> * * <code>repeated .blipai.deckard.Message messages = 1;</code> */ public Builder addMessages( int index, ai.blip.deckard.Message value) { if (messagesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureMessagesIsMutable(); messages_.add(index, value); onChanged(); } else { messagesBuilder_.addMessage(index, value); } return this; } /** * <pre> * List of returned messages * </pre> * * <code>repeated .blipai.deckard.Message messages = 1;</code> */ public Builder addMessages( ai.blip.deckard.Message.Builder builderForValue) { if (messagesBuilder_ == null) { ensureMessagesIsMutable(); messages_.add(builderForValue.build()); onChanged(); } else { messagesBuilder_.addMessage(builderForValue.build()); } return this; } /** * <pre> * List of returned messages * </pre> * * <code>repeated .blipai.deckard.Message messages = 1;</code> */ public Builder addMessages( int index, ai.blip.deckard.Message.Builder builderForValue) { if (messagesBuilder_ == null) { ensureMessagesIsMutable(); messages_.add(index, builderForValue.build()); onChanged(); } else { messagesBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * <pre> * List of returned messages * </pre> * * <code>repeated .blipai.deckard.Message messages = 1;</code> */ public Builder addAllMessages( java.lang.Iterable<? extends ai.blip.deckard.Message> values) { if (messagesBuilder_ == null) { ensureMessagesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, messages_); onChanged(); } else { messagesBuilder_.addAllMessages(values); } return this; } /** * <pre> * List of returned messages * </pre> * * <code>repeated .blipai.deckard.Message messages = 1;</code> */ public Builder clearMessages() { if (messagesBuilder_ == null) { messages_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { messagesBuilder_.clear(); } return this; } /** * <pre> * List of returned messages * </pre> * * <code>repeated .blipai.deckard.Message messages = 1;</code> */ public Builder removeMessages(int index) { if (messagesBuilder_ == null) { ensureMessagesIsMutable(); messages_.remove(index); onChanged(); } else { messagesBuilder_.remove(index); } return this; } /** * <pre> * List of returned messages * </pre> * * <code>repeated .blipai.deckard.Message messages = 1;</code> */ public ai.blip.deckard.Message.Builder getMessagesBuilder( int index) { return getMessagesFieldBuilder().getBuilder(index); } /** * <pre> * List of returned messages * </pre> * * <code>repeated .blipai.deckard.Message messages = 1;</code> */ public ai.blip.deckard.MessageOrBuilder getMessagesOrBuilder( int index) { if (messagesBuilder_ == null) { return messages_.get(index); } else { return messagesBuilder_.getMessageOrBuilder(index); } } /** * <pre> * List of returned messages * </pre> * * <code>repeated .blipai.deckard.Message messages = 1;</code> */ public java.util.List<? extends ai.blip.deckard.MessageOrBuilder> getMessagesOrBuilderList() { if (messagesBuilder_ != null) { return messagesBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(messages_); } } /** * <pre> * List of returned messages * </pre> * * <code>repeated .blipai.deckard.Message messages = 1;</code> */ public ai.blip.deckard.Message.Builder addMessagesBuilder() { return getMessagesFieldBuilder().addBuilder( ai.blip.deckard.Message.getDefaultInstance()); } /** * <pre> * List of returned messages * </pre> * * <code>repeated .blipai.deckard.Message messages = 1;</code> */ public ai.blip.deckard.Message.Builder addMessagesBuilder( int index) { return getMessagesFieldBuilder().addBuilder( index, ai.blip.deckard.Message.getDefaultInstance()); } /** * <pre> * List of returned messages * </pre> * * <code>repeated .blipai.deckard.Message messages = 1;</code> */ public java.util.List<ai.blip.deckard.Message.Builder> getMessagesBuilderList() { return getMessagesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< ai.blip.deckard.Message, ai.blip.deckard.Message.Builder, ai.blip.deckard.MessageOrBuilder> getMessagesFieldBuilder() { if (messagesBuilder_ == null) { messagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< ai.blip.deckard.Message, ai.blip.deckard.Message.Builder, ai.blip.deckard.MessageOrBuilder>( messages_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); messages_ = null; } return messagesBuilder_; } @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:blipai.deckard.PullResponse) } // @@protoc_insertion_point(class_scope:blipai.deckard.PullResponse) private static final ai.blip.deckard.PullResponse DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ai.blip.deckard.PullResponse(); } public static ai.blip.deckard.PullResponse getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<PullResponse> PARSER = new com.google.protobuf.AbstractParser<PullResponse>() { @java.lang.Override public PullResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser<PullResponse> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<PullResponse> getParserForType() { return PARSER; } @java.lang.Override public ai.blip.deckard.PullResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/PullResponseOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; public interface PullResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:blipai.deckard.PullResponse) com.google.protobuf.MessageOrBuilder { /** * <pre> * List of returned messages * </pre> * * <code>repeated .blipai.deckard.Message messages = 1;</code> */ java.util.List<ai.blip.deckard.Message> getMessagesList(); /** * <pre> * List of returned messages * </pre> * * <code>repeated .blipai.deckard.Message messages = 1;</code> */ ai.blip.deckard.Message getMessages(int index); /** * <pre> * List of returned messages * </pre> * * <code>repeated .blipai.deckard.Message messages = 1;</code> */ int getMessagesCount(); /** * <pre> * List of returned messages * </pre> * * <code>repeated .blipai.deckard.Message messages = 1;</code> */ java.util.List<? extends ai.blip.deckard.MessageOrBuilder> getMessagesOrBuilderList(); /** * <pre> * List of returned messages * </pre> * * <code>repeated .blipai.deckard.Message messages = 1;</code> */ ai.blip.deckard.MessageOrBuilder getMessagesOrBuilder( int index); }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/QueueConfiguration.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; /** * <pre> * The queue configuration does not change instantly and can take up to 10 minutes to complete update. * </pre> * * Protobuf type {@code blipai.deckard.QueueConfiguration} */ public final class QueueConfiguration extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:blipai.deckard.QueueConfiguration) QueueConfigurationOrBuilder { private static final long serialVersionUID = 0L; // Use QueueConfiguration.newBuilder() to construct. private QueueConfiguration(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private QueueConfiguration() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new QueueConfiguration(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_QueueConfiguration_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_QueueConfiguration_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.QueueConfiguration.class, ai.blip.deckard.QueueConfiguration.Builder.class); } public static final int MAX_ELEMENTS_FIELD_NUMBER = 1; private long maxElements_ = 0L; /** * <pre> * Number of max elements the queue can have. * * To apply a max elements to a queue, set a value greater than 0. * To remove the max elements from a queue, set the value to -1. * 0 will be always ignored and the queue will not be updated. * * All queues are unlimited by default. * * The exclusion policy will be applied to the queue when the max elements is reached: * * Messages are excluded ordered by its TTL, where the closest to expire will be excluded first. * If all messages have the same TTL, the oldest message will be excluded first. * </pre> * * <code>int64 max_elements = 1;</code> * @return The maxElements. */ @java.lang.Override public long getMaxElements() { return maxElements_; } 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 (maxElements_ != 0L) { output.writeInt64(1, maxElements_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (maxElements_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(1, maxElements_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof ai.blip.deckard.QueueConfiguration)) { return super.equals(obj); } ai.blip.deckard.QueueConfiguration other = (ai.blip.deckard.QueueConfiguration) obj; if (getMaxElements() != other.getMaxElements()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + MAX_ELEMENTS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getMaxElements()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static ai.blip.deckard.QueueConfiguration parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.QueueConfiguration parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.QueueConfiguration parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.QueueConfiguration parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.QueueConfiguration parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.QueueConfiguration parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.QueueConfiguration parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.QueueConfiguration 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 ai.blip.deckard.QueueConfiguration parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ai.blip.deckard.QueueConfiguration 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 ai.blip.deckard.QueueConfiguration parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.QueueConfiguration 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(ai.blip.deckard.QueueConfiguration 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; } /** * <pre> * The queue configuration does not change instantly and can take up to 10 minutes to complete update. * </pre> * * Protobuf type {@code blipai.deckard.QueueConfiguration} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:blipai.deckard.QueueConfiguration) ai.blip.deckard.QueueConfigurationOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_QueueConfiguration_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_QueueConfiguration_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.QueueConfiguration.class, ai.blip.deckard.QueueConfiguration.Builder.class); } // Construct using ai.blip.deckard.QueueConfiguration.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; maxElements_ = 0L; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_QueueConfiguration_descriptor; } @java.lang.Override public ai.blip.deckard.QueueConfiguration getDefaultInstanceForType() { return ai.blip.deckard.QueueConfiguration.getDefaultInstance(); } @java.lang.Override public ai.blip.deckard.QueueConfiguration build() { ai.blip.deckard.QueueConfiguration result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public ai.blip.deckard.QueueConfiguration buildPartial() { ai.blip.deckard.QueueConfiguration result = new ai.blip.deckard.QueueConfiguration(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(ai.blip.deckard.QueueConfiguration result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.maxElements_ = maxElements_; } } @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 ai.blip.deckard.QueueConfiguration) { return mergeFrom((ai.blip.deckard.QueueConfiguration)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ai.blip.deckard.QueueConfiguration other) { if (other == ai.blip.deckard.QueueConfiguration.getDefaultInstance()) return this; if (other.getMaxElements() != 0L) { setMaxElements(other.getMaxElements()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { maxElements_ = input.readInt64(); bitField0_ |= 0x00000001; break; } // case 8 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private long maxElements_ ; /** * <pre> * Number of max elements the queue can have. * * To apply a max elements to a queue, set a value greater than 0. * To remove the max elements from a queue, set the value to -1. * 0 will be always ignored and the queue will not be updated. * * All queues are unlimited by default. * * The exclusion policy will be applied to the queue when the max elements is reached: * * Messages are excluded ordered by its TTL, where the closest to expire will be excluded first. * If all messages have the same TTL, the oldest message will be excluded first. * </pre> * * <code>int64 max_elements = 1;</code> * @return The maxElements. */ @java.lang.Override public long getMaxElements() { return maxElements_; } /** * <pre> * Number of max elements the queue can have. * * To apply a max elements to a queue, set a value greater than 0. * To remove the max elements from a queue, set the value to -1. * 0 will be always ignored and the queue will not be updated. * * All queues are unlimited by default. * * The exclusion policy will be applied to the queue when the max elements is reached: * * Messages are excluded ordered by its TTL, where the closest to expire will be excluded first. * If all messages have the same TTL, the oldest message will be excluded first. * </pre> * * <code>int64 max_elements = 1;</code> * @param value The maxElements to set. * @return This builder for chaining. */ public Builder setMaxElements(long value) { maxElements_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * <pre> * Number of max elements the queue can have. * * To apply a max elements to a queue, set a value greater than 0. * To remove the max elements from a queue, set the value to -1. * 0 will be always ignored and the queue will not be updated. * * All queues are unlimited by default. * * The exclusion policy will be applied to the queue when the max elements is reached: * * Messages are excluded ordered by its TTL, where the closest to expire will be excluded first. * If all messages have the same TTL, the oldest message will be excluded first. * </pre> * * <code>int64 max_elements = 1;</code> * @return This builder for chaining. */ public Builder clearMaxElements() { bitField0_ = (bitField0_ & ~0x00000001); maxElements_ = 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:blipai.deckard.QueueConfiguration) } // @@protoc_insertion_point(class_scope:blipai.deckard.QueueConfiguration) private static final ai.blip.deckard.QueueConfiguration DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ai.blip.deckard.QueueConfiguration(); } public static ai.blip.deckard.QueueConfiguration getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<QueueConfiguration> PARSER = new com.google.protobuf.AbstractParser<QueueConfiguration>() { @java.lang.Override public QueueConfiguration parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser<QueueConfiguration> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<QueueConfiguration> getParserForType() { return PARSER; } @java.lang.Override public ai.blip.deckard.QueueConfiguration getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/QueueConfigurationOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; public interface QueueConfigurationOrBuilder extends // @@protoc_insertion_point(interface_extends:blipai.deckard.QueueConfiguration) com.google.protobuf.MessageOrBuilder { /** * <pre> * Number of max elements the queue can have. * * To apply a max elements to a queue, set a value greater than 0. * To remove the max elements from a queue, set the value to -1. * 0 will be always ignored and the queue will not be updated. * * All queues are unlimited by default. * * The exclusion policy will be applied to the queue when the max elements is reached: * * Messages are excluded ordered by its TTL, where the closest to expire will be excluded first. * If all messages have the same TTL, the oldest message will be excluded first. * </pre> * * <code>int64 max_elements = 1;</code> * @return The maxElements. */ long getMaxElements(); }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/RemoveRequest.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; /** * Protobuf type {@code blipai.deckard.RemoveRequest} */ public final class RemoveRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:blipai.deckard.RemoveRequest) RemoveRequestOrBuilder { private static final long serialVersionUID = 0L; // Use RemoveRequest.newBuilder() to construct. private RemoveRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private RemoveRequest() { ids_ = com.google.protobuf.LazyStringArrayList.emptyList(); queue_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new RemoveRequest(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_RemoveRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_RemoveRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.RemoveRequest.class, ai.blip.deckard.RemoveRequest.Builder.class); } public static final int IDS_FIELD_NUMBER = 1; @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList ids_ = com.google.protobuf.LazyStringArrayList.emptyList(); /** * <code>repeated string ids = 1;</code> * @return A list containing the ids. */ public com.google.protobuf.ProtocolStringList getIdsList() { return ids_; } /** * <code>repeated string ids = 1;</code> * @return The count of ids. */ public int getIdsCount() { return ids_.size(); } /** * <code>repeated string ids = 1;</code> * @param index The index of the element to return. * @return The ids at the given index. */ public java.lang.String getIds(int index) { return ids_.get(index); } /** * <code>repeated string ids = 1;</code> * @param index The index of the value to return. * @return The bytes of the ids at the given index. */ public com.google.protobuf.ByteString getIdsBytes(int index) { return ids_.getByteString(index); } public static final int QUEUE_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object queue_ = ""; /** * <pre> * Name of the queue to remove message * Provide the name of the application as a prefix using colon as the separator. Example: &lt;application_name&gt;:&lt;queue_name&gt; * </pre> * * <code>string queue = 2;</code> * @return The queue. */ @java.lang.Override public java.lang.String getQueue() { java.lang.Object ref = queue_; 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(); queue_ = s; return s; } } /** * <pre> * Name of the queue to remove message * Provide the name of the application as a prefix using colon as the separator. Example: &lt;application_name&gt;:&lt;queue_name&gt; * </pre> * * <code>string queue = 2;</code> * @return The bytes for queue. */ @java.lang.Override public com.google.protobuf.ByteString getQueueBytes() { java.lang.Object ref = queue_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); queue_ = 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 < ids_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ids_.getRaw(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queue_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, queue_); } getUnknownFields().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 < ids_.size(); i++) { dataSize += computeStringSizeNoTag(ids_.getRaw(i)); } size += dataSize; size += 1 * getIdsList().size(); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queue_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, queue_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof ai.blip.deckard.RemoveRequest)) { return super.equals(obj); } ai.blip.deckard.RemoveRequest other = (ai.blip.deckard.RemoveRequest) obj; if (!getIdsList() .equals(other.getIdsList())) return false; if (!getQueue() .equals(other.getQueue())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (getIdsCount() > 0) { hash = (37 * hash) + IDS_FIELD_NUMBER; hash = (53 * hash) + getIdsList().hashCode(); } hash = (37 * hash) + QUEUE_FIELD_NUMBER; hash = (53 * hash) + getQueue().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static ai.blip.deckard.RemoveRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.RemoveRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.RemoveRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.RemoveRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.RemoveRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.RemoveRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.RemoveRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.RemoveRequest 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 ai.blip.deckard.RemoveRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ai.blip.deckard.RemoveRequest 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 ai.blip.deckard.RemoveRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.RemoveRequest 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(ai.blip.deckard.RemoveRequest 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 blipai.deckard.RemoveRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:blipai.deckard.RemoveRequest) ai.blip.deckard.RemoveRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_RemoveRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_RemoveRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.RemoveRequest.class, ai.blip.deckard.RemoveRequest.Builder.class); } // Construct using ai.blip.deckard.RemoveRequest.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; ids_ = com.google.protobuf.LazyStringArrayList.emptyList(); queue_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_RemoveRequest_descriptor; } @java.lang.Override public ai.blip.deckard.RemoveRequest getDefaultInstanceForType() { return ai.blip.deckard.RemoveRequest.getDefaultInstance(); } @java.lang.Override public ai.blip.deckard.RemoveRequest build() { ai.blip.deckard.RemoveRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public ai.blip.deckard.RemoveRequest buildPartial() { ai.blip.deckard.RemoveRequest result = new ai.blip.deckard.RemoveRequest(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(ai.blip.deckard.RemoveRequest result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { ids_.makeImmutable(); result.ids_ = ids_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.queue_ = queue_; } } @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 ai.blip.deckard.RemoveRequest) { return mergeFrom((ai.blip.deckard.RemoveRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ai.blip.deckard.RemoveRequest other) { if (other == ai.blip.deckard.RemoveRequest.getDefaultInstance()) return this; if (!other.ids_.isEmpty()) { if (ids_.isEmpty()) { ids_ = other.ids_; bitField0_ |= 0x00000001; } else { ensureIdsIsMutable(); ids_.addAll(other.ids_); } onChanged(); } if (!other.getQueue().isEmpty()) { queue_ = other.queue_; bitField0_ |= 0x00000002; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { java.lang.String s = input.readStringRequireUtf8(); ensureIdsIsMutable(); ids_.add(s); break; } // case 10 case 18: { queue_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private com.google.protobuf.LazyStringArrayList ids_ = com.google.protobuf.LazyStringArrayList.emptyList(); private void ensureIdsIsMutable() { if (!ids_.isModifiable()) { ids_ = new com.google.protobuf.LazyStringArrayList(ids_); } bitField0_ |= 0x00000001; } /** * <code>repeated string ids = 1;</code> * @return A list containing the ids. */ public com.google.protobuf.ProtocolStringList getIdsList() { ids_.makeImmutable(); return ids_; } /** * <code>repeated string ids = 1;</code> * @return The count of ids. */ public int getIdsCount() { return ids_.size(); } /** * <code>repeated string ids = 1;</code> * @param index The index of the element to return. * @return The ids at the given index. */ public java.lang.String getIds(int index) { return ids_.get(index); } /** * <code>repeated string ids = 1;</code> * @param index The index of the value to return. * @return The bytes of the ids at the given index. */ public com.google.protobuf.ByteString getIdsBytes(int index) { return ids_.getByteString(index); } /** * <code>repeated string ids = 1;</code> * @param index The index to set the value at. * @param value The ids to set. * @return This builder for chaining. */ public Builder setIds( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureIdsIsMutable(); ids_.set(index, value); bitField0_ |= 0x00000001; onChanged(); return this; } /** * <code>repeated string ids = 1;</code> * @param value The ids to add. * @return This builder for chaining. */ public Builder addIds( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureIdsIsMutable(); ids_.add(value); bitField0_ |= 0x00000001; onChanged(); return this; } /** * <code>repeated string ids = 1;</code> * @param values The ids to add. * @return This builder for chaining. */ public Builder addAllIds( java.lang.Iterable<java.lang.String> values) { ensureIdsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, ids_); bitField0_ |= 0x00000001; onChanged(); return this; } /** * <code>repeated string ids = 1;</code> * @return This builder for chaining. */ public Builder clearIds() { ids_ = com.google.protobuf.LazyStringArrayList.emptyList(); bitField0_ = (bitField0_ & ~0x00000001);; onChanged(); return this; } /** * <code>repeated string ids = 1;</code> * @param value The bytes of the ids to add. * @return This builder for chaining. */ public Builder addIdsBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureIdsIsMutable(); ids_.add(value); bitField0_ |= 0x00000001; onChanged(); return this; } private java.lang.Object queue_ = ""; /** * <pre> * Name of the queue to remove message * Provide the name of the application as a prefix using colon as the separator. Example: &lt;application_name&gt;:&lt;queue_name&gt; * </pre> * * <code>string queue = 2;</code> * @return The queue. */ public java.lang.String getQueue() { java.lang.Object ref = queue_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); queue_ = s; return s; } else { return (java.lang.String) ref; } } /** * <pre> * Name of the queue to remove message * Provide the name of the application as a prefix using colon as the separator. Example: &lt;application_name&gt;:&lt;queue_name&gt; * </pre> * * <code>string queue = 2;</code> * @return The bytes for queue. */ public com.google.protobuf.ByteString getQueueBytes() { java.lang.Object ref = queue_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); queue_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <pre> * Name of the queue to remove message * Provide the name of the application as a prefix using colon as the separator. Example: &lt;application_name&gt;:&lt;queue_name&gt; * </pre> * * <code>string queue = 2;</code> * @param value The queue to set. * @return This builder for chaining. */ public Builder setQueue( java.lang.String value) { if (value == null) { throw new NullPointerException(); } queue_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * <pre> * Name of the queue to remove message * Provide the name of the application as a prefix using colon as the separator. Example: &lt;application_name&gt;:&lt;queue_name&gt; * </pre> * * <code>string queue = 2;</code> * @return This builder for chaining. */ public Builder clearQueue() { queue_ = getDefaultInstance().getQueue(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * <pre> * Name of the queue to remove message * Provide the name of the application as a prefix using colon as the separator. Example: &lt;application_name&gt;:&lt;queue_name&gt; * </pre> * * <code>string queue = 2;</code> * @param value The bytes for queue to set. * @return This builder for chaining. */ public Builder setQueueBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); queue_ = value; bitField0_ |= 0x00000002; 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:blipai.deckard.RemoveRequest) } // @@protoc_insertion_point(class_scope:blipai.deckard.RemoveRequest) private static final ai.blip.deckard.RemoveRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ai.blip.deckard.RemoveRequest(); } public static ai.blip.deckard.RemoveRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<RemoveRequest> PARSER = new com.google.protobuf.AbstractParser<RemoveRequest>() { @java.lang.Override public RemoveRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser<RemoveRequest> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<RemoveRequest> getParserForType() { return PARSER; } @java.lang.Override public ai.blip.deckard.RemoveRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/RemoveRequestOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; public interface RemoveRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:blipai.deckard.RemoveRequest) com.google.protobuf.MessageOrBuilder { /** * <code>repeated string ids = 1;</code> * @return A list containing the ids. */ java.util.List<java.lang.String> getIdsList(); /** * <code>repeated string ids = 1;</code> * @return The count of ids. */ int getIdsCount(); /** * <code>repeated string ids = 1;</code> * @param index The index of the element to return. * @return The ids at the given index. */ java.lang.String getIds(int index); /** * <code>repeated string ids = 1;</code> * @param index The index of the value to return. * @return The bytes of the ids at the given index. */ com.google.protobuf.ByteString getIdsBytes(int index); /** * <pre> * Name of the queue to remove message * Provide the name of the application as a prefix using colon as the separator. Example: &lt;application_name&gt;:&lt;queue_name&gt; * </pre> * * <code>string queue = 2;</code> * @return The queue. */ java.lang.String getQueue(); /** * <pre> * Name of the queue to remove message * Provide the name of the application as a prefix using colon as the separator. Example: &lt;application_name&gt;:&lt;queue_name&gt; * </pre> * * <code>string queue = 2;</code> * @return The bytes for queue. */ com.google.protobuf.ByteString getQueueBytes(); }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/RemoveResponse.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; /** * Protobuf type {@code blipai.deckard.RemoveResponse} */ public final class RemoveResponse extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:blipai.deckard.RemoveResponse) RemoveResponseOrBuilder { private static final long serialVersionUID = 0L; // Use RemoveResponse.newBuilder() to construct. private RemoveResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); } private RemoveResponse() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new RemoveResponse(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_RemoveResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_RemoveResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.RemoveResponse.class, ai.blip.deckard.RemoveResponse.Builder.class); } public static final int CACHEREMOVED_FIELD_NUMBER = 1; private long cacheRemoved_ = 0L; /** * <code>int64 cacheRemoved = 1;</code> * @return The cacheRemoved. */ @java.lang.Override public long getCacheRemoved() { return cacheRemoved_; } public static final int STORAGEREMOVED_FIELD_NUMBER = 2; private long storageRemoved_ = 0L; /** * <code>int64 storageRemoved = 2;</code> * @return The storageRemoved. */ @java.lang.Override public long getStorageRemoved() { return storageRemoved_; } 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 (cacheRemoved_ != 0L) { output.writeInt64(1, cacheRemoved_); } if (storageRemoved_ != 0L) { output.writeInt64(2, storageRemoved_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (cacheRemoved_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(1, cacheRemoved_); } if (storageRemoved_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(2, storageRemoved_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof ai.blip.deckard.RemoveResponse)) { return super.equals(obj); } ai.blip.deckard.RemoveResponse other = (ai.blip.deckard.RemoveResponse) obj; if (getCacheRemoved() != other.getCacheRemoved()) return false; if (getStorageRemoved() != other.getStorageRemoved()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + CACHEREMOVED_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getCacheRemoved()); hash = (37 * hash) + STORAGEREMOVED_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getStorageRemoved()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static ai.blip.deckard.RemoveResponse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.RemoveResponse parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.RemoveResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.RemoveResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.RemoveResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ai.blip.deckard.RemoveResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static ai.blip.deckard.RemoveResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.RemoveResponse 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 ai.blip.deckard.RemoveResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ai.blip.deckard.RemoveResponse 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 ai.blip.deckard.RemoveResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ai.blip.deckard.RemoveResponse 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(ai.blip.deckard.RemoveResponse 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 blipai.deckard.RemoveResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:blipai.deckard.RemoveResponse) ai.blip.deckard.RemoveResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_RemoveResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_RemoveResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( ai.blip.deckard.RemoveResponse.class, ai.blip.deckard.RemoveResponse.Builder.class); } // Construct using ai.blip.deckard.RemoveResponse.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; cacheRemoved_ = 0L; storageRemoved_ = 0L; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ai.blip.deckard.DeckardService.internal_static_blipai_deckard_RemoveResponse_descriptor; } @java.lang.Override public ai.blip.deckard.RemoveResponse getDefaultInstanceForType() { return ai.blip.deckard.RemoveResponse.getDefaultInstance(); } @java.lang.Override public ai.blip.deckard.RemoveResponse build() { ai.blip.deckard.RemoveResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public ai.blip.deckard.RemoveResponse buildPartial() { ai.blip.deckard.RemoveResponse result = new ai.blip.deckard.RemoveResponse(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(ai.blip.deckard.RemoveResponse result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.cacheRemoved_ = cacheRemoved_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.storageRemoved_ = storageRemoved_; } } @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 ai.blip.deckard.RemoveResponse) { return mergeFrom((ai.blip.deckard.RemoveResponse)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ai.blip.deckard.RemoveResponse other) { if (other == ai.blip.deckard.RemoveResponse.getDefaultInstance()) return this; if (other.getCacheRemoved() != 0L) { setCacheRemoved(other.getCacheRemoved()); } if (other.getStorageRemoved() != 0L) { setStorageRemoved(other.getStorageRemoved()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { cacheRemoved_ = input.readInt64(); bitField0_ |= 0x00000001; break; } // case 8 case 16: { storageRemoved_ = input.readInt64(); bitField0_ |= 0x00000002; break; } // case 16 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private long cacheRemoved_ ; /** * <code>int64 cacheRemoved = 1;</code> * @return The cacheRemoved. */ @java.lang.Override public long getCacheRemoved() { return cacheRemoved_; } /** * <code>int64 cacheRemoved = 1;</code> * @param value The cacheRemoved to set. * @return This builder for chaining. */ public Builder setCacheRemoved(long value) { cacheRemoved_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * <code>int64 cacheRemoved = 1;</code> * @return This builder for chaining. */ public Builder clearCacheRemoved() { bitField0_ = (bitField0_ & ~0x00000001); cacheRemoved_ = 0L; onChanged(); return this; } private long storageRemoved_ ; /** * <code>int64 storageRemoved = 2;</code> * @return The storageRemoved. */ @java.lang.Override public long getStorageRemoved() { return storageRemoved_; } /** * <code>int64 storageRemoved = 2;</code> * @param value The storageRemoved to set. * @return This builder for chaining. */ public Builder setStorageRemoved(long value) { storageRemoved_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * <code>int64 storageRemoved = 2;</code> * @return This builder for chaining. */ public Builder clearStorageRemoved() { bitField0_ = (bitField0_ & ~0x00000002); storageRemoved_ = 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:blipai.deckard.RemoveResponse) } // @@protoc_insertion_point(class_scope:blipai.deckard.RemoveResponse) private static final ai.blip.deckard.RemoveResponse DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ai.blip.deckard.RemoveResponse(); } public static ai.blip.deckard.RemoveResponse getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser<RemoveResponse> PARSER = new com.google.protobuf.AbstractParser<RemoveResponse>() { @java.lang.Override public RemoveResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser<RemoveResponse> parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser<RemoveResponse> getParserForType() { return PARSER; } @java.lang.Override public ai.blip.deckard.RemoveResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }
0
java-sources/ai/blip/deckard/0.0.43/ai/blip
java-sources/ai/blip/deckard/0.0.43/ai/blip/deckard/RemoveResponseOrBuilder.java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: proto/deckard_service.proto // Protobuf Java Version: 3.25.3 package ai.blip.deckard; public interface RemoveResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:blipai.deckard.RemoveResponse) com.google.protobuf.MessageOrBuilder { /** * <code>int64 cacheRemoved = 1;</code> * @return The cacheRemoved. */ long getCacheRemoved(); /** * <code>int64 storageRemoved = 2;</code> * @return The storageRemoved. */ long getStorageRemoved(); }
0
java-sources/ai/bongotech/bongobt/1.0.3/ai/bongotech
java-sources/ai/bongotech/bongobt/1.0.3/ai/bongotech/bt/BongoBT.java
package ai.bongotech.bt; import android.annotation.SuppressLint; import android.app.Activity; import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothManager; import android.bluetooth.BluetoothSocket; import android.content.BroadcastReceiver; import android.content.Context; import android.content.ContextWrapper; import android.content.Intent; import android.content.IntentFilter; import android.os.Handler; import android.os.Looper; import android.util.Log; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.HashMap; import java.util.Set; import java.util.UUID; public class BongoBT { // Jubayer Hossain @www.bongotech.ai public static final int REQ_ENABLE_BT = 9922; private static final String TAG = "BongoBT"; private final Context appContext; private Context myContext; private ArrayList<HashMap<String, String>> searchArrayList = new ArrayList<>(); BluetoothAdapter bluetoothAdapter; private BtDiscoveryListener discoveryListener; private final Handler main = new Handler(Looper.getMainLooper()); public BongoBT(Context context) { this.appContext = context; this.myContext = context; } private BluetoothDevice connectedDevice; public BluetoothDevice getConnectedDevice() { return connectedDevice; } private void setConnectedDevice(BluetoothDevice connectedDevice) { this.connectedDevice = connectedDevice; } public interface BtDiscoveryListener { void onStarted(); void onDeviceAdded(String name, String mac); void onFinished(ArrayList<HashMap<String, String>> arrayList); void onError(String errorReason); } @SuppressLint("MissingPermission") public void searchDevices(BtDiscoveryListener dl) { searchArrayList = new ArrayList<>(); setDiscoveryListener(dl); setSearchArrayList(searchArrayList); stopDiscovery(); MyBtPermissions.ensureScanAndConnect(appContext, new MyBtPermissions.Callback() { @Override public void onGranted() { BluetoothManager bm = (BluetoothManager) appContext.getSystemService(Context.BLUETOOTH_SERVICE); bluetoothAdapter = (bm != null) ? bm.getAdapter() : BluetoothAdapter.getDefaultAdapter(); if (bluetoothAdapter == null) { logw("Bluetooth Not Supported"); dl.onError("Bluetooth Not Supported"); return; } if (!bluetoothAdapter.isEnabled()) { //launchEnableDialogIfPossible(); dl.onError("Bluetooth is OFF. Please turn on BT."); requestEnableAndWait(new BtEnableResult() { @Override public void onResult(boolean enabled) { if (enabled) finalDiscovery(dl); } }); return; } // Finally Going to discover finalDiscovery(dl); } @Override public void onDenied(boolean neverAskAgain) { logw("Permissions denied by user"); dl.onError("Permissions denied by you."); } }); } public interface BtEnableResult { void onResult(boolean enabled); } @SuppressLint("MissingPermission") public void requestEnableAndWait(BtEnableResult cb) { // Start enable intent Intent intent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); appContext.startActivity(intent); // Register temp receiver to wait for state change BroadcastReceiver tempReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { if (BluetoothAdapter.ACTION_STATE_CHANGED.equals(intent.getAction())) { int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.ERROR); if (state == BluetoothAdapter.STATE_ON || state == BluetoothAdapter.STATE_OFF) { appContext.unregisterReceiver(this); cb.onResult(state == BluetoothAdapter.STATE_ON); } } } }; IntentFilter filter = new IntentFilter(BluetoothAdapter.ACTION_STATE_CHANGED); appContext.registerReceiver(tempReceiver, filter); } /** Try ACTION_REQUEST_ENABLE from Activity; otherwise NEW_TASK fallback (no result). */ @SuppressLint("MissingPermission") private void launchEnableDialogIfPossible() { Intent intent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE); Activity activity = findActivity(appContext); if (activity != null) { activity.startActivityForResult(intent, REQ_ENABLE_BT); logd("Requested BT enable via startActivityForResult()"); } else { intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); appContext.startActivity(intent); logw("Started enable intent without Activity; result won't be delivered."); } } @SuppressLint("MissingPermission") private void finalDiscovery(BtDiscoveryListener dl){ logd("Bluetooth ready → onStarted()"); dl.onStarted(); Set<BluetoothDevice> pairedDevices = bluetoothAdapter.getBondedDevices(); if (pairedDevices.size() > 0) { for (BluetoothDevice device : pairedDevices) { String deviceName = device.getName(); String deviceHardwareAddress = device.getAddress(); // MAC address if (device != null && deviceHardwareAddress!=null) { if (!isDeviceListed(deviceHardwareAddress)) { HashMap<String, String> hashMap = new HashMap<>(); hashMap.put("type", "Paired"); hashMap.put("name", deviceName); hashMap.put("mac", "" + deviceHardwareAddress); searchArrayList.add(hashMap); logd("Paired Found: " + deviceName + " [" + deviceHardwareAddress + "]"); dl.onDeviceAdded(deviceName != null ? deviceName : "Unknown", deviceHardwareAddress); } } } //End of For loop } IntentFilter filter = new IntentFilter(BluetoothDevice.ACTION_FOUND); filter.addAction(BluetoothAdapter.ACTION_DISCOVERY_FINISHED); appContext.registerReceiver(broadcastReceiver, filter); if (bluetoothAdapter!=null) { bluetoothAdapter.cancelDiscovery(); bluetoothAdapter.startDiscovery(); } } /** Extract Activity if the provided Context ultimately wraps one ~ Jubayer */ private static Activity findActivity(Context ctx) { while (ctx instanceof ContextWrapper) { if (ctx instanceof Activity) return (Activity) ctx; ctx = ((ContextWrapper) ctx).getBaseContext(); } return null; } private boolean isDeviceListed(String macAddress){ boolean isDeviceListed= false; if (searchArrayList!=null) { for (int i = 0; i < searchArrayList.size(); i++) { HashMap<String, String> myHashmap = searchArrayList.get(i); String deviceMac = ""+myHashmap.get("mac"); if (deviceMac.contains(macAddress)) { isDeviceListed = true; break; } } } return isDeviceListed; } //Juba -- > Custom BroadCastReceiver private void setDiscoveryListener(BtDiscoveryListener dl) { this.discoveryListener = dl; } private void setSearchArrayList(ArrayList<HashMap<String, String>> arrayList) { this.searchArrayList = arrayList; } @SuppressLint("MissingPermission") private BroadcastReceiver broadcastReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); if (BluetoothDevice.ACTION_FOUND.equals(action)) { BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE); if (device != null) { String deviceName = device.getName(); String deviceHardwareAddress = device.getAddress(); if (deviceHardwareAddress != null && !isDeviceListed(deviceHardwareAddress)) { HashMap<String, String> hashMap = new HashMap<>(); hashMap.put("type", "Found"); hashMap.put("name", deviceName != null ? deviceName : "Unknown"); hashMap.put("mac", deviceHardwareAddress); searchArrayList.add(hashMap); if (discoveryListener != null) { discoveryListener.onDeviceAdded(deviceName != null ? deviceName : "Unknown", deviceHardwareAddress); } else logd("discoveryListener is NULL"); logd("New Found: " + deviceName + " [" + deviceHardwareAddress + "]"); } } } else if (BluetoothAdapter.ACTION_DISCOVERY_FINISHED.equals(action)) { logd("Discovery finished"); stopDiscovery(); if (discoveryListener != null) { discoveryListener.onFinished(searchArrayList); } else logd("discoveryListener is NULL"); } } }; @SuppressLint("MissingPermission") private void stopDiscovery() { if (bluetoothAdapter != null && bluetoothAdapter.isDiscovering()) { bluetoothAdapter.cancelDiscovery(); } try { appContext.unregisterReceiver(broadcastReceiver); } catch (IllegalArgumentException e) { logw("Receiver already unregistered"); } } public void release(){ logw("BongoBT Library Released"); try { appContext.unregisterReceiver(broadcastReceiver); } catch (Exception ignore) {} disconnect(); cancelOngoingConnect(); } //Juba ------------------------------------------------------------- private android.bluetooth.BluetoothSocket currentSocket; private Thread connectThread; public interface BtConnectListener { void onConnected(); void onReceived(String message); void onError(String reason); } // juba --> Connection --> BongoBT @SuppressLint("MissingPermission") public void connectTo(String mac, BtConnectListener conL) { MyBtPermissions.ensureScanAndConnect(appContext, new MyBtPermissions.Callback() { @Override public void onGranted() { BluetoothManager bm = (BluetoothManager) appContext.getSystemService(Context.BLUETOOTH_SERVICE); bluetoothAdapter = (bm != null) ? bm.getAdapter() : BluetoothAdapter.getDefaultAdapter(); if (bluetoothAdapter == null) { logw("Bluetooth Not Supported"); conL.onError("Bluetooth Not Supported"); return; } if (!bluetoothAdapter.isEnabled()) { //launchEnableDialogIfPossible(); conL.onError("Bluetooth is OFF. Please turn on BT."); requestEnableAndWait(new BtEnableResult() { @Override public void onResult(boolean enabled) { if (enabled) finalBtConnection(mac, conL); } }); return; } // Finally Going to Connect finalBtConnection(mac, conL); } @Override public void onDenied(boolean neverAskAgain) { logw("Permissions denied"); conL.onError("Permissions denied! Please allow permission and continue"); } }); } private static final UUID DEFAULT_SPP_UUID = UUID.fromString("00001101-0000-1000-8000-00805F9B34FB"); private UUID sppUuid; // Setter public void setUuid(UUID uuid) { this.sppUuid = (uuid != null) ? uuid : DEFAULT_SPP_UUID; } // Getter public UUID getUuid() { return (sppUuid != null) ? sppUuid : DEFAULT_SPP_UUID; } @SuppressLint("MissingPermission") private void finalBtConnection(String mac, BtConnectListener cb){ if (mac == null || mac.length() < 11) { main.post(() -> { if (cb != null) cb.onError("Invalid MAC address"); }); return; } BluetoothManager bm = (BluetoothManager) appContext.getSystemService(Context.BLUETOOTH_SERVICE); bluetoothAdapter = (bm != null) ? bm.getAdapter() : BluetoothAdapter.getDefaultAdapter(); if (bluetoothAdapter == null) { main.post(() -> { if (cb != null) cb.onError("Bluetooth not supported"); }); return; } if (!bluetoothAdapter.isEnabled()) { main.post(() -> { if (cb != null) cb.onError("Bluetooth is disabled"); launchEnableDialogIfPossible(); }); return; } try { if (bluetoothAdapter.isDiscovering()) bluetoothAdapter.cancelDiscovery(); } catch (Exception ignore) {} final BluetoothDevice device; try { device = bluetoothAdapter.getRemoteDevice(mac); } catch (IllegalArgumentException e) { main.post(() -> { if (cb != null) cb.onError("Invalid MAC format"); }); return; } // If LE-only, bail to GATT int t = device.getType(); if (t == BluetoothDevice.DEVICE_TYPE_LE || t == BluetoothDevice.DEVICE_TYPE_UNKNOWN) { main.post(() -> { if (cb != null) cb.onError("Target seems BLE-only (use GATT)"); }); return; } //final java.util.UUID SPP_UUID = java.util.UUID.fromString("00001101-0000-1000-8000-00805F9B34FB"); if (sppUuid==null) sppUuid = DEFAULT_SPP_UUID; cancelOngoingConnect(); disconnect(); // ensure previous socket is dead refreshUuids(device); // refresh SDP a bit sleep(120); // tiny backoff connectThread = new Thread(() -> { BluetoothSocket socket = null; boolean bonded = (device.getBondState() == BluetoothDevice.BOND_BONDED); try { // PATH A: already bonded → prefer SECURE first ~ Juba if (bonded) { try { socket = device.createRfcommSocketToServiceRecord(sppUuid); socket.connect(); } catch (Exception eSecureFirst) { safeClose(socket); socket = null; // Fallback insecure then secure again! try { socket = device.createInsecureRfcommSocketToServiceRecord(sppUuid); socket.connect(); } catch (Exception eInsec) { safeClose(socket); socket = null; // Reflection channel- 001 --juba try { socket = (BluetoothSocket) device.getClass() .getMethod("createRfcommSocket", int.class) .invoke(device, 1); socket.connect(); } catch (Exception eRef) { safeClose(socket); socket = null; main.post(() -> { if (cb != null) cb.onError("Connection failed (bonded path)"); }); loge("Connect fail(bonded) " + mac, eRef); return; } } } } else { // PATH B: not bonded → try INSECURE to pop pairing ~ Juba try { socket = device.createInsecureRfcommSocketToServiceRecord(sppUuid); socket.connect(); } catch (Exception eInsecFirst) { safeClose(socket); socket = null; } // Ensure bonding complete (handles that “popup appears then vanishes” race) if (!ensureBonded(device, 10000)) { main.post(() -> { if (cb != null) cb.onError("Pairing required but not completed!"); }); return; } // After bond, prefer SECURE sleep(150); try { socket = device.createRfcommSocketToServiceRecord(sppUuid); socket.connect(); } catch (Exception eSecure) { safeClose(socket); socket = null; // Final fallback: reflection // try { socket = (BluetoothSocket) device.getClass() .getMethod("createRfcommSocket", int.class) .invoke(device, 1); socket.connect(); } catch (Exception eRef) { safeClose(socket); socket = null; main.post(() -> { if (cb != null) cb.onError("Connection failed after pairing"); }); loge("Connect Failed (after pair) " + mac, eRef); return; } } } synchronized (this) { currentSocket = socket; } BluetoothSocket finalSocket1 = socket; main.post(() -> { if (cb != null) cb.onConnected(); }); logd("✅ Connected: " + device.getName() + " [" + device.getAddress() + "]"); setConnectedDevice(device); // Receive Command BluetoothSocket finalSocket = socket; new Thread(() -> { try { InputStream is = finalSocket.getInputStream(); byte[] buf = new byte[1024]; int len; while (!Thread.currentThread().isInterrupted() && finalSocket.isConnected() && (len = is.read(buf)) != -1) { if (len > 0) { String received = new String(buf, 0, len, StandardCharsets.UTF_8); if (!received.isEmpty()) { main.post(() -> { if (cb != null) cb.onReceived(received); }); } } } } catch (IOException e) { Log.e(TAG, "Read loop ended", e); } }).start(); } finally { synchronized (this) { connectThread = null; } } }); connectThread.start(); } private static void safeClose(BluetoothSocket s) { if (s != null) try { s.close(); } catch (Exception ignore) {} } private static void sleep(long ms) { try { Thread.sleep(ms); } catch (InterruptedException ignored) {} } @SuppressLint("MissingPermission") private boolean ensureBonded(BluetoothDevice device, long timeoutMs) { int st = device.getBondState(); if (st == BluetoothDevice.BOND_BONDED) return true; // Trigger pairing if needed if (st == BluetoothDevice.BOND_NONE) { try { device.createBond(); } catch (Throwable ignored) {} } long deadline = System.currentTimeMillis() + timeoutMs; int last = -1; while (System.currentTimeMillis() < deadline) { int s = device.getBondState(); if (s != last) { Log.d(TAG, "Bond state: " + s); last = s; } if (s == BluetoothDevice.BOND_BONDED) return true; if (s == BluetoothDevice.BOND_NONE) break; // user canceled / failed sleep(150); } return device.getBondState() == BluetoothDevice.BOND_BONDED; } /** Rare cases need a re-pair ~Juba */ private boolean removeBond(BluetoothDevice device) { try { return (boolean) device.getClass().getMethod("removeBond").invoke(device); } catch (Exception e) { return false; } } /** Refresh UUIDs via SDP (async). We just give it a small wait window ~Jubayer */ @SuppressLint("MissingPermission") private void refreshUuids(BluetoothDevice device) { try { device.fetchUuidsWithSdp(); } catch (Exception ignored) {} sleep(400); } private void cancelOngoingConnect() { Thread t; synchronized (this) { t = connectThread; } if (t != null && t.isAlive()) { try { t.interrupt(); } catch (Exception ignore) {} } } public void disconnect() { cancelOngoingConnect(); android.bluetooth.BluetoothSocket s; synchronized (this) { s = currentSocket; currentSocket = null; } if (s != null) { try { s.close(); } catch (Exception ignore) {} logd("Bluetooth socket closed."); } } public boolean sendCommand(String cmd) { BluetoothSocket s; synchronized (this) { s = currentSocket; } if (s == null) { logw("No active connection"); return false; } try { OutputStream os = s.getOutputStream(); os.write(cmd.getBytes(StandardCharsets.UTF_8)); os.flush(); return true; } catch (IOException e) { loge("Message Sending Failed", e); return false; } } private boolean DEBUG = false; public void enableLog(boolean enabled) { DEBUG = enabled; } private void logd(String msg) { if (DEBUG) Log.d(TAG, msg); } private void logw(String msg) { if (DEBUG) Log.w(TAG, msg); } private void loge(String msg, Throwable t) { if (DEBUG) { if (t != null) { Log.e(TAG, msg, t); } else { Log.e(TAG, msg); } } } //---------------------------- }
0
java-sources/ai/bongotech/bongobt/1.0.3/ai/bongotech
java-sources/ai/bongotech/bongobt/1.0.3/ai/bongotech/bt/BtPermissionConfig.java
package ai.bongotech.bt; import android.Manifest; import android.os.Build; final class BtPermissionConfig { // Jubayer Hossain @www.bongotech.ai private BtPermissionConfig() {} static String[] scanAndConnect() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { return new String[]{ Manifest.permission.BLUETOOTH_SCAN, Manifest.permission.BLUETOOTH_CONNECT }; } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { return new String[]{ Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION }; } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { return new String[]{ Manifest.permission.ACCESS_COARSE_LOCATION }; } else { return new String[0]; } } }
0
java-sources/ai/bongotech/bongobt/1.0.3/ai/bongotech
java-sources/ai/bongotech/bongobt/1.0.3/ai/bongotech/bt/BtPermissions.java
package ai.bongotech.bt; import androidx.fragment.app.FragmentActivity; public final class BtPermissions { // Jubayer Hossain @www.bongotech.ai private BtPermissions() {} public interface Callback { void onGranted(); void onDenied(boolean neverAskAgain); } public static void ensureScanAndConnect(FragmentActivity activity, Callback cb) { String[] perms = BtPermissionConfig.scanAndConnect(); PermissionHostFragment.of(activity).request( activity, perms.length == 0 ? "No permission required" : "Allow Bluetooth Permission", perms.length == 0 ? "Your device does not require runtime permissions for this feature." : "This app uses Bluetooth only to discover and connect nearby devices. No data is stored or shared.", perms, new PermissionHostFragment.Callback() { @Override public void onGranted() { cb.onGranted(); } @Override public void onDenied(boolean naa) { cb.onDenied(naa); } } ); } }
0
java-sources/ai/bongotech/bongobt/1.0.3/ai/bongotech
java-sources/ai/bongotech/bongobt/1.0.3/ai/bongotech/bt/CallbackRegistry.java
package ai.bongotech.bt; import java.util.Map; import java.util.UUID; import java.util.concurrent.ConcurrentHashMap; final class CallbackRegistry { // Jubayer Hossain @www.bongotech.ai interface Callback { void onGranted(); void onDenied(boolean neverAskAgain); } private static final Map<String, Callback> MAP = new ConcurrentHashMap<>(); static String put(Callback cb) { String id = UUID.randomUUID().toString(); MAP.put(id, cb); return id; } static void consume(String id, boolean granted, boolean naa) { Callback cb = MAP.remove(id); if (cb == null) return; if (granted) cb.onGranted(); else cb.onDenied(naa); } }
0
java-sources/ai/bongotech/bongobt/1.0.3/ai/bongotech
java-sources/ai/bongotech/bongobt/1.0.3/ai/bongotech/bt/MyBtPermissions.java
package ai.bongotech.bt; import android.content.Context; import android.content.Intent; import androidx.fragment.app.FragmentActivity; public final class MyBtPermissions { // Jubayer Hossain @www.bongotech.ai public interface Callback { void onGranted(); void onDenied(boolean neverAskAgain); } private MyBtPermissions() {} public static void ensureScanAndConnect(Context ctx, Callback cb) { String[] perms = BtPermissionConfig.scanAndConnect(); if (perms.length == 0) { cb.onGranted(); return; } if (ctx instanceof FragmentActivity) { FragmentActivity fa = (FragmentActivity) ctx; PermissionHostFragment.of(fa).request( fa, "Allow Bluetooth Permission", "This feature discovers and connects to nearby Bluetooth devices. No data is stored or shared.", perms, new PermissionHostFragment.Callback() { @Override public void onGranted() { cb.onGranted(); } @Override public void onDenied(boolean naa) { cb.onDenied(naa); } } ); } else { // Fallback: launch bridge activity String id = CallbackRegistry.put(new CallbackRegistry.Callback() { @Override public void onGranted() { cb.onGranted(); } @Override public void onDenied(boolean naa) { cb.onDenied(naa); } }); Intent i = new Intent(ctx, PermissionBridgeActivity.class); i.putExtra(PermissionBridgeActivity.EXTRA_ID, id); i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); ctx.startActivity(i); } } }
0
java-sources/ai/bongotech/bongobt/1.0.3/ai/bongotech
java-sources/ai/bongotech/bongobt/1.0.3/ai/bongotech/bt/PermissionBridgeActivity.java
package ai.bongotech.bt; import android.app.Activity; import android.content.Intent; import android.content.pm.PackageManager; import android.os.Bundle; import androidx.annotation.Nullable; import androidx.core.app.ActivityCompat; public final class PermissionBridgeActivity extends Activity { // Jubayer Hossain @www.bongotech.ai static final String EXTRA_ID = "req_id"; @Override protected void onCreate(@Nullable Bundle s) { super.onCreate(s); String id = getIntent().getStringExtra(EXTRA_ID); String[] perms = BtPermissionConfig.scanAndConnect(); // Already granted? boolean all = true; for (String p : perms) all &= checkSelfPermission(p)==PackageManager.PERMISSION_GRANTED; if (all) { CallbackRegistry.consume(id, true, false); finish(); return; } ActivityCompat.requestPermissions(this, perms, 42); } @Override public void onRequestPermissionsResult(int code, String[] perms, int[] res) { super.onRequestPermissionsResult(code, perms, res); if (code != 42) { finish(); return; } boolean all = true, naa = false; for (int i = 0; i < perms.length; i++) { boolean g = (i < res.length) && (res[i] == PackageManager.PERMISSION_GRANTED); all &= g; if (!g && !ActivityCompat.shouldShowRequestPermissionRationale(this, perms[i])) naa = true; } String id = getIntent().getStringExtra(EXTRA_ID); CallbackRegistry.consume(id, all, naa); finish(); } }
0
java-sources/ai/bongotech/bongobt/1.0.3/ai/bongotech
java-sources/ai/bongotech/bongobt/1.0.3/ai/bongotech/bt/PermissionHostFragment.java
package ai.bongotech.bt; import android.app.Activity; import android.app.AlertDialog; import android.content.pm.PackageManager; import android.os.Bundle; import androidx.activity.result.ActivityResultLauncher; import androidx.activity.result.contract.ActivityResultContracts; import androidx.annotation.Nullable; import androidx.fragment.app.*; import java.util.Map; public final class PermissionHostFragment extends Fragment { // Jubayer Hossain @www.bongotech.ai interface Callback { void onGranted(); void onDenied(boolean neverAskAgain); } private static final String TAG = "BtPermHost"; private ActivityResultLauncher<String[]> launcher; private Callback pending; public static PermissionHostFragment of(FragmentActivity act) { FragmentManager fm = act.getSupportFragmentManager(); Fragment f = fm.findFragmentByTag(TAG); if (f instanceof PermissionHostFragment) return (PermissionHostFragment) f; PermissionHostFragment h = new PermissionHostFragment(); fm.beginTransaction().add(h, TAG).commitNow(); return h; } @Override public void onCreate(@Nullable Bundle s) { super.onCreate(s); setRetainInstance(true); launcher = registerForActivityResult(new ActivityResultContracts.RequestMultiplePermissions(), (Map<String, Boolean> res) -> { if (pending == null) return; boolean all = !res.containsValue(Boolean.FALSE); boolean naa = false; Activity a = getActivity(); if (!all && a != null) { for (String p : res.keySet()) { if (Boolean.FALSE.equals(res.get(p)) && !shouldShowRequestPermissionRationale(p)) { naa = true; break; } } } Callback cb = pending; pending = null; if (all) cb.onGranted(); else cb.onDenied(naa); }); } void request(FragmentActivity act, String title, String msg, String[] perms, Callback cb) { // already granted? boolean granted = true; for (String p : perms) granted &= act.checkSelfPermission(p)==PackageManager.PERMISSION_GRANTED; if (granted) { cb.onGranted(); return; } boolean rationale = false; for (String p : perms) if (shouldShowRequestPermissionRationale(p)) { rationale = true; break; } pending = cb; if (rationale) { new AlertDialog.Builder(act).setTitle(title).setMessage(msg) .setPositiveButton("Allow", (d,w) -> launcher.launch(perms)) .setNegativeButton("Cancel", (d,w) -> { Callback c=pending; pending=null; if(c!=null)c.onDenied(false); }) .show(); } else { launcher.launch(perms); } } }
0
java-sources/ai/bridgee/bridgee-android-sdk/1.0.2/ai/bridgee/android
java-sources/ai/bridgee/bridgee-android-sdk/1.0.2/ai/bridgee/android/sdk/AnalyticsProvider.java
package ai.bridgee.android.sdk; import android.os.Bundle; /** * This interface is used to provide a contract for the analytics provider. * The client of the SDK must provide an implementation of this interface * to allow the logging of events. For example, if you are using Firebase Analytics, * you can provide an implementation of this interface that will log events to Firebase Analytics. */ public interface AnalyticsProvider { /** * Logs an event. * * @param name The name of the event to be logged. * @param params A Bundle containing the parameters of the event. */ void logEvent(String name, Bundle params); }
0
java-sources/ai/bridgee/bridgee-android-sdk/1.0.2/ai/bridgee/android
java-sources/ai/bridgee/bridgee-android-sdk/1.0.2/ai/bridgee/android/sdk/BridgeeSDK.java
package ai.bridgee.android.sdk; import android.content.Context; import android.os.Bundle; import android.util.Log; import ai.bridgee.android.sdk.internal.api.MatchApiClient; import ai.bridgee.android.sdk.internal.api.InstallRefererResolver; import ai.bridgee.android.sdk.internal.model.MatchRequest; import ai.bridgee.android.sdk.internal.model.MatchResponse; import ai.bridgee.android.sdk.internal.util.TenantTokenEncoder; import org.json.JSONException; import org.json.JSONObject; /** * BridgeeSDK is a SDK that publish events into an given analytics provider (e.g. Firebase Analytics). * The main purpose is to inject UTM atribution parameters into the events, according to a proprietary * match logic thats searchs in our captured data the best atribution event given the search parameters * you provided. Wich more search parameters you provide, more accurate the match will be. */ public class BridgeeSDK { private static final String TAG = "BRIDGEE-SDK"; private final AnalyticsProvider analyticsProvider; private final MatchApiClient matchApiClient; private final Context context; private final InstallRefererResolver instalRefererResolver; private Boolean dryRun = true; private static BridgeeSDK instance; /****** PUBLIC METHODS *******/ /** * This is the constructor of BridgeeSDK. We recommend to use this as a singleton pattern. * * @param context The application context. * @param provider The analytics provider implementation provided by the client. * @param tenantId The tenant ID for authentication. * @param tenantKey The tenant key for authentication. * @param dryRun Boolean to enable dry run mode. */ public static synchronized BridgeeSDK getInstance(Context context, AnalyticsProvider provider, String tenantId, String tenantKey, Boolean dryRun) { if (instance == null) { instance = new BridgeeSDK(context, provider, tenantId, tenantKey, dryRun); } return instance; } /** * This method will log an event into your analytics provider, but before that it will try to match * the given parameters with Bridgee-API. We want to inject in this event the UTM attribution parameters. * @param eventName The name of the event to be logged. * @param matchParams Additional parameters to be matched - wich more parameters you provide, more accurate the match will be. */ public void logEvent(String eventName, Bundle eventParams, MatchBundle matchBundle) { try { if (eventName == null || eventName.trim().isEmpty()) { Log.w(TAG, "Event name cannot be null or empty"); return; } resolveBfpid(matchBundle); match(matchBundle.toBundle(), new MatchCallback<MatchResponse>() { @Override public void onSuccess(MatchResponse response) { Log.d(TAG, "Dry run: " + eventName + " >> " + response.toBundle()); if (!dryRun) { eventParams.putAll(response.toBundle()); analyticsProvider.logEvent(eventName, eventParams); } } @Override public void onError(String error) { // we garantee that if something goes wrong, we will not throw // an exception and eventually break the app experience Log.e(TAG, "error to log event: " + error); } }); } catch (Exception e) { // we garantee that if something goes wrong, we will not throw // an exception and eventually break the app experience Log.e(TAG, "error to log event: " + e.getMessage(), e); } } /****** PRIVATE METHODS *******/ private void resolveBfpid(MatchBundle matchBundle) { instalRefererResolver.resolveBfpid(new InstallRefererResolver.BfpidCallback() { @Override public void onBfpidResolved(String bfpid) { if (bfpid != null && !bfpid.trim().isEmpty()) { matchBundle.withCustomParam("bfpid", bfpid); Log.d(TAG, "bfpid resolved and added to match bundle: " + bfpid); } else { Log.d(TAG, "No bfpid found in install referrer"); } } }); } private BridgeeSDK(Context context, AnalyticsProvider provider, String tenantId, String tenantKey, Boolean dryRun) { if (context == null) { throw new IllegalArgumentException("Context cannot be null"); } if (provider == null) { throw new IllegalArgumentException("AnalyticsProvider cannot be null"); } if (tenantId == null || tenantId.trim().isEmpty()) { throw new IllegalArgumentException("Tenant ID cannot be null or empty"); } if (tenantKey == null || tenantKey.trim().isEmpty()) { throw new IllegalArgumentException("Tenant key cannot be null or empty"); } this.context = context.getApplicationContext(); this.analyticsProvider = provider; this.matchApiClient = MatchApiClient.getInstance(this.context, tenantId, tenantKey); this.instalRefererResolver = new InstallRefererResolver(this.context); this.dryRun = dryRun; } private <T extends MatchResponse> void match(Bundle searchBundle, final MatchCallback<T> callback) { if (searchBundle == null) { throw new IllegalArgumentException("SearchParams cannot be null"); } if (callback == null) { throw new IllegalArgumentException("MatchCallback cannot be null"); } MatchApiClient.MatchCallback<JSONObject> apiCallback = new MatchApiClient.MatchCallback<JSONObject>() { @Override public void onSuccess(JSONObject response) { try { MatchResponse matchResponse = new MatchResponse( response.optString("utm_source", response.getString("utm_source")), response.optString("utm_medium", response.getString("utm_medium")), response.optString("utm_campaign", response.getString("utm_campaign")) ); callback.onSuccess((T) matchResponse); } catch (Exception e) { Log.e(TAG, "Error processing response: " + e.getMessage(), e); callback.onError("Error processing response from server"); } } @Override public void onError(String error) { Log.e(TAG, "Error in API call: " + error); callback.onError(error); } }; matchApiClient.match(searchBundle, apiCallback); } public interface MatchCallback<T extends MatchResponse> { void onSuccess(T response); void onError(String error); } }
0
java-sources/ai/bridgee/bridgee-android-sdk/1.0.2/ai/bridgee/android
java-sources/ai/bridgee/bridgee-android-sdk/1.0.2/ai/bridgee/android/sdk/MatchBundle.java
package ai.bridgee.android.sdk; import android.os.Bundle; /** * This class is used to build a bundle of parameters to be matched with Bridgee-API. * It is a helper class to build a bundle of parameters to be matched with Bridgee-API. * Wich more parameters you provide, more accurate the match will be. */ public class MatchBundle { private Bundle params; public MatchBundle() { params = new Bundle(); } public MatchBundle withCustomParam(String key, String value) { params.putString(key, value); return this; } public MatchBundle withEmail(String email) { params.putString("email", email); return this; } public MatchBundle withPhone(String phone) { params.putString("phone", phone); return this; } public MatchBundle withName(String name) { params.putString("name", name); return this; } public MatchBundle withGclid(String gclid) { params.putString("gclid", gclid); return this; } public Bundle toBundle() { return params; } }
0
java-sources/ai/bridgee/bridgee-android-sdk/1.0.2/ai/bridgee/android/sdk/internal
java-sources/ai/bridgee/bridgee-android-sdk/1.0.2/ai/bridgee/android/sdk/internal/api/InstallRefererResolver.java
package ai.bridgee.android.sdk.internal.api; import android.content.Context; import android.net.Uri; import android.os.RemoteException; import android.util.Log; import com.android.installreferrer.api.InstallReferrerClient; import com.android.installreferrer.api.InstallReferrerStateListener; import com.android.installreferrer.api.ReferrerDetails; /** * Resolver for extracting bfpid from Google Play Install Referrer API */ public class InstallRefererResolver { private static final String TAG = "InstallRefererResolver"; private static final String BFPID_PARAM = "bfpid"; private final Context context; private InstallReferrerClient referrerClient; public InstallRefererResolver(Context context) { this.context = context.getApplicationContext(); } /** * Resolves the bfpid parameter from the install referrer URL * @param callback Callback to receive the bfpid value or null if not found */ public void resolveBfpid(BfpidCallback callback) { if (referrerClient != null) { referrerClient.endConnection(); } referrerClient = InstallReferrerClient.newBuilder(context).build(); referrerClient.startConnection(new InstallReferrerStateListener() { @Override public void onInstallReferrerSetupFinished(int responseCode) { switch (responseCode) { case InstallReferrerClient.InstallReferrerResponse.OK: try { ReferrerDetails response = referrerClient.getInstallReferrer(); String referrerUrl = response.getInstallReferrer(); String bfpid = extractBfpidFromUrl(referrerUrl); callback.onBfpidResolved(bfpid); } catch (RemoteException e) { Log.e(TAG, "RemoteException getting install referrer", e); callback.onBfpidResolved(null); } finally { referrerClient.endConnection(); } break; case InstallReferrerClient.InstallReferrerResponse.FEATURE_NOT_SUPPORTED: Log.w(TAG, "Install Referrer API not supported"); callback.onBfpidResolved(null); break; case InstallReferrerClient.InstallReferrerResponse.SERVICE_UNAVAILABLE: Log.w(TAG, "Install Referrer service unavailable"); callback.onBfpidResolved(null); break; default: Log.w(TAG, "Install Referrer setup failed with code: " + responseCode); callback.onBfpidResolved(null); break; } } @Override public void onInstallReferrerServiceDisconnected() { Log.d(TAG, "Install Referrer service disconnected"); callback.onBfpidResolved(null); } }); } /** * Extracts bfpid parameter from the referrer URL * @param referrerUrl The install referrer URL * @return The bfpid value or null if not found */ private String extractBfpidFromUrl(String referrerUrl) { if (referrerUrl == null || referrerUrl.trim().isEmpty()) { Log.d(TAG, "Referrer URL is null or empty"); return null; } try { Uri uri = Uri.parse(referrerUrl); String bfpid = uri.getQueryParameter(BFPID_PARAM); if (bfpid != null && !bfpid.trim().isEmpty()) { Log.d(TAG, "Found bfpid: " + bfpid); return bfpid; } else { Log.d(TAG, "bfpid parameter not found in referrer URL: " + referrerUrl); return null; } } catch (Exception e) { Log.e(TAG, "Error parsing referrer URL: " + referrerUrl, e); return null; } } /** * Callback interface for bfpid resolution */ public interface BfpidCallback { void onBfpidResolved(String bfpid); } }
0
java-sources/ai/bridgee/bridgee-android-sdk/1.0.2/ai/bridgee/android/sdk/internal
java-sources/ai/bridgee/bridgee-android-sdk/1.0.2/ai/bridgee/android/sdk/internal/api/MatchApiClient.java
package ai.bridgee.android.sdk.internal.api; import android.content.Context; import android.net.ConnectivityManager; import android.net.NetworkCapabilities; import android.net.NetworkInfo; import android.os.Build; import android.os.Handler; import android.os.Looper; import android.util.Log; import ai.bridgee.android.sdk.internal.model.MatchRequest; import ai.bridgee.android.sdk.internal.util.TenantTokenEncoder; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import java.io.BufferedReader; import java.io.DataOutputStream; import java.io.IOException; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; import org.json.JSONObject; import org.json.JSONException; import java.nio.charset.StandardCharsets; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; public class MatchApiClient { private static final String TAG = "BridgeeSDK"; private static final String BASE_URL = "https://api.bridgee.ai/"; private static final String CONTENT_TYPE = "application/json; charset=utf-8"; private static final int CONNECTION_TIMEOUT_MS = 500; // 0.5 segundos private static final int READ_TIMEOUT_MS = 1500; // 1.5 segundos private static MatchApiClient instance; private final Gson gson; private final ExecutorService executorService; private final Handler mainHandler; private final Context context; private String tenantId; private String tenantKey; private void setTenantCredentials(String id, String key) { this.tenantId = id; this.tenantKey = key; } private MatchApiClient(Context context, String id, String key) { this.context = context.getApplicationContext(); this.gson = new GsonBuilder().create(); this.executorService = Executors.newSingleThreadExecutor(); this.mainHandler = new Handler(Looper.getMainLooper()); this.setTenantCredentials(id, key); } public static synchronized MatchApiClient getInstance(Context context, String id, String key) { if (instance == null) { instance = new MatchApiClient(context, id, key); } return instance; } private boolean isNetworkAvailable() { ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); if (connectivityManager == null) { return false; } if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { android.net.Network network = connectivityManager.getActiveNetwork(); if (network == null) return false; NetworkCapabilities capabilities = connectivityManager.getNetworkCapabilities(network); return capabilities != null && capabilities.hasCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET); } else { NetworkInfo activeNetwork = connectivityManager.getActiveNetworkInfo(); return activeNetwork != null && activeNetwork.isConnected(); } } public void match( android.os.Bundle bundle, final MatchCallback<JSONObject> callback ) { if (!isNetworkAvailable()) { notifyError(callback, "Sem conexão com a internet"); return; } executorService.execute(() -> { HttpURLConnection urlConnection = null; try { MatchRequest matchRequest = MatchRequest.fromBundle(bundle); String json = gson.toJson(matchRequest); URL url = new URL(BASE_URL + "match"); urlConnection = (HttpURLConnection) url.openConnection(); urlConnection.setRequestMethod("POST"); urlConnection.setRequestProperty("Content-Type", CONTENT_TYPE); urlConnection.setRequestProperty("Accept", "application/json"); urlConnection.setConnectTimeout(CONNECTION_TIMEOUT_MS); urlConnection.setReadTimeout(READ_TIMEOUT_MS); urlConnection.setDoOutput(true); if (tenantId != null && tenantKey != null) { try { String token = TenantTokenEncoder.encodeToken(tenantId, tenantKey); urlConnection.setRequestProperty("x-tenant-token", token); Log.d(TAG, "Added x-tenant header to request"); } catch (Exception e) { Log.e(TAG, "Failed to generate x-tenant token", e); } } try (DataOutputStream wr = new DataOutputStream(urlConnection.getOutputStream())) { byte[] input = json.getBytes(StandardCharsets.UTF_8); wr.write(input, 0, input.length); } int responseCode = urlConnection.getResponseCode(); StringBuilder response = new StringBuilder(); try (BufferedReader br = new BufferedReader( new InputStreamReader( (responseCode == HttpURLConnection.HTTP_OK) ? urlConnection.getInputStream() : urlConnection.getErrorStream(), StandardCharsets.UTF_8))) { String responseLine; while ((responseLine = br.readLine()) != null) { response.append(responseLine.trim()); } } if (responseCode == HttpURLConnection.HTTP_OK) { JSONObject jsonResponse = new JSONObject(response.toString()); notifySuccess(callback, jsonResponse); } else { String errorMsg = "Error from server: " + responseCode + " - " + response.toString(); notifyError(callback, errorMsg); } } catch (Exception e) { notifyError(callback, e.getMessage()); } finally { if (urlConnection != null) { urlConnection.disconnect(); } } }); } private void notifySuccess(MatchCallback<JSONObject> callback, JSONObject response) { if (callback != null) { mainHandler.post(() -> callback.onSuccess(response)); } } private void notifyError(MatchCallback<?> callback, String error) { if (callback != null) { mainHandler.post(() -> callback.onError(error)); } } public interface MatchCallback<T> { void onSuccess(T response); void onError(String error); } }
0
java-sources/ai/bridgee/bridgee-android-sdk/1.0.2/ai/bridgee/android/sdk/internal
java-sources/ai/bridgee/bridgee-android-sdk/1.0.2/ai/bridgee/android/sdk/internal/model/MatchRequest.java
package ai.bridgee.android.sdk.internal.model; import android.os.Bundle; import com.google.gson.annotations.SerializedName; import ai.bridgee.android.sdk.internal.model.MetadataItem; import java.util.ArrayList; import java.util.List; public class MatchRequest { @SerializedName("metadata") private List<MetadataItem> metadata; public MatchRequest(List<MetadataItem> metadata) { this.metadata = metadata != null ? metadata : new ArrayList<>(); } public List<MetadataItem> getMetadata() { return metadata; } public static MatchRequest fromBundle(Bundle bundle) { if (bundle == null) { return new MatchRequest(new ArrayList<>()); } List<MetadataItem> metadata = new ArrayList<>(); for (String key : bundle.keySet()) { Object value = bundle.get(key); if (value != null) { metadata.add(new MetadataItem(key, value.toString())); } } return new MatchRequest(metadata); } public void setMetadata(List<MetadataItem> metadata) { this.metadata = metadata != null ? metadata : new ArrayList<>(); } }
0
java-sources/ai/bridgee/bridgee-android-sdk/1.0.2/ai/bridgee/android/sdk/internal
java-sources/ai/bridgee/bridgee-android-sdk/1.0.2/ai/bridgee/android/sdk/internal/model/MatchResponse.java
package ai.bridgee.android.sdk.internal.model; import android.os.Bundle; public class MatchResponse { private final String utmSource; private final String utmMedium; private final String utmCampaign; public MatchResponse(String utmSource, String utmMedium, String utmCampaign) { this.utmSource = utmSource; this.utmMedium = utmMedium; this.utmCampaign = utmCampaign; } public String getUtmSource() { return utmSource; } public String getUtmMedium() { return utmMedium; } public String getUtmCampaign() { return utmCampaign; } public Bundle toBundle() { Bundle bundle = new Bundle(); if (utmSource != null) bundle.putString("utm_source", utmSource); if (utmMedium != null) bundle.putString("utm_medium", utmMedium); if (utmCampaign != null) bundle.putString("utm_campaign", utmCampaign); return bundle; } }
0
java-sources/ai/bridgee/bridgee-android-sdk/1.0.2/ai/bridgee/android/sdk/internal
java-sources/ai/bridgee/bridgee-android-sdk/1.0.2/ai/bridgee/android/sdk/internal/model/MetadataItem.java
package ai.bridgee.android.sdk.internal.model; import com.google.gson.annotations.SerializedName; public class MetadataItem { @SerializedName("key") private String key; @SerializedName("value") private String value; public MetadataItem(String key, String value) { this.key = key; this.value = value; } // Getters e Setters public String getKey() { return key; } public void setKey(String key) { this.key = key; } public String getValue() { return value; } public void setValue(String value) { this.value = value; } }
0
java-sources/ai/bridgee/bridgee-android-sdk/1.0.2/ai/bridgee/android/sdk/internal
java-sources/ai/bridgee/bridgee-android-sdk/1.0.2/ai/bridgee/android/sdk/internal/util/TenantTokenEncoder.java
package ai.bridgee.android.sdk.internal.util; import android.util.Base64; import java.nio.charset.StandardCharsets; public class TenantTokenEncoder { public static String encodeToken(String id, String key) { if (id == null || id.isEmpty() || key == null || key.isEmpty()) { throw new IllegalArgumentException("ID and key must not be null or empty"); } String combined = id + ";" + key; String base64 = Base64.encodeToString( combined.getBytes(StandardCharsets.UTF_8), Base64.NO_WRAP ); return base64; } }
0
java-sources/ai/buildin/buildin-api-client/1.0.4/org/openapitools
java-sources/ai/buildin/buildin-api-client/1.0.4/org/openapitools/client/ApiCallback.java
/* * Buildin API * Buildin Developer API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package org.openapitools.client; import java.io.IOException; import java.util.Map; import java.util.List; /** * Callback for asynchronous API call. * * @param <T> The return type */ public interface ApiCallback<T> { /** * This is called when the API call fails. * * @param e The exception causing the failure * @param statusCode Status code of the response if available, otherwise it would be 0 * @param responseHeaders Headers of the response if available, otherwise it would be null */ void onFailure(ApiException e, int statusCode, Map<String, List<String>> responseHeaders); /** * This is called when the API call succeeded. * * @param result The result deserialized from response * @param statusCode Status code of the response * @param responseHeaders Headers of the response */ void onSuccess(T result, int statusCode, Map<String, List<String>> responseHeaders); /** * This is called when the API upload processing. * * @param bytesWritten bytes Written * @param contentLength content length of request body * @param done write end */ void onUploadProgress(long bytesWritten, long contentLength, boolean done); /** * This is called when the API download processing. * * @param bytesRead bytes Read * @param contentLength content length of the response * @param done Read end */ void onDownloadProgress(long bytesRead, long contentLength, boolean done); }
0
java-sources/ai/buildin/buildin-api-client/1.0.4/org/openapitools
java-sources/ai/buildin/buildin-api-client/1.0.4/org/openapitools/client/ApiClient.java
/* * Buildin API * Buildin Developer API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package org.openapitools.client; import okhttp3.*; import okhttp3.internal.http.HttpMethod; import okhttp3.internal.tls.OkHostnameVerifier; import okhttp3.logging.HttpLoggingInterceptor; import okhttp3.logging.HttpLoggingInterceptor.Level; import okio.Buffer; import okio.BufferedSink; import okio.Okio; import javax.net.ssl.*; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.UnsupportedEncodingException; import java.lang.reflect.Type; import java.net.URI; import java.net.URLConnection; import java.net.URLEncoder; import java.nio.file.Files; import java.nio.file.Paths; import java.security.GeneralSecurityException; import java.security.KeyStore; import java.security.SecureRandom; import java.security.cert.Certificate; import java.security.cert.CertificateException; import java.security.cert.CertificateFactory; import java.security.cert.X509Certificate; import java.text.DateFormat; import java.time.LocalDate; import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; import java.util.*; import java.util.Map.Entry; import java.util.concurrent.TimeUnit; import java.util.function.Supplier; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.openapitools.client.auth.Authentication; import org.openapitools.client.auth.HttpBasicAuth; import org.openapitools.client.auth.HttpBearerAuth; import org.openapitools.client.auth.ApiKeyAuth; /** * <p>ApiClient class.</p> */ public class ApiClient { protected String basePath = "https://api.buildin.ai"; protected List<ServerConfiguration> servers = new ArrayList<ServerConfiguration>(Arrays.asList( new ServerConfiguration( "https://api.buildin.ai", "生产环境", new HashMap<String, ServerVariable>() ), new ServerConfiguration( "https://api.buildin.ai", "测试环境", new HashMap<String, ServerVariable>() ) )); protected Integer serverIndex = 0; protected Map<String, String> serverVariables = null; protected boolean debugging = false; protected Map<String, String> defaultHeaderMap = new HashMap<String, String>(); protected Map<String, String> defaultCookieMap = new HashMap<String, String>(); protected String tempFolderPath = null; protected Map<String, Authentication> authentications; protected DateFormat dateFormat; protected DateFormat datetimeFormat; protected boolean lenientDatetimeFormat; protected int dateLength; protected InputStream sslCaCert; protected boolean verifyingSsl; protected KeyManager[] keyManagers; protected OkHttpClient httpClient; protected JSON json; protected HttpLoggingInterceptor loggingInterceptor; /** * Basic constructor for ApiClient */ public ApiClient() { init(); initHttpClient(); // Setup authentications (key: authentication name, value: authentication). authentications.put("bearerAuth", new HttpBearerAuth("bearer")); // Prevent the authentications from being modified. authentications = Collections.unmodifiableMap(authentications); } /** * Basic constructor with custom OkHttpClient * * @param client a {@link okhttp3.OkHttpClient} object */ public ApiClient(OkHttpClient client) { init(); httpClient = client; // Setup authentications (key: authentication name, value: authentication). authentications.put("bearerAuth", new HttpBearerAuth("bearer")); // Prevent the authentications from being modified. authentications = Collections.unmodifiableMap(authentications); } protected void initHttpClient() { initHttpClient(Collections.<Interceptor>emptyList()); } protected void initHttpClient(List<Interceptor> interceptors) { OkHttpClient.Builder builder = new OkHttpClient.Builder(); builder.addNetworkInterceptor(getProgressInterceptor()); for (Interceptor interceptor: interceptors) { builder.addInterceptor(interceptor); } httpClient = builder.build(); } protected void init() { verifyingSsl = true; json = new JSON(); // Set default User-Agent. setUserAgent("OpenAPI-Generator/1.0.0/java"); authentications = new HashMap<String, Authentication>(); } /** * Get base path * * @return Base path */ public String getBasePath() { return basePath; } /** * Set base path * * @param basePath Base path of the URL (e.g https://api.buildin.ai * @return An instance of OkHttpClient */ public ApiClient setBasePath(String basePath) { this.basePath = basePath; this.serverIndex = null; return this; } public List<ServerConfiguration> getServers() { return servers; } public ApiClient setServers(List<ServerConfiguration> servers) { this.servers = servers; return this; } public Integer getServerIndex() { return serverIndex; } public ApiClient setServerIndex(Integer serverIndex) { this.serverIndex = serverIndex; return this; } public Map<String, String> getServerVariables() { return serverVariables; } public ApiClient setServerVariables(Map<String, String> serverVariables) { this.serverVariables = serverVariables; return this; } /** * Get HTTP client * * @return An instance of OkHttpClient */ public OkHttpClient getHttpClient() { return httpClient; } /** * Set HTTP client, which must never be null. * * @param newHttpClient An instance of OkHttpClient * @return Api Client * @throws java.lang.NullPointerException when newHttpClient is null */ public ApiClient setHttpClient(OkHttpClient newHttpClient) { this.httpClient = Objects.requireNonNull(newHttpClient, "HttpClient must not be null!"); return this; } /** * Get JSON * * @return JSON object */ public JSON getJSON() { return json; } /** * Set JSON * * @param json JSON object * @return Api client */ public ApiClient setJSON(JSON json) { this.json = json; return this; } /** * True if isVerifyingSsl flag is on * * @return True if isVerifySsl flag is on */ public boolean isVerifyingSsl() { return verifyingSsl; } /** * Configure whether to verify certificate and hostname when making https requests. * Default to true. * NOTE: Do NOT set to false in production code, otherwise you would face multiple types of cryptographic attacks. * * @param verifyingSsl True to verify TLS/SSL connection * @return ApiClient */ public ApiClient setVerifyingSsl(boolean verifyingSsl) { this.verifyingSsl = verifyingSsl; applySslSettings(); return this; } /** * Get SSL CA cert. * * @return Input stream to the SSL CA cert */ public InputStream getSslCaCert() { return sslCaCert; } /** * Configure the CA certificate to be trusted when making https requests. * Use null to reset to default. * * @param sslCaCert input stream for SSL CA cert * @return ApiClient */ public ApiClient setSslCaCert(InputStream sslCaCert) { this.sslCaCert = sslCaCert; applySslSettings(); return this; } /** * <p>Getter for the field <code>keyManagers</code>.</p> * * @return an array of {@link javax.net.ssl.KeyManager} objects */ public KeyManager[] getKeyManagers() { return keyManagers; } /** * Configure client keys to use for authorization in an SSL session. * Use null to reset to default. * * @param managers The KeyManagers to use * @return ApiClient */ public ApiClient setKeyManagers(KeyManager[] managers) { this.keyManagers = managers; applySslSettings(); return this; } /** * <p>Getter for the field <code>dateFormat</code>.</p> * * @return a {@link java.text.DateFormat} object */ public DateFormat getDateFormat() { return dateFormat; } /** * <p>Setter for the field <code>dateFormat</code>.</p> * * @param dateFormat a {@link java.text.DateFormat} object * @return a {@link org.openapitools.client.ApiClient} object */ public ApiClient setDateFormat(DateFormat dateFormat) { JSON.setDateFormat(dateFormat); return this; } /** * <p>Set SqlDateFormat.</p> * * @param dateFormat a {@link java.text.DateFormat} object * @return a {@link org.openapitools.client.ApiClient} object */ public ApiClient setSqlDateFormat(DateFormat dateFormat) { JSON.setSqlDateFormat(dateFormat); return this; } /** * <p>Set OffsetDateTimeFormat.</p> * * @param dateFormat a {@link java.time.format.DateTimeFormatter} object * @return a {@link org.openapitools.client.ApiClient} object */ public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { JSON.setOffsetDateTimeFormat(dateFormat); return this; } /** * <p>Set LocalDateFormat.</p> * * @param dateFormat a {@link java.time.format.DateTimeFormatter} object * @return a {@link org.openapitools.client.ApiClient} object */ public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) { JSON.setLocalDateFormat(dateFormat); return this; } /** * <p>Set LenientOnJson.</p> * * @param lenientOnJson a boolean * @return a {@link org.openapitools.client.ApiClient} object */ public ApiClient setLenientOnJson(boolean lenientOnJson) { JSON.setLenientOnJson(lenientOnJson); return this; } /** * Get authentications (key: authentication name, value: authentication). * * @return Map of authentication objects */ public Map<String, Authentication> getAuthentications() { return authentications; } /** * Get authentication for the given name. * * @param authName The authentication name * @return The authentication, null if not found */ public Authentication getAuthentication(String authName) { return authentications.get(authName); } /** * Helper method to set access token for the first Bearer authentication. * @param bearerToken Bearer token */ public void setBearerToken(String bearerToken) { setBearerToken(() -> bearerToken); } /** * Helper method to set the supplier of access tokens for Bearer authentication. * * @param tokenSupplier The supplier of bearer tokens */ public void setBearerToken(Supplier<String> tokenSupplier) { for (Authentication auth : authentications.values()) { if (auth instanceof HttpBearerAuth) { ((HttpBearerAuth) auth).setBearerToken(tokenSupplier); return; } } throw new RuntimeException("No Bearer authentication configured!"); } /** * Helper method to set username for the first HTTP basic authentication. * * @param username Username */ public void setUsername(String username) { for (Authentication auth : authentications.values()) { if (auth instanceof HttpBasicAuth) { ((HttpBasicAuth) auth).setUsername(username); return; } } throw new RuntimeException("No HTTP basic authentication configured!"); } /** * Helper method to set password for the first HTTP basic authentication. * * @param password Password */ public void setPassword(String password) { for (Authentication auth : authentications.values()) { if (auth instanceof HttpBasicAuth) { ((HttpBasicAuth) auth).setPassword(password); return; } } throw new RuntimeException("No HTTP basic authentication configured!"); } /** * Helper method to set API key value for the first API key authentication. * * @param apiKey API key */ public void setApiKey(String apiKey) { for (Authentication auth : authentications.values()) { if (auth instanceof ApiKeyAuth) { ((ApiKeyAuth) auth).setApiKey(apiKey); return; } } throw new RuntimeException("No API key authentication configured!"); } /** * Helper method to set API key prefix for the first API key authentication. * * @param apiKeyPrefix API key prefix */ public void setApiKeyPrefix(String apiKeyPrefix) { for (Authentication auth : authentications.values()) { if (auth instanceof ApiKeyAuth) { ((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix); return; } } throw new RuntimeException("No API key authentication configured!"); } /** * Helper method to set access token for the first OAuth2 authentication. * * @param accessToken Access token */ public void setAccessToken(String accessToken) { throw new RuntimeException("No OAuth2 authentication configured!"); } /** * Helper method to set credentials for AWSV4 Signature * * @param accessKey Access Key * @param secretKey Secret Key * @param region Region * @param service Service to access to */ public void setAWS4Configuration(String accessKey, String secretKey, String region, String service) { throw new RuntimeException("No AWS4 authentication configured!"); } /** * Helper method to set credentials for AWSV4 Signature * * @param accessKey Access Key * @param secretKey Secret Key * @param sessionToken Session Token * @param region Region * @param service Service to access to */ public void setAWS4Configuration(String accessKey, String secretKey, String sessionToken, String region, String service) { throw new RuntimeException("No AWS4 authentication configured!"); } /** * Set the User-Agent header's value (by adding to the default header map). * * @param userAgent HTTP request's user agent * @return ApiClient */ public ApiClient setUserAgent(String userAgent) { addDefaultHeader("User-Agent", userAgent); return this; } /** * Add a default header. * * @param key The header's key * @param value The header's value * @return ApiClient */ public ApiClient addDefaultHeader(String key, String value) { defaultHeaderMap.put(key, value); return this; } /** * Add a default cookie. * * @param key The cookie's key * @param value The cookie's value * @return ApiClient */ public ApiClient addDefaultCookie(String key, String value) { defaultCookieMap.put(key, value); return this; } /** * Check that whether debugging is enabled for this API client. * * @return True if debugging is enabled, false otherwise. */ public boolean isDebugging() { return debugging; } /** * Enable/disable debugging for this API client. * * @param debugging To enable (true) or disable (false) debugging * @return ApiClient */ public ApiClient setDebugging(boolean debugging) { if (debugging != this.debugging) { if (debugging) { loggingInterceptor = new HttpLoggingInterceptor(); loggingInterceptor.setLevel(Level.BODY); httpClient = httpClient.newBuilder().addInterceptor(loggingInterceptor).build(); } else { final OkHttpClient.Builder builder = httpClient.newBuilder(); builder.interceptors().remove(loggingInterceptor); httpClient = builder.build(); loggingInterceptor = null; } } this.debugging = debugging; return this; } /** * The path of temporary folder used to store downloaded files from endpoints * with file response. The default value is <code>null</code>, i.e. using * the system's default temporary folder. * * @see <a href="https://docs.oracle.com/javase/7/docs/api/java/nio/file/Files.html#createTempFile(java.lang.String,%20java.lang.String,%20java.nio.file.attribute.FileAttribute...)">createTempFile</a> * @return Temporary folder path */ public String getTempFolderPath() { return tempFolderPath; } /** * Set the temporary folder path (for downloading files) * * @param tempFolderPath Temporary folder path * @return ApiClient */ public ApiClient setTempFolderPath(String tempFolderPath) { this.tempFolderPath = tempFolderPath; return this; } /** * Get connection timeout (in milliseconds). * * @return Timeout in milliseconds */ public int getConnectTimeout() { return httpClient.connectTimeoutMillis(); } /** * Sets the connect timeout (in milliseconds). * A value of 0 means no timeout, otherwise values must be between 1 and * {@link java.lang.Integer#MAX_VALUE}. * * @param connectionTimeout connection timeout in milliseconds * @return Api client */ public ApiClient setConnectTimeout(int connectionTimeout) { httpClient = httpClient.newBuilder().connectTimeout(connectionTimeout, TimeUnit.MILLISECONDS).build(); return this; } /** * Get read timeout (in milliseconds). * * @return Timeout in milliseconds */ public int getReadTimeout() { return httpClient.readTimeoutMillis(); } /** * Sets the read timeout (in milliseconds). * A value of 0 means no timeout, otherwise values must be between 1 and * {@link java.lang.Integer#MAX_VALUE}. * * @param readTimeout read timeout in milliseconds * @return Api client */ public ApiClient setReadTimeout(int readTimeout) { httpClient = httpClient.newBuilder().readTimeout(readTimeout, TimeUnit.MILLISECONDS).build(); return this; } /** * Get write timeout (in milliseconds). * * @return Timeout in milliseconds */ public int getWriteTimeout() { return httpClient.writeTimeoutMillis(); } /** * Sets the write timeout (in milliseconds). * A value of 0 means no timeout, otherwise values must be between 1 and * {@link java.lang.Integer#MAX_VALUE}. * * @param writeTimeout connection timeout in milliseconds * @return Api client */ public ApiClient setWriteTimeout(int writeTimeout) { httpClient = httpClient.newBuilder().writeTimeout(writeTimeout, TimeUnit.MILLISECONDS).build(); return this; } /** * Format the given parameter object into string. * * @param param Parameter * @return String representation of the parameter */ public String parameterToString(Object param) { if (param == null) { return ""; } else if (param instanceof Date || param instanceof OffsetDateTime || param instanceof LocalDate) { //Serialize to json string and remove the " enclosing characters String jsonStr = JSON.serialize(param); return jsonStr.substring(1, jsonStr.length() - 1); } else if (param instanceof Collection) { StringBuilder b = new StringBuilder(); for (Object o : (Collection) param) { if (b.length() > 0) { b.append(","); } b.append(o); } return b.toString(); } else { return String.valueOf(param); } } /** * Formats the specified query parameter to a list containing a single {@code Pair} object. * * Note that {@code value} must not be a collection. * * @param name The name of the parameter. * @param value The value of the parameter. * @return A list containing a single {@code Pair} object. */ public List<Pair> parameterToPair(String name, Object value) { List<Pair> params = new ArrayList<Pair>(); // preconditions if (name == null || name.isEmpty() || value == null || value instanceof Collection) { return params; } params.add(new Pair(name, parameterToString(value))); return params; } /** * Formats the specified collection query parameters to a list of {@code Pair} objects. * * Note that the values of each of the returned Pair objects are percent-encoded. * * @param collectionFormat The collection format of the parameter. * @param name The name of the parameter. * @param value The value of the parameter. * @return A list of {@code Pair} objects. */ public List<Pair> parameterToPairs(String collectionFormat, String name, Collection value) { List<Pair> params = new ArrayList<Pair>(); // preconditions if (name == null || name.isEmpty() || value == null || value.isEmpty()) { return params; } // create the params based on the collection format if ("multi".equals(collectionFormat)) { for (Object item : value) { params.add(new Pair(name, escapeString(parameterToString(item)))); } return params; } // collectionFormat is assumed to be "csv" by default String delimiter = ","; // escape all delimiters except commas, which are URI reserved // characters if ("ssv".equals(collectionFormat)) { delimiter = escapeString(" "); } else if ("tsv".equals(collectionFormat)) { delimiter = escapeString("\t"); } else if ("pipes".equals(collectionFormat)) { delimiter = escapeString("|"); } StringBuilder sb = new StringBuilder(); for (Object item : value) { sb.append(delimiter); sb.append(escapeString(parameterToString(item))); } params.add(new Pair(name, sb.substring(delimiter.length()))); return params; } /** * Formats the specified free-form query parameters to a list of {@code Pair} objects. * * @param value The free-form query parameters. * @return A list of {@code Pair} objects. */ public List<Pair> freeFormParameterToPairs(Object value) { List<Pair> params = new ArrayList<>(); // preconditions if (value == null || !(value instanceof Map )) { return params; } @SuppressWarnings("unchecked") final Map<String, Object> valuesMap = (Map<String, Object>) value; for (Map.Entry<String, Object> entry : valuesMap.entrySet()) { params.add(new Pair(entry.getKey(), parameterToString(entry.getValue()))); } return params; } /** * Formats the specified collection path parameter to a string value. * * @param collectionFormat The collection format of the parameter. * @param value The value of the parameter. * @return String representation of the parameter */ public String collectionPathParameterToString(String collectionFormat, Collection value) { // create the value based on the collection format if ("multi".equals(collectionFormat)) { // not valid for path params return parameterToString(value); } // collectionFormat is assumed to be "csv" by default String delimiter = ","; if ("ssv".equals(collectionFormat)) { delimiter = " "; } else if ("tsv".equals(collectionFormat)) { delimiter = "\t"; } else if ("pipes".equals(collectionFormat)) { delimiter = "|"; } StringBuilder sb = new StringBuilder() ; for (Object item : value) { sb.append(delimiter); sb.append(parameterToString(item)); } return sb.substring(delimiter.length()); } /** * Sanitize filename by removing path. * e.g. ../../sun.gif becomes sun.gif * * @param filename The filename to be sanitized * @return The sanitized filename */ public String sanitizeFilename(String filename) { return filename.replaceFirst("^.*[/\\\\]", ""); } /** * Check if the given MIME is a JSON MIME. * JSON MIME examples: * application/json * application/json; charset=UTF8 * APPLICATION/JSON * application/vnd.company+json * "* / *" is also default to JSON * @param mime MIME (Multipurpose Internet Mail Extensions) * @return True if the given MIME is JSON, false otherwise. */ public boolean isJsonMime(String mime) { String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"; return mime != null && (mime.matches(jsonMime) || mime.equals("*/*")); } /** * Select the Accept header's value from the given accepts array: * if JSON exists in the given array, use it; * otherwise use all of them (joining into a string) * * @param accepts The accepts array to select from * @return The Accept header to use. If the given array is empty, * null will be returned (not to set the Accept header explicitly). */ public String selectHeaderAccept(String[] accepts) { if (accepts.length == 0) { return null; } for (String accept : accepts) { if (isJsonMime(accept)) { return accept; } } return StringUtil.join(accepts, ","); } /** * Select the Content-Type header's value from the given array: * if JSON exists in the given array, use it; * otherwise use the first one of the array. * * @param contentTypes The Content-Type array to select from * @return The Content-Type header to use. If the given array is empty, * returns null. If it matches "any", JSON will be used. */ public String selectHeaderContentType(String[] contentTypes) { if (contentTypes.length == 0) { return null; } if (contentTypes[0].equals("*/*")) { return "application/json"; } for (String contentType : contentTypes) { if (isJsonMime(contentType)) { return contentType; } } return contentTypes[0]; } /** * Escape the given string to be used as URL query value. * * @param str String to be escaped * @return Escaped string */ public String escapeString(String str) { try { return URLEncoder.encode(str, "utf8").replaceAll("\\+", "%20"); } catch (UnsupportedEncodingException e) { return str; } } /** * Deserialize response body to Java object, according to the return type and * the Content-Type response header. * * @param <T> Type * @param response HTTP response * @param returnType The type of the Java object * @return The deserialized Java object * @throws org.openapitools.client.ApiException If fail to deserialize response body, i.e. cannot read response body * or the Content-Type of the response is not supported. */ @SuppressWarnings("unchecked") public <T> T deserialize(Response response, Type returnType) throws ApiException { if (response == null || returnType == null) { return null; } if ("byte[]".equals(returnType.toString())) { // Handle binary response (byte array). try { return (T) response.body().bytes(); } catch (IOException e) { throw new ApiException(e); } } else if (returnType.equals(File.class)) { // Handle file downloading. return (T) downloadFileFromResponse(response); } ResponseBody respBody = response.body(); if (respBody == null) { return null; } String contentType = response.headers().get("Content-Type"); if (contentType == null) { // ensuring a default content type contentType = "application/json"; } try { if (isJsonMime(contentType)) { return JSON.deserialize(respBody.byteStream(), returnType); } else if (returnType.equals(String.class)) { String respBodyString = respBody.string(); if (respBodyString.isEmpty()) { return null; } // Expecting string, return the raw response body. return (T) respBodyString; } else { throw new ApiException( "Content type \"" + contentType + "\" is not supported for type: " + returnType, response.code(), response.headers().toMultimap(), response.body().string()); } } catch (IOException e) { throw new ApiException(e); } } /** * Serialize the given Java object into request body according to the object's * class and the request Content-Type. * * @param obj The Java object * @param contentType The request Content-Type * @return The serialized request body * @throws org.openapitools.client.ApiException If fail to serialize the given object */ public RequestBody serialize(Object obj, String contentType) throws ApiException { if (obj instanceof byte[]) { // Binary (byte array) body parameter support. return RequestBody.create((byte[]) obj, MediaType.parse(contentType)); } else if (obj instanceof File) { // File body parameter support. return RequestBody.create((File) obj, MediaType.parse(contentType)); } else if ("text/plain".equals(contentType) && obj instanceof String) { return RequestBody.create((String) obj, MediaType.parse(contentType)); } else if (isJsonMime(contentType)) { String content; if (obj != null) { content = JSON.serialize(obj); } else { content = null; } return RequestBody.create(content, MediaType.parse(contentType)); } else if (obj instanceof String) { return RequestBody.create((String) obj, MediaType.parse(contentType)); } else { throw new ApiException("Content type \"" + contentType + "\" is not supported"); } } /** * Download file from the given response. * * @param response An instance of the Response object * @throws org.openapitools.client.ApiException If fail to read file content from response and write to disk * @return Downloaded file */ public File downloadFileFromResponse(Response response) throws ApiException { try { File file = prepareDownloadFile(response); BufferedSink sink = Okio.buffer(Okio.sink(file)); sink.writeAll(response.body().source()); sink.close(); return file; } catch (IOException e) { throw new ApiException(e); } } /** * Prepare file for download * * @param response An instance of the Response object * @return Prepared file for the download * @throws java.io.IOException If fail to prepare file for download */ public File prepareDownloadFile(Response response) throws IOException { String filename = null; String contentDisposition = response.header("Content-Disposition"); if (contentDisposition != null && !"".equals(contentDisposition)) { // Get filename from the Content-Disposition header. Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?"); Matcher matcher = pattern.matcher(contentDisposition); if (matcher.find()) { filename = sanitizeFilename(matcher.group(1)); } } String prefix = null; String suffix = null; if (filename == null) { prefix = "download-"; suffix = ""; } else { int pos = filename.lastIndexOf("."); if (pos == -1) { prefix = filename + "-"; } else { prefix = filename.substring(0, pos) + "-"; suffix = filename.substring(pos); } // Files.createTempFile requires the prefix to be at least three characters long if (prefix.length() < 3) prefix = "download-"; } if (tempFolderPath == null) return Files.createTempFile(prefix, suffix).toFile(); else return Files.createTempFile(Paths.get(tempFolderPath), prefix, suffix).toFile(); } /** * {@link #execute(Call, Type)} * * @param <T> Type * @param call An instance of the Call object * @return ApiResponse&lt;T&gt; * @throws org.openapitools.client.ApiException If fail to execute the call */ public <T> ApiResponse<T> execute(Call call) throws ApiException { return execute(call, null); } /** * Execute HTTP call and deserialize the HTTP response body into the given return type. * * @param returnType The return type used to deserialize HTTP response body * @param <T> The return type corresponding to (same with) returnType * @param call Call * @return ApiResponse object containing response status, headers and * data, which is a Java object deserialized from response body and would be null * when returnType is null. * @throws org.openapitools.client.ApiException If fail to execute the call */ public <T> ApiResponse<T> execute(Call call, Type returnType) throws ApiException { try { Response response = call.execute(); T data = handleResponse(response, returnType); return new ApiResponse<T>(response.code(), response.headers().toMultimap(), data); } catch (IOException e) { throw new ApiException(e); } } /** * {@link #executeAsync(Call, Type, ApiCallback)} * * @param <T> Type * @param call An instance of the Call object * @param callback ApiCallback&lt;T&gt; */ public <T> void executeAsync(Call call, ApiCallback<T> callback) { executeAsync(call, null, callback); } /** * Execute HTTP call asynchronously. * * @param <T> Type * @param call The callback to be executed when the API call finishes * @param returnType Return type * @param callback ApiCallback * @see #execute(Call, Type) */ @SuppressWarnings("unchecked") public <T> void executeAsync(Call call, final Type returnType, final ApiCallback<T> callback) { call.enqueue(new Callback() { @Override public void onFailure(Call call, IOException e) { callback.onFailure(new ApiException(e), 0, null); } @Override public void onResponse(Call call, Response response) throws IOException { T result; try { result = (T) handleResponse(response, returnType); } catch (ApiException e) { callback.onFailure(e, response.code(), response.headers().toMultimap()); return; } catch (Exception e) { callback.onFailure(new ApiException(e), response.code(), response.headers().toMultimap()); return; } callback.onSuccess(result, response.code(), response.headers().toMultimap()); } }); } /** * Handle the given response, return the deserialized object when the response is successful. * * @param <T> Type * @param response Response * @param returnType Return type * @return Type * @throws org.openapitools.client.ApiException If the response has an unsuccessful status code or * fail to deserialize the response body */ public <T> T handleResponse(Response response, Type returnType) throws ApiException { if (response.isSuccessful()) { if (returnType == null || response.code() == 204) { // returning null if the returnType is not defined, // or the status code is 204 (No Content) if (response.body() != null) { try { response.body().close(); } catch (Exception e) { throw new ApiException(response.message(), e, response.code(), response.headers().toMultimap()); } } return null; } else { return deserialize(response, returnType); } } else { String respBody = null; if (response.body() != null) { try { respBody = response.body().string(); } catch (IOException e) { throw new ApiException(response.message(), e, response.code(), response.headers().toMultimap()); } } throw new ApiException(response.message(), response.code(), response.headers().toMultimap(), respBody); } } /** * Build HTTP call with the given options. * * @param baseUrl The base URL * @param path The sub-path of the HTTP URL * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE" * @param queryParams The query parameters * @param collectionQueryParams The collection query parameters * @param body The request body object * @param headerParams The header parameters * @param cookieParams The cookie parameters * @param formParams The form parameters * @param authNames The authentications to apply * @param callback Callback for upload/download progress * @return The HTTP call * @throws org.openapitools.client.ApiException If fail to serialize the request body object */ public Call buildCall(String baseUrl, String path, String method, List<Pair> queryParams, List<Pair> collectionQueryParams, Object body, Map<String, String> headerParams, Map<String, String> cookieParams, Map<String, Object> formParams, String[] authNames, ApiCallback callback) throws ApiException { Request request = buildRequest(baseUrl, path, method, queryParams, collectionQueryParams, body, headerParams, cookieParams, formParams, authNames, callback); return httpClient.newCall(request); } /** * Build an HTTP request with the given options. * * @param baseUrl The base URL * @param path The sub-path of the HTTP URL * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE" * @param queryParams The query parameters * @param collectionQueryParams The collection query parameters * @param body The request body object * @param headerParams The header parameters * @param cookieParams The cookie parameters * @param formParams The form parameters * @param authNames The authentications to apply * @param callback Callback for upload/download progress * @return The HTTP request * @throws org.openapitools.client.ApiException If fail to serialize the request body object */ public Request buildRequest(String baseUrl, String path, String method, List<Pair> queryParams, List<Pair> collectionQueryParams, Object body, Map<String, String> headerParams, Map<String, String> cookieParams, Map<String, Object> formParams, String[] authNames, ApiCallback callback) throws ApiException { final String url = buildUrl(baseUrl, path, queryParams, collectionQueryParams); // prepare HTTP request body RequestBody reqBody; String contentType = headerParams.get("Content-Type"); String contentTypePure = contentType; if (contentTypePure != null && contentTypePure.contains(";")) { contentTypePure = contentType.substring(0, contentType.indexOf(";")); } if (!HttpMethod.permitsRequestBody(method)) { reqBody = null; } else if ("application/x-www-form-urlencoded".equals(contentTypePure)) { reqBody = buildRequestBodyFormEncoding(formParams); } else if ("multipart/form-data".equals(contentTypePure)) { reqBody = buildRequestBodyMultipart(formParams); } else if (body == null) { if ("DELETE".equals(method)) { // allow calling DELETE without sending a request body reqBody = null; } else { // use an empty request body (for POST, PUT and PATCH) reqBody = RequestBody.create("", contentType == null ? null : MediaType.parse(contentType)); } } else { reqBody = serialize(body, contentType); } List<Pair> updatedQueryParams = new ArrayList<>(queryParams); // update parameters with authentication settings updateParamsForAuth(authNames, updatedQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url)); final Request.Builder reqBuilder = new Request.Builder().url(buildUrl(baseUrl, path, updatedQueryParams, collectionQueryParams)); processHeaderParams(headerParams, reqBuilder); processCookieParams(cookieParams, reqBuilder); // Associate callback with request (if not null) so interceptor can // access it when creating ProgressResponseBody reqBuilder.tag(callback); Request request = null; if (callback != null && reqBody != null) { ProgressRequestBody progressRequestBody = new ProgressRequestBody(reqBody, callback); request = reqBuilder.method(method, progressRequestBody).build(); } else { request = reqBuilder.method(method, reqBody).build(); } return request; } /** * Build full URL by concatenating base path, the given sub path and query parameters. * * @param baseUrl The base URL * @param path The sub path * @param queryParams The query parameters * @param collectionQueryParams The collection query parameters * @return The full URL */ public String buildUrl(String baseUrl, String path, List<Pair> queryParams, List<Pair> collectionQueryParams) { final StringBuilder url = new StringBuilder(); if (baseUrl != null) { url.append(baseUrl).append(path); } else { String baseURL; if (serverIndex != null) { if (serverIndex < 0 || serverIndex >= servers.size()) { throw new ArrayIndexOutOfBoundsException(String.format( "Invalid index %d when selecting the host settings. Must be less than %d", serverIndex, servers.size() )); } baseURL = servers.get(serverIndex).URL(serverVariables); } else { baseURL = basePath; } url.append(baseURL).append(path); } if (queryParams != null && !queryParams.isEmpty()) { // support (constant) query string in `path`, e.g. "/posts?draft=1" String prefix = path.contains("?") ? "&" : "?"; for (Pair param : queryParams) { if (param.getValue() != null) { if (prefix != null) { url.append(prefix); prefix = null; } else { url.append("&"); } String value = parameterToString(param.getValue()); url.append(escapeString(param.getName())).append("=").append(escapeString(value)); } } } if (collectionQueryParams != null && !collectionQueryParams.isEmpty()) { String prefix = url.toString().contains("?") ? "&" : "?"; for (Pair param : collectionQueryParams) { if (param.getValue() != null) { if (prefix != null) { url.append(prefix); prefix = null; } else { url.append("&"); } String value = parameterToString(param.getValue()); // collection query parameter value already escaped as part of parameterToPairs url.append(escapeString(param.getName())).append("=").append(value); } } } return url.toString(); } /** * Set header parameters to the request builder, including default headers. * * @param headerParams Header parameters in the form of Map * @param reqBuilder Request.Builder */ public void processHeaderParams(Map<String, String> headerParams, Request.Builder reqBuilder) { for (Entry<String, String> param : headerParams.entrySet()) { reqBuilder.header(param.getKey(), parameterToString(param.getValue())); } for (Entry<String, String> header : defaultHeaderMap.entrySet()) { if (!headerParams.containsKey(header.getKey())) { reqBuilder.header(header.getKey(), parameterToString(header.getValue())); } } } /** * Set cookie parameters to the request builder, including default cookies. * * @param cookieParams Cookie parameters in the form of Map * @param reqBuilder Request.Builder */ public void processCookieParams(Map<String, String> cookieParams, Request.Builder reqBuilder) { for (Entry<String, String> param : cookieParams.entrySet()) { reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.getValue())); } for (Entry<String, String> param : defaultCookieMap.entrySet()) { if (!cookieParams.containsKey(param.getKey())) { reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.getValue())); } } } /** * Update query and header parameters based on authentication settings. * * @param authNames The authentications to apply * @param queryParams List of query parameters * @param headerParams Map of header parameters * @param cookieParams Map of cookie parameters * @param payload HTTP request body * @param method HTTP method * @param uri URI * @throws org.openapitools.client.ApiException If fails to update the parameters */ public void updateParamsForAuth(String[] authNames, List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams, String payload, String method, URI uri) throws ApiException { for (String authName : authNames) { Authentication auth = authentications.get(authName); if (auth == null) { throw new RuntimeException("Authentication undefined: " + authName); } auth.applyToParams(queryParams, headerParams, cookieParams, payload, method, uri); } } /** * Build a form-encoding request body with the given form parameters. * * @param formParams Form parameters in the form of Map * @return RequestBody */ public RequestBody buildRequestBodyFormEncoding(Map<String, Object> formParams) { okhttp3.FormBody.Builder formBuilder = new okhttp3.FormBody.Builder(); for (Entry<String, Object> param : formParams.entrySet()) { formBuilder.add(param.getKey(), parameterToString(param.getValue())); } return formBuilder.build(); } /** * Build a multipart (file uploading) request body with the given form parameters, * which could contain text fields and file fields. * * @param formParams Form parameters in the form of Map * @return RequestBody */ public RequestBody buildRequestBodyMultipart(Map<String, Object> formParams) { MultipartBody.Builder mpBuilder = new MultipartBody.Builder().setType(MultipartBody.FORM); for (Entry<String, Object> param : formParams.entrySet()) { if (param.getValue() instanceof File) { File file = (File) param.getValue(); addPartToMultiPartBuilder(mpBuilder, param.getKey(), file); } else if (param.getValue() instanceof List) { List list = (List) param.getValue(); for (Object item: list) { if (item instanceof File) { addPartToMultiPartBuilder(mpBuilder, param.getKey(), (File) item); } else { addPartToMultiPartBuilder(mpBuilder, param.getKey(), param.getValue()); } } } else { addPartToMultiPartBuilder(mpBuilder, param.getKey(), param.getValue()); } } return mpBuilder.build(); } /** * Guess Content-Type header from the given file (defaults to "application/octet-stream"). * * @param file The given file * @return The guessed Content-Type */ public String guessContentTypeFromFile(File file) { String contentType = URLConnection.guessContentTypeFromName(file.getName()); if (contentType == null) { return "application/octet-stream"; } else { return contentType; } } /** * Add a Content-Disposition Header for the given key and file to the MultipartBody Builder. * * @param mpBuilder MultipartBody.Builder * @param key The key of the Header element * @param file The file to add to the Header */ protected void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, File file) { Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + key + "\"; filename=\"" + file.getName() + "\""); MediaType mediaType = MediaType.parse(guessContentTypeFromFile(file)); mpBuilder.addPart(partHeaders, RequestBody.create(file, mediaType)); } /** * Add a Content-Disposition Header for the given key and complex object to the MultipartBody Builder. * * @param mpBuilder MultipartBody.Builder * @param key The key of the Header element * @param obj The complex object to add to the Header */ protected void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, Object obj) { RequestBody requestBody; if (obj instanceof String) { requestBody = RequestBody.create((String) obj, MediaType.parse("text/plain")); } else { String content; if (obj != null) { content = JSON.serialize(obj); } else { content = null; } requestBody = RequestBody.create(content, MediaType.parse("application/json")); } Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + key + "\""); mpBuilder.addPart(partHeaders, requestBody); } /** * Get network interceptor to add it to the httpClient to track download progress for * async requests. */ protected Interceptor getProgressInterceptor() { return new Interceptor() { @Override public Response intercept(Interceptor.Chain chain) throws IOException { final Request request = chain.request(); final Response originalResponse = chain.proceed(request); if (request.tag() instanceof ApiCallback) { final ApiCallback callback = (ApiCallback) request.tag(); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), callback)) .build(); } return originalResponse; } }; } /** * Apply SSL related settings to httpClient according to the current values of * verifyingSsl and sslCaCert. */ protected void applySslSettings() { try { TrustManager[] trustManagers; HostnameVerifier hostnameVerifier; if (!verifyingSsl) { trustManagers = new TrustManager[]{ new X509TrustManager() { @Override public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException { } @Override public void checkServerTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException { } @Override public java.security.cert.X509Certificate[] getAcceptedIssuers() { return new java.security.cert.X509Certificate[]{}; } } }; hostnameVerifier = new HostnameVerifier() { @Override public boolean verify(String hostname, SSLSession session) { return true; } }; } else { TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); if (sslCaCert == null) { trustManagerFactory.init((KeyStore) null); } else { char[] password = null; // Any password will work. CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509"); Collection<? extends Certificate> certificates = certificateFactory.generateCertificates(sslCaCert); if (certificates.isEmpty()) { throw new IllegalArgumentException("expected non-empty set of trusted certificates"); } KeyStore caKeyStore = newEmptyKeyStore(password); int index = 0; for (Certificate certificate : certificates) { String certificateAlias = "ca" + (index++); caKeyStore.setCertificateEntry(certificateAlias, certificate); } trustManagerFactory.init(caKeyStore); } trustManagers = trustManagerFactory.getTrustManagers(); hostnameVerifier = OkHostnameVerifier.INSTANCE; } SSLContext sslContext = SSLContext.getInstance("TLS"); sslContext.init(keyManagers, trustManagers, new SecureRandom()); httpClient = httpClient.newBuilder() .sslSocketFactory(sslContext.getSocketFactory(), (X509TrustManager) trustManagers[0]) .hostnameVerifier(hostnameVerifier) .build(); } catch (GeneralSecurityException e) { throw new RuntimeException(e); } } protected KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityException { try { KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); keyStore.load(null, password); return keyStore; } catch (IOException e) { throw new AssertionError(e); } } /** * Convert the HTTP request body to a string. * * @param requestBody The HTTP request object * @return The string representation of the HTTP request body * @throws org.openapitools.client.ApiException If fail to serialize the request body object into a string */ protected String requestBodyToString(RequestBody requestBody) throws ApiException { if (requestBody != null) { try { final Buffer buffer = new Buffer(); requestBody.writeTo(buffer); return buffer.readUtf8(); } catch (final IOException e) { throw new ApiException(e); } } // empty http request body return ""; } }
0
java-sources/ai/buildin/buildin-api-client/1.0.4/org/openapitools
java-sources/ai/buildin/buildin-api-client/1.0.4/org/openapitools/client/ApiException.java
/* * Buildin API * Buildin Developer API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package org.openapitools.client; import java.util.Map; import java.util.List; /** * <p>ApiException class.</p> */ @SuppressWarnings("serial") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0") public class ApiException extends Exception { private static final long serialVersionUID = 1L; private int code = 0; private Map<String, List<String>> responseHeaders = null; private String responseBody = null; /** * <p>Constructor for ApiException.</p> */ public ApiException() {} /** * <p>Constructor for ApiException.</p> * * @param throwable a {@link java.lang.Throwable} object */ public ApiException(Throwable throwable) { super(throwable); } /** * <p>Constructor for ApiException.</p> * * @param message the error message */ public ApiException(String message) { super(message); } /** * <p>Constructor for ApiException.</p> * * @param message the error message * @param throwable a {@link java.lang.Throwable} object * @param code HTTP status code * @param responseHeaders a {@link java.util.Map} of HTTP response headers * @param responseBody the response body */ public ApiException(String message, Throwable throwable, int code, Map<String, List<String>> responseHeaders, String responseBody) { super(message, throwable); this.code = code; this.responseHeaders = responseHeaders; this.responseBody = responseBody; } /** * <p>Constructor for ApiException.</p> * * @param message the error message * @param code HTTP status code * @param responseHeaders a {@link java.util.Map} of HTTP response headers * @param responseBody the response body */ public ApiException(String message, int code, Map<String, List<String>> responseHeaders, String responseBody) { this(message, (Throwable) null, code, responseHeaders, responseBody); } /** * <p>Constructor for ApiException.</p> * * @param message the error message * @param throwable a {@link java.lang.Throwable} object * @param code HTTP status code * @param responseHeaders a {@link java.util.Map} of HTTP response headers */ public ApiException(String message, Throwable throwable, int code, Map<String, List<String>> responseHeaders) { this(message, throwable, code, responseHeaders, null); } /** * <p>Constructor for ApiException.</p> * * @param code HTTP status code * @param responseHeaders a {@link java.util.Map} of HTTP response headers * @param responseBody the response body */ public ApiException(int code, Map<String, List<String>> responseHeaders, String responseBody) { this("Response Code: " + code + " Response Body: " + responseBody, (Throwable) null, code, responseHeaders, responseBody); } /** * <p>Constructor for ApiException.</p> * * @param code HTTP status code * @param message a {@link java.lang.String} object */ public ApiException(int code, String message) { super(message); this.code = code; } /** * <p>Constructor for ApiException.</p> * * @param code HTTP status code * @param message the error message * @param responseHeaders a {@link java.util.Map} of HTTP response headers * @param responseBody the response body */ public ApiException(int code, String message, Map<String, List<String>> responseHeaders, String responseBody) { this(code, message); this.responseHeaders = responseHeaders; this.responseBody = responseBody; } /** * Get the HTTP status code. * * @return HTTP status code */ public int getCode() { return code; } /** * Get the HTTP response headers. * * @return A map of list of string */ public Map<String, List<String>> getResponseHeaders() { return responseHeaders; } /** * Get the HTTP response body. * * @return Response body in the form of string */ public String getResponseBody() { return responseBody; } /** * Get the exception message including HTTP response data. * * @return The exception message */ public String getMessage() { return String.format("Message: %s%nHTTP response code: %s%nHTTP response body: %s%nHTTP response headers: %s", super.getMessage(), this.getCode(), this.getResponseBody(), this.getResponseHeaders()); } }
0
java-sources/ai/buildin/buildin-api-client/1.0.4/org/openapitools
java-sources/ai/buildin/buildin-api-client/1.0.4/org/openapitools/client/ApiResponse.java
/* * Buildin API * Buildin Developer API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package org.openapitools.client; import java.util.List; import java.util.Map; /** * API response returned by API call. */ public class ApiResponse<T> { final private int statusCode; final private Map<String, List<String>> headers; final private T data; /** * <p>Constructor for ApiResponse.</p> * * @param statusCode The status code of HTTP response * @param headers The headers of HTTP response */ public ApiResponse(int statusCode, Map<String, List<String>> headers) { this(statusCode, headers, null); } /** * <p>Constructor for ApiResponse.</p> * * @param statusCode The status code of HTTP response * @param headers The headers of HTTP response * @param data The object deserialized from response bod */ public ApiResponse(int statusCode, Map<String, List<String>> headers, T data) { this.statusCode = statusCode; this.headers = headers; this.data = data; } /** * <p>Get the <code>status code</code>.</p> * * @return the status code */ public int getStatusCode() { return statusCode; } /** * <p>Get the <code>headers</code>.</p> * * @return a {@link java.util.Map} of headers */ public Map<String, List<String>> getHeaders() { return headers; } /** * <p>Get the <code>data</code>.</p> * * @return the data */ public T getData() { return data; } }
0
java-sources/ai/buildin/buildin-api-client/1.0.4/org/openapitools
java-sources/ai/buildin/buildin-api-client/1.0.4/org/openapitools/client/Configuration.java
/* * Buildin API * Buildin Developer API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package org.openapitools.client; import java.util.Objects; import java.util.concurrent.atomic.AtomicReference; import java.util.function.Supplier; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0") public class Configuration { public static final String VERSION = "1.0.0"; private static final AtomicReference<ApiClient> defaultApiClient = new AtomicReference<>(); private static volatile Supplier<ApiClient> apiClientFactory = ApiClient::new; /** * Get the default API client, which would be used when creating API instances without providing an API client. * * @return Default API client */ public static ApiClient getDefaultApiClient() { ApiClient client = defaultApiClient.get(); if (client == null) { client = defaultApiClient.updateAndGet(val -> { if (val != null) { // changed by another thread return val; } return apiClientFactory.get(); }); } return client; } /** * Set the default API client, which would be used when creating API instances without providing an API client. * * @param apiClient API client */ public static void setDefaultApiClient(ApiClient apiClient) { defaultApiClient.set(apiClient); } /** * set the callback used to create new ApiClient objects */ public static void setApiClientFactory(Supplier<ApiClient> factory) { apiClientFactory = Objects.requireNonNull(factory); } private Configuration() { } }
0
java-sources/ai/buildin/buildin-api-client/1.0.4/org/openapitools
java-sources/ai/buildin/buildin-api-client/1.0.4/org/openapitools/client/GzipRequestInterceptor.java
/* * Buildin API * Buildin Developer API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package org.openapitools.client; import okhttp3.*; import okio.Buffer; import okio.BufferedSink; import okio.GzipSink; import okio.Okio; import java.io.IOException; /** * Encodes request bodies using gzip. * * Taken from https://github.com/square/okhttp/issues/350 */ class GzipRequestInterceptor implements Interceptor { @Override public Response intercept(Chain chain) throws IOException { Request originalRequest = chain.request(); if (originalRequest.body() == null || originalRequest.header("Content-Encoding") != null) { return chain.proceed(originalRequest); } Request compressedRequest = originalRequest.newBuilder() .header("Content-Encoding", "gzip") .method(originalRequest.method(), forceContentLength(gzip(originalRequest.body()))) .build(); return chain.proceed(compressedRequest); } private RequestBody forceContentLength(final RequestBody requestBody) throws IOException { final Buffer buffer = new Buffer(); requestBody.writeTo(buffer); return new RequestBody() { @Override public MediaType contentType() { return requestBody.contentType(); } @Override public long contentLength() { return buffer.size(); } @Override public void writeTo(BufferedSink sink) throws IOException { sink.write(buffer.snapshot()); } }; } private RequestBody gzip(final RequestBody body) { return new RequestBody() { @Override public MediaType contentType() { return body.contentType(); } @Override public long contentLength() { return -1; // We don't know the compressed length in advance! } @Override public void writeTo(BufferedSink sink) throws IOException { BufferedSink gzipSink = Okio.buffer(new GzipSink(sink)); body.writeTo(gzipSink); gzipSink.close(); } }; } }
0
java-sources/ai/buildin/buildin-api-client/1.0.4/org/openapitools
java-sources/ai/buildin/buildin-api-client/1.0.4/org/openapitools/client/JSON.java
/* * Buildin API * Buildin Developer API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package org.openapitools.client; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonParseException; import com.google.gson.TypeAdapter; import com.google.gson.internal.bind.util.ISO8601Utils; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import com.google.gson.JsonElement; import io.gsonfire.GsonFireBuilder; import io.gsonfire.TypeSelector; import okio.ByteString; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.StringReader; import java.lang.reflect.Type; import java.nio.charset.StandardCharsets; import java.text.DateFormat; import java.text.ParseException; import java.text.ParsePosition; import java.time.LocalDate; import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; import java.util.Date; import java.util.Locale; import java.util.Map; import java.util.HashMap; /* * A JSON utility class * * NOTE: in the future, this class may be converted to static, which may break * backward-compatibility */ public class JSON { private static Gson gson; private static boolean isLenientOnJson = false; private static DateTypeAdapter dateTypeAdapter = new DateTypeAdapter(); private static SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter(); private static OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter(); private static LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); private static ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter(); @SuppressWarnings("unchecked") public static GsonBuilder createGson() { GsonFireBuilder fireBuilder = new GsonFireBuilder() ; GsonBuilder builder = fireBuilder.createGsonBuilder(); return builder; } private static String getDiscriminatorValue(JsonElement readElement, String discriminatorField) { JsonElement element = readElement.getAsJsonObject().get(discriminatorField); if (null == element) { throw new IllegalArgumentException("missing discriminator field: <" + discriminatorField + ">"); } return element.getAsString(); } /** * Returns the Java class that implements the OpenAPI schema for the specified discriminator value. * * @param classByDiscriminatorValue The map of discriminator values to Java classes. * @param discriminatorValue The value of the OpenAPI discriminator in the input data. * @return The Java class that implements the OpenAPI schema */ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, String discriminatorValue) { Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue); if (null == clazz) { throw new IllegalArgumentException("cannot determine model class of name: <" + discriminatorValue + ">"); } return clazz; } static { GsonBuilder gsonBuilder = createGson(); gsonBuilder.registerTypeAdapter(Date.class, dateTypeAdapter); gsonBuilder.registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter); gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter); gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter); gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AppendBlockChildrenRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AppendBlockChildrenRequestChildrenInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.AppendBlockChildrenResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Block.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BlockData.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BlockDataExternal.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BlockDataFile.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BlockDataSyncedFrom.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Cover.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CoverExternal.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreateDatabaseRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePagePropertyValue.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePagePropertyValueCheckbox.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePagePropertyValueDate.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePagePropertyValueDateDate.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePagePropertyValueEmail.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePagePropertyValueFiles.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePagePropertyValueFilesFilesInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePagePropertyValueFilesFilesInnerExternal.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePagePropertyValueMultiSelect.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePagePropertyValueNumber.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePagePropertyValuePeople.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePagePropertyValuePeoplePeopleInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePagePropertyValuePhoneNumber.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePagePropertyValueRelation.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePagePropertyValueRelationRelationInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePagePropertyValueRichText.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePagePropertyValueSelect.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePagePropertyValueSelectSelect.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePagePropertyValueTitle.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePagePropertyValueUrl.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePageRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePageResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePageResponseCreatedBy.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePageResponseParent.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePageResponseParentOneOf.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePageResponseParentOneOf1.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.CreatePageResponseUpdatedBy.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Database.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DeleteBlockResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Error.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.GetBlockChildrenResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Icon.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.IconEmoji.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.IconExternal.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.IconExternalDetail.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.IconFile.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.IconFileDetail.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Page.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PaginatedList.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Parent.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ParentBlockId.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ParentDatabaseId.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ParentPageId.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ParentSpaceId.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PropertySchema.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PropertySchemaCheckbox.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PropertySchemaDate.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PropertySchemaEmail.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PropertySchemaFiles.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PropertySchemaFormula.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PropertySchemaFormulaFormula.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PropertySchemaMultiSelect.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PropertySchemaNumber.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PropertySchemaNumberNumber.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PropertySchemaPeople.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PropertySchemaPhoneNumber.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PropertySchemaRelation.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PropertySchemaRelationRelation.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PropertySchemaRichText.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PropertySchemaSelect.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PropertySchemaSelectOption.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PropertySchemaSelectSelect.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PropertySchemaTitle.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PropertySchemaUrl.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PropertyValue.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PropertyValueCheckbox.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PropertyValueDate.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PropertyValueDateDate.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PropertyValueEmail.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PropertyValueFiles.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PropertyValueFilesFilesInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PropertyValueMultiSelect.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PropertyValueMultiSelectMultiSelectInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PropertyValueNumber.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PropertyValuePeople.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PropertyValuePeoplePeopleInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PropertyValuePhoneNumber.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PropertyValueRelation.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PropertyValueRichText.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PropertyValueSelect.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PropertyValueSelectSelect.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PropertyValueTitle.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PropertyValueUrl.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.QueryDatabaseRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.QueryDatabaseResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RichTextItem.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RichTextItemAnnotations.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RichTextItemEquation.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RichTextItemMention.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RichTextItemMentionDate.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RichTextItemMentionUser.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RichTextItemText.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.RichTextItemTextLink.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SearchRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SearchResult.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SearchResultDataInner.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UpdateBlockRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UpdateDatabaseRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UpdateDatabaseRequestPropertiesValue.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UpdatePageRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.User.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UserMe.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UserMePerson.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.V1SearchPageResult.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.V1SearchPageResultParent.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.V1SearchPageResultProperties.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.V1SearchPageResultPropertiesTitle.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.V1SearchRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.V1SearchResponse.CustomTypeAdapterFactory()); gson = gsonBuilder.create(); } /** * Get Gson. * * @return Gson */ public static Gson getGson() { return gson; } /** * Set Gson. * * @param gson Gson */ public static void setGson(Gson gson) { JSON.gson = gson; } public static void setLenientOnJson(boolean lenientOnJson) { isLenientOnJson = lenientOnJson; } /** * Serialize the given Java object into JSON string. * * @param obj Object * @return String representation of the JSON */ public static String serialize(Object obj) { return gson.toJson(obj); } /** * Deserialize the given JSON string to Java object. * * @param <T> Type * @param body The JSON string * @param returnType The type to deserialize into * @return The deserialized Java object */ @SuppressWarnings("unchecked") public static <T> T deserialize(String body, Type returnType) { try { if (isLenientOnJson) { JsonReader jsonReader = new JsonReader(new StringReader(body)); // see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean) jsonReader.setLenient(true); return gson.fromJson(jsonReader, returnType); } else { return gson.fromJson(body, returnType); } } catch (JsonParseException e) { // Fallback processing when failed to parse JSON form response body: // return the response body string directly for the String return type; if (returnType.equals(String.class)) { return (T) body; } else { throw (e); } } } /** * Deserialize the given JSON InputStream to a Java object. * * @param <T> Type * @param inputStream The JSON InputStream * @param returnType The type to deserialize into * @return The deserialized Java object */ @SuppressWarnings("unchecked") public static <T> T deserialize(InputStream inputStream, Type returnType) throws IOException { try (InputStreamReader reader = new InputStreamReader(inputStream, StandardCharsets.UTF_8)) { if (isLenientOnJson) { // see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean) JsonReader jsonReader = new JsonReader(reader); jsonReader.setLenient(true); return gson.fromJson(jsonReader, returnType); } else { return gson.fromJson(reader, returnType); } } } /** * Gson TypeAdapter for Byte Array type */ public static class ByteArrayAdapter extends TypeAdapter<byte[]> { @Override public void write(JsonWriter out, byte[] value) throws IOException { if (value == null) { out.nullValue(); } else { out.value(ByteString.of(value).base64()); } } @Override public byte[] read(JsonReader in) throws IOException { switch (in.peek()) { case NULL: in.nextNull(); return null; default: String bytesAsBase64 = in.nextString(); ByteString byteString = ByteString.decodeBase64(bytesAsBase64); return byteString.toByteArray(); } } } /** * Gson TypeAdapter for JSR310 OffsetDateTime type */ public static class OffsetDateTimeTypeAdapter extends TypeAdapter<OffsetDateTime> { private DateTimeFormatter formatter; public OffsetDateTimeTypeAdapter() { this(DateTimeFormatter.ISO_OFFSET_DATE_TIME); } public OffsetDateTimeTypeAdapter(DateTimeFormatter formatter) { this.formatter = formatter; } public void setFormat(DateTimeFormatter dateFormat) { this.formatter = dateFormat; } @Override public void write(JsonWriter out, OffsetDateTime date) throws IOException { if (date == null) { out.nullValue(); } else { out.value(formatter.format(date)); } } @Override public OffsetDateTime read(JsonReader in) throws IOException { switch (in.peek()) { case NULL: in.nextNull(); return null; default: String date = in.nextString(); if (date.endsWith("+0000")) { date = date.substring(0, date.length()-5) + "Z"; } return OffsetDateTime.parse(date, formatter); } } } /** * Gson TypeAdapter for JSR310 LocalDate type */ public static class LocalDateTypeAdapter extends TypeAdapter<LocalDate> { private DateTimeFormatter formatter; public LocalDateTypeAdapter() { this(DateTimeFormatter.ISO_LOCAL_DATE); } public LocalDateTypeAdapter(DateTimeFormatter formatter) { this.formatter = formatter; } public void setFormat(DateTimeFormatter dateFormat) { this.formatter = dateFormat; } @Override public void write(JsonWriter out, LocalDate date) throws IOException { if (date == null) { out.nullValue(); } else { out.value(formatter.format(date)); } } @Override public LocalDate read(JsonReader in) throws IOException { switch (in.peek()) { case NULL: in.nextNull(); return null; default: String date = in.nextString(); return LocalDate.parse(date, formatter); } } } public static void setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { offsetDateTimeTypeAdapter.setFormat(dateFormat); } public static void setLocalDateFormat(DateTimeFormatter dateFormat) { localDateTypeAdapter.setFormat(dateFormat); } /** * Gson TypeAdapter for java.sql.Date type * If the dateFormat is null, a simple "yyyy-MM-dd" format will be used * (more efficient than SimpleDateFormat). */ public static class SqlDateTypeAdapter extends TypeAdapter<java.sql.Date> { private DateFormat dateFormat; public SqlDateTypeAdapter() {} public SqlDateTypeAdapter(DateFormat dateFormat) { this.dateFormat = dateFormat; } public void setFormat(DateFormat dateFormat) { this.dateFormat = dateFormat; } @Override public void write(JsonWriter out, java.sql.Date date) throws IOException { if (date == null) { out.nullValue(); } else { String value; if (dateFormat != null) { value = dateFormat.format(date); } else { value = date.toString(); } out.value(value); } } @Override public java.sql.Date read(JsonReader in) throws IOException { switch (in.peek()) { case NULL: in.nextNull(); return null; default: String date = in.nextString(); try { if (dateFormat != null) { return new java.sql.Date(dateFormat.parse(date).getTime()); } return new java.sql.Date(ISO8601Utils.parse(date, new ParsePosition(0)).getTime()); } catch (ParseException e) { throw new JsonParseException(e); } } } } /** * Gson TypeAdapter for java.util.Date type * If the dateFormat is null, ISO8601Utils will be used. */ public static class DateTypeAdapter extends TypeAdapter<Date> { private DateFormat dateFormat; public DateTypeAdapter() {} public DateTypeAdapter(DateFormat dateFormat) { this.dateFormat = dateFormat; } public void setFormat(DateFormat dateFormat) { this.dateFormat = dateFormat; } @Override public void write(JsonWriter out, Date date) throws IOException { if (date == null) { out.nullValue(); } else { String value; if (dateFormat != null) { value = dateFormat.format(date); } else { value = ISO8601Utils.format(date, true); } out.value(value); } } @Override public Date read(JsonReader in) throws IOException { try { switch (in.peek()) { case NULL: in.nextNull(); return null; default: String date = in.nextString(); try { if (dateFormat != null) { return dateFormat.parse(date); } return ISO8601Utils.parse(date, new ParsePosition(0)); } catch (ParseException e) { throw new JsonParseException(e); } } } catch (IllegalArgumentException e) { throw new JsonParseException(e); } } } public static void setDateFormat(DateFormat dateFormat) { dateTypeAdapter.setFormat(dateFormat); } public static void setSqlDateFormat(DateFormat dateFormat) { sqlDateTypeAdapter.setFormat(dateFormat); } }
0
java-sources/ai/buildin/buildin-api-client/1.0.4/org/openapitools
java-sources/ai/buildin/buildin-api-client/1.0.4/org/openapitools/client/Pair.java
/* * Buildin API * Buildin Developer API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package org.openapitools.client; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0") public class Pair { private String name = ""; private String value = ""; public Pair (String name, String value) { setName(name); setValue(value); } private void setName(String name) { if (!isValidString(name)) { return; } this.name = name; } private void setValue(String value) { if (!isValidString(value)) { return; } this.value = value; } public String getName() { return this.name; } public String getValue() { return this.value; } private boolean isValidString(String arg) { if (arg == null) { return false; } return true; } }
0
java-sources/ai/buildin/buildin-api-client/1.0.4/org/openapitools
java-sources/ai/buildin/buildin-api-client/1.0.4/org/openapitools/client/ProgressRequestBody.java
/* * Buildin API * Buildin Developer API * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package org.openapitools.client; import okhttp3.MediaType; import okhttp3.RequestBody; import java.io.IOException; import okio.Buffer; import okio.BufferedSink; import okio.ForwardingSink; import okio.Okio; import okio.Sink; public class ProgressRequestBody extends RequestBody { private final RequestBody requestBody; private final ApiCallback callback; public ProgressRequestBody(RequestBody requestBody, ApiCallback callback) { this.requestBody = requestBody; this.callback = callback; } @Override public MediaType contentType() { return requestBody.contentType(); } @Override public long contentLength() throws IOException { return requestBody.contentLength(); } @Override public void writeTo(BufferedSink sink) throws IOException { BufferedSink bufferedSink = Okio.buffer(sink(sink)); requestBody.writeTo(bufferedSink); bufferedSink.flush(); } private Sink sink(Sink sink) { return new ForwardingSink(sink) { long bytesWritten = 0L; long contentLength = 0L; @Override public void write(Buffer source, long byteCount) throws IOException { super.write(source, byteCount); if (contentLength == 0) { contentLength = contentLength(); } bytesWritten += byteCount; callback.onUploadProgress(bytesWritten, contentLength, bytesWritten == contentLength); } }; } }