index
int64 | repo_id
string | file_path
string | content
string |
|---|---|---|---|
0
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/ApptuitDropwizardExports.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.jinsight;
import com.codahale.metrics.Counter;
import com.codahale.metrics.Gauge;
import com.codahale.metrics.Histogram;
import com.codahale.metrics.Meter;
import com.codahale.metrics.Metered;
import com.codahale.metrics.Metric;
import com.codahale.metrics.MetricRegistry;
import com.codahale.metrics.Sampling;
import com.codahale.metrics.Snapshot;
import com.codahale.metrics.Timer;
import io.prometheus.client.dropwizard.samplebuilder.SampleBuilder;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.SortedMap;
import java.util.concurrent.TimeUnit;
import java.util.logging.Level;
import java.util.logging.Logger;
public class ApptuitDropwizardExports extends io.prometheus.client.Collector
implements io.prometheus.client.Collector.Describable {
private static final Logger LOGGER = Logger.getLogger(ApptuitDropwizardExports.class.getName());
private static final String QUANTILE_TAG_NAME = "quantile";
private static final String WINDOW_TAG_NAME = "window";
private static final String RATE_SUFFIX = "_rate";
private MetricRegistry registry;
private SampleBuilder sampleBuilder;
public ApptuitDropwizardExports(MetricRegistry registry, SampleBuilder builder) {
this.registry = registry;
this.sampleBuilder = builder;
}
private static String getHelpMessage(String metricName, Metric metric) {
return "Generated from Dropwizard metric import (metric=" + metricName +
", type=" + metric.getClass().getName() + ")";
}
private MetricFamilySamples fromSnapshotAndCount(String dropwizardName, String durationSuffix, Sampling samplingObj, long count, double factor, String helpMessage) {
Snapshot snapshot = samplingObj.getSnapshot();
List<MetricFamilySamples.Sample> samples = Arrays.asList(
sampleBuilder.createSample(dropwizardName, durationSuffix + "_min",
null, null, snapshot.getMin() * factor),
sampleBuilder.createSample(dropwizardName, durationSuffix + "_max",
null, null, snapshot.getMax() * factor),
sampleBuilder.createSample(dropwizardName, durationSuffix + "_mean",
null, null, snapshot.getMean() * factor),
sampleBuilder.createSample(dropwizardName, durationSuffix + "_stddev",
null, null, snapshot.getStdDev() * factor),
sampleBuilder.createSample(dropwizardName, durationSuffix,
Collections.singletonList(QUANTILE_TAG_NAME), Collections.singletonList("0.5"), snapshot.getMedian() * factor),
sampleBuilder.createSample(dropwizardName, durationSuffix,
Collections.singletonList(QUANTILE_TAG_NAME),
Collections.singletonList("0.75"), snapshot.get75thPercentile() * factor),
sampleBuilder.createSample(dropwizardName, durationSuffix,
Collections.singletonList(QUANTILE_TAG_NAME),
Collections.singletonList("0.95"), snapshot.get95thPercentile() * factor),
sampleBuilder.createSample(dropwizardName, durationSuffix,
Collections.singletonList(QUANTILE_TAG_NAME),
Collections.singletonList("0.98"), snapshot.get98thPercentile() * factor),
sampleBuilder.createSample(dropwizardName, durationSuffix,
Collections.singletonList(QUANTILE_TAG_NAME),
Collections.singletonList("0.99"), snapshot.get99thPercentile() * factor),
sampleBuilder.createSample(dropwizardName, durationSuffix,
Collections.singletonList(QUANTILE_TAG_NAME),
Collections.singletonList("0.999"), snapshot.get999thPercentile() * factor),
sampleBuilder.createSample(dropwizardName, "_count",
null, null, count)
);
return new MetricFamilySamples(samples.get(0).name, Type.SUMMARY, helpMessage, samples);
}
private MetricFamilySamples fromHistogram(String dropwizardName, Histogram histogram) {
return fromSnapshotAndCount(dropwizardName, "", histogram, histogram.getCount(), 1.0,
getHelpMessage(dropwizardName, histogram));
}
private MetricFamilySamples fromCounter(String dropwizardName, Counter counter) {
MetricFamilySamples.Sample sample = sampleBuilder.createSample(dropwizardName, "", null, null,
counter.getCount());
return new MetricFamilySamples(sample.name, Type.GAUGE, getHelpMessage(dropwizardName, counter),
Collections.singletonList(sample));
}
/**
* Export gauge as a prometheus gauge.
*/
private MetricFamilySamples fromGauge(String dropwizardName, Gauge gauge) {
Object obj = gauge.getValue();
double value;
if (obj instanceof Number) {
value = ((Number) obj).doubleValue();
} else if (obj instanceof Boolean) {
value = ((Boolean) obj) ? 1 : 0;
} else {
String objName = "null";
if (obj != null) {
objName = obj.getClass().getName();
}
LOGGER.log(Level.FINE, String.format("Invalid type for Gauge %s: %s", sanitizeMetricName(dropwizardName),
objName));
return null;
}
MetricFamilySamples.Sample sample = sampleBuilder.createSample(dropwizardName, "",
null, null, value);
return new MetricFamilySamples(sample.name, Type.GAUGE, getHelpMessage(dropwizardName, gauge),
Collections.singletonList(sample));
}
private MetricFamilySamples fromMeter(String dropwizardName, Metered meter) {
List<MetricFamilySamples.Sample> samples = Arrays.asList(
sampleBuilder.createSample(dropwizardName, RATE_SUFFIX,
Collections.singletonList(WINDOW_TAG_NAME), Collections.singletonList("1m"), meter.getOneMinuteRate()),
sampleBuilder.createSample(dropwizardName, RATE_SUFFIX,
Collections.singletonList(WINDOW_TAG_NAME), Collections.singletonList("5m"), meter.getFiveMinuteRate()),
sampleBuilder.createSample(dropwizardName, RATE_SUFFIX,
Collections.singletonList(WINDOW_TAG_NAME), Collections.singletonList("15m"), meter.getFifteenMinuteRate()),
sampleBuilder.createSample(dropwizardName, "_total", null, null, meter.getCount())
);
return new MetricFamilySamples(samples.get(0).name, Type.SUMMARY, getHelpMessage(dropwizardName, meter), samples);
}
private MetricFamilySamples fromTimer(String dropwizardName, Timer timer) {
List<MetricFamilySamples.Sample> samples = new ArrayList<>(fromMeter(dropwizardName, timer).samples);
samples.remove(samples.size() - 1);
samples.addAll(fromSnapshotAndCount(dropwizardName, "_duration", timer, timer.getCount(),
1.0D / TimeUnit.SECONDS.toNanos(1L), getHelpMessage(dropwizardName, timer)).samples);
return new MetricFamilySamples(samples.get(0).name, Type.SUMMARY, getHelpMessage(dropwizardName, timer), samples);
}
@Override
public List<MetricFamilySamples> collect() {
Map<String, MetricFamilySamples> mfSamplesMap = new HashMap<>(registry.getMetrics().size());
for (SortedMap.Entry<String, Metric> entry : registry.getMetrics().entrySet()) {
try {
Metric metric = entry.getValue();
MetricFamilySamples samples;
if (metric instanceof Histogram) {
samples = fromHistogram(entry.getKey(), (Histogram) metric);
} else if(metric instanceof Timer) {
samples = fromTimer(entry.getKey(), (Timer) metric);
} else if(metric instanceof Meter) {
samples = fromMeter(entry.getKey(), (Meter) metric);
} else if(metric instanceof Gauge) {
samples = fromGauge(entry.getKey(), (Gauge) metric);
} else if(metric instanceof Counter) {
samples = fromCounter(entry.getKey(), (Counter) metric);
} else {
continue;
}
addToMap(mfSamplesMap, samples);
} catch (RuntimeException rte) {
LOGGER.log(Level.SEVERE, "Error collecting fromHistogram [" + entry.getKey() + "]", rte);
}
}
return new ArrayList<>(mfSamplesMap.values());
}
private void addToMap(Map<String, MetricFamilySamples> mfSamplesMap, MetricFamilySamples newMfSamples) {
if (newMfSamples != null) {
MetricFamilySamples currentMfSamples = mfSamplesMap.get(newMfSamples.name);
if (currentMfSamples == null) {
mfSamplesMap.put(newMfSamples.name, newMfSamples);
} else {
List<MetricFamilySamples.Sample> samples = new ArrayList<>(currentMfSamples.samples);
samples.addAll(newMfSamples.samples);
mfSamplesMap.put(newMfSamples.name,
new MetricFamilySamples(newMfSamples.name, currentMfSamples.type, currentMfSamples.help, samples));
}
}
}
@Override
public List<MetricFamilySamples> describe() {
return new ArrayList<>();
}
}
|
0
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/ConfigService.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.jinsight;
import ai.apptuit.metrics.client.Sanitizer;
import ai.apptuit.metrics.dropwizard.ApptuitReporter.ReportingMode;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.InvocationTargetException;
import java.net.InetAddress;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.UnknownHostException;
import java.time.Duration;
import java.time.format.DateTimeParseException;
import java.util.*;
import java.util.jar.Attributes;
import java.util.jar.Manifest;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* Provides access to Configuration options.
*
* @author Rajiv Shivane
*/
public class ConfigService {
private static final String CONFIG_SYSTEM_PROPERTY = "jinsight.config";
private static final String DEFAULT_CONFIG_FILE_NAME = "jinsight-config.properties";
public static final String REPORTING_FREQ_PROPERTY_NAME = "reporting_frequency";
private static final String GLOBAL_TAGS_PROPERTY_NAME = "global_tags";
public static final String REPORTER_PROPERTY_NAME = "reporter";
public static final String PROMETHEUS_EXPORTER_PORT = "prometheus.exporter_port";
public static final String PROMETHEUS_METRICS_PATH = "prometheus.exporter_endpoint";
public static final String REPORTING_MODE_PROPERTY_NAME = "apptuit.reporting_mode";
private static final String ACCESS_TOKEN_PROPERTY_NAME = "apptuit.access_token";
private static final String API_ENDPOINT_PROPERTY_NAME = "apptuit.api_url";
private static final String HOST_TAG_NAME = "host";
private static final String UUID_TEMPLATE_VARIABLE = "${UUID}";
private static final String PID_TEMPLATE_VARIABLE = "${PID}";
private static final File JINSIGHT_HOME = new File(System.getProperty("user.home"), ".jinsight");
private static final File UNIX_JINSIGHT_CONF_DIR = new File("/etc/jinsight/");
private static final ReportingMode DEFAULT_REPORTING_MODE = ReportingMode.API_PUT;
public static final ReporterType DEFAULT_REPORTER_TYPE = ReporterType.PROMETHEUS;
private static final String DEFAULT_REPORTING_FREQUENCY = "15s";
private static final String DEFAULT_PROMETHEUS_EXPORTER_PORT = "9404";
private static final String DEFAULT_PROMETHEUS_METRICS_PATH = "/metrics";
private static final Logger LOGGER = Logger.getLogger(ConfigService.class.getName());
private static volatile ConfigService singleton = null;
private final String apiToken;
private final URL apiUrl;
private final ReporterType reporterType;
private final ReportingMode reportingMode;
private final long reportingFrequencyMillis;
private final int prometheusPort;
private final String prometheusMetricsPath;
private final Map<String, String> loadedGlobalTags = new HashMap<>();
private final String agentVersion;
private Map<String, String> globalTags = null;
private final Sanitizer sanitizer;
public enum ReporterType {
PROMETHEUS, APPTUIT
}
ConfigService(Properties config) throws ConfigurationException {
this.apiToken = config.getProperty(ACCESS_TOKEN_PROPERTY_NAME);
this.reporterType = readReporter(config);
this.reportingMode = readReportingMode(config);
this.reportingFrequencyMillis = readReportingFrequency(config);
this.prometheusMetricsPath = readPrometheusMetricsPath(config);
this.sanitizer = readSanitizer(config);
this.prometheusPort = readPrometheusPort(config);
if (this.reporterType == ReporterType.APPTUIT && apiToken == null && reportingMode == ReportingMode.API_PUT) {
throw new ConfigurationException(
"Could not find the property [" + ACCESS_TOKEN_PROPERTY_NAME + "]");
}
String configUrl = config.getProperty(API_ENDPOINT_PROPERTY_NAME);
URL url = null;
if (configUrl != null) {
try {
url = new URL(configUrl.trim());
} catch (MalformedURLException e) {
LOGGER.severe("Malformed API URL [" + configUrl + "]. Using default URL instead");
LOGGER.log(Level.FINE, e.toString(), e);
configUrl = null;
}
}
this.apiUrl = url;
this.agentVersion = loadAgentVersion();
loadGlobalTags(config);
}
public static ConfigService getInstance() {
if (singleton == null) {
synchronized (ConfigService.class) {
if (singleton == null) {
try {
initialize();
} catch (IOException | ConfigurationException e) {
throw new IllegalStateException(e);
}
}
}
}
return singleton;
}
static void initialize() throws IOException, ConfigurationException {
if (singleton != null) {
throw new IllegalStateException(
ConfigService.class.getSimpleName() + " already initialized.");
}
File configFile = getConfigFile();
try {
Properties config = loadProperties(configFile);
singleton = new ConfigService(config);
} catch (ConfigurationException e) {
throw new ConfigurationException("Error loading configuration from the file ["
+ configFile + "]: " + e.getMessage(), e);
}
}
private static File getConfigFile() throws FileNotFoundException, ConfigurationException {
File configFile;
String configFilePath = System.getProperty(CONFIG_SYSTEM_PROPERTY);
if (configFilePath != null && configFilePath.trim().length() > 0) {
configFile = new File(configFilePath);
if (!configFile.exists() || !configFile.canRead()) {
throw new FileNotFoundException("Could not find or read config file: ["
+ configFile.getAbsolutePath() + "]");
}
} else if (canLoadDefaultProperties(UNIX_JINSIGHT_CONF_DIR)) {
configFile = new File(UNIX_JINSIGHT_CONF_DIR, DEFAULT_CONFIG_FILE_NAME);
} else if (canLoadDefaultProperties(JINSIGHT_HOME)) {
configFile = new File(JINSIGHT_HOME, DEFAULT_CONFIG_FILE_NAME);
} else {
throw new ConfigurationException("Could not find configuration file. "
+ "Set the path to configuration file using the system property \""
+ CONFIG_SYSTEM_PROPERTY + "\"");
}
return configFile;
}
private static boolean canLoadDefaultProperties(File folder) {
File configFile = new File(folder, DEFAULT_CONFIG_FILE_NAME);
return (configFile.exists() && configFile.canRead());
}
private static Properties loadProperties(File configFilePath) throws IOException {
Properties config = new Properties();
try (InputStream inputStream = new BufferedInputStream(new FileInputStream(configFilePath))) {
config.load(inputStream);
}
// override with system properties, if present
config.putAll(loadSystemProperties());
return config;
}
private static Map<String, Object> loadSystemProperties() {
Map<String, Object> systemProperties = new HashMap<>();
String reporter = getProperty(REPORTER_PROPERTY_NAME);
if(reporter != null){
systemProperties.put(REPORTER_PROPERTY_NAME, reporter);
}
String accessToken = getProperty(ACCESS_TOKEN_PROPERTY_NAME);
if(accessToken != null){
systemProperties.put(ACCESS_TOKEN_PROPERTY_NAME, accessToken);
}
String apiEndpoint = getProperty(API_ENDPOINT_PROPERTY_NAME);
if(apiEndpoint != null){
systemProperties.put(API_ENDPOINT_PROPERTY_NAME, apiEndpoint);
}
String globalTags = getProperty(GLOBAL_TAGS_PROPERTY_NAME);
if(globalTags != null){
systemProperties.put(GLOBAL_TAGS_PROPERTY_NAME, globalTags);
}
return systemProperties;
}
private static String getProperty(String propertyName) {
String updatedPropertyName = propertyName;
if(!propertyName.contains(".")) {
updatedPropertyName = "jinsight." + propertyName;
}
String propertyValue = System.getenv(updatedPropertyName);
if(propertyValue == null || propertyValue.equals("")){
propertyValue = System.getProperty(updatedPropertyName);
}
return propertyValue != null && !propertyValue.equals("") ? propertyValue : null;
}
private Sanitizer readSanitizer(Properties config) {
String configSanitizer = config.getProperty("apptuit.sanitizer");
if (configSanitizer != null && !configSanitizer.equals("")) {
try {
if (configSanitizer.trim().equalsIgnoreCase("PROMETHEUS_SANITIZER")) {
return Sanitizer.PROMETHEUS_SANITIZER;
} else if (configSanitizer.trim().equalsIgnoreCase("APPTUIT_SANITIZER")) {
return Sanitizer.APPTUIT_SANITIZER;
} else if (configSanitizer.trim().equalsIgnoreCase("NO_OP_SANITIZER")) {
return Sanitizer.NO_OP_SANITIZER;
} else {
throw new IllegalArgumentException();
}
} catch (IllegalArgumentException e) {
LOGGER.severe("Un-supported sanitization type [" + configSanitizer + "]. "
+ "Using default sanitization type: [" + Sanitizer.DEFAULT_SANITIZER + "]");
LOGGER.log(Level.FINE, e.toString(), e);
}
}
return Sanitizer.DEFAULT_SANITIZER;
}
private ReporterType readReporter(Properties config) {
String configReporter = config.getProperty(REPORTER_PROPERTY_NAME);
if (configReporter != null && !configReporter.equals("")) {
try {
return ReporterType.valueOf(configReporter.trim().toUpperCase());
} catch (IllegalArgumentException e) {
LOGGER.severe("Un-supported reporting type [" + configReporter + "]. "
+ "Using default reporting type: [" + DEFAULT_REPORTER_TYPE + "]");
LOGGER.log(Level.FINE, e.toString(), e);
}
}
return DEFAULT_REPORTER_TYPE;
}
private ReportingMode readReportingMode(Properties config) {
String configMode = config.getProperty(REPORTING_MODE_PROPERTY_NAME);
if (configMode != null && !configMode.equals("")) {
try {
return ReportingMode.valueOf(configMode.trim().toUpperCase());
} catch (IllegalArgumentException e) {
LOGGER.severe("Un-supported reporting mode [" + configMode + "]. "
+ "Using default reporting mode: [" + DEFAULT_REPORTING_MODE + "]");
LOGGER.log(Level.FINE, e.toString(), e);
}
}
return DEFAULT_REPORTING_MODE;
}
private String readPrometheusMetricsPath(Properties config) {
String configPath = config.getProperty(PROMETHEUS_METRICS_PATH);
if (configPath != null && !configPath.equals("")) {
return configPath;
}
return DEFAULT_PROMETHEUS_METRICS_PATH;
}
private long readReportingFrequency(Properties config) {
String configFreq = config.getProperty(REPORTING_FREQ_PROPERTY_NAME);
if (configFreq != null) {
try {
return parseDuration(configFreq);
} catch (DateTimeParseException | IllegalArgumentException e) {
LOGGER.severe("Invalid reporting frequency [" + configFreq + "]. "
+ "Using default reporting frequency: [" + DEFAULT_REPORTING_FREQUENCY + "]");
LOGGER.log(Level.FINE, e.toString(), e);
}
}
return parseDuration(DEFAULT_REPORTING_FREQUENCY);
}
private int readPrometheusPort(Properties config) {
String configPort = config.getProperty(PROMETHEUS_EXPORTER_PORT,
DEFAULT_PROMETHEUS_EXPORTER_PORT);
if (configPort != null && !configPort.equals("")) {
try {
return Integer.parseInt(configPort);
} catch (NumberFormatException e) {
LOGGER.severe("Invalid port [" + configPort + "]. "
+ "Using default port: [" + DEFAULT_PROMETHEUS_EXPORTER_PORT + "]");
LOGGER.log(Level.FINE, e.toString(), e);
}
}
return Integer.parseInt(DEFAULT_PROMETHEUS_EXPORTER_PORT);
}
private long parseDuration(String durationString) {
long millis = Duration.parse("PT" + durationString.trim()).toMillis();
if (millis < 0) {
throw new IllegalArgumentException("Frequency cannot be negative");
}
return millis;
}
private void loadGlobalTags(Properties config) throws ConfigurationException {
String tagsString = config.getProperty(GLOBAL_TAGS_PROPERTY_NAME);
if (tagsString != null) {
String[] tvPairs = tagsString.split(",");
for (String tvPair : tvPairs) {
String[] tagAndValue = tvPair.split(":");
if (tagAndValue.length == 2) {
String tag = tagAndValue[0].trim();
String value = tagAndValue[1].trim();
if (value.equalsIgnoreCase(UUID_TEMPLATE_VARIABLE)) {
value = UUID.randomUUID().toString();
} else if (value.equalsIgnoreCase(PID_TEMPLATE_VARIABLE)) {
value = getThisJVMProcessID() + "";
}
if (tag.length() > 0 && value.length() > 0) {
loadedGlobalTags.put(tag, value);
continue;
}
}
throw new ConfigurationException("Error parsing " + GLOBAL_TAGS_PROPERTY_NAME
+ " property: [" + tvPair + "].\n"
+ "Expected format: " + GLOBAL_TAGS_PROPERTY_NAME
+ "=key1:value1,key2:value2,key3:value3");
}
}
}
static int getThisJVMProcessID() throws ConfigurationException {
try {
java.lang.management.RuntimeMXBean runtime =
java.lang.management.ManagementFactory.getRuntimeMXBean();
java.lang.reflect.Field jvm = runtime.getClass().getDeclaredField("jvm");
jvm.setAccessible(true);
sun.management.VMManagement mgmt =
(sun.management.VMManagement) jvm.get(runtime);
java.lang.reflect.Method pidMethod =
mgmt.getClass().getDeclaredMethod("getProcessId");
pidMethod.setAccessible(true);
return (Integer) pidMethod.invoke(mgmt);
} catch (NoSuchFieldException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {
throw new ConfigurationException("Error fetching " + PID_TEMPLATE_VARIABLE + " of JVM", e);
}
}
String getApiToken() {
return apiToken;
}
Map<String, String> getGlobalTags() {
if (globalTags != null) {
return globalTags;
}
globalTags = Collections.unmodifiableMap(createGlobalTagsMap());
return globalTags;
}
private Map<String, String> createGlobalTagsMap() {
Map<String, String> retVal = new HashMap<>(loadedGlobalTags);
if (getReporterType() == ReporterType.APPTUIT && getReportingMode() == ReportingMode.API_PUT) {
String hostname = retVal.get(HOST_TAG_NAME);
if (hostname == null || "".equals(hostname.trim())) {
try {
hostname = InetAddress.getLocalHost().getCanonicalHostName();
} catch (UnknownHostException e) {
hostname = "?";
}
retVal.put(HOST_TAG_NAME, hostname);
}
}
return retVal;
}
URL getApiUrl() {
return apiUrl;
}
public ReporterType getReporterType() {
return reporterType;
}
public ReportingMode getReportingMode() {
return reportingMode;
}
long getReportingFrequency() {
return reportingFrequencyMillis;
}
public int getPrometheusPort() {
return prometheusPort;
}
public Sanitizer getSanitizer() {
return sanitizer;
}
public String getPrometheusMetricsPath() {
return prometheusMetricsPath;
}
public String getAgentVersion() {
return agentVersion;
}
private String loadAgentVersion() {
Enumeration<URL> resources = null;
try {
resources = ConfigService.class.getClassLoader().getResources("META-INF/MANIFEST.MF");
} catch (IOException e) {
LOGGER.log(Level.SEVERE, "Error locating manifests.", e);
}
while (resources != null && resources.hasMoreElements()) {
URL manifestUrl = resources.nextElement();
try (InputStream resource = manifestUrl.openStream()) {
Manifest manifest = new Manifest(resource);
Attributes mainAttributes = manifest.getMainAttributes();
if (mainAttributes != null) {
String agentClass = mainAttributes.getValue("Agent-Class");
if (Agent.class.getName().equals(agentClass)) {
String agentVersion = mainAttributes.getValue("Agent-Version");
if (agentVersion != null) {
return agentVersion;
}
break;
}
}
} catch (IOException e) {
LOGGER.log(Level.SEVERE, "Error loading manifest from [" + manifestUrl + "]", e);
}
}
return "?";
}
}
|
0
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/ConfigurationException.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.jinsight;
/**
* This exception is thrown when there is a configuration problem.
*
* @author Rajiv Shivane
*/
public class ConfigurationException extends Exception {
public ConfigurationException(String message) {
super(message);
}
public ConfigurationException(String message, Throwable cause) {
super(message, cause);
}
public ConfigurationException(Throwable cause) {
super(cause);
}
}
|
0
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/ContextualModuleLoader.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.jinsight;
import ai.apptuit.metrics.jinsight.ContextualModuleLoader.ModuleClassLoader;
import java.io.File;
import java.io.IOException;
import java.lang.ref.SoftReference;
import java.net.URL;
import java.net.URLClassLoader;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Map;
import java.util.WeakHashMap;
import org.jboss.byteman.modules.ModuleSystem;
import org.jboss.byteman.rule.helper.Helper;
/**
* @author Rajiv Shivane
*/
public class ContextualModuleLoader implements ModuleSystem<ModuleClassLoader> {
private final Map<ClassLoader, SoftReference<ModuleClassLoader>> moduleLoaders = Collections
.synchronizedMap(new WeakHashMap<>());
public void initialize(String args) {
if (!args.isEmpty()) {
Helper.err("Unexpected module system arguments: " + args);
}
}
public ModuleClassLoader createLoader(ClassLoader triggerClassLoader, String[] imports) {
if (imports.length > 0) {
throw new IllegalArgumentException("IMPORTs are not supported");
}
ModuleClassLoader moduleClassLoader = getModuleClassLoader(triggerClassLoader);
if (moduleClassLoader != null) {
return moduleClassLoader;
}
synchronized (moduleLoaders) {
//Double check idiom
moduleClassLoader = getModuleClassLoader(triggerClassLoader);
if (moduleClassLoader != null) {
return moduleClassLoader;
}
moduleClassLoader = AccessController.doPrivileged(
(PrivilegedAction<ModuleClassLoader>) () -> new ModuleClassLoader(triggerClassLoader));
//Since there are no strong references to moduleClassloader, it might be collected
//We should probably hold a PhantomReference to moduleClassloader
//that is collected only after the triggerClassloader is collected
moduleLoaders.put(triggerClassLoader, new SoftReference<>(moduleClassLoader));
return moduleClassLoader;
}
}
private ModuleClassLoader getModuleClassLoader(ClassLoader triggerClassLoader) {
SoftReference<ModuleClassLoader> reference = moduleLoaders.get(triggerClassLoader);
if (reference != null) {
ModuleClassLoader moduleClassLoader = reference.get();
if (moduleClassLoader != null) {
return moduleClassLoader;
}
}
return null;
}
public void destroyLoader(ModuleClassLoader helperLoader) {
moduleLoaders.remove(helperLoader.getParent());
}
public Class<?> loadHelperAdapter(ModuleClassLoader helperLoader, String helperAdapterName,
byte[] classBytes) {
return helperLoader.addClass(helperAdapterName, classBytes);
}
public static class ModuleClassLoader extends URLClassLoader {
private static final URL[] SYS_CLASS_PATH = getSystemClassPath();
public ModuleClassLoader(ClassLoader cl) {
super(SYS_CLASS_PATH, cl);
}
private static URL[] getSystemClassPath() {
String cp = System.getProperty("java.class.path");
if (cp == null || cp.isEmpty()) {
String initialModuleName = System.getProperty("jdk.module.main");
cp = initialModuleName == null ? "" : null;
}
ArrayList<URL> path = new ArrayList<>();
if (cp != null) {
int off = 0;
int next;
do {
next = cp.indexOf(File.pathSeparator, off);
String element = next == -1 ? cp.substring(off) : cp.substring(off, next);
if (!element.isEmpty()) {
try {
URL url = (new File(element)).getCanonicalFile().toURI().toURL();
path.add(url);
} catch (IOException ignored) {
//Ignore invalid urls
}
}
off = next + 1;
} while (next != -1);
}
path.add(ContextualModuleLoader.class.getProtectionDomain().getCodeSource().getLocation());
return path.toArray(new URL[0]);
}
public Class<?> addClass(String name, byte[] bytes)
throws ClassFormatError {
Class<?> cl = defineClass(name, bytes, 0, bytes.length);
resolveClass(cl);
return cl;
}
@Override
public Class<?> loadClass(String name) throws ClassNotFoundException {
if (name.startsWith("ai.apptuit.metrics.jinsight.modules.")) {
Class<?> clazz = findLoadedClass(name);
if (clazz != null) {
return clazz;
}
synchronized (this) {
clazz = findClass(name);
resolveClass(clazz);
return clazz;
}
} else if (name.startsWith("ai.apptuit.metrics.jinsight.")) {
//If jinsight.jar is added to the war, by mistake, we should always go to sys classloader
return ClassLoader.getSystemClassLoader().loadClass(name);
}
return super.loadClass(name);
}
}
}
|
0
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/MetricRegistryCollection.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.jinsight;
import static java.nio.charset.StandardCharsets.UTF_8;
import com.codahale.metrics.Counter;
import com.codahale.metrics.Gauge;
import com.codahale.metrics.Histogram;
import com.codahale.metrics.Meter;
import com.codahale.metrics.Metric;
import com.codahale.metrics.MetricFilter;
import com.codahale.metrics.MetricRegistry;
import com.codahale.metrics.Snapshot;
import com.codahale.metrics.Timer;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.lang.ref.WeakReference;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Collections;
import java.util.Map;
import java.util.SortedMap;
import java.util.TreeMap;
import java.util.WeakHashMap;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import java.util.function.Function;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* @author Rajiv Shivane
*/
public class MetricRegistryCollection {
private static final Logger LOGGER = Logger.getLogger(MetricRegistryCollection.class.getName());
private static final MetricRegistryCollection SINGLETON = new MetricRegistryCollection();
private final AggregatedMetricRegistry aggregatedMetricRegistry = new AggregatedMetricRegistry();
private MetricRegistryCollection() {
}
void initialize(MetricRegistry jinsightRegistry) {
registerUnchecked(jinsightRegistry);
}
public static MetricRegistryCollection getInstance() {
return SINGLETON;
}
public boolean register(Object metricRegistry) {
if (!RegistryService.getRegistryService().isInitialized()) {
throw new IllegalStateException("JInsight not initialized - cannot report ");
}
return registerUnchecked(metricRegistry);
}
private boolean registerUnchecked(Object metricRegistry) {
return aggregatedMetricRegistry.registerMetricRegistry(metricRegistry);
}
public boolean deRegister(Object metricRegistry) {
return aggregatedMetricRegistry.deRegisterMetricRegistry(metricRegistry);
}
MetricRegistry getAggregatedMetricRegistry() {
return aggregatedMetricRegistry;
}
private static class MetricRegistryWrapper {
public enum MetricType {
Gauge("Gauge", GaugeWrapper::new),
Counter("Counter", CounterWrapper::new),
Histogram("Histogram", HistogramWrapper::new),
Meter("Meter", MeterWrapper::new),
Timer("Timer", TimerWrapper::new);
private String type;
private Function constructor;
MetricType(String type, Function o) {
this.type = type;
constructor = o;
}
public Method getAccessor(Object delegate) throws NoSuchMethodException {
Class<?> klass = delegate.getClass();
Method method = klass.getMethod("get" + type + "s");
method.setAccessible(true);
return method;
}
@SuppressWarnings("unchecked")
public <T extends Metric> T getWrappedValue(Object value) {
return (T) constructor.apply(value);
}
}
private final Map<MetricType, Method> methods = new WeakHashMap<>();
private final WeakReference reference;
public MetricRegistryWrapper(Object delegate) {
if (delegate == null) {
throw new IllegalArgumentException("Registry cannot be null");
}
this.reference = new WeakReference<>(delegate);
}
private Object getDelegate() {
return reference.get();
}
@SuppressWarnings("unchecked")
public <T extends Metric> void addMetrics(TreeMap<String, T> metrics, MetricType type, MetricFilter filter) {
try {
Method method = getAccessorMethod(type);
Map<String, Object> result = (Map<String, Object>) method.invoke(getDelegate());
for (Map.Entry<String, Object> entry : result.entrySet()) {
Metric metric = type.getWrappedValue(entry.getValue());
String metricName = entry.getKey();
if (filter.matches(metricName, metric)) {
metrics.put(metricName, (T) metric);
}
}
} catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException e) {
LOGGER.log(Level.SEVERE, "Error collecting metrics from [" + getDelegate() + "]", e);
}
}
private <T extends Metric> Method getAccessorMethod(MetricType type) throws NoSuchMethodException {
Method method = methods.get(type);
if (method == null) {
method = type.getAccessor(getDelegate());
methods.put(type, method);
}
return method;
}
private static Object invokeOnDelegate(Object delegate, String methodName) {
try {
Method method = delegate.getClass().getMethod(methodName);
method.setAccessible(true);
return method.invoke(delegate);
} catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {
throw new RuntimeException(e);
}
}
private static Object invokeOnDelegate(Object delegate, String methodName, double arg) {
try {
Method method = delegate.getClass().getMethod(methodName, double.class);
method.setAccessible(true);
return method.invoke(delegate, arg);
} catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {
throw new RuntimeException(e);
}
}
private static class GaugeWrapper implements Gauge {
private Object delegate;
public GaugeWrapper(Object delegate) {
this.delegate = delegate;
}
@Override
public Object getValue() {
return invokeOnDelegate(delegate, "getValue");
}
}
private static class CounterWrapper extends Counter {
private Object delegate;
public CounterWrapper(Object delegate) {
this.delegate = delegate;
}
@Override
public void inc() {
throw new UnsupportedOperationException();
}
@Override
public void inc(long n) {
throw new UnsupportedOperationException();
}
@Override
public void dec() {
throw new UnsupportedOperationException();
}
@Override
public void dec(long n) {
throw new UnsupportedOperationException();
}
@Override
public long getCount() {
return (long) invokeOnDelegate(delegate, "getCount");
}
}
private static class MeterWrapper extends Meter {
private Object delegate;
public MeterWrapper(Object delegate) {
this.delegate = delegate;
}
@Override
public void mark() {
throw new UnsupportedOperationException();
}
@Override
public void mark(long n) {
throw new UnsupportedOperationException();
}
@Override
public long getCount() {
return (long) invokeOnDelegate(delegate, "getCount");
}
@Override
public double getFifteenMinuteRate() {
return (double) invokeOnDelegate(delegate, "getFifteenMinuteRate");
}
@Override
public double getFiveMinuteRate() {
return (double) invokeOnDelegate(delegate, "getFiveMinuteRate");
}
@Override
public double getMeanRate() {
return (double) invokeOnDelegate(delegate, "getMeanRate");
}
@Override
public double getOneMinuteRate() {
return (double) invokeOnDelegate(delegate, "getOneMinuteRate");
}
}
private static class TimerWrapper extends Timer {
private Object delegate;
public TimerWrapper(Object delegate) {
this.delegate = delegate;
}
@Override
public void update(long duration, TimeUnit unit) {
throw new UnsupportedOperationException();
}
@Override
public <T> T time(Callable<T> event) {
throw new UnsupportedOperationException();
}
@Override
public void time(Runnable event) {
throw new UnsupportedOperationException();
}
@Override
public Context time() {
throw new UnsupportedOperationException();
}
@Override
public long getCount() {
return (long) invokeOnDelegate(delegate, "getCount");
}
@Override
public double getFifteenMinuteRate() {
return (double) invokeOnDelegate(delegate, "getFifteenMinuteRate");
}
@Override
public double getFiveMinuteRate() {
return (double) invokeOnDelegate(delegate, "getFiveMinuteRate");
}
@Override
public double getMeanRate() {
return (double) invokeOnDelegate(delegate, "getMeanRate");
}
@Override
public double getOneMinuteRate() {
return (double) invokeOnDelegate(delegate, "getOneMinuteRate");
}
@Override
public Snapshot getSnapshot() {
return new SnapshotWrapper(invokeOnDelegate(delegate, "getSnapshot"));
}
}
private static class HistogramWrapper extends Histogram {
private Object delegate;
public HistogramWrapper(Object delegate) {
super(null);
this.delegate = delegate;
}
@Override
public void update(int value) {
throw new UnsupportedOperationException();
}
@Override
public void update(long value) {
throw new UnsupportedOperationException();
}
@Override
public long getCount() {
try {
Method method = delegate.getClass().getMethod("getCount");
method.setAccessible(true);
return (long) method.invoke(delegate);
} catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {
throw new RuntimeException(e);
}
}
@Override
public Snapshot getSnapshot() {
try {
Method method = delegate.getClass().getMethod("getSnapshot");
method.setAccessible(true);
return new SnapshotWrapper(method.invoke(delegate));
} catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {
throw new RuntimeException(e);
}
}
}
private static class SnapshotWrapper extends Snapshot {
private Object delegate;
public SnapshotWrapper(Object delegate) {
this.delegate = delegate;
}
@Override
public double getValue(double quantile) {
return (double) invokeOnDelegate(delegate, "getValue", quantile);
}
@Override
public long[] getValues() {
return (long[]) invokeOnDelegate(delegate, "getValues");
}
@Override
public int size() {
return (int) invokeOnDelegate(delegate, "size");
}
@Override
public long getMax() {
return (long) invokeOnDelegate(delegate, "getMax");
}
@Override
public double getMean() {
return (double) invokeOnDelegate(delegate, "getMean");
}
@Override
public long getMin() {
return (long) invokeOnDelegate(delegate, "getMin");
}
@Override
public double getStdDev() {
return (double) invokeOnDelegate(delegate, "getStdDev");
}
@Override
public void dump(OutputStream output) {
try (PrintWriter out = new PrintWriter(new OutputStreamWriter(output, UTF_8))) {
for (long value : getValues()) {
out.printf("%d%n", value);
}
}
}
}
}
private static class AggregatedMetricRegistry extends MetricRegistry {
private final Map<Object, MetricRegistryWrapper> registries = new WeakHashMap<>();
private final ReadWriteLock lock = new ReentrantReadWriteLock();
private final Lock writeLock = lock.writeLock();
private final Lock readLock = lock.readLock();
public boolean registerMetricRegistry(Object metricRegistry) {
writeLock.lock();
try {
if (registries.containsKey(metricRegistry)) {
return false;
}
registries.put(metricRegistry, new MetricRegistryWrapper(metricRegistry));
return true;
} finally {
writeLock.unlock();
}
}
public boolean deRegisterMetricRegistry(Object metricRegistry) {
writeLock.lock();
try {
return registries.remove(metricRegistry) != null;
} finally {
writeLock.unlock();
}
}
@Override
public SortedMap<String, Gauge> getGauges(MetricFilter filter) {
return getMetrics(MetricRegistryWrapper.MetricType.Gauge, filter);
}
@Override
public SortedMap<String, Counter> getCounters(MetricFilter filter) {
return getMetrics(MetricRegistryWrapper.MetricType.Counter, filter);
}
@Override
public SortedMap<String, Histogram> getHistograms(MetricFilter filter) {
return getMetrics(MetricRegistryWrapper.MetricType.Histogram, filter);
}
@Override
public SortedMap<String, Meter> getMeters(MetricFilter filter) {
return getMetrics(MetricRegistryWrapper.MetricType.Meter, filter);
}
@Override
public SortedMap<String, Timer> getTimers(MetricFilter filter) {
return getMetrics(MetricRegistryWrapper.MetricType.Timer, filter);
}
@Override
public Map<String, Metric> getMetrics() {
Map<String, Metric> metrics = new TreeMap<>();
metrics.putAll(getGauges(MetricFilter.ALL));
metrics.putAll(getCounters(MetricFilter.ALL));
metrics.putAll(getHistograms(MetricFilter.ALL));
metrics.putAll(getMeters(MetricFilter.ALL));
metrics.putAll(getTimers(MetricFilter.ALL));
return metrics;
}
private <T extends Metric> SortedMap<String, T> getMetrics(MetricRegistryWrapper.MetricType type,
MetricFilter filter) {
final TreeMap<String, T> retVal = new TreeMap<>();
readLock.lock();
try {
for (MetricRegistryWrapper wrapper : registries.values()) {
wrapper.addMetrics(retVal, type, filter);
}
} finally {
readLock.unlock();
}
return Collections.unmodifiableSortedMap(retVal);
}
}
}
|
0
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/PromHttpServer.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.jinsight;
import com.sun.net.httpserver.HttpExchange;
import com.sun.net.httpserver.HttpHandler;
import io.prometheus.client.Collector.MetricFamilySamples;
import io.prometheus.client.CollectorRegistry;
import io.prometheus.client.exporter.HTTPServer;
import io.prometheus.client.exporter.common.TextFormat;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.InetSocketAddress;
import java.nio.charset.StandardCharsets;
import java.util.Enumeration;
import java.util.Set;
import java.util.zip.GZIPOutputStream;
public class PromHttpServer extends HTTPServer {
@SuppressWarnings("squid:S5164")
private static final ThreadLocal<ByteArrayOutputStream> THREAD_LOCAL_BUFFER = ThreadLocal
.withInitial(() -> new ByteArrayOutputStream(1 << 20));
private CollectorRegistry registry;
/**
* constructor for the PromHttpServer.
*/
public PromHttpServer(InetSocketAddress address,
CollectorRegistry registry,
boolean daemon) throws IOException {
super(address, registry, daemon);
this.registry = registry;
this.server.removeContext("/");
this.server.removeContext("/metrics");
}
/**
* to set the context(endpoint).
*
* @param endPoint it should be a string
* returns the endPoint which is set
*/
public String setContext(String endPoint) {
HttpHandler mHandler = new HttpMetricHandler(this.registry);
String tempEndPoint = endPoint;
if (endPoint == null || endPoint.equals("")) {
tempEndPoint = "/metrics"; //default end point
}
this.server.createContext(tempEndPoint, mHandler);
return tempEndPoint;
}
private static class HttpMetricHandler implements HttpHandler {
private CollectorRegistry registry;
HttpMetricHandler(CollectorRegistry registry) {
this.registry = registry;
}
public void handle(HttpExchange t) throws IOException {
String query = t.getRequestURI().getRawQuery();
ByteArrayOutputStream baos = THREAD_LOCAL_BUFFER.get();
baos.reset();
OutputStreamWriter osw = new OutputStreamWriter(baos, StandardCharsets.UTF_8);
Set<String> includedNames = parseQuery(query);
Enumeration<MetricFamilySamples> mfs;
if(includedNames.isEmpty()) {
mfs = registry.metricFamilySamples();
}else {
mfs = registry.filteredMetricFamilySamples(includedNames);
}
TextFormat.write004(osw, mfs);
osw.flush();
osw.close();
baos.flush();
baos.close();
t.getResponseHeaders().set("Content-Type", TextFormat.CONTENT_TYPE_004);
if (shouldUseCompression(t)) {
t.getResponseHeaders().set("Content-Encoding", "gzip");
t.sendResponseHeaders(HttpURLConnection.HTTP_OK, 0);
final GZIPOutputStream os = new GZIPOutputStream(t.getResponseBody());
baos.writeTo(os);
os.close();
} else {
t.getResponseHeaders().set("Content-Length", String.valueOf(baos.size()));
t.sendResponseHeaders(HttpURLConnection.HTTP_OK, baos.size());
baos.writeTo(t.getResponseBody());
}
t.close();
}
}
}
|
0
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/RegistryService.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.jinsight;
import ai.apptuit.metrics.client.Sanitizer;
import ai.apptuit.metrics.client.TagEncodedMetricName;
import ai.apptuit.metrics.dropwizard.ApptuitReporter.ReportingMode;
import ai.apptuit.metrics.dropwizard.ApptuitReporterFactory;
import ai.apptuit.metrics.jinsight.modules.jvm.JvmMetricSet;
import com.codahale.metrics.MetricRegistry;
import com.codahale.metrics.ScheduledReporter;
import io.prometheus.client.CollectorRegistry;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.URL;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* Provides access to the MetricRegistry that is pre-configured to use {@link ai.apptuit.metrics.dropwizard}. Rest the
* Agent runtime classes use this registry to create metrics.
*
* @author Rajiv Shivane
*/
public class RegistryService {
private static final Logger LOGGER = Logger.getLogger(RegistryService.class.getName());
private static final RegistryService singleton = new RegistryService();
private MetricRegistry registry = new MetricRegistry();
private Sanitizer sanitizer = null;
private boolean initialized = false;
private RegistryService() {
}
RegistryService(ConfigService configService, ApptuitReporterFactory factory) {
initialize(configService, factory);
}
boolean initialize() {
initialize(ConfigService.getInstance(), new ApptuitReporterFactory());
return initialized;
}
private void initialize(ConfigService configService, ApptuitReporterFactory factory) {
registry.registerAll(new JvmMetricSet());
String buildInfoMetricName = TagEncodedMetricName.decode("jinsight").submetric("build_info")
.withTags("version", configService.getAgentVersion()).toString();
registry.gauge(buildInfoMetricName, () -> () -> 1L);
MetricRegistryCollection metricRegistryCollection = MetricRegistryCollection.getInstance();
metricRegistryCollection.initialize(registry);
startReportingOnRegistryCollection(configService, factory, metricRegistryCollection);
}
private void startReportingOnRegistryCollection(ConfigService configService,
ApptuitReporterFactory factory, MetricRegistryCollection metricRegistryCollection) {
MetricRegistry aggregatedMetricRegistry = metricRegistryCollection.getAggregatedMetricRegistry();
ConfigService.ReporterType reporterType = configService.getReporterType();
if (reporterType == ConfigService.ReporterType.APPTUIT) {
ReportingMode mode = configService.getReportingMode();
sanitizer = configService.getSanitizer();
ScheduledReporter reporter = createReporter(factory, configService.getGlobalTags(),
configService.getApiToken(), configService.getApiUrl(), mode, aggregatedMetricRegistry);
reporter.start(configService.getReportingFrequency(), TimeUnit.MILLISECONDS);
initialized = true;
} else if (reporterType == ConfigService.ReporterType.PROMETHEUS) {
CollectorRegistry collectorRegistry = CollectorRegistry.defaultRegistry;
ApptuitDropwizardExports collector = new ApptuitDropwizardExports(aggregatedMetricRegistry,
new TagDecodingSampleBuilder(configService.getGlobalTags()));
collectorRegistry.register(collector);
try {
int port = configService.getPrometheusPort();
InetSocketAddress address = new InetSocketAddress(port);
PromHttpServer server = new PromHttpServer(address, collectorRegistry, true);
server.setContext(configService.getPrometheusMetricsPath());
initialized = true;
} catch (IOException e) {
LOGGER.log(Level.SEVERE, "Error while creating http port.", e);
}
} else {
throw new IllegalStateException();
}
}
public boolean isInitialized() {
return initialized;
}
public static MetricRegistry getMetricRegistry() {
RegistryService registryService = getRegistryService();
if (!registryService.isInitialized()) {
throw new IllegalStateException("RegistryService not yet initialized.");
}
return registryService.registry;
}
public static RegistryService getRegistryService() {
return singleton;
}
private ScheduledReporter createReporter(ApptuitReporterFactory factory,
Map<String, String> globalTags,
String apiToken, URL apiUrl,
ReportingMode reportingMode,
MetricRegistry registry) {
factory.setRateUnit(TimeUnit.SECONDS);
factory.setDurationUnit(TimeUnit.MILLISECONDS);
globalTags.forEach(factory::addGlobalTag);
factory.setApiKey(apiToken);
factory.setApiUrl(apiUrl != null ? apiUrl.toString() : null);
factory.setReportingMode(reportingMode);
if (sanitizer != null) {
factory.setSanitizer(sanitizer);
}
return factory.build(registry);
}
}
|
0
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/TagDecodingSampleBuilder.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.jinsight;
import ai.apptuit.metrics.client.TagEncodedMetricName;
import io.prometheus.client.Collector;
import io.prometheus.client.dropwizard.samplebuilder.SampleBuilder;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* Extracts Metric names, label values and label names from dropwizardName, additionalLabels and additionalLabelValues.
* dropwizard has format MetricName[labelName1:labelValue1,labelName2:labelValue2.....]
*/
public class TagDecodingSampleBuilder implements SampleBuilder {
private final PrometheusTimeSeriesNameCache cache = new PrometheusTimeSeriesNameCache(250000);
private final Map<String, String> globalTags;
public TagDecodingSampleBuilder(Map<String, String> globalTags) {
this.globalTags = globalTags;
}
@Override
public Collector.MetricFamilySamples.Sample createSample(final String dropwizardName,
final String nameSuffix,
final List<String> additionalLabelNames,
final List<String> additionalLabelValues,
final double value) {
PrometheusTimeSeriesName timeSeries;
timeSeries = cache.getPrometheusTimeSeriesName(dropwizardName, nameSuffix, additionalLabelNames,
additionalLabelValues);
return new Collector.MetricFamilySamples.Sample(
timeSeries.metricName,
timeSeries.labelNames,
timeSeries.labelValues,
value);
}
private class PrometheusTimeSeriesNameCache {
private Map<String, PrometheusTimeSeriesName> cachedTSNs = null;
public PrometheusTimeSeriesNameCache(int capacity) {
if (capacity > 0) {
cachedTSNs = Collections.synchronizedMap(
new LRUCache<>(capacity));
}
}
private PrometheusTimeSeriesName getPrometheusTimeSeriesName(String dropwizardName, String nameSuffix,
List<String> additionalLabelNames, List<String> additionalLabelValues) {
PrometheusTimeSeriesName timeSeries;
if (cachedTSNs != null && (additionalLabelNames == null || additionalLabelNames.size() <= 1)) {
String cacheKey = dropwizardName;
if (nameSuffix != null) {
cacheKey += "\n" + nameSuffix;
}
if (additionalLabelNames != null && additionalLabelNames.size() == 1) {
cacheKey += "\n" + additionalLabelNames.get(0);
cacheKey += "\n" + additionalLabelValues.get(0);
}
timeSeries = cachedTSNs.get(cacheKey);
if (timeSeries == null) {
timeSeries = new PrometheusTimeSeriesName(dropwizardName, nameSuffix, additionalLabelNames,
additionalLabelValues);
cachedTSNs.put(cacheKey, timeSeries);
}
} else {
timeSeries = new PrometheusTimeSeriesName(dropwizardName, nameSuffix, additionalLabelNames,
additionalLabelValues);
}
return timeSeries;
}
}
private static class LRUCache<K, V> extends LinkedHashMap<K, V> {
private final int capacity;
public LRUCache(int capacity) {
super(capacity + 1, 1.0f, true);
this.capacity = capacity;
}
@Override
protected boolean removeEldestEntry(Map.Entry<K, V> eldest) {
return (size() > this.capacity);
}
}
private class PrometheusTimeSeriesName {
private final String metricName;
private final List<String> labelNames;
private final List<String> labelValues;
public PrometheusTimeSeriesName(final String dropwizardName,
final String nameSuffix,
final List<String> additionalLabelNames,
final List<String> additionalLabelValues) {
final String suffix = nameSuffix == null ? "" : nameSuffix;
TagEncodedMetricName mn = TagEncodedMetricName.decode(dropwizardName);
final String metric = mn.getMetricName() + suffix;
Map<String, String> tags = mn.getTags();
int labelCount = tags.size();
if (globalTags != null) {
labelCount += globalTags.size();
}
if (additionalLabelNames != null) {
labelCount += additionalLabelNames.size();
}
Set<String> labelNames = new LinkedHashSet<>(labelCount);
List<String> labelValues = new ArrayList<>(labelCount);
addLabels(labelNames, labelValues, tags.keySet(), tags.values(), false);
addLabels(labelNames, labelValues, additionalLabelNames, additionalLabelValues, false);
if (globalTags != null) {
addLabels(labelNames, labelValues, globalTags.keySet(), globalTags.values(), true);
}
this.metricName = Collector.sanitizeMetricName(metric);
this.labelNames = new ArrayList<>(labelNames);
this.labelValues = labelValues;
}
private void addLabels(Set<String> labelNames, List<String> labelValues, Collection<String> sourceNames,
Collection<String> sourceValues, boolean skipDuplicate) {
if (sourceNames == null) {
return;
}
Iterator<String> values = sourceValues.iterator();
for (String tag : sourceNames) {
String value = values.next();
String sanitizedName = Collector.sanitizeMetricName(tag);
if (skipDuplicate && labelNames.contains(sanitizedName)) {
continue;
}
labelNames.add(sanitizedName);
labelValues.add(value);
}
}
}
}
|
0
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/TracingMetricRegistry.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.jinsight;
import com.codahale.metrics.Counter;
import com.codahale.metrics.ExponentiallyDecayingReservoir;
import com.codahale.metrics.Gauge;
import com.codahale.metrics.Histogram;
import com.codahale.metrics.Meter;
import com.codahale.metrics.Metric;
import com.codahale.metrics.MetricRegistry;
import com.codahale.metrics.Timer;
import java.util.concurrent.TimeUnit;
import java.util.logging.ConsoleHandler;
import java.util.logging.Formatter;
import java.util.logging.Level;
import java.util.logging.LogRecord;
import java.util.logging.Logger;
/**
* @author Rajiv Shivane
*/
class TracingMetricRegistry extends MetricRegistry {
private static final Logger metricUpdateTracer = createMetricUpdateTracer();
private static Logger createMetricUpdateTracer() {
Logger logger = Logger.getLogger(TracingMetricRegistry.class.getName() + ".metricUpdates");
ConsoleHandler handler = new ConsoleHandler();
handler.setFormatter(new Formatter() {
@Override
public String format(LogRecord record) {
return ">>" + record.getMessage() + "\n";
}
});
logger.addHandler(handler);
logger.setUseParentHandlers(false);
handler.setLevel(Level.ALL);
//logger.setLevel(Level.ALL);
return logger;
}
@Override
public Timer timer(String name) {
return super.timer(name, () -> new TracedTimer(name));
}
@Override
public Timer timer(String name, MetricSupplier<Timer> supplier) {
throw new UnsupportedOperationException();
}
@Override
public Meter meter(String name) {
return super.meter(name, () -> new TracedMeter(name));
}
@Override
public Meter meter(String name, MetricSupplier<Meter> supplier) {
throw new UnsupportedOperationException();
}
@Override
public Counter counter(String name) {
return super.counter(name, () -> new TracedCounter(name));
}
@Override
public Counter counter(String name, MetricSupplier<Counter> supplier) {
throw new UnsupportedOperationException();
}
@Override
public Histogram histogram(String name) {
return super.histogram(name, () -> new TracedHistogram(name));
}
@Override
public Histogram histogram(String name, MetricSupplier<Histogram> supplier) {
throw new UnsupportedOperationException();
}
@Override
public Gauge gauge(String name, MetricSupplier supplier) {
throw new UnsupportedOperationException();
}
protected void onUpdate(TraceableMetric metric) {
String metricType = metric.getClass().getSuperclass().getSimpleName();
metricUpdateTracer.log(Level.FINE, "Updated " + metricType + ":" + metric.getMetricName());
}
interface TraceableMetric extends Metric {
String getMetricName();
}
private class TracedTimer extends Timer implements TraceableMetric {
private String metricName;
public TracedTimer(String metricName) {
this.metricName = metricName;
}
@Override
public void update(long duration, TimeUnit unit) {
super.update(duration, unit);
onUpdate(this);
}
public String getMetricName() {
return metricName;
}
}
private class TracedMeter extends Meter implements TraceableMetric {
private String metricName;
public TracedMeter(String metricName) {
this.metricName = metricName;
}
@Override
public void mark() {
super.mark(1);
onUpdate(this);
}
@Override
public void mark(long n) {
super.mark(n);
onUpdate(this);
}
public String getMetricName() {
return metricName;
}
}
private class TracedCounter extends Counter implements TraceableMetric {
private String metricName;
public TracedCounter(String metricName) {
this.metricName = metricName;
}
@Override
public void inc() {
super.inc(1);
onUpdate(this);
}
@Override
public void inc(long n) {
super.inc(n);
onUpdate(this);
}
@Override
public void dec() {
super.dec(1);
onUpdate(this);
}
@Override
public void dec(long n) {
super.dec(n);
onUpdate(this);
}
public String getMetricName() {
return metricName;
}
}
private class TracedHistogram extends Histogram implements TraceableMetric {
private String metricName;
public TracedHistogram(String metricName) {
super(new ExponentiallyDecayingReservoir());
this.metricName = metricName;
}
@Override
public void update(int value) {
super.update((long) value);
onUpdate(this);
}
@Override
public void update(long value) {
super.update(value);
onUpdate(this);
}
public String getMetricName() {
return metricName;
}
}
}
|
0
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules/common/AbstractRuleSet.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.jinsight.modules.common;
import java.io.PrintStream;
import java.util.List;
/**
* @author Rajiv Shivane
*/
public abstract class AbstractRuleSet {
public abstract List<RuleInfo> getRules();
public static class RuleInfo {
public static final String AT_ENTRY = "AT ENTRY";
public static final String AT_EXIT = "AT EXIT";
public static final String AT_EXCEPTION_EXIT = "AT EXCEPTION EXIT";
public static final String CONSTRUCTOR_METHOD = "<init>";
public static final String CLASS_CONSTRUCTOR = "<clinit>";
private static final String LINEBREAK = String.format("%n");
private String ruleName;
private String className;
private boolean isInterface;
private boolean isIncludeSubclases;
private String methodName;
private String helperName;
private String where = AT_ENTRY;
private String bind;
private String ifcondition = "true";
private String action;
private String imports;
private String compile;
public RuleInfo(String ruleName, String className, boolean isInterface,
boolean isIncludeSubclases, String methodName, String helperName, String where, String bind,
String ifcondition, String action, String imports, String compile) {
this.ruleName = ruleName;
this.className = className;
this.isInterface = isInterface;
this.isIncludeSubclases = isIncludeSubclases;
this.methodName = methodName;
this.helperName = helperName;
if (where != null) {
this.where = where;
}
this.bind = bind;
if (ifcondition != null) {
this.ifcondition = ifcondition;
}
this.action = action;
this.imports = imports;
this.compile = compile;
}
public String generateRule(PrintStream stringBuilder) {
stringBuilder.append("RULE ");
stringBuilder.append(ruleName);
stringBuilder.append(LINEBREAK);
if (isInterface) {
stringBuilder.append("INTERFACE ");
} else {
stringBuilder.append("CLASS ");
}
if (isIncludeSubclases) {
stringBuilder.append("^");
}
stringBuilder.append(className);
stringBuilder.append(LINEBREAK);
stringBuilder.append("METHOD ");
stringBuilder.append(methodName);
stringBuilder.append(LINEBREAK);
stringBuilder.append(where);
stringBuilder.append(LINEBREAK);
if (helperName != null) {
stringBuilder.append("HELPER ");
stringBuilder.append(helperName);
stringBuilder.append(LINEBREAK);
}
if (imports != null) {
stringBuilder.append(imports);
}
if (compile != null) {
stringBuilder.append(compile);
stringBuilder.append(LINEBREAK);
}
if (bind != null) {
stringBuilder.append("BIND ");
stringBuilder.append(bind);
stringBuilder.append(LINEBREAK);
}
stringBuilder.append("IF ");
stringBuilder.append(ifcondition);
stringBuilder.append(LINEBREAK);
stringBuilder.append("DO ");
stringBuilder.append(action);
stringBuilder.append(LINEBREAK);
stringBuilder.append("ENDRULE");
stringBuilder.append(LINEBREAK);
return stringBuilder.toString();
}
}
}
|
0
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules/common/RuleHelper.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.jinsight.modules.common;
import ai.apptuit.metrics.client.TagEncodedMetricName;
import ai.apptuit.metrics.jinsight.RegistryService;
import com.codahale.metrics.Clock;
import com.codahale.metrics.MetricRegistry;
import com.codahale.metrics.Timer;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Collections;
import java.util.Deque;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Map;
import java.util.WeakHashMap;
import java.util.concurrent.TimeUnit;
import java.util.function.Supplier;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.jboss.byteman.rule.Rule;
import org.jboss.byteman.rule.helper.Helper;
/**
* @author Rajiv Shivane
*/
public class RuleHelper extends Helper {
private static final Logger LOGGER = Logger.getLogger(RuleHelper.class.getName());
private static final Map<Object, Map<String, Object>> objectProperties = Collections
.synchronizedMap(new WeakHashMap<>());
private static Method GET_MODULE_METHOD;
private static Method MODULE_GET_NAME_METHOD;
static {
try {
GET_MODULE_METHOD = Class.class.getMethod("getModule");
} catch (NoSuchMethodException e) {
LOGGER.log(Level.FINE, "Can't find Class.getModule method.", e);
}
try {
Class<?> clazz = Class.forName("java.lang.Module");
MODULE_GET_NAME_METHOD = clazz.getMethod("getName");
} catch (NoSuchMethodException e) {
LOGGER.log(Level.FINE, "Can't find Class.getModule method.", e);
} catch (ClassNotFoundException e) {
LOGGER.log(Level.FINE, "Can't find java.lang.Module class.", e);
}
}
public RuleHelper(Rule rule) {
super(rule);
}
public boolean canAccess(Object o) throws InvocationTargetException, IllegalAccessException {
if (GET_MODULE_METHOD ==null)
return true;
Class<?> clazz = o.getClass();
Object module = GET_MODULE_METHOD.invoke(clazz);
Object moduleName = MODULE_GET_NAME_METHOD.invoke(module);
if (moduleName!=null && moduleName.equals("inception.agent"))
return false;
return true;
}
public String setObjectProperty(Object o, String propertyName, String propertyValue) {
return setObjectProperty0(o, propertyName, propertyValue);
}
public Number setObjectProperty(Object o, String propertyName, Number propertyValue) {
return setObjectProperty0(o, propertyName, propertyValue);
}
@SuppressWarnings("unchecked")
private <V> V setObjectProperty0(Object o, String propertyName, V propertyValue) {
Map<String, Object> props = objectProperties
.computeIfAbsent(o, k -> Collections.synchronizedMap(new HashMap<>()));
return (V) props.put(propertyName, propertyValue);
}
@SuppressWarnings("unchecked")
public <V> V getObjectProperty(Object o, String propertyName) {
Map<String, Object> props = objectProperties.get(o);
if (props == null) {
return null;
}
return (V) props.get(propertyName);
}
@SuppressWarnings("unchecked")
public <V> V removeObjectProperty(Object o, String propertyName) {
Map<String, Object> props = objectProperties.get(o);
if (props == null) {
return null;
}
return (V) props.remove(propertyName);
}
public void beginTimedOperation(OperationId operationId) {
OperationContexts.start(operationId);
}
public void endTimedOperation(OperationId operationId, Timer timer) {
endTimedOperation(operationId, () -> timer);
}
public void endTimedOperation(OperationId operationId,
Supplier<Timer> timerSupplier) {
OperationContexts.stop(operationId, timerSupplier);
}
protected Timer getTimer(TagEncodedMetricName metricName) {
MetricRegistry registry = RegistryService.getMetricRegistry();
return registry.timer(metricName.toString());
}
public static final class OperationId {
private String displayName;
public OperationId(String displayName) {
this.displayName = displayName;
}
@Override
public String toString() {
return "OperationId(" + displayName + ")#" + hashCode();
}
}
private static class OperationContexts {
private static final ThreadLocal<Deque<OperationContext>> CONTEXT_STACK = ThreadLocal
.withInitial(LinkedList::new);
private static final Clock clock = Clock.defaultClock();
private static final OperationContext RENTRANT = new OperationContext(new OperationId("NOOP"),
clock);
public static void start(OperationId id) {
Deque<OperationContext> contexts = CONTEXT_STACK.get();
if (!contexts.isEmpty() && lastId() == id) {
contexts.push(RENTRANT);
return;
}
contexts.push(new OperationContext(id, clock));
}
public static void stop(OperationId id, Supplier<Timer> timerSupplier) {
OperationId lastId = lastId();
if (lastId != id) {
//TODO better error handling
LOGGER.severe("Operation Context Mismatch. Expected: " + id + " got " + lastId);
return;
}
OperationContext context = CONTEXT_STACK.get().pop();
if (context == RENTRANT) {
return;
}
Timer timer = timerSupplier.get();
if (timer != null) {
long t = clock.getTick() - context.getStartTime();
timer.update(t, TimeUnit.NANOSECONDS);
}
}
private static OperationId lastId() {
Deque<OperationContext> contexts = CONTEXT_STACK.get();
OperationContext prevContext = null;
Iterator<OperationContext> iterator = contexts.descendingIterator();
while (iterator.hasNext()){
prevContext = iterator.next();
if (prevContext != RENTRANT) {
break;
}
}
return prevContext != null ? prevContext.getId() : null;
}
}
private static class OperationContext {
private final OperationId id;
private final long startTime;
public OperationContext(OperationId id, Clock clock) {
this.id = id;
this.startTime = clock.getTick();
}
public OperationId getId() {
return id;
}
public long getStartTime() {
return startTime;
}
}
}
|
0
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules/common/RuleScriptGenerator.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.jinsight.modules.common;
import ai.apptuit.metrics.jinsight.modules.common.AbstractRuleSet.RuleInfo;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
/**
* @author Rajiv Shivane
*/
public class RuleScriptGenerator {
private final List<AbstractRuleSet> ruleSets = new ArrayList<>();
public RuleScriptGenerator(List<String> helpers) {
for (String helper : helpers) {
try {
Class<?> clazz = Class.forName(helper);
int modifiers = clazz.getModifiers();
if (Modifier.isAbstract(modifiers) || Modifier.isInterface(modifiers)) {
continue;
}
if (!AbstractRuleSet.class.isAssignableFrom(clazz)) {
System.err.println("Not a RuleSet: " + clazz);
continue;
}
AbstractRuleSet ruleSet = (AbstractRuleSet) clazz.newInstance();
ruleSets.add(ruleSet);
} catch (ClassNotFoundException | IllegalAccessException | InstantiationException e) {
System.err.println(e);
}
}
}
public static void main(String[] args) throws IOException {
File outputFile = new File(args[0]);
List<String> helpers = new ArrayList<>(args.length);
for (int i = 1; i < args.length; i++) {
String helper = args[i].replaceAll("\\.class$", "")
.replaceAll("\\\\", ".")
.replaceAll("/", ".")
.replaceAll("^\\.", "");
helpers.add(helper);
}
//System.out.println(outputFile);
//System.out.println(helpers);
FileOutputStream fileOutputStream = new FileOutputStream(outputFile, true);
PrintStream ps = new PrintStream(new BufferedOutputStream(fileOutputStream), false, "UTF-8");
new RuleScriptGenerator(helpers).generateRules(ps);
ps.flush();
ps.close();
}
private void generateRules(PrintStream ps) {
AtomicInteger total = new AtomicInteger(0);
ruleSets.forEach(ruleSet -> {
List<RuleInfo> rules = ruleSet.getRules();
rules.forEach(ruleInfo -> ruleInfo.generateRule(ps));
System.out.println(ruleSet.getClass().getSimpleName() + ": " + rules.size());
total.getAndAdd(rules.size());
});
System.out.println("Rules generated: " + total);
}
}
|
0
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules/ehcache/CacheLifecycleListener.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.jinsight.modules.ehcache;
import com.codahale.metrics.Gauge;
import com.codahale.metrics.MetricRegistry;
import java.util.Set;
import java.util.TreeSet;
import net.sf.ehcache.Cache;
import net.sf.ehcache.CacheException;
import net.sf.ehcache.Ehcache;
import net.sf.ehcache.Status;
import net.sf.ehcache.extension.CacheExtension;
/**
* @author Rajiv Shivane
*/
class CacheLifecycleListener implements CacheExtension {
private final Cache cache;
private final MetricRegistry metricRegistry;
private final Set<String> registeredMetrics = new TreeSet<>();
private Status status;
public CacheLifecycleListener(Cache cache, MetricRegistry metricRegistry) {
this.cache = cache;
this.metricRegistry = metricRegistry;
this.status = Status.STATUS_UNINITIALISED;
}
@Override
public void init() {
register("hits", () -> cache.getStatistics().cacheHitCount());
register("in_memory_hits", () -> cache.getStatistics().localHeapHitCount());
register("off_heap_hits", () -> cache.getStatistics().localOffHeapHitCount());
register("on_disk_hits", () -> cache.getStatistics().localDiskHitCount());
register("misses", () -> cache.getStatistics().cacheMissCount());
register("in_memory_misses", () -> cache.getStatistics().localHeapMissCount());
register("off_heap_misses", () -> cache.getStatistics().localOffHeapMissCount());
register("on_disk_misses", () -> cache.getStatistics().localDiskMissCount());
register("objects", () -> cache.getStatistics().getSize());
register("in_memory_objects", () -> cache.getStatistics().getLocalHeapSize());
register("off_heap_objects", () -> cache.getStatistics().getLocalOffHeapSize());
register("on_disk_objects", () -> cache.getStatistics().getLocalDiskSize());
register("mean_get_time",
() -> cache.getStatistics().cacheGetOperation().latency().average().value());
register("mean_search_time",
() -> cache.getStatistics().cacheSearchOperation().latency().average().value());
register("eviction_count",
() -> cache.getStatistics().cacheEvictionOperation().count().value());
register("searches_per_second",
() -> cache.getStatistics().cacheSearchOperation().rate().value());
register("writer_queue_size", () -> cache.getStatistics().getWriterQueueLength());
status = Status.STATUS_ALIVE;
}
private void register(String metric, Gauge<Number> gauge) {
String name = EhcacheRuleHelper.ROOT_NAME.submetric(metric)
.withTags("cache", this.cache.getName()).toString();
registeredMetrics.add(name);
metricRegistry.register(name, gauge);
}
@Override
public void dispose() throws CacheException {
registeredMetrics.forEach(metricRegistry::remove);
status = Status.STATUS_SHUTDOWN;
}
@Override
public CacheExtension clone(Ehcache cache) throws CloneNotSupportedException {
throw new CloneNotSupportedException();
}
@Override
public Status getStatus() {
return status;
}
}
|
0
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules/ehcache/EhcacheRuleHelper.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.jinsight.modules.ehcache;
import ai.apptuit.metrics.client.TagEncodedMetricName;
import ai.apptuit.metrics.jinsight.RegistryService;
import ai.apptuit.metrics.jinsight.modules.common.RuleHelper;
import com.codahale.metrics.MetricRegistry;
import com.codahale.metrics.Timer;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import net.sf.ehcache.Cache;
import net.sf.ehcache.CacheException;
import org.jboss.byteman.rule.Rule;
/**
* @author Rajiv Shivane
*/
public class EhcacheRuleHelper extends RuleHelper {
public static final TagEncodedMetricName ROOT_NAME = TagEncodedMetricName.decode("ehcache");
public static final OperationId GET_OPERATION = new OperationId("ehcache.get");
public static final OperationId PUT_OPERATION = new OperationId("ehcache.put");
private static Map<String, Timer> getTimers = new ConcurrentHashMap<>();
private static Map<String, Timer> putTimers = new ConcurrentHashMap<>();
public EhcacheRuleHelper(Rule rule) {
super(rule);
}
public void monitor(Cache cache) {
MetricRegistry registry = RegistryService.getMetricRegistry();
cache.registerCacheExtension(new CacheLifecycleListener(cache, registry) {
@Override
public void dispose() throws CacheException {
getTimers.remove(cache.getName());
putTimers.remove(cache.getName());
super.dispose();
}
});
}
public void onGetEntry(Cache cache) {
beginTimedOperation(GET_OPERATION);
}
public void onGetExit(Cache cache) {
endTimedOperation(GET_OPERATION,
() -> {
return getTimers.computeIfAbsent(cache.getName(), s -> {
String[] tags = new String[]{"op", "get", "cache", cache.getName()};
TagEncodedMetricName metricName = ROOT_NAME.submetric("ops").withTags(tags);
return getTimer(metricName);
});
});
}
public void onPutEntry(Cache cache) {
beginTimedOperation(PUT_OPERATION);
}
public void onPutExit(Cache cache) {
endTimedOperation(PUT_OPERATION,
() -> {
return putTimers.computeIfAbsent(cache.getName(), s -> {
String[] tags = new String[]{"op", "put", "cache", cache.getName()};
TagEncodedMetricName metricName = ROOT_NAME.submetric("ops").withTags(tags);
return getTimer(metricName);
});
});
}
}
|
0
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules/httpasyncclient/HttpAsyncClientRuleHelper.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.jinsight.modules.httpasyncclient;
import ai.apptuit.metrics.client.TagEncodedMetricName;
import ai.apptuit.metrics.jinsight.RegistryService;
import ai.apptuit.metrics.jinsight.modules.common.RuleHelper;
import ai.apptuit.metrics.jinsight.modules.httpurlconnection.UrlConnectionRuleHelper;
import com.codahale.metrics.Clock;
import com.codahale.metrics.Timer;
import java.util.concurrent.TimeUnit;
import org.apache.http.HttpRequest;
import org.apache.http.HttpResponse;
import org.jboss.byteman.rule.Rule;
/**
* @author Rajiv Shivane
*/
public class HttpAsyncClientRuleHelper extends RuleHelper {
public static final TagEncodedMetricName ROOT_NAME = TagEncodedMetricName.decode("http.requests");
private static final String START_TIME_PROPERTY_NAME =
UrlConnectionRuleHelper.class + ".START_TIME";
private static final Clock CLOCK = Clock.defaultClock();
public HttpAsyncClientRuleHelper(Rule rule) {
super(rule);
}
public void onRequestReady(HttpRequest request) {
setObjectProperty(request, START_TIME_PROPERTY_NAME, CLOCK.getTick());
}
public void onResponseReceived(HttpRequest request, HttpResponse response) {
Long startTime = removeObjectProperty(request, START_TIME_PROPERTY_NAME);
if (startTime == null) {
return;
}
long t = Clock.defaultClock().getTick() - startTime;
String method = request.getRequestLine().getMethod();
int statusCode = response.getStatusLine().getStatusCode();
String metricName = ROOT_NAME.withTags(
"method", method,
"status", "" + statusCode).toString();
Timer timer = RegistryService.getMetricRegistry().timer(metricName);
timer.update(t, TimeUnit.NANOSECONDS);
}
}
|
0
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules/httpclient/HttpClientRuleHelper.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.jinsight.modules.httpclient;
import ai.apptuit.metrics.client.TagEncodedMetricName;
import ai.apptuit.metrics.jinsight.modules.common.RuleHelper;
import com.codahale.metrics.Timer;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.apache.http.HttpRequest;
import org.apache.http.HttpResponse;
import org.jboss.byteman.rule.Rule;
/**
* @author Rajiv Shivane
*/
public class HttpClientRuleHelper extends RuleHelper {
public static final TagEncodedMetricName ROOT_NAME = TagEncodedMetricName.decode("http.requests");
private static final OperationId EXECUTE_METHOD_OPERATION_ID = new OperationId("ahc.execute");
private Map<String, Timer> timers = new ConcurrentHashMap<>();
public HttpClientRuleHelper(Rule rule) {
super(rule);
}
public void onExecuteStart(HttpRequest request) {
beginTimedOperation(EXECUTE_METHOD_OPERATION_ID);
}
public void onExecuteEnd(HttpRequest request, HttpResponse response) {
endTimedOperation(EXECUTE_METHOD_OPERATION_ID, () -> {
String method = request.getRequestLine().getMethod();
String status = "" + response.getStatusLine().getStatusCode();
return timers.computeIfAbsent(status + method, s -> {
TagEncodedMetricName metricName = ROOT_NAME.withTags(
"method", method,
"status", status);
return getTimer(metricName);
});
});
}
}
|
0
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules/httpurlconnection/UrlConnectionRuleHelper.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.jinsight.modules.httpurlconnection;
import ai.apptuit.metrics.client.TagEncodedMetricName;
import ai.apptuit.metrics.jinsight.modules.common.RuleHelper;
import com.codahale.metrics.Clock;
import com.codahale.metrics.Timer;
import java.net.HttpURLConnection;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;
import org.jboss.byteman.rule.Rule;
/**
* @author Rajiv Shivane
*/
public class UrlConnectionRuleHelper extends RuleHelper {
public static final TagEncodedMetricName ROOT_NAME = TagEncodedMetricName.decode("http.requests");
private static final String START_TIME_PROPERTY_NAME =
UrlConnectionRuleHelper.class + ".START_TIME";
private static final Clock CLOCK = Clock.defaultClock();
private Map<String, Timer> timers = new ConcurrentHashMap<>();
public UrlConnectionRuleHelper(Rule rule) {
super(rule);
}
public void onConnect(HttpURLConnection urlConnection) {
setObjectProperty(urlConnection, START_TIME_PROPERTY_NAME, CLOCK.getTick());
}
public void onGetInputStream(HttpURLConnection urlConnection, int statusCode) {
Long startTime = removeObjectProperty(urlConnection, START_TIME_PROPERTY_NAME);
if (startTime == null) {
return;
}
long t = Clock.defaultClock().getTick() - startTime;
String method = urlConnection.getRequestMethod();
String status = "" + statusCode;
Timer timer = timers.computeIfAbsent(status + method, s -> {
TagEncodedMetricName metricName = ROOT_NAME.withTags(
"method", method,
"status", status);
return getTimer(metricName);
});
timer.update(t, TimeUnit.NANOSECONDS);
}
}
|
0
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules/jdbc/JdbcRuleHelper.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.jinsight.modules.jdbc;
import ai.apptuit.metrics.client.TagEncodedMetricName;
import ai.apptuit.metrics.jinsight.RegistryService;
import ai.apptuit.metrics.jinsight.modules.common.RuleHelper;
import com.codahale.metrics.MetricRegistry;
import com.codahale.metrics.Timer;
import java.sql.Connection;
import java.sql.PreparedStatement;
import javax.sql.DataSource;
import org.jboss.byteman.rule.Rule;
/**
* @author Rajiv Shivane
*/
public class JdbcRuleHelper extends RuleHelper {
public static final TagEncodedMetricName ROOT_NAME = TagEncodedMetricName.decode("jdbc");
public static final TagEncodedMetricName GET_CONNECTION_NAME = ROOT_NAME
.submetric("ds.getConnection");
public static final TagEncodedMetricName PREPARE_STATEMENT_NAME = ROOT_NAME
.submetric("conn.prepareStatement");
public static final TagEncodedMetricName EXECUTE_STATEMENT_NAME = ROOT_NAME
.submetric("ps.execute");
private static final Timer GET_CONNECTION_TIMER = createTimer(GET_CONNECTION_NAME);
private static final Timer PREPARE_STATEMENT_TIMER = createTimer(PREPARE_STATEMENT_NAME);
private static final OperationId GET_CONNECTION_OPERATION = new OperationId(
GET_CONNECTION_NAME.toString());
private static final OperationId PREPARE_STATEMENT_OPERATION = new OperationId(
PREPARE_STATEMENT_NAME.toString());
private static final OperationId EXECUTE_STATEMENT_OPERATION = new OperationId(
EXECUTE_STATEMENT_NAME.toString());
private static final String PREP_STMT_SQL_QUERY_STRING = "jdbc.ps.sql";
private static final StringUniqueIdService uidService = new StringUniqueIdService();
public JdbcRuleHelper(Rule rule) {
super(rule);
}
private static Timer createTimer(TagEncodedMetricName name) {
MetricRegistry metricRegistry = RegistryService.getMetricRegistry();
return metricRegistry.timer(name.toString());
}
public void onGetConnectionEntry(DataSource ds) {
beginTimedOperation(GET_CONNECTION_OPERATION);
}
public void onGetConnectionExit(DataSource ds, Connection connection) {
endTimedOperation(GET_CONNECTION_OPERATION, GET_CONNECTION_TIMER);
}
public void onGetConnectionError(DataSource ds) {
endTimedOperation(GET_CONNECTION_OPERATION, () -> null);
}
public void onPrepareStatementEntry(Connection connection) {
beginTimedOperation(PREPARE_STATEMENT_OPERATION);
}
public void onPrepareStatementExit(Connection connection, String sql, PreparedStatement ps) {
//TODO add datasource name as a tag
endTimedOperation(PREPARE_STATEMENT_OPERATION, PREPARE_STATEMENT_TIMER);
setObjectProperty(ps, PREP_STMT_SQL_QUERY_STRING, sql);
}
public void onPrepareStatementError(Connection connection) {
endTimedOperation(PREPARE_STATEMENT_OPERATION, () -> null);
}
public void onExecuteStatementEntry(PreparedStatement ps) {
beginTimedOperation(EXECUTE_STATEMENT_OPERATION);
}
public void onExecuteStatementExit(PreparedStatement ps) {
//TODO add datasource name & execution type (execute/executeUpdate/executeBath) as tags
endTimedOperation(EXECUTE_STATEMENT_OPERATION, () -> {
String sql = getObjectProperty(ps, PREP_STMT_SQL_QUERY_STRING);
String sqlId = uidService.getUniqueId(sql);
String metricName = EXECUTE_STATEMENT_NAME.withTags("sql", sqlId).toString();
return RegistryService.getMetricRegistry().timer(metricName);
});
}
public void onExecuteStatementError(PreparedStatement ps) {
endTimedOperation(EXECUTE_STATEMENT_OPERATION, () -> null);
}
}
|
0
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules/jdbc/StringUniqueIdService.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.jinsight.modules.jdbc;
import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* @author Rajiv Shivane
*/
public class StringUniqueIdService {
private static final Logger LOGGER = Logger.getLogger(StringUniqueIdService.class.getName());
private static final int MAX_SIZE = 1000;
private static Map<String, String> sqlIdCache = Collections.synchronizedMap(new LruMap(MAX_SIZE));
public String getUniqueId(String sqlString) {
if (sqlString == null) {
return null;
}
String sqlId = sqlIdCache.get(sqlString);
if (sqlId != null) {
return sqlId;
}
sqlId = getIdFromServer(sqlString);
sqlIdCache.put(sqlString, sqlId);
return sqlId;
}
String getIdFromServer(String sqlString) {
String sqlId = null;
try {
MessageDigest md = MessageDigest.getInstance("MD5");
byte[] hash = md.digest(sqlString.getBytes("UTF-8"));
StringBuilder sb = new StringBuilder(2 * hash.length);
for (byte b : hash) {
sb.append(String.format("%02x", b & 0xff));
}
sqlId = sb.toString();
} catch (NoSuchAlgorithmException | UnsupportedEncodingException e) {
LOGGER.log(Level.SEVERE, "Error generating unique id.", e);
}
return sqlId;
}
private static class LruMap extends LinkedHashMap<String, String> {
private int maxSize;
public LruMap(int maxSize) {
super(maxSize + 1, 0.1F, true);
this.maxSize = maxSize;
}
public boolean removeEldestEntry(Map.Entry eldest) {
return size() > maxSize;
}
}
}
|
0
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules/jedis/JedisRuleHelper.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.jinsight.modules.jedis;
import ai.apptuit.metrics.client.TagEncodedMetricName;
import ai.apptuit.metrics.jinsight.RegistryService;
import ai.apptuit.metrics.jinsight.modules.common.RuleHelper;
import com.codahale.metrics.Clock;
import com.codahale.metrics.Timer;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;
import org.jboss.byteman.rule.Rule;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.Pipeline;
import redis.clients.jedis.Transaction;
import redis.clients.util.Pool;
/**
* @author Rajiv Shivane
*/
public class JedisRuleHelper extends RuleHelper {
public static final TagEncodedMetricName COMMANDS_BASE_NAME =
TagEncodedMetricName.decode("jedis.commands");
public static final TagEncodedMetricName TRANSACTIONS_EXEC_METRIC =
TagEncodedMetricName.decode("jedis.transactions.exec");
public static final TagEncodedMetricName TRANSACTIONS_DISCARD_METRIC =
TagEncodedMetricName.decode("jedis.transactions.discard");
public static final TagEncodedMetricName PIPELINES_SYNC_METRIC =
TagEncodedMetricName.decode("jedis.pipelines.sync");
public static final TagEncodedMetricName POOL_GET_METRIC =
TagEncodedMetricName.decode("jedis.pool.get");
public static final TagEncodedMetricName POOL_RELEASE_METRIC =
TagEncodedMetricName.decode("jedis.pool.release");
private static final Clock clock = Clock.defaultClock();
private static final String TRANSACTION_START_TIME_PROP_NAME = "jedis.tx.start";
private static final Timer txExecTimer = RegistryService.getMetricRegistry()
.timer(TRANSACTIONS_EXEC_METRIC.toString());
private static final Timer txDiscardTimer = RegistryService.getMetricRegistry()
.timer(TRANSACTIONS_DISCARD_METRIC.toString());
private static final Timer pipelineSyncTimer = RegistryService.getMetricRegistry()
.timer(PIPELINES_SYNC_METRIC.toString());
private static final OperationId POOL_GET_OPERATION = new OperationId("jedis.pool.get");
private static final OperationId POOL_RELEASE_OPERATION = new OperationId("jedis.pool.release");
private static final Timer poolGetTimer = RegistryService.getMetricRegistry()
.timer(POOL_GET_METRIC.toString());
private static final Timer poolReleaseTimer = RegistryService.getMetricRegistry()
.timer(POOL_RELEASE_METRIC.toString());
private static final Map<String, OperationId> operations = new ConcurrentHashMap<>();
private static final Map<String, Timer> timers = new ConcurrentHashMap<>();
private static final Map<String, String> commands = new ConcurrentHashMap<>();
static {
commands.put("append", "append");
commands.put("bitcount", "bitcount");
commands.put("bitfield", "bitfield");
commands.put("bitpos", "bitpos");
commands.put("blpop", "blpop");
commands.put("brpop", "brpop");
commands.put("decr", "decr");
commands.put("decrBy", "decrBy");
commands.put("del", "delete");
commands.put("echo", "echo");
commands.put("exists", "exists");
commands.put("expire", "expire");
commands.put("expireAt", "expireAt");
commands.put("geoadd", "geoadd");
commands.put("geodist", "geodist");
commands.put("geohash", "geohash");
commands.put("geopos", "geopos");
commands.put("georadius", "georadius");
commands.put("georadiusByMember", "georadiusByMember");
commands.put("get", "get");
commands.put("getbit", "getbit");
commands.put("getrange", "getrange");
commands.put("getSet", "getSet");
commands.put("hdel", "hdel");
commands.put("hexists", "hexists");
commands.put("hget", "hget");
commands.put("hgetAll", "hgetAll");
commands.put("hincrBy", "hincrBy");
commands.put("hincrByFloat", "hincrByFloat");
commands.put("hkeys", "hkeys");
commands.put("hlen", "hlen");
commands.put("hmget", "hmget");
commands.put("hmset", "hmset");
commands.put("hscan", "hscan");
commands.put("hset", "hset");
commands.put("hsetnx", "hsetnx");
commands.put("hvals", "hvals");
commands.put("incr", "incr");
commands.put("incrBy", "incrBy");
commands.put("incrByFloat", "incrByFloat");
commands.put("lindex", "lindex");
commands.put("linsert", "linsert");
commands.put("llen", "llen");
commands.put("lpop", "lpop");
commands.put("lpush", "lpush");
commands.put("lpushx", "lpushx");
commands.put("lrange", "lrange");
commands.put("lrem", "lrem");
commands.put("lset", "lset");
commands.put("ltrim", "ltrim");
commands.put("move", "move");
commands.put("persist", "persist");
commands.put("pexpire", "pexpire");
commands.put("pexpireAt", "pexpireAt");
commands.put("pfadd", "pfadd");
commands.put("pfcount", "pfcount");
commands.put("psetex", "psetex");
commands.put("pttl", "pttl");
commands.put("rpop", "rpop");
commands.put("rpush", "rpush");
commands.put("rpushx", "rpushx");
commands.put("sadd", "sadd");
commands.put("scard", "scard");
commands.put("set", "set");
commands.put("setbit", "setbit");
commands.put("setex", "setex");
commands.put("setnx", "setnx");
commands.put("setrange", "setrange");
commands.put("sismember", "sismember");
commands.put("smembers", "smembers");
commands.put("sort", "sort");
commands.put("spop", "spop");
commands.put("srandmember", "srandmember");
commands.put("srem", "srem");
commands.put("sscan", "sscan");
commands.put("strlen", "strlen");
commands.put("substr", "substr");
commands.put("ttl", "ttl");
commands.put("type", "type");
commands.put("zadd", "zadd");
commands.put("zcard", "zcard");
commands.put("zcount", "zcount");
commands.put("zincrby", "zincrby");
commands.put("zlexcount", "zlexcount");
commands.put("zrange", "zrange");
commands.put("zrangeByLex", "zrangeByLex");
commands.put("zrangeByScore", "zrangeByScore");
commands.put("zrangeByScoreWithScores", "zrangeByScoreWithScores");
commands.put("zrangeWithScores", "zrangeWithScores");
commands.put("zrank", "zrank");
commands.put("zrem", "zrem");
commands.put("zremrangeByLex", "zremrangeByLex");
commands.put("zremrangeByRank", "zremrangeByRank");
commands.put("zremrangeByScore", "zremrangeByScore");
commands.put("zrevrange", "zrevrange");
commands.put("zrevrangeByLex", "zrevrangeByLex");
commands.put("zrevrangeByScore", "zrevrangeByScore");
commands.put("zrevrangeByScoreWithScores", "zrevrangeByScoreWithScores");
commands.put("zrevrangeWithScores", "zrevrangeWithScores");
commands.put("zrevrank", "zrevrank");
commands.put("zscan", "zscan");
commands.put("zscore", "zscore");
}
public JedisRuleHelper(Rule rule) {
super(rule);
}
public void onOperationStart(String methName, Jedis jedis) {
OperationId operationId = getOperationId(methName);
if (operationId == null) {
return;//not tracking metrics for this method
}
beginTimedOperation(operationId);
}
public void onOperationEnd(String methName, Jedis jedis) {
OperationId operationId = getOperationId(methName);
if (operationId == null) {
return;//not tracking metrics for this method
}
endTimedOperation(operationId, getTimer(methName));
}
public void onOperationError(String methName, Jedis jedis) {
OperationId operationId = getOperationId(methName);
if (operationId == null) {
return;//not tracking metrics for this method
}
endTimedOperation(operationId, getTimer(methName));
}
public void onTransactionBegin(Transaction tx) {
setObjectProperty(tx, TRANSACTION_START_TIME_PROP_NAME, clock.getTick());
}
public void onTransactionExec(Transaction tx) {
Long startTime = removeObjectProperty(tx, TRANSACTION_START_TIME_PROP_NAME);
if (startTime == null) {
return;
}
long t = Clock.defaultClock().getTick() - startTime;
txExecTimer.update(t, TimeUnit.NANOSECONDS);
}
public void onTransactionDiscard(Transaction tx) {
Long startTime = removeObjectProperty(tx, TRANSACTION_START_TIME_PROP_NAME);
if (startTime == null) {
return;
}
long t = Clock.defaultClock().getTick() - startTime;
txDiscardTimer.update(t, TimeUnit.NANOSECONDS);
}
public void onPipelineBegin(Pipeline pipeline) {
setObjectProperty(pipeline, TRANSACTION_START_TIME_PROP_NAME, clock.getTick());
}
public void onPipelineSync(Pipeline pipeline) {
Long startTime = removeObjectProperty(pipeline, TRANSACTION_START_TIME_PROP_NAME);
if (startTime == null) {
return;
}
long t = Clock.defaultClock().getTick() - startTime;
pipelineSyncTimer.update(t, TimeUnit.NANOSECONDS);
}
public void onPoolGetStart(Pool pool) {
beginTimedOperation(POOL_GET_OPERATION);
}
public void onPoolGetEnd(Pool pool) {
endTimedOperation(POOL_GET_OPERATION, poolGetTimer);
}
public void onPoolGetError(Pool pool) {
endTimedOperation(POOL_GET_OPERATION, poolGetTimer);
}
public void onPoolReleaseStart(Pool pool) {
beginTimedOperation(POOL_RELEASE_OPERATION);
}
public void onPoolReleaseEnd(Pool pool) {
endTimedOperation(POOL_RELEASE_OPERATION, poolReleaseTimer);
}
public void onPoolReleaseError(Pool pool) {
endTimedOperation(POOL_RELEASE_OPERATION, poolReleaseTimer);
}
private OperationId getOperationId(String methName) {
return operations.computeIfAbsent(methName, s -> new OperationId("jedis." + methName));
}
private Timer getTimer(String methName) {
String op = commands.get(methName);
return timers.computeIfAbsent(op, s -> {
String metric = COMMANDS_BASE_NAME.withTags("command", op).toString();
return RegistryService.getMetricRegistry().timer(metric);
});
}
}
|
0
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules/jedis/JedisRuleSet.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.jinsight.modules.jedis;
import ai.apptuit.metrics.jinsight.modules.common.AbstractRuleSet;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisCommands;
import redis.clients.jedis.Pipeline;
import redis.clients.jedis.Transaction;
import redis.clients.util.Pool;
/**
* @author Rajiv Shivane
*/
public class JedisRuleSet extends AbstractRuleSet {
private static final String HELPER_NAME =
"ai.apptuit.metrics.jinsight.modules.jedis.JedisRuleHelper";
private final List<RuleInfo> rules = new ArrayList<>();
public JedisRuleSet() {
interceptJedisCommands();
interceptJedisTransaction();
interceptJedisPipeline();
interceptJedisPool();
}
private void interceptJedisPool() {
addRule(Pool.class, "getResource", RuleInfo.AT_ENTRY, "onPoolGetStart($0)");
addRule(Pool.class, "getResource", RuleInfo.AT_EXIT, "onPoolGetEnd($0)");
addRule(Pool.class, "getResource", RuleInfo.AT_EXCEPTION_EXIT, "onPoolGetError($0)");
addRule(Pool.class, "returnResource", RuleInfo.AT_ENTRY, "onPoolReleaseStart($0)");
addRule(Pool.class, "returnBrokenResource", RuleInfo.AT_ENTRY, "onPoolReleaseStart($0)");
addRule(Pool.class, "returnResourceObject", RuleInfo.AT_ENTRY, "onPoolReleaseStart($0)");
addRule(Pool.class, "returnResource", RuleInfo.AT_EXIT, "onPoolReleaseEnd($0)");
addRule(Pool.class, "returnBrokenResource", RuleInfo.AT_EXIT, "onPoolReleaseEnd($0)");
addRule(Pool.class, "returnResourceObject", RuleInfo.AT_EXIT, "onPoolReleaseEnd($0)");
addRule(Pool.class, "returnResource", RuleInfo.AT_EXCEPTION_EXIT, "onPoolReleaseError($0)");
addRule(Pool.class, "returnBrokenResource", RuleInfo.AT_EXCEPTION_EXIT,
"onPoolReleaseError($0)");
addRule(Pool.class, "returnResourceObject", RuleInfo.AT_EXCEPTION_EXIT,
"onPoolReleaseError($0)");
}
private void interceptJedisPipeline() {
addRule(Pipeline.class, RuleInfo.CONSTRUCTOR_METHOD, RuleInfo.AT_EXIT,
"onPipelineBegin($0)");
addRule(Pipeline.class, "sync", RuleInfo.AT_EXIT,
"onPipelineSync($0)");
}
private void interceptJedisTransaction() {
addRule(Transaction.class, RuleInfo.CONSTRUCTOR_METHOD, RuleInfo.AT_EXIT,
"onTransactionBegin($0)");
addRule(Transaction.class, "exec", RuleInfo.AT_EXIT,
"onTransactionExec($0)");
addRule(Transaction.class, "execGetResponse", RuleInfo.AT_EXIT,
"onTransactionExec($0)");
addRule(Transaction.class, "discard", RuleInfo.AT_EXIT,
"onTransactionDiscard($0)");
}
private void interceptJedisCommands() {
Class<JedisCommands> clazz = JedisCommands.class;
Method[] methods = clazz.getDeclaredMethods();
Set<String> methodNames = new HashSet<>();
for (Method method : methods) {
if (methodNames.contains(method.getName())) {
continue;//over-loaded method
}
methodNames.add(method.getName());
addRulesForOperation(method);
}
}
private void addRulesForOperation(Method method) {
String methodName = method.getName();
addRule(Jedis.class, methodName, RuleInfo.AT_ENTRY,
"onOperationStart(\"" + methodName + "\", $0)");
addRule(Jedis.class, methodName, RuleInfo.AT_EXIT,
"onOperationEnd(\"" + methodName + "\", $0)");
addRule(Jedis.class, methodName, RuleInfo.AT_EXCEPTION_EXIT,
"onOperationError(\"" + methodName + "\", $0)");
}
private void addRule(Class clazz, String methodName, String whereClause, String action) {
String ruleName = clazz + " " + methodName + " " + whereClause;
RuleInfo rule = new RuleInfo(ruleName, clazz.getName(), clazz.isInterface(), false,
methodName, HELPER_NAME, whereClause, null, null, action, null, null);
rules.add(rule);
}
@Override
public List<RuleInfo> getRules() {
return rules;
}
}
|
0
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules/jvm/BufferPoolMetrics.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.jinsight.modules.jvm;
import static ai.apptuit.metrics.jinsight.modules.jvm.MemoryUsageMetrics.sanitizePoolName;
import ai.apptuit.metrics.client.TagEncodedMetricName;
import com.codahale.metrics.Gauge;
import com.codahale.metrics.Metric;
import com.codahale.metrics.MetricSet;
import java.lang.management.BufferPoolMXBean;
import java.lang.management.ManagementFactory;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author Rajiv Shivane
*/
class BufferPoolMetrics implements MetricSet {
private static final String POOL_TAG_NAME = "pool";
private final List<BufferPoolMXBean> pools;
public BufferPoolMetrics() {
pools = ManagementFactory.getPlatformMXBeans(BufferPoolMXBean.class);
}
@Override
public Map<String, Metric> getMetrics() {
final Map<String, Metric> gauges = new HashMap<>();
for (BufferPoolMXBean pool : pools) {
final String poolName = sanitizePoolName(pool.getName());
gauges.put(getMetricName("capacity.bytes", POOL_TAG_NAME, poolName),
(Gauge<Long>) pool::getTotalCapacity);
gauges.put(getMetricName("count", POOL_TAG_NAME, poolName),
(Gauge<Long>) pool::getCount);
gauges.put(getMetricName("used.bytes", POOL_TAG_NAME, poolName),
(Gauge<Long>) pool::getMemoryUsed);
}
return Collections.unmodifiableMap(gauges);
}
private String getMetricName(String base, String... tags) {
return TagEncodedMetricName.decode(base).withTags(tags).toString();
}
}
|
0
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules/jvm/FileDescriptorMetrics.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.jinsight.modules.jvm;
import static java.lang.management.ManagementFactory.getOperatingSystemMXBean;
import com.codahale.metrics.Gauge;
import com.codahale.metrics.Metric;
import com.codahale.metrics.MetricSet;
import com.sun.management.UnixOperatingSystemMXBean;
import java.lang.management.OperatingSystemMXBean;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* @author Rajiv Shivane
*/
class FileDescriptorMetrics implements MetricSet {
private static final Logger LOGGER = Logger.getLogger(FileDescriptorMetrics.class.getName());
private final Class unixOSMBeanClass;
private final OperatingSystemMXBean osMxBean;
public FileDescriptorMetrics() throws ClassNotFoundException {
this(getOperatingSystemMXBean());
}
public FileDescriptorMetrics(OperatingSystemMXBean osMxBean) throws ClassNotFoundException {
this.osMxBean = osMxBean;
unixOSMBeanClass = Class.forName("com.sun.management.UnixOperatingSystemMXBean");
unixOSMBeanClass.cast(this.osMxBean);
}
public Map<String, Metric> getMetrics() {
final Map<String, Metric> gauges = new HashMap<>();
if (osMxBean instanceof UnixOperatingSystemMXBean) {
gauges.put("open", (Gauge<Long>) () -> getMetricLong("getOpenFileDescriptorCount"));
gauges.put("max", (Gauge<Long>) () -> getMetricLong("getMaxFileDescriptorCount"));
}
return gauges;
}
private Long getMetricLong(String name) {
try {
final Method method = unixOSMBeanClass.getDeclaredMethod(name);
return (Long) method.invoke(osMxBean);
} catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {
LOGGER.log(Level.SEVERE,
"Error fetching file descriptor metrics from OperatingSystemMXBean", e);
return -1L;
}
}
}
|
0
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules/jvm/GarbageCollectorMetrics.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.jinsight.modules.jvm;
import ai.apptuit.metrics.client.TagEncodedMetricName;
import com.codahale.metrics.Gauge;
import com.codahale.metrics.Metric;
import com.codahale.metrics.MetricSet;
import java.lang.management.GarbageCollectorMXBean;
import java.lang.management.ManagementFactory;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
/**
* @author Rajiv Shivane
*/
class GarbageCollectorMetrics implements MetricSet {
private static final String YOUNG_GEN = "young";
private static final String OLD_GEN = "old";
private static final Pattern WHITESPACE = Pattern.compile("[\\s]+");
private final List<GarbageCollector> garbageCollectors;
public GarbageCollectorMetrics() {
this(ManagementFactory.getGarbageCollectorMXBeans());
}
public GarbageCollectorMetrics(Collection<GarbageCollectorMXBean> collectorMxBeans) {
this.garbageCollectors = new ArrayList<>(collectorMxBeans.size());
collectorMxBeans.stream().map(GarbageCollector::new).forEach(this.garbageCollectors::add);
}
@Override
public Map<String, Metric> getMetrics() {
final Map<String, Metric> gauges = new HashMap<>();
garbageCollectors.forEach(gc -> {
gauges.put(getMetricName(gc, "count"), (Gauge<Long>) gc::getCollectionCount);
gauges.put(getMetricName(gc, "time.seconds"), (Gauge<Double>) gc::getCollectionTime);
});
gauges.put("total.count", (Gauge<Long>) () -> {
long count = 0;
for (GarbageCollector gc : garbageCollectors) {
count += gc.getCollectionCount();
}
return count;
});
gauges.put("total.time.seconds", (Gauge<Long>) () -> {
long time = 0;
for (GarbageCollector gc : garbageCollectors) {
time += gc.getCollectionTime();
}
return time;
});
return Collections.unmodifiableMap(gauges);
}
private String getMetricName(GarbageCollector gc, String submetric) {
return TagEncodedMetricName.decode(submetric)
.withTags("type", gc.getName())
.withTags("generation", gc.getGcGeneration())
.toString();
}
private static class GarbageCollector {
private GarbageCollectorMXBean delegate;
GarbageCollector(GarbageCollectorMXBean delegate) {
this.delegate = delegate;
}
public String getGcGeneration() {
String name = delegate.getName();
switch (name) {
case "Copy":
case "PS Scavenge":
case "ParNew":
case "G1 Young Generation":
return YOUNG_GEN;
case "MarkSweepCompact":
case "PS MarkSweep":
case "ConcurrentMarkSweep":
case "G1 Old Generation":
return OLD_GEN;
default:
return name;
}
}
public Long getCollectionCount() {
return delegate.getCollectionCount();
}
public Double getCollectionTime() {
// converting time in millis to seconds
return delegate.getCollectionTime() / 1000.0;
}
public String getName() {
return WHITESPACE.matcher(delegate.getName()).replaceAll("_").toLowerCase();
}
}
}
|
0
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules/jvm/JvmMetricSet.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.jinsight.modules.jvm;
import static java.lang.management.ManagementFactory.OPERATING_SYSTEM_MXBEAN_NAME;
import static java.lang.management.ManagementFactory.getPlatformMBeanServer;
import static java.lang.management.ManagementFactory.getRuntimeMXBean;
import static java.lang.management.ManagementFactory.newPlatformMXBeanProxy;
import ai.apptuit.metrics.client.TagEncodedMetricName;
import com.codahale.metrics.Gauge;
import com.codahale.metrics.Metric;
import com.codahale.metrics.MetricRegistry;
import com.codahale.metrics.MetricSet;
import com.codahale.metrics.jvm.ClassLoadingGaugeSet;
import java.io.IOException;
import java.lang.management.RuntimeMXBean;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.management.MBeanServerConnection;
/**
* @author Rajiv Shivane
*/
public class JvmMetricSet implements MetricSet {
private static final Logger LOGGER = Logger.getLogger(JvmMetricSet.class.getName());
static final String JVM_INFO_METRIC_NAME = TagEncodedMetricName.decode("jvm.info")
.withTags("version", System.getProperty("java.version"))
.withTags("vendor", System.getProperty("java.vendor"))
.toString();
private final Map<String, Metric> metrics = new HashMap<>();
public JvmMetricSet() {
registerSet("jvm.buffer_pool", new BufferPoolMetrics());
registerSet("jvm.classes", new ClassLoadingGaugeSet());
try {
registerSet("jvm.fd", new FileDescriptorMetrics());
} catch (ClassNotFoundException|RuntimeException e) {
LOGGER.log(Level.SEVERE, "Could not load FileDescriptorMetrics."
+ " File descriptor metrics will not be available.", e);
}
registerSet("jvm.gc", new GarbageCollectorMetrics());
registerSet("jvm.memory", new MemoryUsageMetrics());
registerSet("jvm.threads", new ThreadStateMetrics());
metrics.put("jvm.uptime.seconds", new UptimeGauge());
metrics.put(JVM_INFO_METRIC_NAME, (Gauge) () -> 1L);
try {
metrics.put("jvm.process.cpu.seconds", new ProcessCpuTicksGauge());
} catch (ClassNotFoundException | IOException e) {
LOGGER.log(Level.SEVERE, "Error fetching process CPU usage metrics.", e);
}
}
@Override
public Map<String, Metric> getMetrics() {
return Collections.unmodifiableMap(metrics);
}
private void registerSet(String prefix, MetricSet metricset) throws IllegalArgumentException {
metricset.getMetrics().forEach((key, value) -> {
metrics.put(getMetricName(prefix, key), value);
});
}
private String getMetricName(String prefix, String key) {
return MetricRegistry.name(prefix, key).toLowerCase().replace('-', '_');
}
private static class UptimeGauge implements Gauge<Double> {
private final RuntimeMXBean rtMxBean = getRuntimeMXBean();
@Override
public Double getValue() {
// converting millis into seconds
return rtMxBean.getUptime() / 1000.0;
}
}
private static class ProcessCpuTicksGauge implements Gauge<Double> {
private final com.sun.management.OperatingSystemMXBean osMxBean;
public ProcessCpuTicksGauge() throws ClassNotFoundException, IOException {
MBeanServerConnection mbsc = getPlatformMBeanServer();
Class.forName("com.sun.management.OperatingSystemMXBean");
osMxBean = newPlatformMXBeanProxy(mbsc, OPERATING_SYSTEM_MXBEAN_NAME,
com.sun.management.OperatingSystemMXBean.class);
}
@Override
public Double getValue() {
//converting nanoseconds into seconds
return osMxBean.getProcessCpuTime() / 1000000000.0;
}
}
}
|
0
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules/jvm/MemoryUsageMetrics.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.jinsight.modules.jvm;
import ai.apptuit.metrics.client.TagEncodedMetricName;
import com.codahale.metrics.Gauge;
import com.codahale.metrics.Metric;
import com.codahale.metrics.MetricSet;
import com.codahale.metrics.RatioGauge;
import java.lang.management.ManagementFactory;
import java.lang.management.MemoryMXBean;
import java.lang.management.MemoryPoolMXBean;
import java.lang.management.MemoryUsage;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
/**
* @author Rajiv Shivane
*/
class MemoryUsageMetrics implements MetricSet {
private static final Pattern SPECIAL_CHARS = Pattern.compile("[\\s-']+");
private static final Pattern SPECIAL_CHARS_ENDING = Pattern.compile("[\\s-']+$");
private static final String EDEN_GEN = "eden";
private static final String SURVIVOR_GEN = "survivor";
private static final String OLD_GEN = "old";
private static final String HEAP_TAG_VALUE = "heap";
private static final String NON_HEAP_TAG_VALUE = "non-heap";
private static final String AREA_TAG_NAME = "area";
private final MemoryMXBean mxBean;
private final List<MemoryPoolMXBean> memoryPools;
public MemoryUsageMetrics() {
this(ManagementFactory.getMemoryMXBean(), ManagementFactory.getMemoryPoolMXBeans());
}
public MemoryUsageMetrics(MemoryMXBean mxBean, Collection<MemoryPoolMXBean> memoryPools) {
this.mxBean = mxBean;
this.memoryPools = new ArrayList<>(memoryPools);
}
@Override
public Map<String, Metric> getMetrics() {
final Map<String, Metric> gauges = new HashMap<>();
gauges.put("total.init.bytes", (Gauge<Long>) () ->
mxBean.getHeapMemoryUsage().getInit() + mxBean.getNonHeapMemoryUsage().getInit()
);
gauges.put("total.used.bytes", (Gauge<Long>) () ->
mxBean.getHeapMemoryUsage().getUsed() + mxBean.getNonHeapMemoryUsage().getUsed()
);
gauges.put("total.max.bytes", (Gauge<Long>) () ->
mxBean.getHeapMemoryUsage().getMax() + mxBean.getNonHeapMemoryUsage().getMax()
);
gauges.put("total.committed.bytes", (Gauge<Long>) () ->
mxBean.getHeapMemoryUsage().getCommitted() + mxBean.getNonHeapMemoryUsage().getCommitted()
);
gauges.put(getMetricName("init.bytes", AREA_TAG_NAME, HEAP_TAG_VALUE),
(Gauge<Long>) () -> mxBean.getHeapMemoryUsage().getInit());
gauges.put(getMetricName("used.bytes", AREA_TAG_NAME, HEAP_TAG_VALUE),
(Gauge<Long>) () -> mxBean.getHeapMemoryUsage().getUsed());
gauges.put(getMetricName("max.bytes", AREA_TAG_NAME, HEAP_TAG_VALUE),
(Gauge<Long>) () -> mxBean.getHeapMemoryUsage().getMax());
gauges.put(getMetricName("committed.bytes", AREA_TAG_NAME, HEAP_TAG_VALUE),
(Gauge<Long>) () -> mxBean.getHeapMemoryUsage().getCommitted());
gauges.put(getMetricName("usage", AREA_TAG_NAME, HEAP_TAG_VALUE), new RatioGauge() {
@Override
protected Ratio getRatio() {
final MemoryUsage usage = mxBean.getHeapMemoryUsage();
return Ratio.of(usage.getUsed(), usage.getMax());
}
});
gauges.put(getMetricName("init.bytes", AREA_TAG_NAME, NON_HEAP_TAG_VALUE),
(Gauge<Long>) () -> mxBean.getNonHeapMemoryUsage().getInit());
gauges.put(getMetricName("used.bytes", AREA_TAG_NAME, NON_HEAP_TAG_VALUE),
(Gauge<Long>) () -> mxBean.getNonHeapMemoryUsage().getUsed());
gauges.put(getMetricName("max.bytes", AREA_TAG_NAME, NON_HEAP_TAG_VALUE),
(Gauge<Long>) () -> mxBean.getNonHeapMemoryUsage().getMax());
gauges.put(getMetricName("committed.bytes", AREA_TAG_NAME, NON_HEAP_TAG_VALUE),
(Gauge<Long>) () -> mxBean.getNonHeapMemoryUsage().getCommitted());
gauges.put(getMetricName("usage", AREA_TAG_NAME, NON_HEAP_TAG_VALUE), new RatioGauge() {
@Override
protected Ratio getRatio() {
final MemoryUsage usage = mxBean.getNonHeapMemoryUsage();
return Ratio.of(usage.getUsed(), usage.getMax());
}
});
for (final MemoryPoolMXBean pool : memoryPools) {
String poolNameOrig = pool.getName();
final String poolName = sanitizePoolName(poolNameOrig);
String generation = getPoolGeneration(poolNameOrig);
String[] poolNameTags;
if (generation != null) {
poolNameTags = new String[]{"pool", generation, "name", poolName};
} else {
poolNameTags = new String[]{"pool", poolName};
}
gauges.put(getMetricName("pool.usage", poolNameTags),
new RatioGauge() {
@Override
protected Ratio getRatio() {
MemoryUsage usage = pool.getUsage();
return Ratio.of(usage.getUsed(),
usage.getMax() == -1 ? usage.getCommitted() : usage.getMax());
}
});
gauges.put(getMetricName("pool.max.bytes", poolNameTags),
(Gauge<Long>) () -> pool.getUsage().getMax());
gauges.put(getMetricName("pool.used.bytes", poolNameTags),
(Gauge<Long>) () -> pool.getUsage().getUsed());
gauges.put(getMetricName("pool.committed.bytes", poolNameTags),
(Gauge<Long>) () -> pool.getUsage().getCommitted());
// Only register GC usage metrics if the memory pool supports usage statistics.
if (pool.getCollectionUsage() != null) {
gauges.put(getMetricName("pool.used-after-gc.bytes", poolNameTags),
(Gauge<Long>) () -> pool.getCollectionUsage().getUsed());
}
gauges.put(getMetricName("pool.init.bytes", poolNameTags),
(Gauge<Long>) () -> pool.getUsage().getInit());
}
return Collections.unmodifiableMap(gauges);
}
static String sanitizePoolName(String poolName) {
String s = SPECIAL_CHARS_ENDING.matcher(poolName.toLowerCase()).replaceAll("");
return SPECIAL_CHARS.matcher(s).replaceAll("_");
}
private String getMetricName(String base, String... tags) {
return TagEncodedMetricName.decode(base).withTags(tags).toString();
}
private String getPoolGeneration(String name) {
switch (name) {
case "Eden Space":
case "PS Eden Space":
case "Par Eden Space":
case "G1 Eden Space":
return EDEN_GEN;
case "Survivor Space":
case "PS Survivor Space":
case "Par Survivor Space":
case "G1 Survivor Space":
return SURVIVOR_GEN;
case "Tenured Gen":
case "PS Old Gen":
case "CMS Old Gen":
case "G1 Old Gen":
return OLD_GEN;
default:
return null;
}
}
}
|
0
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules/jvm/ThreadStateMetrics.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.jinsight.modules.jvm;
import com.codahale.metrics.Metric;
import com.codahale.metrics.MetricSet;
import com.codahale.metrics.jvm.CachedThreadStatesGaugeSet;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;
/**
* @author Rajiv Shivane
*/
class ThreadStateMetrics implements MetricSet {
private final Map<String, Metric> metrics = new HashMap<>();
public ThreadStateMetrics() {
MetricSet delegate = new CachedThreadStatesGaugeSet(60, TimeUnit.SECONDS);
delegate.getMetrics().forEach((key, value) -> {
metrics.put(getMetricName(key), value);
});
}
@Override
public Map<String, Metric> getMetrics() {
return Collections.unmodifiableMap(metrics);
}
private String getMetricName(String key) throws IllegalArgumentException {
switch (key) {
case "count":
return "total.count";
case "blocked.count":
return "count[state:blocked]";
case "new.count":
return "count[state:new]";
case "runnable.count":
return "count[state:runnable]";
case "terminated.count":
return "count[state:terminated]";
case "timed_waiting.count":
return "count[state:timed_waiting]";
case "waiting.count":
return "count[state:waiting]";
default:
return key;
}
}
}
|
0
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules/log4j/Log4JRuleHelper.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.jinsight.modules.log4j;
import ai.apptuit.metrics.jinsight.modules.common.RuleHelper;
import ai.apptuit.metrics.jinsight.modules.logback.ErrorFingerprint;
import ai.apptuit.metrics.jinsight.modules.logback.LogEventTracker;
import org.apache.log4j.spi.LoggingEvent;
import org.apache.log4j.spi.ThrowableInformation;
import org.jboss.byteman.rule.Rule;
/**
* @author Rajiv Shivane
*/
public class Log4JRuleHelper extends RuleHelper {
private static final LogEventTracker tracker = new LogEventTracker();
public Log4JRuleHelper(Rule rule) {
super(rule);
}
public void appendersCalled(LoggingEvent event) {
ThrowableInformation throwableInfo = event.getThrowableInformation();
String throwableName = null;
ErrorFingerprint fingerprint = null;
if (throwableInfo != null) {
Throwable throwable = throwableInfo.getThrowable();
throwableName = (throwable != null) ? throwable.getClass().getName() : null;
fingerprint = ErrorFingerprint.fromThrowable(throwableInfo.getThrowable());
}
LogEventTracker.LogLevel level = LogEventTracker.LogLevel.valueOf(event.getLevel().toString());
tracker.track(level, (throwableInfo != null), throwableName, fingerprint);
if (fingerprint != null && event.getProperty(LogEventTracker.FINGERPRINT_PROPERTY_NAME) == null) {
event.setProperty(LogEventTracker.FINGERPRINT_PROPERTY_NAME, fingerprint.getChecksum());
}
}
public String convertMessage(LoggingEvent event, String origMessage) {
String fingerprint = event.getProperty(LogEventTracker.FINGERPRINT_PROPERTY_NAME);
if (fingerprint == null) {
return origMessage;
}
return "[error:" + fingerprint + "] " + origMessage;
}
}
|
0
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules/log4j2/Log4J2RuleHelper.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.jinsight.modules.log4j2;
import ai.apptuit.metrics.jinsight.modules.common.RuleHelper;
import ai.apptuit.metrics.jinsight.modules.logback.ErrorFingerprint;
import ai.apptuit.metrics.jinsight.modules.logback.LogEventTracker;
import org.apache.logging.log4j.ThreadContext;
import org.apache.logging.log4j.core.LogEvent;
import org.apache.logging.log4j.core.impl.ThrowableProxy;
import org.jboss.byteman.rule.Rule;
/**
* @author Rajiv Shivane
*/
public class Log4J2RuleHelper extends RuleHelper {
private static final LogEventTracker tracker = new LogEventTracker();
private static final ThreadLocal<ErrorFingerprint> CURRENT_FINGERPRINT = new ThreadLocal<>();
public Log4J2RuleHelper(Rule rule) {
super(rule);
}
public void appendersCalled(LogEvent event) {
ThrowableProxy throwableProxy = event.getThrownProxy();
String throwable = (throwableProxy != null) ? throwableProxy.getName() : null;
LogEventTracker.LogLevel level = LogEventTracker.LogLevel.valueOf(event.getLevel().toString());
ErrorFingerprint fingerprint = CURRENT_FINGERPRINT.get();
tracker.track(level, (throwableProxy != null), throwable, fingerprint);
}
public void beforeLogMessage(Object[] params) {
if (ThreadContext.containsKey(LogEventTracker.FINGERPRINT_PROPERTY_NAME)) {
return;
}
if (!(params[5] instanceof Throwable)) {
return;
}
Throwable throwable = (Throwable) params[5];
ErrorFingerprint fingerprint = ErrorFingerprint.fromThrowable(throwable);
if (fingerprint != null) {
CURRENT_FINGERPRINT.set(fingerprint);
ThreadContext.put(LogEventTracker.FINGERPRINT_PROPERTY_NAME, fingerprint.getChecksum());
}
}
public void afterLogMessage(Object[] params) {
CURRENT_FINGERPRINT.remove();
ThreadContext.remove(LogEventTracker.FINGERPRINT_PROPERTY_NAME);
}
public void beforeMessageFormat(final LogEvent event, final StringBuilder buf) {
String fingerprint = event.getContextData().getValue(LogEventTracker.FINGERPRINT_PROPERTY_NAME);
if (fingerprint == null) {
return;
}
buf.append("[error:").append(fingerprint).append("] ");
}
}
|
0
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules/logback/ErrorFingerprint.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.jinsight.modules.logback;
import ch.qos.logback.classic.spi.IThrowableProxy;
import ch.qos.logback.classic.spi.StackTraceElementProxy;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.nio.charset.StandardCharsets;
import java.security.DigestOutputStream;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Collections;
import java.util.IdentityHashMap;
import java.util.Iterator;
import java.util.NoSuchElementException;
import java.util.Set;
/**
* @author Rajiv Shivane
*/
public class ErrorFingerprint {
private static boolean DEBUG = false;
private String fqClassName;
private String className;
private String checksum;
private String body;
private ErrorFingerprint(String fqClassName, String className, String checksum) {
this.fqClassName = fqClassName;
this.className = className;
this.checksum = checksum;
}
public String getChecksum() {
return checksum;
}
public String getErrorFullName() {
return fqClassName;
}
public String getErrorSimpleName() {
return className;
}
@Override
public String toString() {
return className + "#" + checksum.substring(0, 4);
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ErrorFingerprint that = (ErrorFingerprint) o;
return checksum.equals(that.checksum);
}
@Override
public int hashCode() {
return checksum.hashCode();
}
/**
* @return The fingerprint. Maybe null if there is an error computing the fingerprint
*/
public static ErrorFingerprint fromThrowable(Throwable t) {
IThrowable wrapper = (t == null) ? null : new ThrowableWrapper(t);
return fromIThrowable(wrapper);
}
public static ErrorFingerprint fromIThrowableProxy(IThrowableProxy proxy) {
IThrowable wrapper = (proxy == null) ? null : new ThrowableProxyWrapper(proxy);
return fromIThrowable(wrapper);
}
public static ErrorFingerprint fromIThrowable(IThrowable t) {
try {
return _fromThrowable(t);
} catch (Throwable thr) {
return null;
}
}
private static ErrorFingerprint _fromThrowable(IThrowable t) throws NoSuchAlgorithmException, IOException {
if (t == null) {
return null;
}
MessageDigest md = MessageDigest.getInstance("MD5");
OutputStream outputStream;
if (DEBUG) {
outputStream = new ByteArrayOutputStream(2 * 1024);
} else {
outputStream = NULL_OUTPUT_STREAM;
}
Writer writer = new OutputStreamWriter(new DigestOutputStream(outputStream, md), StandardCharsets.UTF_8);
printStackTrace(t, writer);
writer.flush();
writer.close();
ErrorFingerprint fingerprint = new ErrorFingerprint(t.getClassName(), t.getSimpleName(), toHex(md.digest()));
if (DEBUG) {
fingerprint.body = new String(((ByteArrayOutputStream) outputStream).toByteArray(), StandardCharsets.UTF_8);
System.out.println(fingerprint.body);
}
return fingerprint;
}
private static String toHex(byte[] hash) {
StringBuilder sb = new StringBuilder(2 * hash.length);
for (byte b : hash) {
sb.append(String.format("%02x", b & 0xff));
}
return sb.toString();
}
private static void printStackTrace(IThrowable t, Writer writer) throws IOException {
writer.write(t.getClassName());
writer.write('\n');
Iterator<StackTraceElement> trace = t.getStackTrace();
while (trace.hasNext()) {
StackTraceElement traceElement = trace.next();
printStackTraceElement(writer, traceElement);
}
IThrowable cause = t.getCause();
if (cause != null) {
writer.write("Caused by: ");
printStackTrace(cause, writer);
}
}
private static void printStackTraceElement(Writer writer, StackTraceElement traceElement) throws IOException {
String className = traceElement.getClassName();
if (className.startsWith("com.sun.proxy.$Proxy")) {
className = "com.sun.proxy.$Proxy$$";
} else {
/*
Handle reflection inflation //https://blogs.oracle.com/buck/entry/inflation_system_properties
Fake NativeMethodAccessor and GeneratedMethodAccessor stack elements to look alike
NativeMethodAccessor elements
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
GeneratedMethodAccessor elements
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
*/
if ("sun.reflect.NativeMethodAccessorImpl".equals(className) || "jdk.internal.reflect.NativeMethodAccessorImpl".equals(className)) {
if (traceElement.getMethodName().equals("invoke0")) {
return;
}
className = "sun.reflect.$$MethodAccessor$$";
} else if (className.startsWith("sun.reflect.GeneratedMethodAccessor")
|| className.startsWith("jdk.internal.reflect.GeneratedMethodAccessor")) {
className = "sun.reflect.$$MethodAccessor$$";
}
}
writer.write("\tat " + className + "." + traceElement.getMethodName() + "\n");
}
private static final OutputStream NULL_OUTPUT_STREAM = new OutputStream() {
@Override
public void write(byte[] b) {
// do nothing
}
@Override
public void write(byte[] b, int off, int len) {
// do nothing
}
@Override
public void write(int b) {
// do nothing
}
};
public interface IThrowable {
String getClassName();
String getSimpleName();
Iterator<StackTraceElement> getStackTrace();
IThrowable getCause();
}
private static class ThrowableWrapper implements IThrowable {
private final Throwable actual;
private final Set<Throwable> causes;
public ThrowableWrapper(Throwable t) {
this(t, Collections.newSetFromMap(new IdentityHashMap<>()));
}
public ThrowableWrapper(Throwable t, Set<Throwable> causes) {
if (t == null) {
throw new IllegalArgumentException("Throwable can not be null");
}
this.actual = t;
this.causes = causes;
}
@Override
public String getClassName() {
return actual.getClass().getName();
}
@Override
public String getSimpleName() {
return actual.getClass().getSimpleName();
}
@Override
public Iterator<StackTraceElement> getStackTrace() {
StackTraceElement[] elements = actual.getStackTrace();
return new Iterator<StackTraceElement>() {
private int pos = 0;
@Override
public boolean hasNext() {
return elements.length > pos;
}
@Override
public StackTraceElement next() {
if (!hasNext()) {
throw new NoSuchElementException();
}
return elements[pos++];
}
};
}
@Override
public IThrowable getCause() {
Throwable cause = actual.getCause();
if (cause == null) {
return null;
}
if (causes.contains(cause)) {
return null;
}
causes.add(cause);
return new ThrowableWrapper(cause, causes);
}
}
private static class ThrowableProxyWrapper implements IThrowable {
private final IThrowableProxy proxy;
public ThrowableProxyWrapper(IThrowableProxy proxy) {
if (proxy == null) {
throw new IllegalArgumentException("IThrowableProxy can not be null");
}
this.proxy = proxy;
}
@Override
public String getClassName() {
return proxy.getClassName();
}
@Override
public String getSimpleName() {
String className = proxy.getClassName();
int idx = className.lastIndexOf('.');
return idx < 0 ? className : className.substring(idx + 1);
}
@Override
public Iterator<StackTraceElement> getStackTrace() {
StackTraceElementProxy[] proxyArray = proxy.getStackTraceElementProxyArray();
return new Iterator<StackTraceElement>() {
private int pos = 0;
@Override
public boolean hasNext() {
return proxyArray.length > pos;
}
@Override
public StackTraceElement next() {
if (!hasNext()) {
throw new NoSuchElementException();
}
return proxyArray[pos++].getStackTraceElement();
}
};
}
@Override
public IThrowable getCause() {
IThrowableProxy cause = proxy.getCause();
if (cause == null) {
return null;
}
return new ThrowableProxyWrapper(cause);
}
}
}
|
0
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules/logback/LogEventTracker.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.jinsight.modules.logback;
import ai.apptuit.metrics.client.TagEncodedMetricName;
import ai.apptuit.metrics.jinsight.RegistryService;
import com.codahale.metrics.Meter;
import com.codahale.metrics.MetricRegistry;
/**
* @author Rajiv Shivane
*/
public class LogEventTracker {
public static final String FINGERPRINT_PROPERTY_NAME = "errorFingerprint";
public static final TagEncodedMetricName APPENDS_BASE_NAME = TagEncodedMetricName
.decode("logger.appends");
public static final TagEncodedMetricName THROWABLES_BASE_NAME = TagEncodedMetricName
.decode("logger.throwables");
public static final TagEncodedMetricName FINGERPRINTS_BASE_NAME = THROWABLES_BASE_NAME.submetric("by_fingerprint");
private static final MetricRegistry registry = RegistryService.getMetricRegistry();
private final TagEncodedMetricName throwablesBaseName;
private final TagEncodedMetricName fingerprintBaseName;
private final Meter total;
private final Meter trace;
private final Meter debug;
private final Meter info;
private final Meter warn;
private final Meter error;
private final Meter fatal;
private final Meter totalThrowables;
public LogEventTracker() {
this(APPENDS_BASE_NAME, THROWABLES_BASE_NAME, FINGERPRINTS_BASE_NAME);
}
private LogEventTracker(TagEncodedMetricName appendsBase, TagEncodedMetricName throwablesBase,
TagEncodedMetricName fingerprintBaseName) {
this.throwablesBaseName = throwablesBase;
this.fingerprintBaseName = fingerprintBaseName;
total = registry.meter(appendsBase.submetric("total").toString());
trace = registry.meter(appendsBase.withTags("level", "trace").toString());
debug = registry.meter(appendsBase.withTags("level", "debug").toString());
info = registry.meter(appendsBase.withTags("level", "info").toString());
warn = registry.meter(appendsBase.withTags("level", "warn").toString());
error = registry.meter(appendsBase.withTags("level", "error").toString());
fatal = registry.meter(appendsBase.withTags("level", "fatal").toString());
totalThrowables = registry.meter(this.throwablesBaseName.submetric("total").toString());
}
public void track(LogLevel level, boolean hasThrowableInfo, String throwableClassName, ErrorFingerprint fingerprint) {
total.mark();
switch (level) {
case TRACE:
trace.mark();
break;
case DEBUG:
debug.mark();
break;
case INFO:
info.mark();
break;
case WARN:
warn.mark();
break;
case ERROR:
error.mark();
break;
case FATAL:
fatal.mark();
break;
default:
break;
}
if (hasThrowableInfo) {
totalThrowables.mark();
}
if (throwableClassName != null) {
registry.meter(throwablesBaseName.withTags("class", throwableClassName).toString()).mark();
}
if (fingerprint != null) {
registry.meter(fingerprintBaseName
.withTags("fingerprint", fingerprint.getChecksum())
.withTags("class", throwableClassName).toString()).mark();
}
}
public enum LogLevel {
TRACE, DEBUG, INFO, WARN, ERROR, FATAL
}
}
|
0
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules/logback/LogbackRuleHelper.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.jinsight.modules.logback;
import ai.apptuit.metrics.jinsight.modules.common.RuleHelper;
import ai.apptuit.metrics.jinsight.modules.logback.LogEventTracker.LogLevel;
import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.classic.spi.IThrowableProxy;
import org.jboss.byteman.rule.Rule;
/**
* @author Rajiv Shivane
*/
public class LogbackRuleHelper extends RuleHelper {
private static final LogEventTracker tracker = new LogEventTracker();
private static final ThreadLocal<ErrorFingerprint> CURRENT_FINGERPRINT = new ThreadLocal<>();
public LogbackRuleHelper(Rule rule) {
super(rule);
}
public void appendersCalled(ILoggingEvent event) {
IThrowableProxy throwableProxy = event.getThrowableProxy();
String throwable = (throwableProxy != null) ? throwableProxy.getClassName() : null;
LogLevel level = LogLevel.valueOf(event.getLevel().toString());
ErrorFingerprint fingerprint = CURRENT_FINGERPRINT.get();
tracker.track(level, (throwableProxy != null), throwable, fingerprint);
}
public String beforeBuildEvent(Throwable throwable) {
ErrorFingerprint fingerprint = ErrorFingerprint.fromThrowable(throwable);
if (fingerprint != null) {
CURRENT_FINGERPRINT.set(fingerprint);
return fingerprint.getChecksum();
}
return null;
}
public void afterBuildEvent(Throwable throwable) {
CURRENT_FINGERPRINT.remove();
}
public String convertMessage(ILoggingEvent event, String origMessage) {
String fingerprint = event.getMDCPropertyMap().get(LogEventTracker.FINGERPRINT_PROPERTY_NAME);
if (fingerprint == null) {
return origMessage;
}
return "[error:" + fingerprint + "] " + origMessage;
}
public Throwable getThrowableToLog(Object[] params, Throwable t) {
if (t != null) {
return t;
}
if (params == null || params.length == 0) {
return null;
}
final Object lastEntry = params[params.length - 1];
if (lastEntry instanceof Throwable) {
return (Throwable) lastEntry;
}
return null;
}
}
|
0
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules/okhttp3/OkHttp3RuleHelper.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.jinsight.modules.okhttp3;
import ai.apptuit.metrics.client.TagEncodedMetricName;
import ai.apptuit.metrics.jinsight.modules.common.RuleHelper;
import com.codahale.metrics.Timer;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import okhttp3.Request;
import okhttp3.Response;
import org.jboss.byteman.rule.Rule;
/**
* @author Rajiv Shivane
*/
public class OkHttp3RuleHelper extends RuleHelper {
public static final TagEncodedMetricName ROOT_NAME = TagEncodedMetricName.decode("http.requests");
private static final OperationId EXECUTE_OPERATION = new OperationId("okhttp3.execute");
private Map<String, Timer> timers = new ConcurrentHashMap<>();
public OkHttp3RuleHelper(Rule rule) {
super(rule);
}
public void onExecuteStart() {
beginTimedOperation(EXECUTE_OPERATION);
}
public void onExecuteException() {
endTimedOperation(EXECUTE_OPERATION, (Timer) null);
}
public void onExecuteEnd(Request request, Response response) {
endTimedOperation(EXECUTE_OPERATION, () -> {
String method = request.method();
String status = "" + response.code();
return timers.computeIfAbsent(status + method, s -> {
TagEncodedMetricName metricName = ROOT_NAME.withTags(
"method", method,
"status", status);
return getTimer(metricName);
});
});
}
}
|
0
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules/servlet/ContextMetricsHelper.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.jinsight.modules.servlet;
import ai.apptuit.metrics.client.TagEncodedMetricName;
import ai.apptuit.metrics.jinsight.RegistryService;
import com.codahale.metrics.Counter;
import com.codahale.metrics.MetricRegistry;
import com.codahale.metrics.Timer;
import java.io.IOException;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;
import javax.servlet.AsyncEvent;
import javax.servlet.AsyncListener;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* @author Rajiv Shivane
*/
public class ContextMetricsHelper {
public static final String ROOT_CONTEXT_PATH = "ROOT";
private MetricRegistry registry;
private TagEncodedMetricName requestCountRootMetric;
private Counter activeRequestsCounter;
private Map<String, Timer> timers = new ConcurrentHashMap<>();
public ContextMetricsHelper(TagEncodedMetricName serverPrefix, String contextPath) {
if (contextPath.trim().equals("")) {
contextPath = ROOT_CONTEXT_PATH;
}
TagEncodedMetricName serverRootMetric = serverPrefix.withTags("context", contextPath);
requestCountRootMetric = serverRootMetric.submetric("requests");
registry = RegistryService.getMetricRegistry();
activeRequestsCounter = registry
.counter(serverRootMetric.submetric("requests.active").toString());
}
public void measure(HttpServletRequest request, HttpServletResponse response,
MeasurableJob runnable)
throws IOException, ServletException {
activeRequestsCounter.inc();
long startTime = System.nanoTime();
runnable.run();
if (request.isAsyncStarted()) {
request.getAsyncContext()
.addListener(new AsyncCompletionListener(startTime, request, response));
} else {
activeRequestsCounter.dec();
updateStatusMetric(startTime, request.getMethod(), response.getStatus());
}
}
private void updateStatusMetric(long startTime, String method, int status) {
getTimer(method, status).update(System.nanoTime() - startTime, TimeUnit.NANOSECONDS);
}
private Timer getTimer(String method, int status) {
String key = String.valueOf(status) + method;
return timers.computeIfAbsent(key, s -> {
TagEncodedMetricName metric = requestCountRootMetric;
if (method != null) {
metric = metric.withTags("method", method, "status", String.valueOf(status));
}
return registry.timer(metric.toString());
});
}
public interface MeasurableJob {
void run() throws IOException, ServletException;
}
private class AsyncCompletionListener implements AsyncListener {
private final HttpServletResponse response;
private long startTime;
private HttpServletRequest request;
private boolean done;
public AsyncCompletionListener(long startTime, HttpServletRequest request,
HttpServletResponse response) {
this.startTime = startTime;
this.request = request;
this.response = response;
done = false;
}
@Override
public void onComplete(AsyncEvent event) throws IOException {
if (done) {
return;
}
activeRequestsCounter.dec();
updateStatusMetric(startTime, request.getMethod(), response.getStatus());
}
@Override
public void onTimeout(AsyncEvent event) throws IOException {
activeRequestsCounter.dec();
updateStatusMetric(startTime, request.getMethod(), response.getStatus());
done = true;
}
@Override
public void onError(AsyncEvent event) throws IOException {
activeRequestsCounter.dec();
updateStatusMetric(startTime, request.getMethod(), response.getStatus());
done = true;
}
@Override
public void onStartAsync(AsyncEvent event) throws IOException {
}
}
}
|
0
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules/servlet/JettyRuleHelper.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.jinsight.modules.servlet;
import ai.apptuit.metrics.client.TagEncodedMetricName;
import ai.apptuit.metrics.jinsight.modules.common.RuleHelper;
import java.io.IOException;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.eclipse.jetty.server.Handler;
import org.eclipse.jetty.server.Request;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.handler.HandlerWrapper;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener;
import org.eclipse.jetty.util.component.LifeCycle;
import org.jboss.byteman.rule.Rule;
/**
* @author Rajiv Shivane
*/
public class JettyRuleHelper extends RuleHelper {
public static final TagEncodedMetricName JETTY_METRIC_PREFIX = TagEncodedMetricName
.decode("jetty");
public JettyRuleHelper(Rule rule) {
super(rule);
}
public void instrument(Server server) {
server.addLifeCycleListener(new AbstractLifeCycleListener() {
@Override
public void lifeCycleStarting(LifeCycle event) {
server.insertHandler(new JettyMetricsHandler());
}
});
}
private static class JettyMetricsHandler extends HandlerWrapper {
private Map<String, ContextMetricsHelper> helpers = new ConcurrentHashMap<>();
@Override
public void handle(String target, Request baseRequest, HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
String contextPath = extractContextPath(request);
ContextMetricsHelper helper = getMetricsHelper(contextPath);
helper.measure(request, response, () -> {
super.handle(target, baseRequest, request, response);
});
}
private String extractContextPath(HttpServletRequest request) {
Handler[] handlers = this.getHandlers();
String contextPath = request.getContextPath();
for (Handler handler : handlers) {
if (handler instanceof ServletContextHandler) {
contextPath = ((ServletContextHandler) handler).getContextPath();
break;
}
}
if (contextPath == null || contextPath.length() == 1) {
contextPath = "";
}
return contextPath;
}
private ContextMetricsHelper getMetricsHelper(String contextPath) {
return helpers.computeIfAbsent(contextPath, s -> {
return new ContextMetricsHelper(JETTY_METRIC_PREFIX, contextPath);
});
}
}
}
|
0
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules/servlet/TomcatRuleHelper.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.jinsight.modules.servlet;
import ai.apptuit.metrics.client.TagEncodedMetricName;
import ai.apptuit.metrics.jinsight.modules.common.RuleHelper;
import java.io.IOException;
import javax.servlet.ServletException;
import org.apache.catalina.Lifecycle;
import org.apache.catalina.connector.Request;
import org.apache.catalina.connector.Response;
import org.apache.catalina.core.StandardContext;
import org.apache.catalina.valves.ValveBase;
import org.jboss.byteman.rule.Rule;
/**
* @author Rajiv Shivane
*/
public class TomcatRuleHelper extends RuleHelper {
public static final TagEncodedMetricName TOMCAT_METRIC_PREFIX = TagEncodedMetricName
.decode("tomcat");
public TomcatRuleHelper(Rule rule) {
super(rule);
}
public void instrument(StandardContext standardContext) {
standardContext.addLifecycleListener(event -> {
String contextPath = standardContext.getPath();
if (Lifecycle.BEFORE_INIT_EVENT.equals(event.getType())) {
TomcatMetricsValve valve = new TomcatMetricsValve(contextPath);
standardContext.addValve(valve);
}
});
}
private static class TomcatMetricsValve extends ValveBase {
private final ContextMetricsHelper helper;
public TomcatMetricsValve(String contextPath) {
super(true);
helper = new ContextMetricsHelper(TOMCAT_METRIC_PREFIX, contextPath);
}
@Override
public void invoke(Request request, Response response) throws IOException, ServletException {
helper.measure(request, response, () -> {
this.getNext().invoke(request, response);
});
}
}
}
|
0
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules/spymemcached/SpymemcachedRuleHelper.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.jinsight.modules.spymemcached;
import ai.apptuit.metrics.client.TagEncodedMetricName;
import ai.apptuit.metrics.jinsight.RegistryService;
import ai.apptuit.metrics.jinsight.modules.common.RuleHelper;
import com.codahale.metrics.Clock;
import com.codahale.metrics.Timer;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;
import net.spy.memcached.ops.ConcatenationOperation;
import net.spy.memcached.ops.GetAndTouchOperation;
import net.spy.memcached.ops.GetOperation;
import net.spy.memcached.ops.GetsOperation;
import net.spy.memcached.ops.MutatorOperation;
import net.spy.memcached.ops.Operation;
import net.spy.memcached.ops.StoreOperation;
import org.jboss.byteman.rule.Rule;
/**
* @author Rajiv Shivane
*/
public class SpymemcachedRuleHelper extends RuleHelper {
public static final TagEncodedMetricName ROOT_NAME = TagEncodedMetricName
.decode("memcached.commands");
private static final String OPERATION_PROPERTY_NAME = "spymemcached.Operation";
private static final Clock clock = Clock.defaultClock();
private static final Map<String, Timer> opVsTimer = new ConcurrentHashMap<>();
public SpymemcachedRuleHelper(Rule rule) {
super(rule);
}
public void onOperationCreate(Operation operation) {
Long startTime = getObjectProperty(operation, OPERATION_PROPERTY_NAME);
if (startTime != null) {
return;//re-entrant
}
setObjectProperty(operation, OPERATION_PROPERTY_NAME, clock.getTick());
}
public void onCallbackComplete(Operation operation) {
Long startTime = removeObjectProperty(operation, OPERATION_PROPERTY_NAME);
if (startTime == null) {
return;//re-entrant
}
String op = Operations.getOperationName(operation);
long t = clock.getTick() - startTime;
Timer timer = opVsTimer.computeIfAbsent(op, s -> {
String metricName = ROOT_NAME.withTags("command", op).toString();
return RegistryService.getMetricRegistry().timer(metricName);
});
timer.update(t, TimeUnit.NANOSECONDS);
}
static class Operations {
private static final Map<String, String> classToOperationMap = new ConcurrentHashMap<>();
public static <T extends Operation> String getOperationName(T operation) {
//TODO optimize. Convert multiple if/else to switch or map.get()
String op;
if (operation instanceof StoreOperation) {
op = ((StoreOperation) operation).getStoreType().name();
} else if (operation instanceof ConcatenationOperation) {
op = ((ConcatenationOperation) operation).getStoreType().name();
} else if (operation instanceof GetsOperation) {
op = "get";
} else if (operation instanceof GetOperation) {
op = "get";
} else if (operation instanceof GetAndTouchOperation) {
op = "gat";
} else if (operation instanceof MutatorOperation) {
op = ((MutatorOperation) operation).getType().name();
} else {
op = Operations.getOperationName(operation.getClass());
}
return op;
}
public static String getOperationName(Class<? extends Operation> clazz) {
String simpleName = clazz.getSimpleName();
String opName = classToOperationMap.get(simpleName);
if (opName != null) {
return opName;
}
opName = simpleName;
opName = opName.replaceAll("OperationImpl$", "");
opName = opName.replaceAll("([A-Z])([A-Z]*)([A-Z])", "$1$2_$3");
opName = opName.replaceAll("([^A-Z_])([A-Z])", "$1_$2").toLowerCase();
classToOperationMap.put(simpleName, opName);
return opName;
}
}
}
|
0
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules/whalinmemcached/WhalinmemcachedRuleHelper.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.jinsight.modules.whalinmemcached;
import ai.apptuit.metrics.client.TagEncodedMetricName;
import ai.apptuit.metrics.jinsight.RegistryService;
import ai.apptuit.metrics.jinsight.modules.common.RuleHelper;
import com.codahale.metrics.Timer;
import com.whalin.MemCached.MemCachedClient;
import org.jboss.byteman.rule.Rule;
/**
* @author Rajiv Shivane
*/
public class WhalinmemcachedRuleHelper extends RuleHelper {
public static final TagEncodedMetricName ROOT_NAME = TagEncodedMetricName
.decode("memcached.commands");
private static final OperationId SET_OPERATION_ID = new OperationId("whalinmemcached.set");
private static final OperationId GET_OPERATION_ID = new OperationId("whalinmemcached.get");
private static final OperationId DELETE_OPERATION_ID = new OperationId("whalinmemcached.delete");
private static final Timer SET_OPERATION_TIMER = createTimerForOp("set");
private static final Timer GET_OPERATION_TIMER = createTimerForOp("get");
private static final Timer DELETE_OPERATION_TIMER = createTimerForOp("delete");
private static final Timer ADD_OPERATION_TIMER = createTimerForOp("add");
private static final Timer REPLACE_OPERATION_TIMER = createTimerForOp("replace");
private static final Timer APPEND_OPERATION_TIMER = createTimerForOp("append");
private static final Timer PREPEND_OPERATION_TIMER = createTimerForOp("prepend");
private static final Timer INCR_OPERATION_TIMER = createTimerForOp("incr");
private static final Timer DECR_OPERATION_TIMER = createTimerForOp("decr");
public WhalinmemcachedRuleHelper(Rule rule) {
super(rule);
}
private static Timer createTimerForOp(String op) {
String metric = ROOT_NAME.withTags("command", op).toString();
return RegistryService.getMetricRegistry().timer(metric);
}
public void onOperationStart(String op, MemCachedClient client) {
beginTimedOperation(getOperationId(op));
}
public void onOperationEnd(String op, MemCachedClient client) {
endTimedOperation(getOperationId(op), getTimerForOp(op));
}
public void onOperationError(String op, MemCachedClient client) {
endTimedOperation(getOperationId(op), getTimerForOp(op));
}
private Timer getTimerForOp(String op) {
switch (op) {
case "set":
case "cas":
return SET_OPERATION_TIMER;
case "get":
case "gets":
return GET_OPERATION_TIMER;
case "delete":
return DELETE_OPERATION_TIMER;
case "add":
return ADD_OPERATION_TIMER;
case "replace":
return REPLACE_OPERATION_TIMER;
case "append":
return APPEND_OPERATION_TIMER;
case "prepend":
return PREPEND_OPERATION_TIMER;
case "addOrIncr":
case "incr":
return INCR_OPERATION_TIMER;
case "addOrDecr":
case "decr":
return DECR_OPERATION_TIMER;
default:
throw new IllegalArgumentException("Unsupported op: " + op);
}
}
private OperationId getOperationId(String op) {
switch (op) {
case "set":
case "cas":
case "add":
case "replace":
case "append":
case "prepend":
return SET_OPERATION_ID;
case "get":
case "gets":
return GET_OPERATION_ID;
case "delete":
return DELETE_OPERATION_ID;
case "incr":
case "decr":
case "addOrIncr":
case "addOrDecr":
return SET_OPERATION_ID;
default:
throw new IllegalArgumentException("Unsupported op: " + op);
}
}
}
|
0
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules
|
java-sources/ai/apptuit/jinsight/1.0.10/ai/apptuit/metrics/jinsight/modules/whalinmemcached/WhalinmemcachedRuleSet.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.jinsight.modules.whalinmemcached;
import ai.apptuit.metrics.jinsight.modules.common.AbstractRuleSet;
import com.whalin.MemCached.MemCachedClient;
import java.util.ArrayList;
import java.util.List;
/**
* @author Rajiv Shivane
*/
public class WhalinmemcachedRuleSet extends AbstractRuleSet {
private static final String HELPER_NAME =
"ai.apptuit.metrics.jinsight.modules.whalinmemcached.WhalinmemcachedRuleHelper";
private static final String[] instrumentedMethods = new String[]{
"get", "set", "delete", "add", "replace", "append", "prepend", "gets", "cas", "addOrIncr",
"incr", "addOrDecr", "decr"
};
private final List<RuleInfo> rules = new ArrayList<>();
public WhalinmemcachedRuleSet() {
for (String method : instrumentedMethods) {
addRulesForOperation(method);
}
}
private void addRulesForOperation(String methodName) {
addRule(MemCachedClient.class, methodName, RuleInfo.AT_ENTRY,
"onOperationStart(\"" + methodName + "\", $0)");
addRule(MemCachedClient.class, methodName, RuleInfo.AT_EXIT,
"onOperationEnd(\"" + methodName + "\", $0)");
addRule(MemCachedClient.class, methodName, RuleInfo.AT_EXCEPTION_EXIT,
"onOperationError(\"" + methodName + "\", $0)");
}
private void addRule(Class clazz, String methodName, String whereClause, String action) {
String ruleName = clazz + " " + methodName + " " + whereClause;
RuleInfo rule = new RuleInfo(ruleName, clazz.getName(), clazz.isInterface(), false,
methodName, HELPER_NAME, whereClause, null, null, action, null, null);
rules.add(rule);
}
@Override
public List<RuleInfo> getRules() {
return rules;
}
}
|
0
|
java-sources/ai/apptuit/metrics/metrics-apptuit-dropwizard/0.9.9/ai/apptuit/metrics
|
java-sources/ai/apptuit/metrics/metrics-apptuit-dropwizard/0.9.9/ai/apptuit/metrics/dropwizard/ApptuitReporter.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.dropwizard;
import ai.apptuit.metrics.client.*;
import com.codahale.metrics.Counter;
import com.codahale.metrics.Gauge;
import com.codahale.metrics.Histogram;
import com.codahale.metrics.Meter;
import com.codahale.metrics.MetricFilter;
import com.codahale.metrics.MetricRegistry;
import com.codahale.metrics.ScheduledReporter;
import com.codahale.metrics.Timer;
import java.io.IOException;
import java.net.URL;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.SortedMap;
import java.util.concurrent.TimeUnit;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* @author Rajiv Shivane
*/
public class ApptuitReporter extends ScheduledReporter {
private static final Logger LOGGER = Logger.getLogger(ApptuitReporter.class.getName());
private static final boolean DEBUG = false;
private static final ReportingMode DEFAULT_REPORTING_MODE = ReportingMode.API_PUT;
private static final String REPORTER_NAME = "apptuit-reporter";
private final Timer buildReportTimer;
private final Timer sendReportTimer;
private final Counter metricsSentCounter;
private final Counter pointsSentCounter;
private final DataPointsSender dataPointsSender;
final Map<TagEncodedMetricName, Long> lastReportedCount = new HashMap<>();
protected ApptuitReporter(MetricRegistry registry, MetricFilter filter, TimeUnit rateUnit,
TimeUnit durationUnit, Map<String, String> globalTags,
String key, URL apiUrl,
ReportingMode reportingMode, Sanitizer sanitizer,
SendErrorHandler errorHandler) {
this(registry, filter, rateUnit, durationUnit,
getDataPointSender(globalTags, key, apiUrl, reportingMode, sanitizer, errorHandler));
}
protected ApptuitReporter(MetricRegistry registry, MetricFilter filter, TimeUnit rateUnit,
TimeUnit durationUnit, DataPointsSender sender) {
super(registry, REPORTER_NAME, filter, rateUnit, durationUnit);
this.buildReportTimer = registry.timer("apptuit.reporter.report.build");
this.sendReportTimer = registry.timer("apptuit.reporter.report.send");
this.metricsSentCounter = registry.counter("apptuit.reporter.metrics.sent.count");
this.pointsSentCounter = registry.counter("apptuit.reporter.points.sent.count");
this.dataPointsSender = sender;
}
private static DataPointsSender getDataPointSender(Map<String, String> globalTags, String key, URL apiUrl,
ReportingMode reportingMode, Sanitizer sanitizer,
SendErrorHandler errorHandler) {
if (reportingMode == null) {
reportingMode = DEFAULT_REPORTING_MODE;
}
switch (reportingMode) {
case NO_OP:
return dataPoints -> {
};
case SYS_OUT:
return dataPoints -> {
dataPoints.forEach(dp -> dp.toTextLine(System.out, globalTags, sanitizer));
};
case XCOLLECTOR:
XCollectorForwarder forwarder = new XCollectorForwarder(globalTags);
return dataPoints -> forwarder.forward(dataPoints, sanitizer);
case API_PUT:
default:
ApptuitPutClient putClient = new ApptuitPutClient(key, globalTags, apiUrl);
return dataPoints -> {
try {
putClient.send(dataPoints, sanitizer);
} catch (IOException e) {
if (errorHandler != null) {
errorHandler.handle(e);
} else {
LOGGER.log(Level.SEVERE, "Error Sending Datapoints", e);
}
}
};
}
}
@Override
public void report(SortedMap<String, Gauge> gauges, SortedMap<String, Counter> counters,
SortedMap<String, Histogram> histograms, SortedMap<String, Meter> meters,
SortedMap<String, Timer> timers) {
DataPointCollector collector = new DataPointCollector(System.currentTimeMillis() / 1000, this);
try {
long t0 = System.currentTimeMillis();
debug("################");
debug(">>>>>>>> Guages <<<<<<<<<");
gauges.forEach(collector::collectGauge);
debug(">>>>>>>> Counters <<<<<<<<<");
counters.forEach(collector::collectCounter);
debug(">>>>>>>> Histograms <<<<<<<<<");
histograms.forEach(collector::collectHistogram);
debug(">>>>>>>> Meters <<<<<<<<<");
meters.forEach(collector::collectMeter);
debug(">>>>>>>> Timers <<<<<<<<<");
timers.forEach(collector::collectTimer);
debug("################");
int numMetrics = gauges.size() + counters.size() + histograms.size() + meters.size() + timers.size();
metricsSentCounter.inc(numMetrics);
pointsSentCounter.inc(collector.getDataPoints().size());
buildReportTimer.update(System.currentTimeMillis() - t0, TimeUnit.MILLISECONDS);
} catch (Exception | Error e) {
LOGGER.log(Level.SEVERE, "Error building metrics.", e);
}
try {
long t1 = System.currentTimeMillis();
Collection<DataPoint> dataPoints = collector.getDataPoints();
dataPointsSender.send(dataPoints);
//dataPoints.forEach(System.out::println);
sendReportTimer.update(System.currentTimeMillis() - t1, TimeUnit.MILLISECONDS);
} catch (Exception | Error e) {
LOGGER.log(Level.SEVERE, "Error reporting metrics.", e);
}
}
@Override
protected double convertDuration(double duration) {
return super.convertDuration(duration);
}
@Override
protected double convertRate(double rate) {
return super.convertRate(rate);
}
static void debug(Object s) {
if (DEBUG) {
System.out.println(s);
}
}
public enum ReportingMode {
NO_OP, SYS_OUT, XCOLLECTOR, API_PUT
}
public interface DataPointsSender {
void send(Collection<DataPoint> dataPoints);
}
}
|
0
|
java-sources/ai/apptuit/metrics/metrics-apptuit-dropwizard/0.9.9/ai/apptuit/metrics
|
java-sources/ai/apptuit/metrics/metrics-apptuit-dropwizard/0.9.9/ai/apptuit/metrics/dropwizard/ApptuitReporterFactory.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.dropwizard;
import ai.apptuit.metrics.client.Sanitizer;
import com.codahale.metrics.MetricFilter;
import com.codahale.metrics.MetricRegistry;
import com.codahale.metrics.ScheduledReporter;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Collections;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.TimeUnit;
/**
* @author Rajiv Shivane
*/
public class ApptuitReporterFactory {
private static final DefaultStringMatchingStrategy DEFAULT_STRING_MATCHING_STRATEGY =
new DefaultStringMatchingStrategy();
private static final RegexStringMatchingStrategy REGEX_STRING_MATCHING_STRATEGY =
new RegexStringMatchingStrategy();
private TimeUnit durationUnit = TimeUnit.MILLISECONDS;
private TimeUnit rateUnit = TimeUnit.SECONDS;
private Set<String> excludes = Collections.emptySet();
private Set<String> includes = Collections.emptySet();
private boolean useRegexFilters = false;
private Map<String, String> globalTags = new LinkedHashMap<>();
private String apiKey;
private String apiUrl;
private ApptuitReporter.ReportingMode reportingMode;
private Sanitizer sanitizer = Sanitizer.DEFAULT_SANITIZER;
private SendErrorHandler errorHandler;
public void addGlobalTag(String tag, String value) {
globalTags.put(tag, value);
}
public void setApiKey(String key) {
this.apiKey = key;
}
public void setApiUrl(String url) {
this.apiUrl = url;
}
public void setReportingMode(ApptuitReporter.ReportingMode reportingMode) {
this.reportingMode = reportingMode;
}
public TimeUnit getDurationUnit() {
return durationUnit;
}
public void setDurationUnit(TimeUnit durationUnit) {
this.durationUnit = durationUnit;
}
public TimeUnit getRateUnit() {
return rateUnit;
}
public void setRateUnit(final TimeUnit rateUnit) {
this.rateUnit = rateUnit;
}
public Set<String> getIncludes() {
return includes;
}
public void setIncludes(Set<String> includes) {
this.includes = new HashSet<>(includes);
}
public Set<String> getExcludes() {
return excludes;
}
public void setExcludes(Set<String> excludes) {
this.excludes = new HashSet<>(excludes);
}
public boolean getUseRegexFilters() {
return useRegexFilters;
}
public void setUseRegexFilters(boolean useRegexFilters) {
this.useRegexFilters = useRegexFilters;
}
public void setSanitizer(Sanitizer sanitizer) {
this.sanitizer = sanitizer;
}
public Sanitizer getSanitizer() {
return this.sanitizer;
}
public SendErrorHandler getErrorHandler() {
return errorHandler;
}
public void setErrorHandler(SendErrorHandler errorHandler) {
this.errorHandler = errorHandler;
}
public MetricFilter getFilter() {
final StringMatchingStrategy stringMatchingStrategy = getUseRegexFilters()
? REGEX_STRING_MATCHING_STRATEGY : DEFAULT_STRING_MATCHING_STRATEGY;
return (name, metric) -> {
// Include the metric if its name is not excluded and its name is included
// Where, by default, with no includes setting, all names are included.
return !stringMatchingStrategy.containsMatch(getExcludes(), name)
&& (getIncludes().isEmpty() || stringMatchingStrategy.containsMatch(getIncludes(), name));
};
}
public ScheduledReporter build(MetricRegistry registry) {
try {
return new ApptuitReporter(registry, getFilter(), getRateUnit(), getDurationUnit(),
globalTags, apiKey, apiUrl != null ? new URL(apiUrl) : null,
reportingMode, sanitizer, errorHandler);
} catch (MalformedURLException e) {
throw new IllegalArgumentException(e);
}
}
private interface StringMatchingStrategy {
boolean containsMatch(Set<String> matchExpressions, String metricName);
}
private static class DefaultStringMatchingStrategy implements StringMatchingStrategy {
@Override
public boolean containsMatch(Set<String> matchExpressions, String metricName) {
return matchExpressions.contains(metricName);
}
}
private static class RegexStringMatchingStrategy extends DefaultStringMatchingStrategy {
//TODO
/*
private final LoadingCache<String, Pattern> patternCache;
private RegexStringMatchingStrategy() {
patternCache = CacheBuilder.newBuilder()
.expireAfterWrite(1, TimeUnit.HOURS)
.build(new CacheLoader<String, Pattern>() {
@Override
public Pattern load(String regex) throws Exception {
return Pattern.compile(regex);
}
});
}
@Override
public boolean containsMatch(Set<String> matchExpressions, String metricName) {
for (String regexExpression : matchExpressions) {
if (patternCache.getUnchecked(regexExpression).matcher(metricName).matches()) {
// just need to match on a single value - return as soon as we do
return true;
}
}
return false;
}
*/
}
}
|
0
|
java-sources/ai/apptuit/metrics/metrics-apptuit-dropwizard/0.9.9/ai/apptuit/metrics
|
java-sources/ai/apptuit/metrics/metrics-apptuit-dropwizard/0.9.9/ai/apptuit/metrics/dropwizard/DataPointCollector.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.dropwizard;
import ai.apptuit.metrics.client.DataPoint;
import ai.apptuit.metrics.client.TagEncodedMetricName;
import com.codahale.metrics.*;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.LinkedList;
import java.util.List;
/**
* @author Rajiv Shivane
*/
public class DataPointCollector {
private static final String QUANTILE_TAG_NAME = "quantile";
private static final String WINDOW_TAG_NAME = "window";
private static final String RATE_SUBMETRIC = "rate";
private final long epoch;
private final ApptuitReporter apptuitReporter;
private final List<DataPoint> dataPoints;
DataPointCollector(long epoch, ApptuitReporter apptuitReporter) {
this.epoch = epoch;
this.apptuitReporter = apptuitReporter;
this.dataPoints = new LinkedList<>();
}
public void collectGauge(String name, Gauge gauge) {
Object value = gauge.getValue();
if (value instanceof BigDecimal) {
addDataPoint(name, ((BigDecimal) value).doubleValue());
} else if (value instanceof BigInteger) {
addDataPoint(name, ((BigInteger) value).doubleValue());
} else if (value != null && value.getClass().isAssignableFrom(Double.class)) {
if (!Double.isNaN((Double) value) && Double.isFinite((Double) value)) {
addDataPoint(name, (Double) value);
}
} else if (value instanceof Number) {
addDataPoint(name, ((Number) value).doubleValue());
}
}
public void collectCounter(String name, Counter counter) {
addDataPoint(name, counter.getCount());
}
public void collectHistogram(String name, Histogram histogram) {
TagEncodedMetricName rootMetric = TagEncodedMetricName.decode(name);
collectCounting(rootMetric.submetric("count"), histogram, () -> reportSnapshot(rootMetric, histogram.getSnapshot()));
}
public void collectMeter(String name, Meter meter) {
TagEncodedMetricName rootMetric = TagEncodedMetricName.decode(name);
collectCounting(rootMetric.submetric("total"), meter, () -> reportMetered(rootMetric, meter));
}
public void collectTimer(String name, final Timer timer) {
TagEncodedMetricName rootMetric = TagEncodedMetricName.decode(name);
collectCounting(rootMetric.submetric("count"), timer, () -> {
reportSnapshot(rootMetric.submetric("duration"), timer.getSnapshot());
reportMetered(rootMetric, timer)
;
});
}
public List<DataPoint> getDataPoints() {
return dataPoints;
}
private <T extends Counting> void collectCounting(TagEncodedMetricName countMetric, T metric,
Runnable reportSubmetrics) {
long currentCount = metric.getCount();
addDataPoint(countMetric, currentCount);
Long lastCount = apptuitReporter.lastReportedCount.put(countMetric, currentCount);
if (lastCount == null || lastCount != currentCount) {
reportSubmetrics.run();
}
}
private void reportSnapshot(TagEncodedMetricName metric, Snapshot snapshot) {
addDataPoint(metric.submetric("min"), convertDuration(snapshot.getMin()));
addDataPoint(metric.submetric("max"), convertDuration(snapshot.getMax()));
addDataPoint(metric.submetric("mean"), convertDuration(snapshot.getMean()));
addDataPoint(metric.submetric("stddev"), convertDuration(snapshot.getStdDev()));
addDataPoint(metric.withTags(QUANTILE_TAG_NAME, "0.5"), convertDuration(snapshot.getMedian()));
addDataPoint(metric.withTags(QUANTILE_TAG_NAME, "0.75"), convertDuration(snapshot.get75thPercentile()));
addDataPoint(metric.withTags(QUANTILE_TAG_NAME, "0.95"), convertDuration(snapshot.get95thPercentile()));
addDataPoint(metric.withTags(QUANTILE_TAG_NAME, "0.98"), convertDuration(snapshot.get98thPercentile()));
addDataPoint(metric.withTags(QUANTILE_TAG_NAME, "0.99"), convertDuration(snapshot.get99thPercentile()));
addDataPoint(metric.withTags(QUANTILE_TAG_NAME, "0.999"), convertDuration(snapshot.get999thPercentile()));
}
private void reportMetered(TagEncodedMetricName metric, Metered meter) {
addDataPoint(metric.submetric(RATE_SUBMETRIC).withTags(WINDOW_TAG_NAME, "1m"),
convertRate(meter.getOneMinuteRate()));
addDataPoint(metric.submetric(RATE_SUBMETRIC).withTags(WINDOW_TAG_NAME, "5m"),
convertRate(meter.getFiveMinuteRate()));
addDataPoint(metric.submetric(RATE_SUBMETRIC).withTags(WINDOW_TAG_NAME, "15m"),
convertRate(meter.getFifteenMinuteRate()));
//addDataPoint(rootMetric.submetric("rate", "window", "all"), epoch, meter.getMeanRate());
}
private double convertRate(double rate) {
return apptuitReporter.convertRate(rate);
}
private double convertDuration(double duration) {
return apptuitReporter.convertDuration(duration);
}
private void addDataPoint(String name, double value) {
addDataPoint(TagEncodedMetricName.decode(name), value);
}
private void addDataPoint(String name, long value) {
addDataPoint(TagEncodedMetricName.decode(name), value);
}
private void addDataPoint(TagEncodedMetricName name, Number value) {
/*
//TODO support disabled metric attributes
if(getDisabledMetricAttributes().contains(type)) {
return;
}
*/
DataPoint dataPoint = new DataPoint(name.getMetricName(), epoch, value, name.getTags());
dataPoints.add(dataPoint);
ApptuitReporter.debug(dataPoint);
}
}
|
0
|
java-sources/ai/apptuit/metrics/metrics-apptuit-dropwizard/0.9.9/ai/apptuit/metrics
|
java-sources/ai/apptuit/metrics/metrics-apptuit-dropwizard/0.9.9/ai/apptuit/metrics/dropwizard/JInsightReporter.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.dropwizard;
import com.codahale.metrics.MetricRegistry;
import com.codahale.metrics.Reporter;
import java.io.Closeable;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
/**
* @author Rajiv Shivane
*/
public class JInsightReporter implements Closeable, Reporter {
private Closeable closeable;
public static Builder forRegistry(MetricRegistry registry) {
return new Builder(registry);
}
private JInsightReporter(Closeable function) {
this.closeable = function;
}
@Override
public void close() throws IOException {
closeable.close();
}
public static class Builder {
private final MetricRegistry registry;
private Builder(MetricRegistry registry) {
this.registry = registry;
}
/**
* @return
* @throws IllegalStateException if JInsight classes cannot be found in system classpath
* or if JInsight could not be initialized
*/
public JInsightReporter build() {
final Class<?> aClass;
try {
aClass = ClassLoader.getSystemClassLoader().loadClass("ai.apptuit.metrics.jinsight.MetricRegistryCollection");
} catch (ClassNotFoundException | NoClassDefFoundError e) {
throw new IllegalStateException("Could not find JInsight classes in system classpath", e);
}
final Method deRegister;
final Object delegate;
try {
Method getInstance = aClass.getMethod("getInstance");
Method register = aClass.getMethod("register", Object.class);
deRegister = aClass.getMethod("deRegister", Object.class);
delegate = getInstance.invoke(null);
register.invoke(delegate, this.registry);
} catch (NoSuchMethodException e) {
throw new IllegalStateException("Could not locate required methods to register with JInsight. Version mismatch?", e);
} catch (IllegalAccessException e) {
throw new IllegalStateException("Error registering with JInsight.", e);
} catch (InvocationTargetException e) {
throw new IllegalStateException("Error registering with JInsight.", e.getCause());
}
return new JInsightReporter(() -> {
try {
deRegister.invoke(delegate, this.registry);
} catch (IllegalAccessException | InvocationTargetException e) {
throw new IOException("Error closing reporter.", e);
}
});
}
}
}
|
0
|
java-sources/ai/apptuit/metrics/metrics-apptuit-dropwizard/0.9.9/ai/apptuit/metrics
|
java-sources/ai/apptuit/metrics/metrics-apptuit-dropwizard/0.9.9/ai/apptuit/metrics/dropwizard/SendErrorHandler.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.dropwizard;
import java.io.IOException;
/**
* @author Rajiv Shivane
*/
public interface SendErrorHandler {
void handle(IOException e);
}
|
0
|
java-sources/ai/apptuit/metrics/metrics-apptuit-prometheus-client/0.9.9/ai/apptuit/metrics/client
|
java-sources/ai/apptuit/metrics/metrics-apptuit-prometheus-client/0.9.9/ai/apptuit/metrics/client/prometheus/AbstractResponse.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.client.prometheus;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.util.Collections;
import java.util.List;
/**
* @author Rajiv Shivane
*/
public abstract class AbstractResponse {
public enum STATUS {success, error}
@SuppressFBWarnings(value = "UWF_UNWRITTEN_FIELD", justification = "Initialized by Gson")
private STATUS status;
@SuppressFBWarnings(value = "UWF_UNWRITTEN_FIELD", justification = "Initialized by Gson")
private String errorType;
@SuppressFBWarnings(value = "UWF_UNWRITTEN_FIELD", justification = "Initialized by Gson")
private String error;
@SuppressFBWarnings(value = "UWF_UNWRITTEN_FIELD", justification = "Initialized by Gson")
private List<String> warnings;
public STATUS getStatus() {
return status;
}
public String getErrorType() {
return errorType;
}
public String getError() {
return error;
}
public List<String> getWarnings() {
return warnings == null ? Collections.emptyList() : Collections.unmodifiableList(warnings);
}
}
|
0
|
java-sources/ai/apptuit/metrics/metrics-apptuit-prometheus-client/0.9.9/ai/apptuit/metrics/client
|
java-sources/ai/apptuit/metrics/metrics-apptuit-prometheus-client/0.9.9/ai/apptuit/metrics/client/prometheus/MatrixResult.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.client.prometheus;
import java.util.Collections;
import java.util.List;
/**
* @author Rajiv Shivane
*/
public class MatrixResult extends QueryResult {
private List<TimeSeries> series;
MatrixResult(List<TimeSeries> series) {
super(TYPE.matrix);
this.series = series;
}
public List<TimeSeries> getSeries() {
return series == null ? Collections.emptyList() : Collections.unmodifiableList(series);
}
}
|
0
|
java-sources/ai/apptuit/metrics/metrics-apptuit-prometheus-client/0.9.9/ai/apptuit/metrics/client
|
java-sources/ai/apptuit/metrics/metrics-apptuit-prometheus-client/0.9.9/ai/apptuit/metrics/client/prometheus/PrometheusClient.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.client.prometheus;
import com.google.gson.Gson;
import com.google.gson.JsonSyntaxException;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URISyntaxException;
import java.net.URL;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.Base64;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* @author Rajiv Shivane
*/
public class PrometheusClient {
public static final String API_V_1_QUERY_RANGE = "api/v1/query_range";
private static final Logger LOGGER = Logger.getLogger(PrometheusClient.class.getName());
private static final int[] STEPS = new int[]{5, 15, 60, 300, 900, 3600};
private static final int CONNECT_TIMEOUT_MS = 5000;
private static final int SOCKET_TIMEOUT_MS = 15000;
private static final URL DEFAULT_PROMQL_API_URI;
static {
try {
DEFAULT_PROMQL_API_URI = new URL("https://api.apptuit.ai/prometheus/");
} catch (MalformedURLException e) {
throw new IllegalStateException(e);
}
}
private String userId;
private final String token;
private final URL prometheusEndpoint;
public PrometheusClient(String token) {
this(token, DEFAULT_PROMQL_API_URI);
}
public PrometheusClient(String token, URL prometheusEndpoint) {
this(null, token, prometheusEndpoint);
}
public PrometheusClient(String userId, String token, URL prometheusEndpoint) {
this.userId = userId;
this.token = token;
this.prometheusEndpoint = prometheusEndpoint;
}
public QueryResponse query(long startEpochMillis, long endEpochMillis, String promQueryString)
throws IOException, ResponseStatusException, URISyntaxException {
return query(startEpochMillis, endEpochMillis, promQueryString, getStepSize(endEpochMillis - startEpochMillis) * 1000);
}
@SuppressFBWarnings(value = "SF_SWITCH_NO_DEFAULT", justification = "Findbugs limitation https://sourceforge.net/p/findbugs/bugs/1298/")
public QueryResponse query(long startEpochMillis, long endEpochMillis, String promQueryString, long stepSizeMillis)
throws IOException, ResponseStatusException, URISyntaxException {
URL queryEndpoint = completeTrailingSlashURL(prometheusEndpoint).toURI().resolve(API_V_1_QUERY_RANGE).toURL();
HttpURLConnection urlConnection = (HttpURLConnection) queryEndpoint.openConnection();
urlConnection.setConnectTimeout(CONNECT_TIMEOUT_MS);
urlConnection.setReadTimeout(SOCKET_TIMEOUT_MS);
urlConnection.setRequestMethod("POST");
urlConnection.setRequestProperty("Authorization", getAuthHeader());
String urlParameters = "start=" + (startEpochMillis / 1000)
+ "&end=" + (endEpochMillis / 1000)
+ "&step=" + (stepSizeMillis / 1000)
+ "&query=" + URLEncoder.encode(promQueryString, "UTF-8");
urlConnection.setDoOutput(true);
try (DataOutputStream wr = new DataOutputStream(urlConnection.getOutputStream())) {
wr.writeBytes(urlParameters);
wr.flush();
}
StringBuilder sb = new StringBuilder();
int responseCode = urlConnection.getResponseCode();
LOGGER.log(Level.FINE, "Sending 'POST' request to URL : " + queryEndpoint);
LOGGER.log(Level.FINE, "Post parameters : " + urlParameters);
InputStream inputStr = (responseCode < HttpURLConnection.HTTP_BAD_REQUEST) ? urlConnection.getInputStream()
: urlConnection.getErrorStream();
try (BufferedReader in = new BufferedReader(new InputStreamReader(inputStr, StandardCharsets.UTF_8))) {
String line;
while ((line = in.readLine()) != null) {
sb.append(line);
}
}
if (sb.indexOf("server returned HTTP status 401 Unauthorized") > 0) {
responseCode = 401;
}
String response = sb.toString();
switch (responseCode) {
case HttpURLConnection.HTTP_OK:
return new Gson().fromJson(response, QueryResponse.class);
case HttpURLConnection.HTTP_BAD_REQUEST:
case HttpURLConnection.HTTP_UNAVAILABLE:
case 422:
try {
return new Gson().fromJson(response, QueryResponse.class);
} catch (JsonSyntaxException e) {
// NOT in prom format, fall through and raise an exception
}
default:
throw new ResponseStatusException(responseCode, response);
}
}
static URL completeTrailingSlashURL(URL url) throws URISyntaxException, MalformedURLException {
String urlPath = url.toURI().toString();
url = urlPath.endsWith("/") ? url : new URL(urlPath + "/");
return url;
}
private String getAuthHeader() {
if (userId == null) {
return "Bearer " + token;
} else {
byte[] userPass = (userId + ":" + token).getBytes(StandardCharsets.UTF_8);
return "Basic " + Base64.getEncoder().encodeToString(userPass);
}
}
static long getStepSize(long queryRangeMillis) {
long step = queryRangeMillis / 1000; //convert to seconds
step = step / 1000; //desired points per series
if (step < 1) {
return 1;
}
int lowerStep = 1;
for (int predefinedStep : STEPS) {
if (step <= predefinedStep) {
break;
}
lowerStep = predefinedStep;
}
return lowerStep * (step / lowerStep);
}
}
|
0
|
java-sources/ai/apptuit/metrics/metrics-apptuit-prometheus-client/0.9.9/ai/apptuit/metrics/client
|
java-sources/ai/apptuit/metrics/metrics-apptuit-prometheus-client/0.9.9/ai/apptuit/metrics/client/prometheus/QueryResponse.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.client.prometheus;
import com.google.gson.Gson;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;
import com.google.gson.JsonPrimitive;
import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSerializer;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.reflect.TypeToken;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;
/**
* @author Rajiv Shivane
*/
public class QueryResponse extends AbstractResponse {
@JsonAdapter(QueryResponse.QueryResultDeserializer.class)
private QueryResult data;
public QueryResult getResult() {
return data;
}
@Override
public String toString() {
return new Gson().toJson(this);
}
static class QueryResultDeserializer implements JsonDeserializer<QueryResult>, JsonSerializer<QueryResult> {
@Override
public QueryResult deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context)
throws JsonParseException {
JsonObject jsonObject = json.getAsJsonObject();
JsonElement type = jsonObject.get("resultType");
if (type != null && type.getAsString().equals("matrix")) {
JsonElement result = jsonObject.get("result");
Type listType = new TypeToken<ArrayList<TimeSeries>>() {
}.getType();
List<TimeSeries> series = new Gson().fromJson(result, listType);
return new MatrixResult(series);
}
throw new UnsupportedOperationException("Unsupported type: [" + type + "]");
}
@Override
public JsonElement serialize(QueryResult queryResult, Type type,
JsonSerializationContext jsonSerializationContext) {
QueryResult.TYPE resultType = queryResult.getType();
if (resultType == QueryResult.TYPE.matrix) {
JsonObject dataJson = new JsonObject();
dataJson.add("resultType", new JsonPrimitive("matrix"));
JsonElement resultJson = new Gson().toJsonTree(((MatrixResult) queryResult).getSeries());
dataJson.add("result", resultJson);
return dataJson;
}
return null;
}
}
}
|
0
|
java-sources/ai/apptuit/metrics/metrics-apptuit-prometheus-client/0.9.9/ai/apptuit/metrics/client
|
java-sources/ai/apptuit/metrics/metrics-apptuit-prometheus-client/0.9.9/ai/apptuit/metrics/client/prometheus/QueryResult.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.client.prometheus;
/**
* @author Rajiv Shivane
*/
public abstract class QueryResult {
public enum TYPE {matrix, vector, scalar, string}
private TYPE type;
protected QueryResult(TYPE type) {
this.type = type;
}
public TYPE getType() {
return type;
}
}
|
0
|
java-sources/ai/apptuit/metrics/metrics-apptuit-prometheus-client/0.9.9/ai/apptuit/metrics/client
|
java-sources/ai/apptuit/metrics/metrics-apptuit-prometheus-client/0.9.9/ai/apptuit/metrics/client/prometheus/ResponseStatusException.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.client.prometheus;
/**
* @author Rajiv Shivane
*/
public class ResponseStatusException extends Exception {
private int httpStatus;
private String body;
public ResponseStatusException(int httpStatus, String body) {
this(httpStatus, body, null);
}
public ResponseStatusException(int httpStatus, String body, Throwable cause) {
super(cause);
this.httpStatus = httpStatus;
this.body = body;
}
public String getMessage() {
return this.httpStatus + (this.body != null ? " [" + this.body + "]" : "");
}
public String getResponseBody() {
return body;
}
public int getResponseStatus() {
return httpStatus;
}
}
|
0
|
java-sources/ai/apptuit/metrics/metrics-apptuit-prometheus-client/0.9.9/ai/apptuit/metrics/client
|
java-sources/ai/apptuit/metrics/metrics-apptuit-prometheus-client/0.9.9/ai/apptuit/metrics/client/prometheus/TimeSeries.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.client.prometheus;
import com.google.gson.JsonArray;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonParseException;
import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSerializer;
import com.google.gson.annotations.JsonAdapter;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.lang.reflect.Type;
import java.util.Collections;
import java.util.List;
import java.util.Map;
/**
* @author Rajiv Shivane
*/
public class TimeSeries {
@SuppressFBWarnings(value = "UWF_UNWRITTEN_FIELD", justification = "Initialized by Gson")
private Map<String, String> metric;
@SuppressFBWarnings(value = "UWF_UNWRITTEN_FIELD", justification = "Initialized by Gson")
private List<Tuple> values;
public Map<String, String> getLabels() {
return metric == null ? Collections.emptyMap() : Collections.unmodifiableMap(metric);
}
public List<Tuple> getValues() {
return values == null ? Collections.emptyList() : Collections.unmodifiableList(values);
}
@JsonAdapter(Tuple.TupleDeserializer.class)
public static class Tuple {
private long timestamp;
private String value;
private Tuple(long ts, String val) {
this.timestamp = ts * 1000;
this.value = val;
}
public long getTimestamp() {
return timestamp;
}
public String getValue() {
return value;
}
public int getValueAsInteger() {
return Integer.parseInt(value);
}
public long getValueAsLong() {
return Long.parseLong(value);
}
public float getValueAsFloat() {
return Float.parseFloat(value);
}
public double getValueAsDouble() {
return Double.parseDouble(value);
}
public static class TupleDeserializer implements JsonDeserializer<Tuple>, JsonSerializer<Tuple> {
@Override
public Tuple deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
JsonArray tupleValues = json.getAsJsonArray();
return new Tuple(tupleValues.get(0).getAsLong(), tupleValues.get(1).getAsString());
}
@Override
public JsonElement serialize(Tuple tuple, Type type, JsonSerializationContext jsonSerializationContext) {
JsonArray retVal = new JsonArray();
retVal.add(tuple.getTimestamp() / 1000);
retVal.add(tuple.getValue());
return retVal;
}
}
}
}
|
0
|
java-sources/ai/apptuit/metrics/metrics-apptuit-send-client/0.9.9/ai/apptuit/metrics
|
java-sources/ai/apptuit/metrics/metrics-apptuit-send-client/0.9.9/ai/apptuit/metrics/client/ApptuitPutClient.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.client;
import static ai.apptuit.metrics.client.Sanitizer.DEFAULT_SANITIZER;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintStream;
import java.net.ConnectException;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.zip.GZIPOutputStream;
/**
* @author Rajiv Shivane
*/
public class ApptuitPutClient {
private static final Logger LOGGER = Logger.getLogger(ApptuitPutClient.class.getName());
private static final boolean DEBUG = false;
private static final boolean GZIP = true;
private static final int BUFFER_SIZE = 8 * 1024;
private static final int MAX_RESP_LENGTH = 5 * 1024 * 1024;
private static final int CONNECT_TIMEOUT_MS = 5000;
private static final int SOCKET_TIMEOUT_MS = 15000;
private static final String CONTENT_TYPE = "Content-Type";
private static final String APPLICATION_JSON = "application/json";
private static final String CONTENT_ENCODING = "Content-Encoding";
private static final String CONTENT_ENCODING_GZIP = "gzip";
private static final URL DEFAULT_PUT_API_URI;
static {
try {
DEFAULT_PUT_API_URI = new URL("https://api.apptuit.ai/api/put?details");
} catch (MalformedURLException e) {
throw new IllegalStateException(e);
}
}
private final URL apiEndPoint;
private Map<String, String> globalTags;
private String token;
private String userId;
public ApptuitPutClient(String token, Map<String, String> globalTags) {
this(token, globalTags, null);
}
public ApptuitPutClient(String token, Map<String, String> globalTags, URL apiEndPoint) {
this.globalTags = globalTags;
this.token = token;
this.apiEndPoint = (apiEndPoint != null) ? apiEndPoint : DEFAULT_PUT_API_URI;
}
public ApptuitPutClient(String userId, String token, Map<String, String> globalTags, URL apiEndPoint) {
this(token, globalTags, apiEndPoint);
this.userId = userId;
}
public void send(Collection<DataPoint> dataPoints) throws ConnectException, ResponseStatusException, IOException {
send(dataPoints, new Sanitizer.CachingSanitizer(DEFAULT_SANITIZER));
}
public void send(Collection<DataPoint> dataPoints, Sanitizer sanitizer) throws ConnectException, ResponseStatusException, IOException {
send(dataPoints, sanitizer, null);
}
public void send(Collection<DataPoint> dataPoints, Sanitizer sanitizer, Map<String, String> reqHeaders) throws ConnectException, ResponseStatusException, IOException {
if (dataPoints.isEmpty()) {
return;
}
DatapointsHttpEntity entity = new DatapointsHttpEntity(dataPoints, globalTags, sanitizer);
HttpURLConnection urlConnection;
int status;
try {
urlConnection = (HttpURLConnection) apiEndPoint.openConnection();
urlConnection.setConnectTimeout(CONNECT_TIMEOUT_MS);
urlConnection.setReadTimeout(SOCKET_TIMEOUT_MS);
urlConnection.setChunkedStreamingMode(0);
urlConnection.setRequestProperty(CONTENT_TYPE, APPLICATION_JSON);
setUserAgent(urlConnection);
if (GZIP) {
urlConnection.setRequestProperty(CONTENT_ENCODING, CONTENT_ENCODING_GZIP);
}
urlConnection.setRequestProperty("Authorization", generateAuthHeader());
if (reqHeaders != null && !reqHeaders.isEmpty()) {
reqHeaders.forEach(urlConnection::setRequestProperty);
}
urlConnection.setRequestMethod("POST");
urlConnection.setDoInput(true);
urlConnection.setDoOutput(true);
OutputStream outputStream = new BufferedOutputStream(urlConnection.getOutputStream(), BUFFER_SIZE);
entity.writeTo(outputStream);
outputStream.flush();
status = urlConnection.getResponseCode();
debug("-------------------" + status + "---------------------");
} catch (IOException e) {
throw e;
}
String responseBody = null;
try {
InputStream inputStr = getInputStream(urlConnection, status);
String encoding = urlConnection.getContentEncoding() == null ? "UTF-8"
: urlConnection.getContentEncoding();
responseBody = inputStr != null ? consumeResponse(inputStr, Charset.forName(encoding)) : null;
debug(responseBody);
} catch (IOException e) {
throw new IOException("Error draining response", e);
}
if (status >= HttpURLConnection.HTTP_BAD_REQUEST) {
throw new ResponseStatusException(status, responseBody);
}
}
private String generateAuthHeader() {
if (userId != null && !userId.isEmpty()) {
return "Basic " + Base64.getEncoder().encodeToString((userId + ":" + token).getBytes(StandardCharsets.UTF_8));
}
return "Bearer " + token;
}
private InputStream getInputStream(HttpURLConnection urlConnection, int status) throws IOException {
InputStream inputStr;
if (status < HttpURLConnection.HTTP_BAD_REQUEST) {
inputStr = urlConnection.getInputStream();
} else {
/* error from server */
inputStr = urlConnection.getErrorStream();
}
return inputStr;
}
/**
* @deprecated There is no way to know if points are successfully put
* in this method, so replaced put(...) with send(...)
*/
@Deprecated
public void put(Collection<DataPoint> dataPoints) {
put(dataPoints, DEFAULT_SANITIZER);
}
/**
* @deprecated There is no way to know if points are successfully sent
* in this method, so replaced put(...) with send(...)
*/
@Deprecated
public void put(Collection<DataPoint> dataPoints, Sanitizer sanitizer){
try {
send(dataPoints, sanitizer);
} catch (Exception e) {
LOGGER.log(Level.SEVERE, "Error sending data", e);
}
}
private void setUserAgent(HttpURLConnection urlConnection) {
String userAgent = "Java/" + System.getProperty("java.version");
userAgent = "metrics-apptuit/" + Package.VERSION + " " + userAgent;
urlConnection.setRequestProperty("User-Agent", userAgent);
}
private String consumeResponse(InputStream inputStr, Charset encoding) throws IOException {
StringBuilder body = new StringBuilder();
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStr, encoding));
try {
int i;
char[] cbuf = new char[BUFFER_SIZE];
while ((i = reader.read(cbuf)) > 0) {
if (body == null) {
continue;
}
if (body.length() + i >= MAX_RESP_LENGTH) {
body = null;
} else {
body.append(cbuf, 0, i);
}
}
} catch (IOException e) {
LOGGER.log(Level.SEVERE, "Error reading response", e);
throw e;
}
return body == null ? "Response too long" : body.toString();
}
private void debug(String s) {
if (DEBUG) {
LOGGER.info(s);
}
}
static class DatapointsHttpEntity {
private final Collection<DataPoint> dataPoints;
private final Map<String, String> globalTags;
private final boolean doZip;
private final Sanitizer sanitizer;
public DatapointsHttpEntity(Collection<DataPoint> dataPoints,
Map<String, String> globalTags,
Sanitizer sanitizer) {
this(dataPoints, globalTags, sanitizer, GZIP);
}
public DatapointsHttpEntity(Collection<DataPoint> dataPoints,
Map<String, String> globalTags,
Sanitizer sanitizer, boolean doZip) {
this.dataPoints = dataPoints;
this.globalTags = globalTags;
this.doZip = doZip;
this.sanitizer = sanitizer;
}
public void writeTo(OutputStream outputStream) throws IOException {
if (doZip) {
outputStream = new GZIPOutputStream(outputStream);
}
PrintStream ps = new PrintStream(outputStream, false, "UTF-8");
ps.println("[");
Iterator<DataPoint> iterator = dataPoints.iterator();
while (iterator.hasNext()) {
DataPoint dp = iterator.next();
dp.toJson(ps, globalTags, this.sanitizer);
if (iterator.hasNext()) {
ps.println(",");
}
}
ps.println("]");
ps.flush();
if (doZip) {
((GZIPOutputStream) outputStream).finish();
}
}
}
}
|
0
|
java-sources/ai/apptuit/metrics/metrics-apptuit-send-client/0.9.9/ai/apptuit/metrics
|
java-sources/ai/apptuit/metrics/metrics-apptuit-send-client/0.9.9/ai/apptuit/metrics/client/DataPoint.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.client;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.io.UnsupportedEncodingException;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Map.Entry;
/**
* @author Rajiv Shivane
*/
public class DataPoint {
private final String metric;
private final long timestamp;
private final Number value;
private final Map<String, String> tags;
public DataPoint(String metricName, long epoch, Number value, Map<String, String> tags) {
if (metricName == null) {
throw new IllegalArgumentException("metricName cannot be null");
}
this.metric = metricName;
this.timestamp = epoch;
if (value == null) {
throw new IllegalArgumentException("Value cannot be null");
}
this.value = value;
if (tags == null) {
throw new IllegalArgumentException("Tags cannot be null");
}
this.tags = tags;
}
public String getMetric() {
return metric;
}
public long getTimestamp() {
return timestamp;
}
public Number getValue() {
return value;
}
public Map<String, String> getTags() {
return tags;
}
@Override
public String toString() {
StringWriter out = new StringWriter();
toTextPlain(new PrintWriter(out), null, Sanitizer.NO_OP_SANITIZER);
return out.toString();
}
public void toJson(PrintStream ps, Map<String, String> globalTags, Sanitizer sanitizer) {
ps.append("{");
{
ps.append("\n\"metric\":\"").append(sanitizer.sanitizer(getMetric())).append("\",")
.append("\n\"timestamp\":").append(Long.toString(getTimestamp())).append(",")
.append("\n\"value\":").append(String.valueOf(getValue()));
ps.append(",\n\"tags\": {");
Map<String, String> tagsToMarshall = new LinkedHashMap<>(getTags());
if (globalTags != null) {
tagsToMarshall.putAll(globalTags);
}
Iterator<Entry<String, String>> iterator = tagsToMarshall.entrySet().iterator();
while (iterator.hasNext()) {
Entry<String, String> tag = iterator.next();
ps.append("\n\"").append(sanitizer.sanitizer(tag.getKey())).append("\":\"")
.append(tag.getValue().replace("\"", "\\\"")).append("\"");
if (iterator.hasNext()) {
ps.append(",");
}
}
ps.append("}\n");
}
ps.append("}");
}
public void toTextLine(OutputStream out, Map<String, String> globalTags, Sanitizer sanitizer) {
try {
PrintWriter writer = new PrintWriter(new OutputStreamWriter(out, "UTF-8"));
toTextPlain(writer, globalTags, sanitizer);
writer.append('\n');
writer.flush();
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
}
private void toTextPlain(PrintWriter ps, Map<String, String> globalTags, Sanitizer sanitizer) {
ps.append(sanitizer.sanitizer(getMetric())).append(" ")
.append(Long.toString(getTimestamp())).append(" ")
.append(String.valueOf(getValue()));
Map<String, String> tagsToMarshall = getTags();
if (globalTags != null) {
LinkedHashMap<String, String> t = new LinkedHashMap<>(tagsToMarshall);
t.putAll(globalTags);
tagsToMarshall = t;
}
tagsToMarshall.forEach((key, val) -> ps.append(" ")
.append(sanitizer.sanitizer(key)).append("=").append(val));
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DataPoint dataPoint = (DataPoint) o;
return timestamp == dataPoint.timestamp
&& metric.equals(dataPoint.metric)
&& value.equals(dataPoint.value)
&& tags.equals(dataPoint.tags);
}
@Override
public int hashCode() {
int result = metric.hashCode();
result = 31 * result + (int) (timestamp ^ (timestamp >>> 32));
result = 31 * result + value.hashCode();
result = 31 * result + tags.hashCode();
return result;
}
}
|
0
|
java-sources/ai/apptuit/metrics/metrics-apptuit-send-client/0.9.9/ai/apptuit/metrics
|
java-sources/ai/apptuit/metrics/metrics-apptuit-send-client/0.9.9/ai/apptuit/metrics/client/Package.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.client;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.Enumeration;
import java.util.jar.Attributes;
import java.util.jar.Manifest;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* @author Rajiv Shivane
*/
public class Package {
private static final Logger LOGGER = Logger.getLogger(Package.class.getName());
public static final String VERSION = loadPackageVersion();
private Package() {
}
private static String loadPackageVersion() {
Enumeration<URL> resources = null;
try {
String version = Package.class.getPackage().getImplementationVersion();
if (version != null) {
return version;
}
ClassLoader classLoader = Package.class.getClassLoader();
if (classLoader == null) {
return "?";
}
resources = classLoader.getResources("META-INF/MANIFEST.MF");
} catch (IOException e) {
LOGGER.log(Level.SEVERE, "Error locating manifests.", e);
}
while (resources != null && resources.hasMoreElements()) {
URL manifestUrl = resources.nextElement();
try (InputStream resource = manifestUrl.openStream()) {
Manifest manifest = new Manifest(resource);
Attributes mainAttributes = manifest.getMainAttributes();
if (mainAttributes != null) {
String agentClass = mainAttributes.getValue("Implementation-Title");
//the agent class comes as "metrics-apptuit-send-client"
if (agentClass != null && agentClass.contains("metrics-apptuit")) {
String packageVersion = mainAttributes.getValue("Implementation-Version");
if (packageVersion != null) {
return packageVersion;
}
break;
}
}
} catch (IOException e) {
LOGGER.log(Level.SEVERE, "Error loading manifest from [" + manifestUrl + "]", e);
}
}
return "?";
}
}
|
0
|
java-sources/ai/apptuit/metrics/metrics-apptuit-send-client/0.9.9/ai/apptuit/metrics
|
java-sources/ai/apptuit/metrics/metrics-apptuit-send-client/0.9.9/ai/apptuit/metrics/client/ResponseStatusException.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.client;
import java.io.IOException;
/**
* @author Joseph Danthikolla
*/
public class ResponseStatusException extends IOException {
private int httpStatus;
private String body;
public ResponseStatusException(int httpStatus, String body) {
this(httpStatus, body, null);
}
public ResponseStatusException(int httpStatus, String body, Throwable cause) {
super(cause);
this.httpStatus = httpStatus;
this.body = body;
}
public String getMessage() {
return this.httpStatus + (this.body != null ? " [" + this.body + "]" : "");
}
public String getResponseBody() {
return body;
}
public int getResponseStatus() {
return httpStatus;
}
}
|
0
|
java-sources/ai/apptuit/metrics/metrics-apptuit-send-client/0.9.9/ai/apptuit/metrics
|
java-sources/ai/apptuit/metrics/metrics-apptuit-send-client/0.9.9/ai/apptuit/metrics/client/Sanitizer.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.client;
import java.util.LinkedHashMap;
import java.util.Map;
public interface Sanitizer {
Sanitizer PROMETHEUS_SANITIZER = new PrometheusSanitizer();
Sanitizer APPTUIT_SANITIZER = new ApptuitSanitizer();
Sanitizer NO_OP_SANITIZER = new NoOpSanitizer();
Sanitizer DEFAULT_SANITIZER = PROMETHEUS_SANITIZER;
String sanitizer(String unSanitizedString);
class PrometheusSanitizer implements Sanitizer {
private PrometheusSanitizer() {
}
public String sanitizer(String unSanitizedString) {
return ((Character.isDigit(unSanitizedString.charAt(0)) ? "_" : "")
+ unSanitizedString).replaceAll("[^a-zA-Z0-9_]", "_")
.replaceAll("[_]+", "_");
}
}
class ApptuitSanitizer implements Sanitizer {
private ApptuitSanitizer() {
}
public String sanitizer(String unSanitizedString) {
return unSanitizedString.replaceAll("[^\\p{L}\\-./_0-9]+", "_")
.replaceAll("[_]+", "_");
}
}
class NoOpSanitizer implements Sanitizer {
private NoOpSanitizer() {
}
public String sanitizer(String unSanitizedString) {
return unSanitizedString;
}
}
class CachingSanitizer implements Sanitizer {
Sanitizer sanitizer;
private Map<String, String> sanitizedTagsCache = new LRUCachingLinkedHashMap<>(10000);
public CachingSanitizer(Sanitizer sanitizer1) {
sanitizer = sanitizer1;
}
@Override
public String sanitizer(String unSanitizedString) {
String sanitizedString = sanitizedTagsCache.get(unSanitizedString);
if (sanitizedString != null) {
return sanitizedString;
}
sanitizedString = this.sanitizer.sanitizer(unSanitizedString);
sanitizedTagsCache.put(unSanitizedString, sanitizedString);
return sanitizedString;
}
}
class LRUCachingLinkedHashMap<K, V> extends LinkedHashMap<K, V> {
private int capacity;
@Override
protected boolean removeEldestEntry(Map.Entry<K, V> eldest) {
return (size() > this.capacity);
}
public LRUCachingLinkedHashMap(int capacity) {
super(capacity + 1, 1.0f, true);
this.capacity = capacity;
}
}
}
|
0
|
java-sources/ai/apptuit/metrics/metrics-apptuit-send-client/0.9.9/ai/apptuit/metrics
|
java-sources/ai/apptuit/metrics/metrics-apptuit-send-client/0.9.9/ai/apptuit/metrics/client/TagEncodedMetricName.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.client;
import java.util.Collections;
import java.util.Map;
import java.util.Map.Entry;
import java.util.TreeMap;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* @author Rajiv Shivane
*/
public class TagEncodedMetricName implements Comparable<TagEncodedMetricName> {
private static final Pattern TAG_ENCODED_METRICNAME_PATTERN = Pattern.compile("([^\\[]+)\\[(.*)\\]");
private static final char TAG_VALUE_SEPARATOR = ':';
private final Map<String, String> tags;
private final String metricName;
private String toString;
private TagEncodedMetricName(String metricName, Map<String, String> tags) {
if (metricName == null) {
throw new IllegalArgumentException("metricName cannot be null");
}
this.metricName = metricName;
if (tags == null) {
this.tags = Collections.emptyMap();
} else {
this.tags = Collections.unmodifiableMap(tags);
}
}
public static TagEncodedMetricName decode(String encodedTagName) {
String metricName;
Map<String, String> tags = null;
Matcher matcher = TAG_ENCODED_METRICNAME_PATTERN.matcher(encodedTagName);
if (matcher.find() && matcher.groupCount() == 2) {
metricName = matcher.group(1);
tags = parseTags(matcher.group(2));
} else {
metricName = encodedTagName;
}
checkEmpty(metricName, "metricName");
return new TagEncodedMetricName(metricName, tags);
}
private static Map<String, String> parseTags(String tv) {
char[] tagValues = tv.toCharArray();
Map<String, String> tags = new TreeMap<>();
StringBuilder tagValueBuffer = new StringBuilder();
int last = 0;
parsing:
while (last < tagValues.length) {
int cur = last;
//Consume leading whitespace in front of tag
while (tagValues[cur] == ' ' || tagValues[cur] == '\t') {
cur++;
if (cur >= tagValues.length) {
break parsing;
}
}
//Extract Tag
while (tagValues[cur] != TAG_VALUE_SEPARATOR) {
cur++;
if (cur >= tagValues.length) {
throw new IllegalArgumentException("Could not parse tags {" + tv + "}. Last:" + last + ". Index: " + cur);
}
}
String k = new String(tagValues, last, cur - last).trim();
checkEmpty(k, "tag");
//Consume the TAG_VALUE_SEPARATOR
if (tagValues[cur] == TAG_VALUE_SEPARATOR) {
cur++;
} else {
throw new IllegalArgumentException("Could not parse tags {" + tv + "}. Last:" + last + ". Index: " + cur);
}
//Consume leading whitespace in front of value
while (cur < tagValues.length && (tagValues[cur] == ' ' || tagValues[cur] == '\t')) {
cur++;
}
if (cur >= tagValues.length) {
throw new IllegalArgumentException("Could not parse tags {" + tv + "}. Last:" + last + ". Index: " + cur);
}
last = cur;
String v;
if (tagValues[cur] == '"') {
cur++;
boolean foundEndQuotedString = false;
while (cur < tagValues.length) {
char c = tagValues[cur];
cur++;
if (c == '"') {
if (cur < tagValues.length && tagValues[cur] == '"') {
//consume escaped quote
cur++;
} else {
foundEndQuotedString = true;
break;
}
}
tagValueBuffer.append(c);
}
if (!foundEndQuotedString) {
throw new IllegalArgumentException("Could not parse tags {" + tv + "}. Last:" + last + ". Index: " + cur);
}
v = tagValueBuffer.toString();
tagValueBuffer.setLength(0);
//Consume trailing whitespace
while (cur < tagValues.length && (tagValues[cur] == ' ' || tagValues[cur] == '\t')) {
cur++;
}
} else {
while (tagValues[cur] != ',') {
cur++;
if (cur >= tagValues.length) {
break;
}
}
v = new String(tagValues, last, cur - last).trim();
}
checkEmpty(v, "tag value");
tags.put(k, v);
if (cur < tagValues.length) {
if (tagValues[cur] == ',') {
cur++;
} else {
throw new IllegalArgumentException("Could not parse tags {" + tv + "}. Last:" + last + ". Index: " + cur);
}
}
last = cur;
}
return tags;
}
private static void checkEmpty(String s, String field) {
if (s == null || "".equals(s.trim())) {
throw new IllegalArgumentException(field + " must be defined");
}
}
public String getMetricName() {
return metricName;
}
public Map<String, String> getTags() {
return tags;
}
public TagEncodedMetricName submetric(String suffix) {
StringBuilder sb = new StringBuilder();
append(sb, metricName);
append(sb, suffix);
return new TagEncodedMetricName(sb.toString(), tags);
}
private static void append(StringBuilder builder, String part) {
if (part != null && !part.isEmpty()) {
if (builder.length() > 0) {
builder.append('.');
}
builder.append(part);
}
}
public TagEncodedMetricName withTags(String... additionalTags) {
Map<String, String> t = tags;
if (additionalTags != null && additionalTags.length > 0) {
if (additionalTags.length % 2 != 0) {
throw new IllegalArgumentException("Additional Tags has to even in count");
}
t = new TreeMap<>(t);
for (int i = 0; i < additionalTags.length; i += 2) {
t.put(additionalTags[i], additionalTags[i + 1]);
}
}
return new TagEncodedMetricName(metricName, t);
}
public TagEncodedMetricName withTags(Map<String, String> additionalTags) {
Map<String, String> t = tags;
if (additionalTags != null && additionalTags.size() > 0) {
t = new TreeMap<>(t);
t.putAll(additionalTags);
}
return new TagEncodedMetricName(metricName, t);
}
public String toString() {
if (tags.isEmpty()) {
return this.metricName;
} else {
if (toString != null) {
return toString;
}
toString = createStringRep();
return toString;
}
}
@Override
public int compareTo(TagEncodedMetricName tagEncodedMetricName) {
return toString().compareTo(tagEncodedMetricName.toString());
}
private String createStringRep() {
StringBuilder sb = new StringBuilder(this.metricName);
//sb.append("\n{\n");
sb.append("[");
String prefix = "";
for (Entry<String, String> tagValuePair : tags.entrySet()) {
sb.append(prefix);
sb.append(tagValuePair.getKey());
sb.append(TAG_VALUE_SEPARATOR);
sb.append(escapeTagValue(tagValuePair.getValue()));
//prefix = ",\n";
prefix = ",";
}
//sb.append("}\n");
sb.append("]");
return sb.toString();
}
private String escapeTagValue(String unescapedTagValue) {
char[] chars = unescapedTagValue.toCharArray();
boolean needsEscaping = false;
for (char c : chars) {
switch (c) {
case '"':
case ' ':
case '\t':
case ',':
case ':':
needsEscaping = true;
break;
default:
}
}
if (!needsEscaping) {
return unescapedTagValue;
}
return "\"" + unescapedTagValue.replace("\"", "\"\"") + "\"";
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
TagEncodedMetricName that = (TagEncodedMetricName) o;
return metricName.equals(that.metricName) && tags.equals(that.tags);
}
@Override
public int hashCode() {
int result = metricName.hashCode();
result = 31 * result + tags.hashCode();
return result;
}
}
|
0
|
java-sources/ai/apptuit/metrics/metrics-apptuit-send-client/0.9.9/ai/apptuit/metrics
|
java-sources/ai/apptuit/metrics/metrics-apptuit-send-client/0.9.9/ai/apptuit/metrics/client/XCollectorForwarder.java
|
/*
* Copyright 2017 Agilx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ai.apptuit.metrics.client;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetSocketAddress;
import java.net.SocketAddress;
import java.net.SocketException;
import java.util.Collection;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* @author Rajiv Shivane
*/
public class XCollectorForwarder {
private static final Logger LOGGER = Logger.getLogger(XCollectorForwarder.class.getName());
private static final String DEFAULT_HOST = "127.0.0.1";
private static final int DEFAULT_PORT = 8953;
private static final int KB = 1024;
private static final int PACKET_SIZE = 8 * KB;
private static final int BUFFER_SIZE = 16 * KB;
private final Map<String, String> globalTags;
private final SocketAddress xcollectorAddress;
private DatagramSocket socket = null;
public XCollectorForwarder(Map<String, String> globalTags) {
this(globalTags, new InetSocketAddress(DEFAULT_HOST, DEFAULT_PORT));
}
XCollectorForwarder(Map<String, String> globalTags, SocketAddress xcollectorAddress) {
this.globalTags = globalTags;
this.xcollectorAddress = xcollectorAddress;
}
public void forward(Collection<DataPoint> dataPoints) {
forward(dataPoints, Sanitizer.DEFAULT_SANITIZER);
}
public void forward(Collection<DataPoint> dataPoints, Sanitizer sanitizer) {
if (socket == null) {
try {
socket = new DatagramSocket();
} catch (SocketException e) {
LOGGER.log(Level.SEVERE, "Error creating UDP socket", e);
return;
}
}
ByteArrayOutputStream baos = new ByteArrayOutputStream(BUFFER_SIZE);
int idx = 0;
for (DataPoint dp : dataPoints) {
dp.toTextLine(baos, globalTags, sanitizer);
int size = baos.size();
if (size >= PACKET_SIZE) {
sendPacket(baos, idx);
idx = baos.size();
} else {
idx = size;
}
}
sendPacket(baos, idx);
}
private void sendPacket(ByteArrayOutputStream outputStream, int idx) {
if (idx <= 0) {
return;
}
int size = outputStream.size();
byte[] bytes = outputStream.toByteArray();
DatagramPacket packet = new DatagramPacket(bytes, 0, idx, xcollectorAddress);
try {
socket.send(packet);
LOGGER.info(" Forwarded [" + idx + "] bytes.");
} catch (IOException e) {
LOGGER.log(Level.SEVERE, "Error sending packet", e);
}
outputStream.reset();
int newSize = size - idx;
if (newSize > 0) {
outputStream.write(bytes, idx, newSize);
}
}
}
|
0
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun/protos/AnalyzeSyntaxListRequest.java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bareun/language_service.proto
package ai.bareun.protos;
/**
* <pre>
* ννμ λΆμ μμ² λ©μμ§
* </pre>
*
* Protobuf type {@code bareun.AnalyzeSyntaxListRequest}
*/
public final class AnalyzeSyntaxListRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:bareun.AnalyzeSyntaxListRequest)
AnalyzeSyntaxListRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use AnalyzeSyntaxListRequest.newBuilder() to construct.
private AnalyzeSyntaxListRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private AnalyzeSyntaxListRequest() {
sentences_ = com.google.protobuf.LazyStringArrayList.EMPTY;
language_ = "";
encodingType_ = 0;
customDomain_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private AnalyzeSyntaxListRequest(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
sentences_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000001;
}
sentences_.add(s);
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
language_ = s;
break;
}
case 24: {
int rawValue = input.readEnum();
encodingType_ = rawValue;
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
customDomain_ = s;
break;
}
case 40: {
autoSpacing_ = input.readBool();
break;
}
case 48: {
autoJointing_ = input.readBool();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
sentences_ = sentences_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_AnalyzeSyntaxListRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_AnalyzeSyntaxListRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.bareun.protos.AnalyzeSyntaxListRequest.class, ai.bareun.protos.AnalyzeSyntaxListRequest.Builder.class);
}
private int bitField0_;
public static final int SENTENCES_FIELD_NUMBER = 1;
private com.google.protobuf.LazyStringList sentences_;
/**
* <pre>
* μ
λ ₯ λ¬Έμ₯μ λ°°μ΄
* </pre>
*
* <code>repeated string sentences = 1;</code>
*/
public com.google.protobuf.ProtocolStringList
getSentencesList() {
return sentences_;
}
/**
* <pre>
* μ
λ ₯ λ¬Έμ₯μ λ°°μ΄
* </pre>
*
* <code>repeated string sentences = 1;</code>
*/
public int getSentencesCount() {
return sentences_.size();
}
/**
* <pre>
* μ
λ ₯ λ¬Έμ₯μ λ°°μ΄
* </pre>
*
* <code>repeated string sentences = 1;</code>
*/
public java.lang.String getSentences(int index) {
return sentences_.get(index);
}
/**
* <pre>
* μ
λ ₯ λ¬Έμ₯μ λ°°μ΄
* </pre>
*
* <code>repeated string sentences = 1;</code>
*/
public com.google.protobuf.ByteString
getSentencesBytes(int index) {
return sentences_.getByteString(index);
}
public static final int LANGUAGE_FIELD_NUMBER = 2;
private volatile java.lang.Object language_;
/**
* <pre>
* μ
λ ₯ λ¬Έμ₯μ μΈμ΄
* </pre>
*
* <code>string language = 2;</code>
*/
public java.lang.String getLanguage() {
java.lang.Object ref = language_;
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();
language_ = s;
return s;
}
}
/**
* <pre>
* μ
λ ₯ λ¬Έμ₯μ μΈμ΄
* </pre>
*
* <code>string language = 2;</code>
*/
public com.google.protobuf.ByteString
getLanguageBytes() {
java.lang.Object ref = language_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
language_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ENCODING_TYPE_FIELD_NUMBER = 3;
private int encodingType_;
/**
* <pre>
* μ€νμ
μ κ³μ°νκΈ° μν μΈμ½λ© νμ
* </pre>
*
* <code>.bareun.EncodingType encoding_type = 3;</code>
*/
public int getEncodingTypeValue() {
return encodingType_;
}
/**
* <pre>
* μ€νμ
μ κ³μ°νκΈ° μν μΈμ½λ© νμ
* </pre>
*
* <code>.bareun.EncodingType encoding_type = 3;</code>
*/
public ai.bareun.protos.EncodingType getEncodingType() {
@SuppressWarnings("deprecation")
ai.bareun.protos.EncodingType result = ai.bareun.protos.EncodingType.valueOf(encodingType_);
return result == null ? ai.bareun.protos.EncodingType.UNRECOGNIZED : result;
}
public static final int CUSTOM_DOMAIN_FIELD_NUMBER = 4;
private volatile java.lang.Object customDomain_;
/**
* <pre>
* 컀μ€ν
μ¬μ λλ©μΈ μ 보
* κ³ μ λͺ
μ¬, 볡ν©λͺ
μ¬ μ¬μ μ κΈ°λ°νμ¬ μ²λ¦¬ν¨.
* </pre>
*
* <code>string custom_domain = 4;</code>
*/
public java.lang.String getCustomDomain() {
java.lang.Object ref = customDomain_;
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();
customDomain_ = s;
return s;
}
}
/**
* <pre>
* 컀μ€ν
μ¬μ λλ©μΈ μ 보
* κ³ μ λͺ
μ¬, 볡ν©λͺ
μ¬ μ¬μ μ κΈ°λ°νμ¬ μ²λ¦¬ν¨.
* </pre>
*
* <code>string custom_domain = 4;</code>
*/
public com.google.protobuf.ByteString
getCustomDomainBytes() {
java.lang.Object ref = customDomain_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
customDomain_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int AUTO_SPACING_FIELD_NUMBER = 5;
private boolean autoSpacing_;
/**
* <pre>
* μλ λμ΄μ°κΈ°
* </pre>
*
* <code>bool auto_spacing = 5;</code>
*/
public boolean getAutoSpacing() {
return autoSpacing_;
}
public static final int AUTO_JOINTING_FIELD_NUMBER = 6;
private boolean autoJointing_;
/**
* <pre>
* μλ λΆμ¬μ°κΈ°
* </pre>
*
* <code>bool auto_jointing = 6;</code>
*/
public boolean getAutoJointing() {
return autoJointing_;
}
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 < sentences_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sentences_.getRaw(i));
}
if (!getLanguageBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, language_);
}
if (encodingType_ != ai.bareun.protos.EncodingType.NONE.getNumber()) {
output.writeEnum(3, encodingType_);
}
if (!getCustomDomainBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, customDomain_);
}
if (autoSpacing_ != false) {
output.writeBool(5, autoSpacing_);
}
if (autoJointing_ != false) {
output.writeBool(6, autoJointing_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
for (int i = 0; i < sentences_.size(); i++) {
dataSize += computeStringSizeNoTag(sentences_.getRaw(i));
}
size += dataSize;
size += 1 * getSentencesList().size();
}
if (!getLanguageBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, language_);
}
if (encodingType_ != ai.bareun.protos.EncodingType.NONE.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(3, encodingType_);
}
if (!getCustomDomainBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, customDomain_);
}
if (autoSpacing_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(5, autoSpacing_);
}
if (autoJointing_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(6, autoJointing_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof ai.bareun.protos.AnalyzeSyntaxListRequest)) {
return super.equals(obj);
}
ai.bareun.protos.AnalyzeSyntaxListRequest other = (ai.bareun.protos.AnalyzeSyntaxListRequest) obj;
if (!getSentencesList()
.equals(other.getSentencesList())) return false;
if (!getLanguage()
.equals(other.getLanguage())) return false;
if (encodingType_ != other.encodingType_) return false;
if (!getCustomDomain()
.equals(other.getCustomDomain())) return false;
if (getAutoSpacing()
!= other.getAutoSpacing()) return false;
if (getAutoJointing()
!= other.getAutoJointing()) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getSentencesCount() > 0) {
hash = (37 * hash) + SENTENCES_FIELD_NUMBER;
hash = (53 * hash) + getSentencesList().hashCode();
}
hash = (37 * hash) + LANGUAGE_FIELD_NUMBER;
hash = (53 * hash) + getLanguage().hashCode();
hash = (37 * hash) + ENCODING_TYPE_FIELD_NUMBER;
hash = (53 * hash) + encodingType_;
hash = (37 * hash) + CUSTOM_DOMAIN_FIELD_NUMBER;
hash = (53 * hash) + getCustomDomain().hashCode();
hash = (37 * hash) + AUTO_SPACING_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getAutoSpacing());
hash = (37 * hash) + AUTO_JOINTING_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getAutoJointing());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static ai.bareun.protos.AnalyzeSyntaxListRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.AnalyzeSyntaxListRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.AnalyzeSyntaxListRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.AnalyzeSyntaxListRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.AnalyzeSyntaxListRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.AnalyzeSyntaxListRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.AnalyzeSyntaxListRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.bareun.protos.AnalyzeSyntaxListRequest 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.bareun.protos.AnalyzeSyntaxListRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static ai.bareun.protos.AnalyzeSyntaxListRequest 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.bareun.protos.AnalyzeSyntaxListRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.bareun.protos.AnalyzeSyntaxListRequest 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.bareun.protos.AnalyzeSyntaxListRequest 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>
* ννμ λΆμ μμ² λ©μμ§
* </pre>
*
* Protobuf type {@code bareun.AnalyzeSyntaxListRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:bareun.AnalyzeSyntaxListRequest)
ai.bareun.protos.AnalyzeSyntaxListRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_AnalyzeSyntaxListRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_AnalyzeSyntaxListRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.bareun.protos.AnalyzeSyntaxListRequest.class, ai.bareun.protos.AnalyzeSyntaxListRequest.Builder.class);
}
// Construct using ai.bareun.protos.AnalyzeSyntaxListRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
sentences_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
language_ = "";
encodingType_ = 0;
customDomain_ = "";
autoSpacing_ = false;
autoJointing_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_AnalyzeSyntaxListRequest_descriptor;
}
@java.lang.Override
public ai.bareun.protos.AnalyzeSyntaxListRequest getDefaultInstanceForType() {
return ai.bareun.protos.AnalyzeSyntaxListRequest.getDefaultInstance();
}
@java.lang.Override
public ai.bareun.protos.AnalyzeSyntaxListRequest build() {
ai.bareun.protos.AnalyzeSyntaxListRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ai.bareun.protos.AnalyzeSyntaxListRequest buildPartial() {
ai.bareun.protos.AnalyzeSyntaxListRequest result = new ai.bareun.protos.AnalyzeSyntaxListRequest(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((bitField0_ & 0x00000001) != 0)) {
sentences_ = sentences_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.sentences_ = sentences_;
result.language_ = language_;
result.encodingType_ = encodingType_;
result.customDomain_ = customDomain_;
result.autoSpacing_ = autoSpacing_;
result.autoJointing_ = autoJointing_;
result.bitField0_ = to_bitField0_;
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.bareun.protos.AnalyzeSyntaxListRequest) {
return mergeFrom((ai.bareun.protos.AnalyzeSyntaxListRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ai.bareun.protos.AnalyzeSyntaxListRequest other) {
if (other == ai.bareun.protos.AnalyzeSyntaxListRequest.getDefaultInstance()) return this;
if (!other.sentences_.isEmpty()) {
if (sentences_.isEmpty()) {
sentences_ = other.sentences_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureSentencesIsMutable();
sentences_.addAll(other.sentences_);
}
onChanged();
}
if (!other.getLanguage().isEmpty()) {
language_ = other.language_;
onChanged();
}
if (other.encodingType_ != 0) {
setEncodingTypeValue(other.getEncodingTypeValue());
}
if (!other.getCustomDomain().isEmpty()) {
customDomain_ = other.customDomain_;
onChanged();
}
if (other.getAutoSpacing() != false) {
setAutoSpacing(other.getAutoSpacing());
}
if (other.getAutoJointing() != false) {
setAutoJointing(other.getAutoJointing());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
ai.bareun.protos.AnalyzeSyntaxListRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (ai.bareun.protos.AnalyzeSyntaxListRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.protobuf.LazyStringList sentences_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureSentencesIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
sentences_ = new com.google.protobuf.LazyStringArrayList(sentences_);
bitField0_ |= 0x00000001;
}
}
/**
* <pre>
* μ
λ ₯ λ¬Έμ₯μ λ°°μ΄
* </pre>
*
* <code>repeated string sentences = 1;</code>
*/
public com.google.protobuf.ProtocolStringList
getSentencesList() {
return sentences_.getUnmodifiableView();
}
/**
* <pre>
* μ
λ ₯ λ¬Έμ₯μ λ°°μ΄
* </pre>
*
* <code>repeated string sentences = 1;</code>
*/
public int getSentencesCount() {
return sentences_.size();
}
/**
* <pre>
* μ
λ ₯ λ¬Έμ₯μ λ°°μ΄
* </pre>
*
* <code>repeated string sentences = 1;</code>
*/
public java.lang.String getSentences(int index) {
return sentences_.get(index);
}
/**
* <pre>
* μ
λ ₯ λ¬Έμ₯μ λ°°μ΄
* </pre>
*
* <code>repeated string sentences = 1;</code>
*/
public com.google.protobuf.ByteString
getSentencesBytes(int index) {
return sentences_.getByteString(index);
}
/**
* <pre>
* μ
λ ₯ λ¬Έμ₯μ λ°°μ΄
* </pre>
*
* <code>repeated string sentences = 1;</code>
*/
public Builder setSentences(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureSentencesIsMutable();
sentences_.set(index, value);
onChanged();
return this;
}
/**
* <pre>
* μ
λ ₯ λ¬Έμ₯μ λ°°μ΄
* </pre>
*
* <code>repeated string sentences = 1;</code>
*/
public Builder addSentences(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureSentencesIsMutable();
sentences_.add(value);
onChanged();
return this;
}
/**
* <pre>
* μ
λ ₯ λ¬Έμ₯μ λ°°μ΄
* </pre>
*
* <code>repeated string sentences = 1;</code>
*/
public Builder addAllSentences(
java.lang.Iterable<java.lang.String> values) {
ensureSentencesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, sentences_);
onChanged();
return this;
}
/**
* <pre>
* μ
λ ₯ λ¬Έμ₯μ λ°°μ΄
* </pre>
*
* <code>repeated string sentences = 1;</code>
*/
public Builder clearSentences() {
sentences_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* <pre>
* μ
λ ₯ λ¬Έμ₯μ λ°°μ΄
* </pre>
*
* <code>repeated string sentences = 1;</code>
*/
public Builder addSentencesBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureSentencesIsMutable();
sentences_.add(value);
onChanged();
return this;
}
private java.lang.Object language_ = "";
/**
* <pre>
* μ
λ ₯ λ¬Έμ₯μ μΈμ΄
* </pre>
*
* <code>string language = 2;</code>
*/
public java.lang.String getLanguage() {
java.lang.Object ref = language_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
language_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* μ
λ ₯ λ¬Έμ₯μ μΈμ΄
* </pre>
*
* <code>string language = 2;</code>
*/
public com.google.protobuf.ByteString
getLanguageBytes() {
java.lang.Object ref = language_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
language_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* μ
λ ₯ λ¬Έμ₯μ μΈμ΄
* </pre>
*
* <code>string language = 2;</code>
*/
public Builder setLanguage(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
language_ = value;
onChanged();
return this;
}
/**
* <pre>
* μ
λ ₯ λ¬Έμ₯μ μΈμ΄
* </pre>
*
* <code>string language = 2;</code>
*/
public Builder clearLanguage() {
language_ = getDefaultInstance().getLanguage();
onChanged();
return this;
}
/**
* <pre>
* μ
λ ₯ λ¬Έμ₯μ μΈμ΄
* </pre>
*
* <code>string language = 2;</code>
*/
public Builder setLanguageBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
language_ = value;
onChanged();
return this;
}
private int encodingType_ = 0;
/**
* <pre>
* μ€νμ
μ κ³μ°νκΈ° μν μΈμ½λ© νμ
* </pre>
*
* <code>.bareun.EncodingType encoding_type = 3;</code>
*/
public int getEncodingTypeValue() {
return encodingType_;
}
/**
* <pre>
* μ€νμ
μ κ³μ°νκΈ° μν μΈμ½λ© νμ
* </pre>
*
* <code>.bareun.EncodingType encoding_type = 3;</code>
*/
public Builder setEncodingTypeValue(int value) {
encodingType_ = value;
onChanged();
return this;
}
/**
* <pre>
* μ€νμ
μ κ³μ°νκΈ° μν μΈμ½λ© νμ
* </pre>
*
* <code>.bareun.EncodingType encoding_type = 3;</code>
*/
public ai.bareun.protos.EncodingType getEncodingType() {
@SuppressWarnings("deprecation")
ai.bareun.protos.EncodingType result = ai.bareun.protos.EncodingType.valueOf(encodingType_);
return result == null ? ai.bareun.protos.EncodingType.UNRECOGNIZED : result;
}
/**
* <pre>
* μ€νμ
μ κ³μ°νκΈ° μν μΈμ½λ© νμ
* </pre>
*
* <code>.bareun.EncodingType encoding_type = 3;</code>
*/
public Builder setEncodingType(ai.bareun.protos.EncodingType value) {
if (value == null) {
throw new NullPointerException();
}
encodingType_ = value.getNumber();
onChanged();
return this;
}
/**
* <pre>
* μ€νμ
μ κ³μ°νκΈ° μν μΈμ½λ© νμ
* </pre>
*
* <code>.bareun.EncodingType encoding_type = 3;</code>
*/
public Builder clearEncodingType() {
encodingType_ = 0;
onChanged();
return this;
}
private java.lang.Object customDomain_ = "";
/**
* <pre>
* 컀μ€ν
μ¬μ λλ©μΈ μ 보
* κ³ μ λͺ
μ¬, 볡ν©λͺ
μ¬ μ¬μ μ κΈ°λ°νμ¬ μ²λ¦¬ν¨.
* </pre>
*
* <code>string custom_domain = 4;</code>
*/
public java.lang.String getCustomDomain() {
java.lang.Object ref = customDomain_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
customDomain_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* 컀μ€ν
μ¬μ λλ©μΈ μ 보
* κ³ μ λͺ
μ¬, 볡ν©λͺ
μ¬ μ¬μ μ κΈ°λ°νμ¬ μ²λ¦¬ν¨.
* </pre>
*
* <code>string custom_domain = 4;</code>
*/
public com.google.protobuf.ByteString
getCustomDomainBytes() {
java.lang.Object ref = customDomain_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
customDomain_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* 컀μ€ν
μ¬μ λλ©μΈ μ 보
* κ³ μ λͺ
μ¬, 볡ν©λͺ
μ¬ μ¬μ μ κΈ°λ°νμ¬ μ²λ¦¬ν¨.
* </pre>
*
* <code>string custom_domain = 4;</code>
*/
public Builder setCustomDomain(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
customDomain_ = value;
onChanged();
return this;
}
/**
* <pre>
* 컀μ€ν
μ¬μ λλ©μΈ μ 보
* κ³ μ λͺ
μ¬, 볡ν©λͺ
μ¬ μ¬μ μ κΈ°λ°νμ¬ μ²λ¦¬ν¨.
* </pre>
*
* <code>string custom_domain = 4;</code>
*/
public Builder clearCustomDomain() {
customDomain_ = getDefaultInstance().getCustomDomain();
onChanged();
return this;
}
/**
* <pre>
* 컀μ€ν
μ¬μ λλ©μΈ μ 보
* κ³ μ λͺ
μ¬, 볡ν©λͺ
μ¬ μ¬μ μ κΈ°λ°νμ¬ μ²λ¦¬ν¨.
* </pre>
*
* <code>string custom_domain = 4;</code>
*/
public Builder setCustomDomainBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
customDomain_ = value;
onChanged();
return this;
}
private boolean autoSpacing_ ;
/**
* <pre>
* μλ λμ΄μ°κΈ°
* </pre>
*
* <code>bool auto_spacing = 5;</code>
*/
public boolean getAutoSpacing() {
return autoSpacing_;
}
/**
* <pre>
* μλ λμ΄μ°κΈ°
* </pre>
*
* <code>bool auto_spacing = 5;</code>
*/
public Builder setAutoSpacing(boolean value) {
autoSpacing_ = value;
onChanged();
return this;
}
/**
* <pre>
* μλ λμ΄μ°κΈ°
* </pre>
*
* <code>bool auto_spacing = 5;</code>
*/
public Builder clearAutoSpacing() {
autoSpacing_ = false;
onChanged();
return this;
}
private boolean autoJointing_ ;
/**
* <pre>
* μλ λΆμ¬μ°κΈ°
* </pre>
*
* <code>bool auto_jointing = 6;</code>
*/
public boolean getAutoJointing() {
return autoJointing_;
}
/**
* <pre>
* μλ λΆμ¬μ°κΈ°
* </pre>
*
* <code>bool auto_jointing = 6;</code>
*/
public Builder setAutoJointing(boolean value) {
autoJointing_ = value;
onChanged();
return this;
}
/**
* <pre>
* μλ λΆμ¬μ°κΈ°
* </pre>
*
* <code>bool auto_jointing = 6;</code>
*/
public Builder clearAutoJointing() {
autoJointing_ = 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:bareun.AnalyzeSyntaxListRequest)
}
// @@protoc_insertion_point(class_scope:bareun.AnalyzeSyntaxListRequest)
private static final ai.bareun.protos.AnalyzeSyntaxListRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new ai.bareun.protos.AnalyzeSyntaxListRequest();
}
public static ai.bareun.protos.AnalyzeSyntaxListRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<AnalyzeSyntaxListRequest>
PARSER = new com.google.protobuf.AbstractParser<AnalyzeSyntaxListRequest>() {
@java.lang.Override
public AnalyzeSyntaxListRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new AnalyzeSyntaxListRequest(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<AnalyzeSyntaxListRequest> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<AnalyzeSyntaxListRequest> getParserForType() {
return PARSER;
}
@java.lang.Override
public ai.bareun.protos.AnalyzeSyntaxListRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
|
0
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun/protos/AnalyzeSyntaxListRequestOrBuilder.java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bareun/language_service.proto
package ai.bareun.protos;
public interface AnalyzeSyntaxListRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:bareun.AnalyzeSyntaxListRequest)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* μ
λ ₯ λ¬Έμ₯μ λ°°μ΄
* </pre>
*
* <code>repeated string sentences = 1;</code>
*/
java.util.List<java.lang.String>
getSentencesList();
/**
* <pre>
* μ
λ ₯ λ¬Έμ₯μ λ°°μ΄
* </pre>
*
* <code>repeated string sentences = 1;</code>
*/
int getSentencesCount();
/**
* <pre>
* μ
λ ₯ λ¬Έμ₯μ λ°°μ΄
* </pre>
*
* <code>repeated string sentences = 1;</code>
*/
java.lang.String getSentences(int index);
/**
* <pre>
* μ
λ ₯ λ¬Έμ₯μ λ°°μ΄
* </pre>
*
* <code>repeated string sentences = 1;</code>
*/
com.google.protobuf.ByteString
getSentencesBytes(int index);
/**
* <pre>
* μ
λ ₯ λ¬Έμ₯μ μΈμ΄
* </pre>
*
* <code>string language = 2;</code>
*/
java.lang.String getLanguage();
/**
* <pre>
* μ
λ ₯ λ¬Έμ₯μ μΈμ΄
* </pre>
*
* <code>string language = 2;</code>
*/
com.google.protobuf.ByteString
getLanguageBytes();
/**
* <pre>
* μ€νμ
μ κ³μ°νκΈ° μν μΈμ½λ© νμ
* </pre>
*
* <code>.bareun.EncodingType encoding_type = 3;</code>
*/
int getEncodingTypeValue();
/**
* <pre>
* μ€νμ
μ κ³μ°νκΈ° μν μΈμ½λ© νμ
* </pre>
*
* <code>.bareun.EncodingType encoding_type = 3;</code>
*/
ai.bareun.protos.EncodingType getEncodingType();
/**
* <pre>
* 컀μ€ν
μ¬μ λλ©μΈ μ 보
* κ³ μ λͺ
μ¬, 볡ν©λͺ
μ¬ μ¬μ μ κΈ°λ°νμ¬ μ²λ¦¬ν¨.
* </pre>
*
* <code>string custom_domain = 4;</code>
*/
java.lang.String getCustomDomain();
/**
* <pre>
* 컀μ€ν
μ¬μ λλ©μΈ μ 보
* κ³ μ λͺ
μ¬, 볡ν©λͺ
μ¬ μ¬μ μ κΈ°λ°νμ¬ μ²λ¦¬ν¨.
* </pre>
*
* <code>string custom_domain = 4;</code>
*/
com.google.protobuf.ByteString
getCustomDomainBytes();
/**
* <pre>
* μλ λμ΄μ°κΈ°
* </pre>
*
* <code>bool auto_spacing = 5;</code>
*/
boolean getAutoSpacing();
/**
* <pre>
* μλ λΆμ¬μ°κΈ°
* </pre>
*
* <code>bool auto_jointing = 6;</code>
*/
boolean getAutoJointing();
}
|
0
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun/protos/AnalyzeSyntaxListResponse.java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bareun/language_service.proto
package ai.bareun.protos;
/**
* <pre>
* νν λΆμ μλ΄ λ©μμ§
* </pre>
*
* Protobuf type {@code bareun.AnalyzeSyntaxListResponse}
*/
public final class AnalyzeSyntaxListResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:bareun.AnalyzeSyntaxListResponse)
AnalyzeSyntaxListResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use AnalyzeSyntaxListResponse.newBuilder() to construct.
private AnalyzeSyntaxListResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private AnalyzeSyntaxListResponse() {
sentences_ = java.util.Collections.emptyList();
language_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private AnalyzeSyntaxListResponse(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
sentences_ = new java.util.ArrayList<ai.bareun.protos.Sentence>();
mutable_bitField0_ |= 0x00000001;
}
sentences_.add(
input.readMessage(ai.bareun.protos.Sentence.parser(), extensionRegistry));
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
language_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
sentences_ = java.util.Collections.unmodifiableList(sentences_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_AnalyzeSyntaxListResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_AnalyzeSyntaxListResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.bareun.protos.AnalyzeSyntaxListResponse.class, ai.bareun.protos.AnalyzeSyntaxListResponse.Builder.class);
}
private int bitField0_;
public static final int SENTENCES_FIELD_NUMBER = 1;
private java.util.List<ai.bareun.protos.Sentence> sentences_;
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* μ¬κΈ°μ λ¬Έμ₯μ μμ²μ λμνμ¬ 1:1λ‘ λ§μΆ°μ§λ€.
* λ§μΌ μμ²μ΄ λΉ λ¬Έμ₯μ΄λ©΄ λΉ λ¬Έμ₯μΌλ‘ λμνλ€.
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public java.util.List<ai.bareun.protos.Sentence> getSentencesList() {
return sentences_;
}
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* μ¬κΈ°μ λ¬Έμ₯μ μμ²μ λμνμ¬ 1:1λ‘ λ§μΆ°μ§λ€.
* λ§μΌ μμ²μ΄ λΉ λ¬Έμ₯μ΄λ©΄ λΉ λ¬Έμ₯μΌλ‘ λμνλ€.
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public java.util.List<? extends ai.bareun.protos.SentenceOrBuilder>
getSentencesOrBuilderList() {
return sentences_;
}
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* μ¬κΈ°μ λ¬Έμ₯μ μμ²μ λμνμ¬ 1:1λ‘ λ§μΆ°μ§λ€.
* λ§μΌ μμ²μ΄ λΉ λ¬Έμ₯μ΄λ©΄ λΉ λ¬Έμ₯μΌλ‘ λμνλ€.
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public int getSentencesCount() {
return sentences_.size();
}
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* μ¬κΈ°μ λ¬Έμ₯μ μμ²μ λμνμ¬ 1:1λ‘ λ§μΆ°μ§λ€.
* λ§μΌ μμ²μ΄ λΉ λ¬Έμ₯μ΄λ©΄ λΉ λ¬Έμ₯μΌλ‘ λμνλ€.
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public ai.bareun.protos.Sentence getSentences(int index) {
return sentences_.get(index);
}
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* μ¬κΈ°μ λ¬Έμ₯μ μμ²μ λμνμ¬ 1:1λ‘ λ§μΆ°μ§λ€.
* λ§μΌ μμ²μ΄ λΉ λ¬Έμ₯μ΄λ©΄ λΉ λ¬Έμ₯μΌλ‘ λμνλ€.
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public ai.bareun.protos.SentenceOrBuilder getSentencesOrBuilder(
int index) {
return sentences_.get(index);
}
public static final int LANGUAGE_FIELD_NUMBER = 3;
private volatile java.lang.Object language_;
/**
* <pre>
* ν
μ€νΈμ μΈμ΄, λ§μΌ μΈμ΄κ° μ§μ λμ§ μμ κ²½μ°μλ μλμΌλ‘ νμ§νμ¬ λ°ννλ€.
* μΈμ΄κ° μ§μ λ κ²½μ°μλ λμΌν μΈμ΄λ₯Ό λ°ννλ€.
* μ΄λ, μΈμ΄λ ko_KR λ±κ³Ό κ°μ΄ μ¬μ©νλ€.
* </pre>
*
* <code>string language = 3;</code>
*/
public java.lang.String getLanguage() {
java.lang.Object ref = language_;
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();
language_ = s;
return s;
}
}
/**
* <pre>
* ν
μ€νΈμ μΈμ΄, λ§μΌ μΈμ΄κ° μ§μ λμ§ μμ κ²½μ°μλ μλμΌλ‘ νμ§νμ¬ λ°ννλ€.
* μΈμ΄κ° μ§μ λ κ²½μ°μλ λμΌν μΈμ΄λ₯Ό λ°ννλ€.
* μ΄λ, μΈμ΄λ ko_KR λ±κ³Ό κ°μ΄ μ¬μ©νλ€.
* </pre>
*
* <code>string language = 3;</code>
*/
public com.google.protobuf.ByteString
getLanguageBytes() {
java.lang.Object ref = language_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
language_ = 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 < sentences_.size(); i++) {
output.writeMessage(1, sentences_.get(i));
}
if (!getLanguageBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, language_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < sentences_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, sentences_.get(i));
}
if (!getLanguageBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, language_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof ai.bareun.protos.AnalyzeSyntaxListResponse)) {
return super.equals(obj);
}
ai.bareun.protos.AnalyzeSyntaxListResponse other = (ai.bareun.protos.AnalyzeSyntaxListResponse) obj;
if (!getSentencesList()
.equals(other.getSentencesList())) return false;
if (!getLanguage()
.equals(other.getLanguage())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getSentencesCount() > 0) {
hash = (37 * hash) + SENTENCES_FIELD_NUMBER;
hash = (53 * hash) + getSentencesList().hashCode();
}
hash = (37 * hash) + LANGUAGE_FIELD_NUMBER;
hash = (53 * hash) + getLanguage().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static ai.bareun.protos.AnalyzeSyntaxListResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.AnalyzeSyntaxListResponse parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.AnalyzeSyntaxListResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.AnalyzeSyntaxListResponse parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.AnalyzeSyntaxListResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.AnalyzeSyntaxListResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.AnalyzeSyntaxListResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.bareun.protos.AnalyzeSyntaxListResponse 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.bareun.protos.AnalyzeSyntaxListResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static ai.bareun.protos.AnalyzeSyntaxListResponse 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.bareun.protos.AnalyzeSyntaxListResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.bareun.protos.AnalyzeSyntaxListResponse 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.bareun.protos.AnalyzeSyntaxListResponse 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>
* νν λΆμ μλ΄ λ©μμ§
* </pre>
*
* Protobuf type {@code bareun.AnalyzeSyntaxListResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:bareun.AnalyzeSyntaxListResponse)
ai.bareun.protos.AnalyzeSyntaxListResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_AnalyzeSyntaxListResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_AnalyzeSyntaxListResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.bareun.protos.AnalyzeSyntaxListResponse.class, ai.bareun.protos.AnalyzeSyntaxListResponse.Builder.class);
}
// Construct using ai.bareun.protos.AnalyzeSyntaxListResponse.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getSentencesFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (sentencesBuilder_ == null) {
sentences_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
sentencesBuilder_.clear();
}
language_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_AnalyzeSyntaxListResponse_descriptor;
}
@java.lang.Override
public ai.bareun.protos.AnalyzeSyntaxListResponse getDefaultInstanceForType() {
return ai.bareun.protos.AnalyzeSyntaxListResponse.getDefaultInstance();
}
@java.lang.Override
public ai.bareun.protos.AnalyzeSyntaxListResponse build() {
ai.bareun.protos.AnalyzeSyntaxListResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ai.bareun.protos.AnalyzeSyntaxListResponse buildPartial() {
ai.bareun.protos.AnalyzeSyntaxListResponse result = new ai.bareun.protos.AnalyzeSyntaxListResponse(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (sentencesBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
sentences_ = java.util.Collections.unmodifiableList(sentences_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.sentences_ = sentences_;
} else {
result.sentences_ = sentencesBuilder_.build();
}
result.language_ = language_;
result.bitField0_ = to_bitField0_;
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.bareun.protos.AnalyzeSyntaxListResponse) {
return mergeFrom((ai.bareun.protos.AnalyzeSyntaxListResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ai.bareun.protos.AnalyzeSyntaxListResponse other) {
if (other == ai.bareun.protos.AnalyzeSyntaxListResponse.getDefaultInstance()) return this;
if (sentencesBuilder_ == null) {
if (!other.sentences_.isEmpty()) {
if (sentences_.isEmpty()) {
sentences_ = other.sentences_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureSentencesIsMutable();
sentences_.addAll(other.sentences_);
}
onChanged();
}
} else {
if (!other.sentences_.isEmpty()) {
if (sentencesBuilder_.isEmpty()) {
sentencesBuilder_.dispose();
sentencesBuilder_ = null;
sentences_ = other.sentences_;
bitField0_ = (bitField0_ & ~0x00000001);
sentencesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getSentencesFieldBuilder() : null;
} else {
sentencesBuilder_.addAllMessages(other.sentences_);
}
}
}
if (!other.getLanguage().isEmpty()) {
language_ = other.language_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
ai.bareun.protos.AnalyzeSyntaxListResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (ai.bareun.protos.AnalyzeSyntaxListResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List<ai.bareun.protos.Sentence> sentences_ =
java.util.Collections.emptyList();
private void ensureSentencesIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
sentences_ = new java.util.ArrayList<ai.bareun.protos.Sentence>(sentences_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
ai.bareun.protos.Sentence, ai.bareun.protos.Sentence.Builder, ai.bareun.protos.SentenceOrBuilder> sentencesBuilder_;
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* μ¬κΈ°μ λ¬Έμ₯μ μμ²μ λμνμ¬ 1:1λ‘ λ§μΆ°μ§λ€.
* λ§μΌ μμ²μ΄ λΉ λ¬Έμ₯μ΄λ©΄ λΉ λ¬Έμ₯μΌλ‘ λμνλ€.
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public java.util.List<ai.bareun.protos.Sentence> getSentencesList() {
if (sentencesBuilder_ == null) {
return java.util.Collections.unmodifiableList(sentences_);
} else {
return sentencesBuilder_.getMessageList();
}
}
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* μ¬κΈ°μ λ¬Έμ₯μ μμ²μ λμνμ¬ 1:1λ‘ λ§μΆ°μ§λ€.
* λ§μΌ μμ²μ΄ λΉ λ¬Έμ₯μ΄λ©΄ λΉ λ¬Έμ₯μΌλ‘ λμνλ€.
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public int getSentencesCount() {
if (sentencesBuilder_ == null) {
return sentences_.size();
} else {
return sentencesBuilder_.getCount();
}
}
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* μ¬κΈ°μ λ¬Έμ₯μ μμ²μ λμνμ¬ 1:1λ‘ λ§μΆ°μ§λ€.
* λ§μΌ μμ²μ΄ λΉ λ¬Έμ₯μ΄λ©΄ λΉ λ¬Έμ₯μΌλ‘ λμνλ€.
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public ai.bareun.protos.Sentence getSentences(int index) {
if (sentencesBuilder_ == null) {
return sentences_.get(index);
} else {
return sentencesBuilder_.getMessage(index);
}
}
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* μ¬κΈ°μ λ¬Έμ₯μ μμ²μ λμνμ¬ 1:1λ‘ λ§μΆ°μ§λ€.
* λ§μΌ μμ²μ΄ λΉ λ¬Έμ₯μ΄λ©΄ λΉ λ¬Έμ₯μΌλ‘ λμνλ€.
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public Builder setSentences(
int index, ai.bareun.protos.Sentence value) {
if (sentencesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSentencesIsMutable();
sentences_.set(index, value);
onChanged();
} else {
sentencesBuilder_.setMessage(index, value);
}
return this;
}
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* μ¬κΈ°μ λ¬Έμ₯μ μμ²μ λμνμ¬ 1:1λ‘ λ§μΆ°μ§λ€.
* λ§μΌ μμ²μ΄ λΉ λ¬Έμ₯μ΄λ©΄ λΉ λ¬Έμ₯μΌλ‘ λμνλ€.
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public Builder setSentences(
int index, ai.bareun.protos.Sentence.Builder builderForValue) {
if (sentencesBuilder_ == null) {
ensureSentencesIsMutable();
sentences_.set(index, builderForValue.build());
onChanged();
} else {
sentencesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* μ¬κΈ°μ λ¬Έμ₯μ μμ²μ λμνμ¬ 1:1λ‘ λ§μΆ°μ§λ€.
* λ§μΌ μμ²μ΄ λΉ λ¬Έμ₯μ΄λ©΄ λΉ λ¬Έμ₯μΌλ‘ λμνλ€.
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public Builder addSentences(ai.bareun.protos.Sentence value) {
if (sentencesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSentencesIsMutable();
sentences_.add(value);
onChanged();
} else {
sentencesBuilder_.addMessage(value);
}
return this;
}
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* μ¬κΈ°μ λ¬Έμ₯μ μμ²μ λμνμ¬ 1:1λ‘ λ§μΆ°μ§λ€.
* λ§μΌ μμ²μ΄ λΉ λ¬Έμ₯μ΄λ©΄ λΉ λ¬Έμ₯μΌλ‘ λμνλ€.
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public Builder addSentences(
int index, ai.bareun.protos.Sentence value) {
if (sentencesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSentencesIsMutable();
sentences_.add(index, value);
onChanged();
} else {
sentencesBuilder_.addMessage(index, value);
}
return this;
}
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* μ¬κΈ°μ λ¬Έμ₯μ μμ²μ λμνμ¬ 1:1λ‘ λ§μΆ°μ§λ€.
* λ§μΌ μμ²μ΄ λΉ λ¬Έμ₯μ΄λ©΄ λΉ λ¬Έμ₯μΌλ‘ λμνλ€.
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public Builder addSentences(
ai.bareun.protos.Sentence.Builder builderForValue) {
if (sentencesBuilder_ == null) {
ensureSentencesIsMutable();
sentences_.add(builderForValue.build());
onChanged();
} else {
sentencesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* μ¬κΈ°μ λ¬Έμ₯μ μμ²μ λμνμ¬ 1:1λ‘ λ§μΆ°μ§λ€.
* λ§μΌ μμ²μ΄ λΉ λ¬Έμ₯μ΄λ©΄ λΉ λ¬Έμ₯μΌλ‘ λμνλ€.
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public Builder addSentences(
int index, ai.bareun.protos.Sentence.Builder builderForValue) {
if (sentencesBuilder_ == null) {
ensureSentencesIsMutable();
sentences_.add(index, builderForValue.build());
onChanged();
} else {
sentencesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* μ¬κΈ°μ λ¬Έμ₯μ μμ²μ λμνμ¬ 1:1λ‘ λ§μΆ°μ§λ€.
* λ§μΌ μμ²μ΄ λΉ λ¬Έμ₯μ΄λ©΄ λΉ λ¬Έμ₯μΌλ‘ λμνλ€.
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public Builder addAllSentences(
java.lang.Iterable<? extends ai.bareun.protos.Sentence> values) {
if (sentencesBuilder_ == null) {
ensureSentencesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, sentences_);
onChanged();
} else {
sentencesBuilder_.addAllMessages(values);
}
return this;
}
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* μ¬κΈ°μ λ¬Έμ₯μ μμ²μ λμνμ¬ 1:1λ‘ λ§μΆ°μ§λ€.
* λ§μΌ μμ²μ΄ λΉ λ¬Έμ₯μ΄λ©΄ λΉ λ¬Έμ₯μΌλ‘ λμνλ€.
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public Builder clearSentences() {
if (sentencesBuilder_ == null) {
sentences_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
sentencesBuilder_.clear();
}
return this;
}
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* μ¬κΈ°μ λ¬Έμ₯μ μμ²μ λμνμ¬ 1:1λ‘ λ§μΆ°μ§λ€.
* λ§μΌ μμ²μ΄ λΉ λ¬Έμ₯μ΄λ©΄ λΉ λ¬Έμ₯μΌλ‘ λμνλ€.
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public Builder removeSentences(int index) {
if (sentencesBuilder_ == null) {
ensureSentencesIsMutable();
sentences_.remove(index);
onChanged();
} else {
sentencesBuilder_.remove(index);
}
return this;
}
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* μ¬κΈ°μ λ¬Έμ₯μ μμ²μ λμνμ¬ 1:1λ‘ λ§μΆ°μ§λ€.
* λ§μΌ μμ²μ΄ λΉ λ¬Έμ₯μ΄λ©΄ λΉ λ¬Έμ₯μΌλ‘ λμνλ€.
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public ai.bareun.protos.Sentence.Builder getSentencesBuilder(
int index) {
return getSentencesFieldBuilder().getBuilder(index);
}
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* μ¬κΈ°μ λ¬Έμ₯μ μμ²μ λμνμ¬ 1:1λ‘ λ§μΆ°μ§λ€.
* λ§μΌ μμ²μ΄ λΉ λ¬Έμ₯μ΄λ©΄ λΉ λ¬Έμ₯μΌλ‘ λμνλ€.
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public ai.bareun.protos.SentenceOrBuilder getSentencesOrBuilder(
int index) {
if (sentencesBuilder_ == null) {
return sentences_.get(index); } else {
return sentencesBuilder_.getMessageOrBuilder(index);
}
}
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* μ¬κΈ°μ λ¬Έμ₯μ μμ²μ λμνμ¬ 1:1λ‘ λ§μΆ°μ§λ€.
* λ§μΌ μμ²μ΄ λΉ λ¬Έμ₯μ΄λ©΄ λΉ λ¬Έμ₯μΌλ‘ λμνλ€.
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public java.util.List<? extends ai.bareun.protos.SentenceOrBuilder>
getSentencesOrBuilderList() {
if (sentencesBuilder_ != null) {
return sentencesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(sentences_);
}
}
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* μ¬κΈ°μ λ¬Έμ₯μ μμ²μ λμνμ¬ 1:1λ‘ λ§μΆ°μ§λ€.
* λ§μΌ μμ²μ΄ λΉ λ¬Έμ₯μ΄λ©΄ λΉ λ¬Έμ₯μΌλ‘ λμνλ€.
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public ai.bareun.protos.Sentence.Builder addSentencesBuilder() {
return getSentencesFieldBuilder().addBuilder(
ai.bareun.protos.Sentence.getDefaultInstance());
}
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* μ¬κΈ°μ λ¬Έμ₯μ μμ²μ λμνμ¬ 1:1λ‘ λ§μΆ°μ§λ€.
* λ§μΌ μμ²μ΄ λΉ λ¬Έμ₯μ΄λ©΄ λΉ λ¬Έμ₯μΌλ‘ λμνλ€.
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public ai.bareun.protos.Sentence.Builder addSentencesBuilder(
int index) {
return getSentencesFieldBuilder().addBuilder(
index, ai.bareun.protos.Sentence.getDefaultInstance());
}
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* μ¬κΈ°μ λ¬Έμ₯μ μμ²μ λμνμ¬ 1:1λ‘ λ§μΆ°μ§λ€.
* λ§μΌ μμ²μ΄ λΉ λ¬Έμ₯μ΄λ©΄ λΉ λ¬Έμ₯μΌλ‘ λμνλ€.
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public java.util.List<ai.bareun.protos.Sentence.Builder>
getSentencesBuilderList() {
return getSentencesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
ai.bareun.protos.Sentence, ai.bareun.protos.Sentence.Builder, ai.bareun.protos.SentenceOrBuilder>
getSentencesFieldBuilder() {
if (sentencesBuilder_ == null) {
sentencesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
ai.bareun.protos.Sentence, ai.bareun.protos.Sentence.Builder, ai.bareun.protos.SentenceOrBuilder>(
sentences_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
sentences_ = null;
}
return sentencesBuilder_;
}
private java.lang.Object language_ = "";
/**
* <pre>
* ν
μ€νΈμ μΈμ΄, λ§μΌ μΈμ΄κ° μ§μ λμ§ μμ κ²½μ°μλ μλμΌλ‘ νμ§νμ¬ λ°ννλ€.
* μΈμ΄κ° μ§μ λ κ²½μ°μλ λμΌν μΈμ΄λ₯Ό λ°ννλ€.
* μ΄λ, μΈμ΄λ ko_KR λ±κ³Ό κ°μ΄ μ¬μ©νλ€.
* </pre>
*
* <code>string language = 3;</code>
*/
public java.lang.String getLanguage() {
java.lang.Object ref = language_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
language_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* ν
μ€νΈμ μΈμ΄, λ§μΌ μΈμ΄κ° μ§μ λμ§ μμ κ²½μ°μλ μλμΌλ‘ νμ§νμ¬ λ°ννλ€.
* μΈμ΄κ° μ§μ λ κ²½μ°μλ λμΌν μΈμ΄λ₯Ό λ°ννλ€.
* μ΄λ, μΈμ΄λ ko_KR λ±κ³Ό κ°μ΄ μ¬μ©νλ€.
* </pre>
*
* <code>string language = 3;</code>
*/
public com.google.protobuf.ByteString
getLanguageBytes() {
java.lang.Object ref = language_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
language_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* ν
μ€νΈμ μΈμ΄, λ§μΌ μΈμ΄κ° μ§μ λμ§ μμ κ²½μ°μλ μλμΌλ‘ νμ§νμ¬ λ°ννλ€.
* μΈμ΄κ° μ§μ λ κ²½μ°μλ λμΌν μΈμ΄λ₯Ό λ°ννλ€.
* μ΄λ, μΈμ΄λ ko_KR λ±κ³Ό κ°μ΄ μ¬μ©νλ€.
* </pre>
*
* <code>string language = 3;</code>
*/
public Builder setLanguage(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
language_ = value;
onChanged();
return this;
}
/**
* <pre>
* ν
μ€νΈμ μΈμ΄, λ§μΌ μΈμ΄κ° μ§μ λμ§ μμ κ²½μ°μλ μλμΌλ‘ νμ§νμ¬ λ°ννλ€.
* μΈμ΄κ° μ§μ λ κ²½μ°μλ λμΌν μΈμ΄λ₯Ό λ°ννλ€.
* μ΄λ, μΈμ΄λ ko_KR λ±κ³Ό κ°μ΄ μ¬μ©νλ€.
* </pre>
*
* <code>string language = 3;</code>
*/
public Builder clearLanguage() {
language_ = getDefaultInstance().getLanguage();
onChanged();
return this;
}
/**
* <pre>
* ν
μ€νΈμ μΈμ΄, λ§μΌ μΈμ΄κ° μ§μ λμ§ μμ κ²½μ°μλ μλμΌλ‘ νμ§νμ¬ λ°ννλ€.
* μΈμ΄κ° μ§μ λ κ²½μ°μλ λμΌν μΈμ΄λ₯Ό λ°ννλ€.
* μ΄λ, μΈμ΄λ ko_KR λ±κ³Ό κ°μ΄ μ¬μ©νλ€.
* </pre>
*
* <code>string language = 3;</code>
*/
public Builder setLanguageBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
language_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:bareun.AnalyzeSyntaxListResponse)
}
// @@protoc_insertion_point(class_scope:bareun.AnalyzeSyntaxListResponse)
private static final ai.bareun.protos.AnalyzeSyntaxListResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new ai.bareun.protos.AnalyzeSyntaxListResponse();
}
public static ai.bareun.protos.AnalyzeSyntaxListResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<AnalyzeSyntaxListResponse>
PARSER = new com.google.protobuf.AbstractParser<AnalyzeSyntaxListResponse>() {
@java.lang.Override
public AnalyzeSyntaxListResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new AnalyzeSyntaxListResponse(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<AnalyzeSyntaxListResponse> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<AnalyzeSyntaxListResponse> getParserForType() {
return PARSER;
}
@java.lang.Override
public ai.bareun.protos.AnalyzeSyntaxListResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
|
0
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun/protos/AnalyzeSyntaxListResponseOrBuilder.java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bareun/language_service.proto
package ai.bareun.protos;
public interface AnalyzeSyntaxListResponseOrBuilder extends
// @@protoc_insertion_point(interface_extends:bareun.AnalyzeSyntaxListResponse)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* μ¬κΈ°μ λ¬Έμ₯μ μμ²μ λμνμ¬ 1:1λ‘ λ§μΆ°μ§λ€.
* λ§μΌ μμ²μ΄ λΉ λ¬Έμ₯μ΄λ©΄ λΉ λ¬Έμ₯μΌλ‘ λμνλ€.
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
java.util.List<ai.bareun.protos.Sentence>
getSentencesList();
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* μ¬κΈ°μ λ¬Έμ₯μ μμ²μ λμνμ¬ 1:1λ‘ λ§μΆ°μ§λ€.
* λ§μΌ μμ²μ΄ λΉ λ¬Έμ₯μ΄λ©΄ λΉ λ¬Έμ₯μΌλ‘ λμνλ€.
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
ai.bareun.protos.Sentence getSentences(int index);
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* μ¬κΈ°μ λ¬Έμ₯μ μμ²μ λμνμ¬ 1:1λ‘ λ§μΆ°μ§λ€.
* λ§μΌ μμ²μ΄ λΉ λ¬Έμ₯μ΄λ©΄ λΉ λ¬Έμ₯μΌλ‘ λμνλ€.
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
int getSentencesCount();
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* μ¬κΈ°μ λ¬Έμ₯μ μμ²μ λμνμ¬ 1:1λ‘ λ§μΆ°μ§λ€.
* λ§μΌ μμ²μ΄ λΉ λ¬Έμ₯μ΄λ©΄ λΉ λ¬Έμ₯μΌλ‘ λμνλ€.
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
java.util.List<? extends ai.bareun.protos.SentenceOrBuilder>
getSentencesOrBuilderList();
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* μ¬κΈ°μ λ¬Έμ₯μ μμ²μ λμνμ¬ 1:1λ‘ λ§μΆ°μ§λ€.
* λ§μΌ μμ²μ΄ λΉ λ¬Έμ₯μ΄λ©΄ λΉ λ¬Έμ₯μΌλ‘ λμνλ€.
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
ai.bareun.protos.SentenceOrBuilder getSentencesOrBuilder(
int index);
/**
* <pre>
* ν
μ€νΈμ μΈμ΄, λ§μΌ μΈμ΄κ° μ§μ λμ§ μμ κ²½μ°μλ μλμΌλ‘ νμ§νμ¬ λ°ννλ€.
* μΈμ΄κ° μ§μ λ κ²½μ°μλ λμΌν μΈμ΄λ₯Ό λ°ννλ€.
* μ΄λ, μΈμ΄λ ko_KR λ±κ³Ό κ°μ΄ μ¬μ©νλ€.
* </pre>
*
* <code>string language = 3;</code>
*/
java.lang.String getLanguage();
/**
* <pre>
* ν
μ€νΈμ μΈμ΄, λ§μΌ μΈμ΄κ° μ§μ λμ§ μμ κ²½μ°μλ μλμΌλ‘ νμ§νμ¬ λ°ννλ€.
* μΈμ΄κ° μ§μ λ κ²½μ°μλ λμΌν μΈμ΄λ₯Ό λ°ννλ€.
* μ΄λ, μΈμ΄λ ko_KR λ±κ³Ό κ°μ΄ μ¬μ©νλ€.
* </pre>
*
* <code>string language = 3;</code>
*/
com.google.protobuf.ByteString
getLanguageBytes();
}
|
0
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun/protos/AnalyzeSyntaxRequest.java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bareun/language_service.proto
package ai.bareun.protos;
/**
* <pre>
* ννμ λΆμ μμ² λ©μμ§
* </pre>
*
* Protobuf type {@code bareun.AnalyzeSyntaxRequest}
*/
public final class AnalyzeSyntaxRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:bareun.AnalyzeSyntaxRequest)
AnalyzeSyntaxRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use AnalyzeSyntaxRequest.newBuilder() to construct.
private AnalyzeSyntaxRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private AnalyzeSyntaxRequest() {
encodingType_ = 0;
customDomain_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private AnalyzeSyntaxRequest(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
ai.bareun.protos.Document.Builder subBuilder = null;
if (document_ != null) {
subBuilder = document_.toBuilder();
}
document_ = input.readMessage(ai.bareun.protos.Document.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(document_);
document_ = subBuilder.buildPartial();
}
break;
}
case 16: {
int rawValue = input.readEnum();
encodingType_ = rawValue;
break;
}
case 24: {
autoSplitSentence_ = input.readBool();
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
customDomain_ = s;
break;
}
case 40: {
autoSpacing_ = input.readBool();
break;
}
case 48: {
autoJointing_ = input.readBool();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_AnalyzeSyntaxRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_AnalyzeSyntaxRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.bareun.protos.AnalyzeSyntaxRequest.class, ai.bareun.protos.AnalyzeSyntaxRequest.Builder.class);
}
public static final int DOCUMENT_FIELD_NUMBER = 1;
private ai.bareun.protos.Document document_;
/**
* <pre>
* μ
λ ₯ λ¬Έμ
* </pre>
*
* <code>.bareun.Document document = 1;</code>
*/
public boolean hasDocument() {
return document_ != null;
}
/**
* <pre>
* μ
λ ₯ λ¬Έμ
* </pre>
*
* <code>.bareun.Document document = 1;</code>
*/
public ai.bareun.protos.Document getDocument() {
return document_ == null ? ai.bareun.protos.Document.getDefaultInstance() : document_;
}
/**
* <pre>
* μ
λ ₯ λ¬Έμ
* </pre>
*
* <code>.bareun.Document document = 1;</code>
*/
public ai.bareun.protos.DocumentOrBuilder getDocumentOrBuilder() {
return getDocument();
}
public static final int ENCODING_TYPE_FIELD_NUMBER = 2;
private int encodingType_;
/**
* <pre>
* μ€νμ
μ κ³μ°νκΈ° μν μΈμ½λ© νμ
* </pre>
*
* <code>.bareun.EncodingType encoding_type = 2;</code>
*/
public int getEncodingTypeValue() {
return encodingType_;
}
/**
* <pre>
* μ€νμ
μ κ³μ°νκΈ° μν μΈμ½λ© νμ
* </pre>
*
* <code>.bareun.EncodingType encoding_type = 2;</code>
*/
public ai.bareun.protos.EncodingType getEncodingType() {
@SuppressWarnings("deprecation")
ai.bareun.protos.EncodingType result = ai.bareun.protos.EncodingType.valueOf(encodingType_);
return result == null ? ai.bareun.protos.EncodingType.UNRECOGNIZED : result;
}
public static final int AUTO_SPLIT_SENTENCE_FIELD_NUMBER = 3;
private boolean autoSplitSentence_;
/**
* <pre>
* auto split sentence trueμ΄λ©΄ μλμΌλ‘ λ¬Έμ₯ λΆλ¦¬λ₯Ό μλνλ€.
* μμΌλ©΄ \n μ κΈ°μ€μΌλ‘ λ¬Έμ₯μ μλ₯Έλ€.
* κΈ°λ³Έκ°μ false μ΄λ€.
* </pre>
*
* <code>bool auto_split_sentence = 3;</code>
*/
public boolean getAutoSplitSentence() {
return autoSplitSentence_;
}
public static final int CUSTOM_DOMAIN_FIELD_NUMBER = 4;
private volatile java.lang.Object customDomain_;
/**
* <pre>
* 컀μ€ν
μ¬μ λλ©μΈ μ 보
* κ³ μ λͺ
μ¬, 볡ν©λͺ
μ¬ μ¬μ μ κΈ°λ°νμ¬ μ²λ¦¬ν¨.
* </pre>
*
* <code>string custom_domain = 4;</code>
*/
public java.lang.String getCustomDomain() {
java.lang.Object ref = customDomain_;
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();
customDomain_ = s;
return s;
}
}
/**
* <pre>
* 컀μ€ν
μ¬μ λλ©μΈ μ 보
* κ³ μ λͺ
μ¬, 볡ν©λͺ
μ¬ μ¬μ μ κΈ°λ°νμ¬ μ²λ¦¬ν¨.
* </pre>
*
* <code>string custom_domain = 4;</code>
*/
public com.google.protobuf.ByteString
getCustomDomainBytes() {
java.lang.Object ref = customDomain_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
customDomain_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int AUTO_SPACING_FIELD_NUMBER = 5;
private boolean autoSpacing_;
/**
* <pre>
* μλ λμ΄μ°κΈ°
* </pre>
*
* <code>bool auto_spacing = 5;</code>
*/
public boolean getAutoSpacing() {
return autoSpacing_;
}
public static final int AUTO_JOINTING_FIELD_NUMBER = 6;
private boolean autoJointing_;
/**
* <pre>
* μλ λΆμ¬μ°κΈ°
* </pre>
*
* <code>bool auto_jointing = 6;</code>
*/
public boolean getAutoJointing() {
return autoJointing_;
}
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 (document_ != null) {
output.writeMessage(1, getDocument());
}
if (encodingType_ != ai.bareun.protos.EncodingType.NONE.getNumber()) {
output.writeEnum(2, encodingType_);
}
if (autoSplitSentence_ != false) {
output.writeBool(3, autoSplitSentence_);
}
if (!getCustomDomainBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, customDomain_);
}
if (autoSpacing_ != false) {
output.writeBool(5, autoSpacing_);
}
if (autoJointing_ != false) {
output.writeBool(6, autoJointing_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (document_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getDocument());
}
if (encodingType_ != ai.bareun.protos.EncodingType.NONE.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(2, encodingType_);
}
if (autoSplitSentence_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(3, autoSplitSentence_);
}
if (!getCustomDomainBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, customDomain_);
}
if (autoSpacing_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(5, autoSpacing_);
}
if (autoJointing_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(6, autoJointing_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof ai.bareun.protos.AnalyzeSyntaxRequest)) {
return super.equals(obj);
}
ai.bareun.protos.AnalyzeSyntaxRequest other = (ai.bareun.protos.AnalyzeSyntaxRequest) obj;
if (hasDocument() != other.hasDocument()) return false;
if (hasDocument()) {
if (!getDocument()
.equals(other.getDocument())) return false;
}
if (encodingType_ != other.encodingType_) return false;
if (getAutoSplitSentence()
!= other.getAutoSplitSentence()) return false;
if (!getCustomDomain()
.equals(other.getCustomDomain())) return false;
if (getAutoSpacing()
!= other.getAutoSpacing()) return false;
if (getAutoJointing()
!= other.getAutoJointing()) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasDocument()) {
hash = (37 * hash) + DOCUMENT_FIELD_NUMBER;
hash = (53 * hash) + getDocument().hashCode();
}
hash = (37 * hash) + ENCODING_TYPE_FIELD_NUMBER;
hash = (53 * hash) + encodingType_;
hash = (37 * hash) + AUTO_SPLIT_SENTENCE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getAutoSplitSentence());
hash = (37 * hash) + CUSTOM_DOMAIN_FIELD_NUMBER;
hash = (53 * hash) + getCustomDomain().hashCode();
hash = (37 * hash) + AUTO_SPACING_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getAutoSpacing());
hash = (37 * hash) + AUTO_JOINTING_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getAutoJointing());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static ai.bareun.protos.AnalyzeSyntaxRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.AnalyzeSyntaxRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.AnalyzeSyntaxRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.AnalyzeSyntaxRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.AnalyzeSyntaxRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.AnalyzeSyntaxRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.AnalyzeSyntaxRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.bareun.protos.AnalyzeSyntaxRequest 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.bareun.protos.AnalyzeSyntaxRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static ai.bareun.protos.AnalyzeSyntaxRequest 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.bareun.protos.AnalyzeSyntaxRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.bareun.protos.AnalyzeSyntaxRequest 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.bareun.protos.AnalyzeSyntaxRequest 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>
* ννμ λΆμ μμ² λ©μμ§
* </pre>
*
* Protobuf type {@code bareun.AnalyzeSyntaxRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:bareun.AnalyzeSyntaxRequest)
ai.bareun.protos.AnalyzeSyntaxRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_AnalyzeSyntaxRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_AnalyzeSyntaxRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.bareun.protos.AnalyzeSyntaxRequest.class, ai.bareun.protos.AnalyzeSyntaxRequest.Builder.class);
}
// Construct using ai.bareun.protos.AnalyzeSyntaxRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (documentBuilder_ == null) {
document_ = null;
} else {
document_ = null;
documentBuilder_ = null;
}
encodingType_ = 0;
autoSplitSentence_ = false;
customDomain_ = "";
autoSpacing_ = false;
autoJointing_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_AnalyzeSyntaxRequest_descriptor;
}
@java.lang.Override
public ai.bareun.protos.AnalyzeSyntaxRequest getDefaultInstanceForType() {
return ai.bareun.protos.AnalyzeSyntaxRequest.getDefaultInstance();
}
@java.lang.Override
public ai.bareun.protos.AnalyzeSyntaxRequest build() {
ai.bareun.protos.AnalyzeSyntaxRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ai.bareun.protos.AnalyzeSyntaxRequest buildPartial() {
ai.bareun.protos.AnalyzeSyntaxRequest result = new ai.bareun.protos.AnalyzeSyntaxRequest(this);
if (documentBuilder_ == null) {
result.document_ = document_;
} else {
result.document_ = documentBuilder_.build();
}
result.encodingType_ = encodingType_;
result.autoSplitSentence_ = autoSplitSentence_;
result.customDomain_ = customDomain_;
result.autoSpacing_ = autoSpacing_;
result.autoJointing_ = autoJointing_;
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.bareun.protos.AnalyzeSyntaxRequest) {
return mergeFrom((ai.bareun.protos.AnalyzeSyntaxRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ai.bareun.protos.AnalyzeSyntaxRequest other) {
if (other == ai.bareun.protos.AnalyzeSyntaxRequest.getDefaultInstance()) return this;
if (other.hasDocument()) {
mergeDocument(other.getDocument());
}
if (other.encodingType_ != 0) {
setEncodingTypeValue(other.getEncodingTypeValue());
}
if (other.getAutoSplitSentence() != false) {
setAutoSplitSentence(other.getAutoSplitSentence());
}
if (!other.getCustomDomain().isEmpty()) {
customDomain_ = other.customDomain_;
onChanged();
}
if (other.getAutoSpacing() != false) {
setAutoSpacing(other.getAutoSpacing());
}
if (other.getAutoJointing() != false) {
setAutoJointing(other.getAutoJointing());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
ai.bareun.protos.AnalyzeSyntaxRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (ai.bareun.protos.AnalyzeSyntaxRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private ai.bareun.protos.Document document_;
private com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.Document, ai.bareun.protos.Document.Builder, ai.bareun.protos.DocumentOrBuilder> documentBuilder_;
/**
* <pre>
* μ
λ ₯ λ¬Έμ
* </pre>
*
* <code>.bareun.Document document = 1;</code>
*/
public boolean hasDocument() {
return documentBuilder_ != null || document_ != null;
}
/**
* <pre>
* μ
λ ₯ λ¬Έμ
* </pre>
*
* <code>.bareun.Document document = 1;</code>
*/
public ai.bareun.protos.Document getDocument() {
if (documentBuilder_ == null) {
return document_ == null ? ai.bareun.protos.Document.getDefaultInstance() : document_;
} else {
return documentBuilder_.getMessage();
}
}
/**
* <pre>
* μ
λ ₯ λ¬Έμ
* </pre>
*
* <code>.bareun.Document document = 1;</code>
*/
public Builder setDocument(ai.bareun.protos.Document value) {
if (documentBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
document_ = value;
onChanged();
} else {
documentBuilder_.setMessage(value);
}
return this;
}
/**
* <pre>
* μ
λ ₯ λ¬Έμ
* </pre>
*
* <code>.bareun.Document document = 1;</code>
*/
public Builder setDocument(
ai.bareun.protos.Document.Builder builderForValue) {
if (documentBuilder_ == null) {
document_ = builderForValue.build();
onChanged();
} else {
documentBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* <pre>
* μ
λ ₯ λ¬Έμ
* </pre>
*
* <code>.bareun.Document document = 1;</code>
*/
public Builder mergeDocument(ai.bareun.protos.Document value) {
if (documentBuilder_ == null) {
if (document_ != null) {
document_ =
ai.bareun.protos.Document.newBuilder(document_).mergeFrom(value).buildPartial();
} else {
document_ = value;
}
onChanged();
} else {
documentBuilder_.mergeFrom(value);
}
return this;
}
/**
* <pre>
* μ
λ ₯ λ¬Έμ
* </pre>
*
* <code>.bareun.Document document = 1;</code>
*/
public Builder clearDocument() {
if (documentBuilder_ == null) {
document_ = null;
onChanged();
} else {
document_ = null;
documentBuilder_ = null;
}
return this;
}
/**
* <pre>
* μ
λ ₯ λ¬Έμ
* </pre>
*
* <code>.bareun.Document document = 1;</code>
*/
public ai.bareun.protos.Document.Builder getDocumentBuilder() {
onChanged();
return getDocumentFieldBuilder().getBuilder();
}
/**
* <pre>
* μ
λ ₯ λ¬Έμ
* </pre>
*
* <code>.bareun.Document document = 1;</code>
*/
public ai.bareun.protos.DocumentOrBuilder getDocumentOrBuilder() {
if (documentBuilder_ != null) {
return documentBuilder_.getMessageOrBuilder();
} else {
return document_ == null ?
ai.bareun.protos.Document.getDefaultInstance() : document_;
}
}
/**
* <pre>
* μ
λ ₯ λ¬Έμ
* </pre>
*
* <code>.bareun.Document document = 1;</code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.Document, ai.bareun.protos.Document.Builder, ai.bareun.protos.DocumentOrBuilder>
getDocumentFieldBuilder() {
if (documentBuilder_ == null) {
documentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.Document, ai.bareun.protos.Document.Builder, ai.bareun.protos.DocumentOrBuilder>(
getDocument(),
getParentForChildren(),
isClean());
document_ = null;
}
return documentBuilder_;
}
private int encodingType_ = 0;
/**
* <pre>
* μ€νμ
μ κ³μ°νκΈ° μν μΈμ½λ© νμ
* </pre>
*
* <code>.bareun.EncodingType encoding_type = 2;</code>
*/
public int getEncodingTypeValue() {
return encodingType_;
}
/**
* <pre>
* μ€νμ
μ κ³μ°νκΈ° μν μΈμ½λ© νμ
* </pre>
*
* <code>.bareun.EncodingType encoding_type = 2;</code>
*/
public Builder setEncodingTypeValue(int value) {
encodingType_ = value;
onChanged();
return this;
}
/**
* <pre>
* μ€νμ
μ κ³μ°νκΈ° μν μΈμ½λ© νμ
* </pre>
*
* <code>.bareun.EncodingType encoding_type = 2;</code>
*/
public ai.bareun.protos.EncodingType getEncodingType() {
@SuppressWarnings("deprecation")
ai.bareun.protos.EncodingType result = ai.bareun.protos.EncodingType.valueOf(encodingType_);
return result == null ? ai.bareun.protos.EncodingType.UNRECOGNIZED : result;
}
/**
* <pre>
* μ€νμ
μ κ³μ°νκΈ° μν μΈμ½λ© νμ
* </pre>
*
* <code>.bareun.EncodingType encoding_type = 2;</code>
*/
public Builder setEncodingType(ai.bareun.protos.EncodingType value) {
if (value == null) {
throw new NullPointerException();
}
encodingType_ = value.getNumber();
onChanged();
return this;
}
/**
* <pre>
* μ€νμ
μ κ³μ°νκΈ° μν μΈμ½λ© νμ
* </pre>
*
* <code>.bareun.EncodingType encoding_type = 2;</code>
*/
public Builder clearEncodingType() {
encodingType_ = 0;
onChanged();
return this;
}
private boolean autoSplitSentence_ ;
/**
* <pre>
* auto split sentence trueμ΄λ©΄ μλμΌλ‘ λ¬Έμ₯ λΆλ¦¬λ₯Ό μλνλ€.
* μμΌλ©΄ \n μ κΈ°μ€μΌλ‘ λ¬Έμ₯μ μλ₯Έλ€.
* κΈ°λ³Έκ°μ false μ΄λ€.
* </pre>
*
* <code>bool auto_split_sentence = 3;</code>
*/
public boolean getAutoSplitSentence() {
return autoSplitSentence_;
}
/**
* <pre>
* auto split sentence trueμ΄λ©΄ μλμΌλ‘ λ¬Έμ₯ λΆλ¦¬λ₯Ό μλνλ€.
* μμΌλ©΄ \n μ κΈ°μ€μΌλ‘ λ¬Έμ₯μ μλ₯Έλ€.
* κΈ°λ³Έκ°μ false μ΄λ€.
* </pre>
*
* <code>bool auto_split_sentence = 3;</code>
*/
public Builder setAutoSplitSentence(boolean value) {
autoSplitSentence_ = value;
onChanged();
return this;
}
/**
* <pre>
* auto split sentence trueμ΄λ©΄ μλμΌλ‘ λ¬Έμ₯ λΆλ¦¬λ₯Ό μλνλ€.
* μμΌλ©΄ \n μ κΈ°μ€μΌλ‘ λ¬Έμ₯μ μλ₯Έλ€.
* κΈ°λ³Έκ°μ false μ΄λ€.
* </pre>
*
* <code>bool auto_split_sentence = 3;</code>
*/
public Builder clearAutoSplitSentence() {
autoSplitSentence_ = false;
onChanged();
return this;
}
private java.lang.Object customDomain_ = "";
/**
* <pre>
* 컀μ€ν
μ¬μ λλ©μΈ μ 보
* κ³ μ λͺ
μ¬, 볡ν©λͺ
μ¬ μ¬μ μ κΈ°λ°νμ¬ μ²λ¦¬ν¨.
* </pre>
*
* <code>string custom_domain = 4;</code>
*/
public java.lang.String getCustomDomain() {
java.lang.Object ref = customDomain_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
customDomain_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* 컀μ€ν
μ¬μ λλ©μΈ μ 보
* κ³ μ λͺ
μ¬, 볡ν©λͺ
μ¬ μ¬μ μ κΈ°λ°νμ¬ μ²λ¦¬ν¨.
* </pre>
*
* <code>string custom_domain = 4;</code>
*/
public com.google.protobuf.ByteString
getCustomDomainBytes() {
java.lang.Object ref = customDomain_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
customDomain_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* 컀μ€ν
μ¬μ λλ©μΈ μ 보
* κ³ μ λͺ
μ¬, 볡ν©λͺ
μ¬ μ¬μ μ κΈ°λ°νμ¬ μ²λ¦¬ν¨.
* </pre>
*
* <code>string custom_domain = 4;</code>
*/
public Builder setCustomDomain(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
customDomain_ = value;
onChanged();
return this;
}
/**
* <pre>
* 컀μ€ν
μ¬μ λλ©μΈ μ 보
* κ³ μ λͺ
μ¬, 볡ν©λͺ
μ¬ μ¬μ μ κΈ°λ°νμ¬ μ²λ¦¬ν¨.
* </pre>
*
* <code>string custom_domain = 4;</code>
*/
public Builder clearCustomDomain() {
customDomain_ = getDefaultInstance().getCustomDomain();
onChanged();
return this;
}
/**
* <pre>
* 컀μ€ν
μ¬μ λλ©μΈ μ 보
* κ³ μ λͺ
μ¬, 볡ν©λͺ
μ¬ μ¬μ μ κΈ°λ°νμ¬ μ²λ¦¬ν¨.
* </pre>
*
* <code>string custom_domain = 4;</code>
*/
public Builder setCustomDomainBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
customDomain_ = value;
onChanged();
return this;
}
private boolean autoSpacing_ ;
/**
* <pre>
* μλ λμ΄μ°κΈ°
* </pre>
*
* <code>bool auto_spacing = 5;</code>
*/
public boolean getAutoSpacing() {
return autoSpacing_;
}
/**
* <pre>
* μλ λμ΄μ°κΈ°
* </pre>
*
* <code>bool auto_spacing = 5;</code>
*/
public Builder setAutoSpacing(boolean value) {
autoSpacing_ = value;
onChanged();
return this;
}
/**
* <pre>
* μλ λμ΄μ°κΈ°
* </pre>
*
* <code>bool auto_spacing = 5;</code>
*/
public Builder clearAutoSpacing() {
autoSpacing_ = false;
onChanged();
return this;
}
private boolean autoJointing_ ;
/**
* <pre>
* μλ λΆμ¬μ°κΈ°
* </pre>
*
* <code>bool auto_jointing = 6;</code>
*/
public boolean getAutoJointing() {
return autoJointing_;
}
/**
* <pre>
* μλ λΆμ¬μ°κΈ°
* </pre>
*
* <code>bool auto_jointing = 6;</code>
*/
public Builder setAutoJointing(boolean value) {
autoJointing_ = value;
onChanged();
return this;
}
/**
* <pre>
* μλ λΆμ¬μ°κΈ°
* </pre>
*
* <code>bool auto_jointing = 6;</code>
*/
public Builder clearAutoJointing() {
autoJointing_ = 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:bareun.AnalyzeSyntaxRequest)
}
// @@protoc_insertion_point(class_scope:bareun.AnalyzeSyntaxRequest)
private static final ai.bareun.protos.AnalyzeSyntaxRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new ai.bareun.protos.AnalyzeSyntaxRequest();
}
public static ai.bareun.protos.AnalyzeSyntaxRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<AnalyzeSyntaxRequest>
PARSER = new com.google.protobuf.AbstractParser<AnalyzeSyntaxRequest>() {
@java.lang.Override
public AnalyzeSyntaxRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new AnalyzeSyntaxRequest(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<AnalyzeSyntaxRequest> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<AnalyzeSyntaxRequest> getParserForType() {
return PARSER;
}
@java.lang.Override
public ai.bareun.protos.AnalyzeSyntaxRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
|
0
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun/protos/AnalyzeSyntaxRequestOrBuilder.java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bareun/language_service.proto
package ai.bareun.protos;
public interface AnalyzeSyntaxRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:bareun.AnalyzeSyntaxRequest)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* μ
λ ₯ λ¬Έμ
* </pre>
*
* <code>.bareun.Document document = 1;</code>
*/
boolean hasDocument();
/**
* <pre>
* μ
λ ₯ λ¬Έμ
* </pre>
*
* <code>.bareun.Document document = 1;</code>
*/
ai.bareun.protos.Document getDocument();
/**
* <pre>
* μ
λ ₯ λ¬Έμ
* </pre>
*
* <code>.bareun.Document document = 1;</code>
*/
ai.bareun.protos.DocumentOrBuilder getDocumentOrBuilder();
/**
* <pre>
* μ€νμ
μ κ³μ°νκΈ° μν μΈμ½λ© νμ
* </pre>
*
* <code>.bareun.EncodingType encoding_type = 2;</code>
*/
int getEncodingTypeValue();
/**
* <pre>
* μ€νμ
μ κ³μ°νκΈ° μν μΈμ½λ© νμ
* </pre>
*
* <code>.bareun.EncodingType encoding_type = 2;</code>
*/
ai.bareun.protos.EncodingType getEncodingType();
/**
* <pre>
* auto split sentence trueμ΄λ©΄ μλμΌλ‘ λ¬Έμ₯ λΆλ¦¬λ₯Ό μλνλ€.
* μμΌλ©΄ \n μ κΈ°μ€μΌλ‘ λ¬Έμ₯μ μλ₯Έλ€.
* κΈ°λ³Έκ°μ false μ΄λ€.
* </pre>
*
* <code>bool auto_split_sentence = 3;</code>
*/
boolean getAutoSplitSentence();
/**
* <pre>
* 컀μ€ν
μ¬μ λλ©μΈ μ 보
* κ³ μ λͺ
μ¬, 볡ν©λͺ
μ¬ μ¬μ μ κΈ°λ°νμ¬ μ²λ¦¬ν¨.
* </pre>
*
* <code>string custom_domain = 4;</code>
*/
java.lang.String getCustomDomain();
/**
* <pre>
* 컀μ€ν
μ¬μ λλ©μΈ μ 보
* κ³ μ λͺ
μ¬, 볡ν©λͺ
μ¬ μ¬μ μ κΈ°λ°νμ¬ μ²λ¦¬ν¨.
* </pre>
*
* <code>string custom_domain = 4;</code>
*/
com.google.protobuf.ByteString
getCustomDomainBytes();
/**
* <pre>
* μλ λμ΄μ°κΈ°
* </pre>
*
* <code>bool auto_spacing = 5;</code>
*/
boolean getAutoSpacing();
/**
* <pre>
* μλ λΆμ¬μ°κΈ°
* </pre>
*
* <code>bool auto_jointing = 6;</code>
*/
boolean getAutoJointing();
}
|
0
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun/protos/AnalyzeSyntaxResponse.java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bareun/language_service.proto
package ai.bareun.protos;
/**
* <pre>
* νν λΆμ μλ΄ λ©μμ§
* </pre>
*
* Protobuf type {@code bareun.AnalyzeSyntaxResponse}
*/
public final class AnalyzeSyntaxResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:bareun.AnalyzeSyntaxResponse)
AnalyzeSyntaxResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use AnalyzeSyntaxResponse.newBuilder() to construct.
private AnalyzeSyntaxResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private AnalyzeSyntaxResponse() {
sentences_ = java.util.Collections.emptyList();
language_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private AnalyzeSyntaxResponse(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
sentences_ = new java.util.ArrayList<ai.bareun.protos.Sentence>();
mutable_bitField0_ |= 0x00000001;
}
sentences_.add(
input.readMessage(ai.bareun.protos.Sentence.parser(), extensionRegistry));
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
language_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
sentences_ = java.util.Collections.unmodifiableList(sentences_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_AnalyzeSyntaxResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_AnalyzeSyntaxResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.bareun.protos.AnalyzeSyntaxResponse.class, ai.bareun.protos.AnalyzeSyntaxResponse.Builder.class);
}
private int bitField0_;
public static final int SENTENCES_FIELD_NUMBER = 1;
private java.util.List<ai.bareun.protos.Sentence> sentences_;
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public java.util.List<ai.bareun.protos.Sentence> getSentencesList() {
return sentences_;
}
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public java.util.List<? extends ai.bareun.protos.SentenceOrBuilder>
getSentencesOrBuilderList() {
return sentences_;
}
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public int getSentencesCount() {
return sentences_.size();
}
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public ai.bareun.protos.Sentence getSentences(int index) {
return sentences_.get(index);
}
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public ai.bareun.protos.SentenceOrBuilder getSentencesOrBuilder(
int index) {
return sentences_.get(index);
}
public static final int LANGUAGE_FIELD_NUMBER = 3;
private volatile java.lang.Object language_;
/**
* <pre>
* ν
μ€νΈμ μΈμ΄, λ§μΌ μΈμ΄κ° μ§μ λμ§ μμ κ²½μ°μλ μλμΌλ‘ νμ§νμ¬ λ°ννλ€.
* μΈμ΄κ° μ§μ λ κ²½μ°μλ λμΌν μΈμ΄λ₯Ό λ°ννλ€.
* μ΄λ, μΈμ΄λ ko_KR λ±κ³Ό κ°μ΄ μ¬μ©νλ€.
* </pre>
*
* <code>string language = 3;</code>
*/
public java.lang.String getLanguage() {
java.lang.Object ref = language_;
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();
language_ = s;
return s;
}
}
/**
* <pre>
* ν
μ€νΈμ μΈμ΄, λ§μΌ μΈμ΄κ° μ§μ λμ§ μμ κ²½μ°μλ μλμΌλ‘ νμ§νμ¬ λ°ννλ€.
* μΈμ΄κ° μ§μ λ κ²½μ°μλ λμΌν μΈμ΄λ₯Ό λ°ννλ€.
* μ΄λ, μΈμ΄λ ko_KR λ±κ³Ό κ°μ΄ μ¬μ©νλ€.
* </pre>
*
* <code>string language = 3;</code>
*/
public com.google.protobuf.ByteString
getLanguageBytes() {
java.lang.Object ref = language_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
language_ = 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 < sentences_.size(); i++) {
output.writeMessage(1, sentences_.get(i));
}
if (!getLanguageBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, language_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < sentences_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, sentences_.get(i));
}
if (!getLanguageBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, language_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof ai.bareun.protos.AnalyzeSyntaxResponse)) {
return super.equals(obj);
}
ai.bareun.protos.AnalyzeSyntaxResponse other = (ai.bareun.protos.AnalyzeSyntaxResponse) obj;
if (!getSentencesList()
.equals(other.getSentencesList())) return false;
if (!getLanguage()
.equals(other.getLanguage())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getSentencesCount() > 0) {
hash = (37 * hash) + SENTENCES_FIELD_NUMBER;
hash = (53 * hash) + getSentencesList().hashCode();
}
hash = (37 * hash) + LANGUAGE_FIELD_NUMBER;
hash = (53 * hash) + getLanguage().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static ai.bareun.protos.AnalyzeSyntaxResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.AnalyzeSyntaxResponse parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.AnalyzeSyntaxResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.AnalyzeSyntaxResponse parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.AnalyzeSyntaxResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.AnalyzeSyntaxResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.AnalyzeSyntaxResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.bareun.protos.AnalyzeSyntaxResponse 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.bareun.protos.AnalyzeSyntaxResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static ai.bareun.protos.AnalyzeSyntaxResponse 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.bareun.protos.AnalyzeSyntaxResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.bareun.protos.AnalyzeSyntaxResponse 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.bareun.protos.AnalyzeSyntaxResponse 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>
* νν λΆμ μλ΄ λ©μμ§
* </pre>
*
* Protobuf type {@code bareun.AnalyzeSyntaxResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:bareun.AnalyzeSyntaxResponse)
ai.bareun.protos.AnalyzeSyntaxResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_AnalyzeSyntaxResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_AnalyzeSyntaxResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.bareun.protos.AnalyzeSyntaxResponse.class, ai.bareun.protos.AnalyzeSyntaxResponse.Builder.class);
}
// Construct using ai.bareun.protos.AnalyzeSyntaxResponse.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getSentencesFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (sentencesBuilder_ == null) {
sentences_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
sentencesBuilder_.clear();
}
language_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_AnalyzeSyntaxResponse_descriptor;
}
@java.lang.Override
public ai.bareun.protos.AnalyzeSyntaxResponse getDefaultInstanceForType() {
return ai.bareun.protos.AnalyzeSyntaxResponse.getDefaultInstance();
}
@java.lang.Override
public ai.bareun.protos.AnalyzeSyntaxResponse build() {
ai.bareun.protos.AnalyzeSyntaxResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ai.bareun.protos.AnalyzeSyntaxResponse buildPartial() {
ai.bareun.protos.AnalyzeSyntaxResponse result = new ai.bareun.protos.AnalyzeSyntaxResponse(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (sentencesBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
sentences_ = java.util.Collections.unmodifiableList(sentences_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.sentences_ = sentences_;
} else {
result.sentences_ = sentencesBuilder_.build();
}
result.language_ = language_;
result.bitField0_ = to_bitField0_;
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.bareun.protos.AnalyzeSyntaxResponse) {
return mergeFrom((ai.bareun.protos.AnalyzeSyntaxResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ai.bareun.protos.AnalyzeSyntaxResponse other) {
if (other == ai.bareun.protos.AnalyzeSyntaxResponse.getDefaultInstance()) return this;
if (sentencesBuilder_ == null) {
if (!other.sentences_.isEmpty()) {
if (sentences_.isEmpty()) {
sentences_ = other.sentences_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureSentencesIsMutable();
sentences_.addAll(other.sentences_);
}
onChanged();
}
} else {
if (!other.sentences_.isEmpty()) {
if (sentencesBuilder_.isEmpty()) {
sentencesBuilder_.dispose();
sentencesBuilder_ = null;
sentences_ = other.sentences_;
bitField0_ = (bitField0_ & ~0x00000001);
sentencesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getSentencesFieldBuilder() : null;
} else {
sentencesBuilder_.addAllMessages(other.sentences_);
}
}
}
if (!other.getLanguage().isEmpty()) {
language_ = other.language_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
ai.bareun.protos.AnalyzeSyntaxResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (ai.bareun.protos.AnalyzeSyntaxResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List<ai.bareun.protos.Sentence> sentences_ =
java.util.Collections.emptyList();
private void ensureSentencesIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
sentences_ = new java.util.ArrayList<ai.bareun.protos.Sentence>(sentences_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
ai.bareun.protos.Sentence, ai.bareun.protos.Sentence.Builder, ai.bareun.protos.SentenceOrBuilder> sentencesBuilder_;
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public java.util.List<ai.bareun.protos.Sentence> getSentencesList() {
if (sentencesBuilder_ == null) {
return java.util.Collections.unmodifiableList(sentences_);
} else {
return sentencesBuilder_.getMessageList();
}
}
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public int getSentencesCount() {
if (sentencesBuilder_ == null) {
return sentences_.size();
} else {
return sentencesBuilder_.getCount();
}
}
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public ai.bareun.protos.Sentence getSentences(int index) {
if (sentencesBuilder_ == null) {
return sentences_.get(index);
} else {
return sentencesBuilder_.getMessage(index);
}
}
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public Builder setSentences(
int index, ai.bareun.protos.Sentence value) {
if (sentencesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSentencesIsMutable();
sentences_.set(index, value);
onChanged();
} else {
sentencesBuilder_.setMessage(index, value);
}
return this;
}
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public Builder setSentences(
int index, ai.bareun.protos.Sentence.Builder builderForValue) {
if (sentencesBuilder_ == null) {
ensureSentencesIsMutable();
sentences_.set(index, builderForValue.build());
onChanged();
} else {
sentencesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public Builder addSentences(ai.bareun.protos.Sentence value) {
if (sentencesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSentencesIsMutable();
sentences_.add(value);
onChanged();
} else {
sentencesBuilder_.addMessage(value);
}
return this;
}
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public Builder addSentences(
int index, ai.bareun.protos.Sentence value) {
if (sentencesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSentencesIsMutable();
sentences_.add(index, value);
onChanged();
} else {
sentencesBuilder_.addMessage(index, value);
}
return this;
}
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public Builder addSentences(
ai.bareun.protos.Sentence.Builder builderForValue) {
if (sentencesBuilder_ == null) {
ensureSentencesIsMutable();
sentences_.add(builderForValue.build());
onChanged();
} else {
sentencesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public Builder addSentences(
int index, ai.bareun.protos.Sentence.Builder builderForValue) {
if (sentencesBuilder_ == null) {
ensureSentencesIsMutable();
sentences_.add(index, builderForValue.build());
onChanged();
} else {
sentencesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public Builder addAllSentences(
java.lang.Iterable<? extends ai.bareun.protos.Sentence> values) {
if (sentencesBuilder_ == null) {
ensureSentencesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, sentences_);
onChanged();
} else {
sentencesBuilder_.addAllMessages(values);
}
return this;
}
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public Builder clearSentences() {
if (sentencesBuilder_ == null) {
sentences_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
sentencesBuilder_.clear();
}
return this;
}
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public Builder removeSentences(int index) {
if (sentencesBuilder_ == null) {
ensureSentencesIsMutable();
sentences_.remove(index);
onChanged();
} else {
sentencesBuilder_.remove(index);
}
return this;
}
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public ai.bareun.protos.Sentence.Builder getSentencesBuilder(
int index) {
return getSentencesFieldBuilder().getBuilder(index);
}
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public ai.bareun.protos.SentenceOrBuilder getSentencesOrBuilder(
int index) {
if (sentencesBuilder_ == null) {
return sentences_.get(index); } else {
return sentencesBuilder_.getMessageOrBuilder(index);
}
}
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public java.util.List<? extends ai.bareun.protos.SentenceOrBuilder>
getSentencesOrBuilderList() {
if (sentencesBuilder_ != null) {
return sentencesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(sentences_);
}
}
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public ai.bareun.protos.Sentence.Builder addSentencesBuilder() {
return getSentencesFieldBuilder().addBuilder(
ai.bareun.protos.Sentence.getDefaultInstance());
}
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public ai.bareun.protos.Sentence.Builder addSentencesBuilder(
int index) {
return getSentencesFieldBuilder().addBuilder(
index, ai.bareun.protos.Sentence.getDefaultInstance());
}
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
public java.util.List<ai.bareun.protos.Sentence.Builder>
getSentencesBuilderList() {
return getSentencesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
ai.bareun.protos.Sentence, ai.bareun.protos.Sentence.Builder, ai.bareun.protos.SentenceOrBuilder>
getSentencesFieldBuilder() {
if (sentencesBuilder_ == null) {
sentencesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
ai.bareun.protos.Sentence, ai.bareun.protos.Sentence.Builder, ai.bareun.protos.SentenceOrBuilder>(
sentences_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
sentences_ = null;
}
return sentencesBuilder_;
}
private java.lang.Object language_ = "";
/**
* <pre>
* ν
μ€νΈμ μΈμ΄, λ§μΌ μΈμ΄κ° μ§μ λμ§ μμ κ²½μ°μλ μλμΌλ‘ νμ§νμ¬ λ°ννλ€.
* μΈμ΄κ° μ§μ λ κ²½μ°μλ λμΌν μΈμ΄λ₯Ό λ°ννλ€.
* μ΄λ, μΈμ΄λ ko_KR λ±κ³Ό κ°μ΄ μ¬μ©νλ€.
* </pre>
*
* <code>string language = 3;</code>
*/
public java.lang.String getLanguage() {
java.lang.Object ref = language_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
language_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* ν
μ€νΈμ μΈμ΄, λ§μΌ μΈμ΄κ° μ§μ λμ§ μμ κ²½μ°μλ μλμΌλ‘ νμ§νμ¬ λ°ννλ€.
* μΈμ΄κ° μ§μ λ κ²½μ°μλ λμΌν μΈμ΄λ₯Ό λ°ννλ€.
* μ΄λ, μΈμ΄λ ko_KR λ±κ³Ό κ°μ΄ μ¬μ©νλ€.
* </pre>
*
* <code>string language = 3;</code>
*/
public com.google.protobuf.ByteString
getLanguageBytes() {
java.lang.Object ref = language_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
language_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* ν
μ€νΈμ μΈμ΄, λ§μΌ μΈμ΄κ° μ§μ λμ§ μμ κ²½μ°μλ μλμΌλ‘ νμ§νμ¬ λ°ννλ€.
* μΈμ΄κ° μ§μ λ κ²½μ°μλ λμΌν μΈμ΄λ₯Ό λ°ννλ€.
* μ΄λ, μΈμ΄λ ko_KR λ±κ³Ό κ°μ΄ μ¬μ©νλ€.
* </pre>
*
* <code>string language = 3;</code>
*/
public Builder setLanguage(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
language_ = value;
onChanged();
return this;
}
/**
* <pre>
* ν
μ€νΈμ μΈμ΄, λ§μΌ μΈμ΄κ° μ§μ λμ§ μμ κ²½μ°μλ μλμΌλ‘ νμ§νμ¬ λ°ννλ€.
* μΈμ΄κ° μ§μ λ κ²½μ°μλ λμΌν μΈμ΄λ₯Ό λ°ννλ€.
* μ΄λ, μΈμ΄λ ko_KR λ±κ³Ό κ°μ΄ μ¬μ©νλ€.
* </pre>
*
* <code>string language = 3;</code>
*/
public Builder clearLanguage() {
language_ = getDefaultInstance().getLanguage();
onChanged();
return this;
}
/**
* <pre>
* ν
μ€νΈμ μΈμ΄, λ§μΌ μΈμ΄κ° μ§μ λμ§ μμ κ²½μ°μλ μλμΌλ‘ νμ§νμ¬ λ°ννλ€.
* μΈμ΄κ° μ§μ λ κ²½μ°μλ λμΌν μΈμ΄λ₯Ό λ°ννλ€.
* μ΄λ, μΈμ΄λ ko_KR λ±κ³Ό κ°μ΄ μ¬μ©νλ€.
* </pre>
*
* <code>string language = 3;</code>
*/
public Builder setLanguageBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
language_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:bareun.AnalyzeSyntaxResponse)
}
// @@protoc_insertion_point(class_scope:bareun.AnalyzeSyntaxResponse)
private static final ai.bareun.protos.AnalyzeSyntaxResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new ai.bareun.protos.AnalyzeSyntaxResponse();
}
public static ai.bareun.protos.AnalyzeSyntaxResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<AnalyzeSyntaxResponse>
PARSER = new com.google.protobuf.AbstractParser<AnalyzeSyntaxResponse>() {
@java.lang.Override
public AnalyzeSyntaxResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new AnalyzeSyntaxResponse(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<AnalyzeSyntaxResponse> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<AnalyzeSyntaxResponse> getParserForType() {
return PARSER;
}
@java.lang.Override
public ai.bareun.protos.AnalyzeSyntaxResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
|
0
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun/protos/AnalyzeSyntaxResponseOrBuilder.java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bareun/language_service.proto
package ai.bareun.protos;
public interface AnalyzeSyntaxResponseOrBuilder extends
// @@protoc_insertion_point(interface_extends:bareun.AnalyzeSyntaxResponse)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
java.util.List<ai.bareun.protos.Sentence>
getSentencesList();
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
ai.bareun.protos.Sentence getSentences(int index);
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
int getSentencesCount();
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
java.util.List<? extends ai.bareun.protos.SentenceOrBuilder>
getSentencesOrBuilderList();
/**
* <pre>
* μ
λ ₯λ λ¬Έμ₯μ ν¬ν¨λ λ¬Έμ₯λ€
* </pre>
*
* <code>repeated .bareun.Sentence sentences = 1;</code>
*/
ai.bareun.protos.SentenceOrBuilder getSentencesOrBuilder(
int index);
/**
* <pre>
* ν
μ€νΈμ μΈμ΄, λ§μΌ μΈμ΄κ° μ§μ λμ§ μμ κ²½μ°μλ μλμΌλ‘ νμ§νμ¬ λ°ννλ€.
* μΈμ΄κ° μ§μ λ κ²½μ°μλ λμΌν μΈμ΄λ₯Ό λ°ννλ€.
* μ΄λ, μΈμ΄λ ko_KR λ±κ³Ό κ°μ΄ μ¬μ©νλ€.
* </pre>
*
* <code>string language = 3;</code>
*/
java.lang.String getLanguage();
/**
* <pre>
* ν
μ€νΈμ μΈμ΄, λ§μΌ μΈμ΄κ° μ§μ λμ§ μμ κ²½μ°μλ μλμΌλ‘ νμ§νμ¬ λ°ννλ€.
* μΈμ΄κ° μ§μ λ κ²½μ°μλ λμΌν μΈμ΄λ₯Ό λ°ννλ€.
* μ΄λ, μΈμ΄λ ko_KR λ±κ³Ό κ°μ΄ μ¬μ©νλ€.
* </pre>
*
* <code>string language = 3;</code>
*/
com.google.protobuf.ByteString
getLanguageBytes();
}
|
0
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun/protos/CustomDictionary.java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bareun/custom_dict.proto
package ai.bareun.protos;
/**
* <pre>
* 컀μ€ν
μ¬μ μ λ°μ΄ν° μ μ‘ κ·κ²©
* </pre>
*
* Protobuf type {@code bareun.CustomDictionary}
*/
public final class CustomDictionary extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:bareun.CustomDictionary)
CustomDictionaryOrBuilder {
private static final long serialVersionUID = 0L;
// Use CustomDictionary.newBuilder() to construct.
private CustomDictionary(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private CustomDictionary() {
domainName_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private CustomDictionary(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
domainName_ = s;
break;
}
case 18: {
ai.bareun.protos.DictSet.Builder subBuilder = null;
if (npSet_ != null) {
subBuilder = npSet_.toBuilder();
}
npSet_ = input.readMessage(ai.bareun.protos.DictSet.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(npSet_);
npSet_ = subBuilder.buildPartial();
}
break;
}
case 26: {
ai.bareun.protos.DictSet.Builder subBuilder = null;
if (cpSet_ != null) {
subBuilder = cpSet_.toBuilder();
}
cpSet_ = input.readMessage(ai.bareun.protos.DictSet.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(cpSet_);
cpSet_ = subBuilder.buildPartial();
}
break;
}
case 34: {
ai.bareun.protos.DictSet.Builder subBuilder = null;
if (cpCaretSet_ != null) {
subBuilder = cpCaretSet_.toBuilder();
}
cpCaretSet_ = input.readMessage(ai.bareun.protos.DictSet.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(cpCaretSet_);
cpCaretSet_ = subBuilder.buildPartial();
}
break;
}
case 42: {
ai.bareun.protos.DictSet.Builder subBuilder = null;
if (vvSet_ != null) {
subBuilder = vvSet_.toBuilder();
}
vvSet_ = input.readMessage(ai.bareun.protos.DictSet.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(vvSet_);
vvSet_ = subBuilder.buildPartial();
}
break;
}
case 50: {
ai.bareun.protos.DictSet.Builder subBuilder = null;
if (vaSet_ != null) {
subBuilder = vaSet_.toBuilder();
}
vaSet_ = input.readMessage(ai.bareun.protos.DictSet.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(vaSet_);
vaSet_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_CustomDictionary_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_CustomDictionary_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.bareun.protos.CustomDictionary.class, ai.bareun.protos.CustomDictionary.Builder.class);
}
public static final int DOMAIN_NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object domainName_;
/**
* <code>string domain_name = 1;</code>
*/
public java.lang.String getDomainName() {
java.lang.Object ref = domainName_;
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();
domainName_ = s;
return s;
}
}
/**
* <code>string domain_name = 1;</code>
*/
public com.google.protobuf.ByteString
getDomainNameBytes() {
java.lang.Object ref = domainName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
domainName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int NP_SET_FIELD_NUMBER = 2;
private ai.bareun.protos.DictSet npSet_;
/**
* <pre>
* κ³ μ λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet np_set = 2;</code>
*/
public boolean hasNpSet() {
return npSet_ != null;
}
/**
* <pre>
* κ³ μ λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet np_set = 2;</code>
*/
public ai.bareun.protos.DictSet getNpSet() {
return npSet_ == null ? ai.bareun.protos.DictSet.getDefaultInstance() : npSet_;
}
/**
* <pre>
* κ³ μ λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet np_set = 2;</code>
*/
public ai.bareun.protos.DictSetOrBuilder getNpSetOrBuilder() {
return getNpSet();
}
public static final int CP_SET_FIELD_NUMBER = 3;
private ai.bareun.protos.DictSet cpSet_;
/**
* <pre>
* 볡ν©λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet cp_set = 3;</code>
*/
public boolean hasCpSet() {
return cpSet_ != null;
}
/**
* <pre>
* 볡ν©λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet cp_set = 3;</code>
*/
public ai.bareun.protos.DictSet getCpSet() {
return cpSet_ == null ? ai.bareun.protos.DictSet.getDefaultInstance() : cpSet_;
}
/**
* <pre>
* 볡ν©λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet cp_set = 3;</code>
*/
public ai.bareun.protos.DictSetOrBuilder getCpSetOrBuilder() {
return getCpSet();
}
public static final int CP_CARET_SET_FIELD_NUMBER = 4;
private ai.bareun.protos.DictSet cpCaretSet_;
/**
* <pre>
* 볡ν©λͺ
μ¬ λΆλ¦¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet cp_caret_set = 4;</code>
*/
public boolean hasCpCaretSet() {
return cpCaretSet_ != null;
}
/**
* <pre>
* 볡ν©λͺ
μ¬ λΆλ¦¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet cp_caret_set = 4;</code>
*/
public ai.bareun.protos.DictSet getCpCaretSet() {
return cpCaretSet_ == null ? ai.bareun.protos.DictSet.getDefaultInstance() : cpCaretSet_;
}
/**
* <pre>
* 볡ν©λͺ
μ¬ λΆλ¦¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet cp_caret_set = 4;</code>
*/
public ai.bareun.protos.DictSetOrBuilder getCpCaretSetOrBuilder() {
return getCpCaretSet();
}
public static final int VV_SET_FIELD_NUMBER = 5;
private ai.bareun.protos.DictSet vvSet_;
/**
* <pre>
* λμ¬ μ¬μ
* </pre>
*
* <code>.bareun.DictSet vv_set = 5;</code>
*/
public boolean hasVvSet() {
return vvSet_ != null;
}
/**
* <pre>
* λμ¬ μ¬μ
* </pre>
*
* <code>.bareun.DictSet vv_set = 5;</code>
*/
public ai.bareun.protos.DictSet getVvSet() {
return vvSet_ == null ? ai.bareun.protos.DictSet.getDefaultInstance() : vvSet_;
}
/**
* <pre>
* λμ¬ μ¬μ
* </pre>
*
* <code>.bareun.DictSet vv_set = 5;</code>
*/
public ai.bareun.protos.DictSetOrBuilder getVvSetOrBuilder() {
return getVvSet();
}
public static final int VA_SET_FIELD_NUMBER = 6;
private ai.bareun.protos.DictSet vaSet_;
/**
* <pre>
* νμ©μ¬ μ¬μ
* </pre>
*
* <code>.bareun.DictSet va_set = 6;</code>
*/
public boolean hasVaSet() {
return vaSet_ != null;
}
/**
* <pre>
* νμ©μ¬ μ¬μ
* </pre>
*
* <code>.bareun.DictSet va_set = 6;</code>
*/
public ai.bareun.protos.DictSet getVaSet() {
return vaSet_ == null ? ai.bareun.protos.DictSet.getDefaultInstance() : vaSet_;
}
/**
* <pre>
* νμ©μ¬ μ¬μ
* </pre>
*
* <code>.bareun.DictSet va_set = 6;</code>
*/
public ai.bareun.protos.DictSetOrBuilder getVaSetOrBuilder() {
return getVaSet();
}
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 (!getDomainNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, domainName_);
}
if (npSet_ != null) {
output.writeMessage(2, getNpSet());
}
if (cpSet_ != null) {
output.writeMessage(3, getCpSet());
}
if (cpCaretSet_ != null) {
output.writeMessage(4, getCpCaretSet());
}
if (vvSet_ != null) {
output.writeMessage(5, getVvSet());
}
if (vaSet_ != null) {
output.writeMessage(6, getVaSet());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getDomainNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, domainName_);
}
if (npSet_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getNpSet());
}
if (cpSet_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getCpSet());
}
if (cpCaretSet_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getCpCaretSet());
}
if (vvSet_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getVvSet());
}
if (vaSet_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getVaSet());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof ai.bareun.protos.CustomDictionary)) {
return super.equals(obj);
}
ai.bareun.protos.CustomDictionary other = (ai.bareun.protos.CustomDictionary) obj;
if (!getDomainName()
.equals(other.getDomainName())) return false;
if (hasNpSet() != other.hasNpSet()) return false;
if (hasNpSet()) {
if (!getNpSet()
.equals(other.getNpSet())) return false;
}
if (hasCpSet() != other.hasCpSet()) return false;
if (hasCpSet()) {
if (!getCpSet()
.equals(other.getCpSet())) return false;
}
if (hasCpCaretSet() != other.hasCpCaretSet()) return false;
if (hasCpCaretSet()) {
if (!getCpCaretSet()
.equals(other.getCpCaretSet())) return false;
}
if (hasVvSet() != other.hasVvSet()) return false;
if (hasVvSet()) {
if (!getVvSet()
.equals(other.getVvSet())) return false;
}
if (hasVaSet() != other.hasVaSet()) return false;
if (hasVaSet()) {
if (!getVaSet()
.equals(other.getVaSet())) return false;
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + DOMAIN_NAME_FIELD_NUMBER;
hash = (53 * hash) + getDomainName().hashCode();
if (hasNpSet()) {
hash = (37 * hash) + NP_SET_FIELD_NUMBER;
hash = (53 * hash) + getNpSet().hashCode();
}
if (hasCpSet()) {
hash = (37 * hash) + CP_SET_FIELD_NUMBER;
hash = (53 * hash) + getCpSet().hashCode();
}
if (hasCpCaretSet()) {
hash = (37 * hash) + CP_CARET_SET_FIELD_NUMBER;
hash = (53 * hash) + getCpCaretSet().hashCode();
}
if (hasVvSet()) {
hash = (37 * hash) + VV_SET_FIELD_NUMBER;
hash = (53 * hash) + getVvSet().hashCode();
}
if (hasVaSet()) {
hash = (37 * hash) + VA_SET_FIELD_NUMBER;
hash = (53 * hash) + getVaSet().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static ai.bareun.protos.CustomDictionary parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.CustomDictionary parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.CustomDictionary parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.CustomDictionary parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.CustomDictionary parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.CustomDictionary parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.CustomDictionary parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.bareun.protos.CustomDictionary 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.bareun.protos.CustomDictionary parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static ai.bareun.protos.CustomDictionary 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.bareun.protos.CustomDictionary parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.bareun.protos.CustomDictionary 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.bareun.protos.CustomDictionary 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>
* 컀μ€ν
μ¬μ μ λ°μ΄ν° μ μ‘ κ·κ²©
* </pre>
*
* Protobuf type {@code bareun.CustomDictionary}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:bareun.CustomDictionary)
ai.bareun.protos.CustomDictionaryOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_CustomDictionary_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_CustomDictionary_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.bareun.protos.CustomDictionary.class, ai.bareun.protos.CustomDictionary.Builder.class);
}
// Construct using ai.bareun.protos.CustomDictionary.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
domainName_ = "";
if (npSetBuilder_ == null) {
npSet_ = null;
} else {
npSet_ = null;
npSetBuilder_ = null;
}
if (cpSetBuilder_ == null) {
cpSet_ = null;
} else {
cpSet_ = null;
cpSetBuilder_ = null;
}
if (cpCaretSetBuilder_ == null) {
cpCaretSet_ = null;
} else {
cpCaretSet_ = null;
cpCaretSetBuilder_ = null;
}
if (vvSetBuilder_ == null) {
vvSet_ = null;
} else {
vvSet_ = null;
vvSetBuilder_ = null;
}
if (vaSetBuilder_ == null) {
vaSet_ = null;
} else {
vaSet_ = null;
vaSetBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_CustomDictionary_descriptor;
}
@java.lang.Override
public ai.bareun.protos.CustomDictionary getDefaultInstanceForType() {
return ai.bareun.protos.CustomDictionary.getDefaultInstance();
}
@java.lang.Override
public ai.bareun.protos.CustomDictionary build() {
ai.bareun.protos.CustomDictionary result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ai.bareun.protos.CustomDictionary buildPartial() {
ai.bareun.protos.CustomDictionary result = new ai.bareun.protos.CustomDictionary(this);
result.domainName_ = domainName_;
if (npSetBuilder_ == null) {
result.npSet_ = npSet_;
} else {
result.npSet_ = npSetBuilder_.build();
}
if (cpSetBuilder_ == null) {
result.cpSet_ = cpSet_;
} else {
result.cpSet_ = cpSetBuilder_.build();
}
if (cpCaretSetBuilder_ == null) {
result.cpCaretSet_ = cpCaretSet_;
} else {
result.cpCaretSet_ = cpCaretSetBuilder_.build();
}
if (vvSetBuilder_ == null) {
result.vvSet_ = vvSet_;
} else {
result.vvSet_ = vvSetBuilder_.build();
}
if (vaSetBuilder_ == null) {
result.vaSet_ = vaSet_;
} else {
result.vaSet_ = vaSetBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof ai.bareun.protos.CustomDictionary) {
return mergeFrom((ai.bareun.protos.CustomDictionary)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ai.bareun.protos.CustomDictionary other) {
if (other == ai.bareun.protos.CustomDictionary.getDefaultInstance()) return this;
if (!other.getDomainName().isEmpty()) {
domainName_ = other.domainName_;
onChanged();
}
if (other.hasNpSet()) {
mergeNpSet(other.getNpSet());
}
if (other.hasCpSet()) {
mergeCpSet(other.getCpSet());
}
if (other.hasCpCaretSet()) {
mergeCpCaretSet(other.getCpCaretSet());
}
if (other.hasVvSet()) {
mergeVvSet(other.getVvSet());
}
if (other.hasVaSet()) {
mergeVaSet(other.getVaSet());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
ai.bareun.protos.CustomDictionary parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (ai.bareun.protos.CustomDictionary) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object domainName_ = "";
/**
* <code>string domain_name = 1;</code>
*/
public java.lang.String getDomainName() {
java.lang.Object ref = domainName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
domainName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <code>string domain_name = 1;</code>
*/
public com.google.protobuf.ByteString
getDomainNameBytes() {
java.lang.Object ref = domainName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
domainName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <code>string domain_name = 1;</code>
*/
public Builder setDomainName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
domainName_ = value;
onChanged();
return this;
}
/**
* <code>string domain_name = 1;</code>
*/
public Builder clearDomainName() {
domainName_ = getDefaultInstance().getDomainName();
onChanged();
return this;
}
/**
* <code>string domain_name = 1;</code>
*/
public Builder setDomainNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
domainName_ = value;
onChanged();
return this;
}
private ai.bareun.protos.DictSet npSet_;
private com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.DictSet, ai.bareun.protos.DictSet.Builder, ai.bareun.protos.DictSetOrBuilder> npSetBuilder_;
/**
* <pre>
* κ³ μ λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet np_set = 2;</code>
*/
public boolean hasNpSet() {
return npSetBuilder_ != null || npSet_ != null;
}
/**
* <pre>
* κ³ μ λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet np_set = 2;</code>
*/
public ai.bareun.protos.DictSet getNpSet() {
if (npSetBuilder_ == null) {
return npSet_ == null ? ai.bareun.protos.DictSet.getDefaultInstance() : npSet_;
} else {
return npSetBuilder_.getMessage();
}
}
/**
* <pre>
* κ³ μ λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet np_set = 2;</code>
*/
public Builder setNpSet(ai.bareun.protos.DictSet value) {
if (npSetBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
npSet_ = value;
onChanged();
} else {
npSetBuilder_.setMessage(value);
}
return this;
}
/**
* <pre>
* κ³ μ λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet np_set = 2;</code>
*/
public Builder setNpSet(
ai.bareun.protos.DictSet.Builder builderForValue) {
if (npSetBuilder_ == null) {
npSet_ = builderForValue.build();
onChanged();
} else {
npSetBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* <pre>
* κ³ μ λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet np_set = 2;</code>
*/
public Builder mergeNpSet(ai.bareun.protos.DictSet value) {
if (npSetBuilder_ == null) {
if (npSet_ != null) {
npSet_ =
ai.bareun.protos.DictSet.newBuilder(npSet_).mergeFrom(value).buildPartial();
} else {
npSet_ = value;
}
onChanged();
} else {
npSetBuilder_.mergeFrom(value);
}
return this;
}
/**
* <pre>
* κ³ μ λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet np_set = 2;</code>
*/
public Builder clearNpSet() {
if (npSetBuilder_ == null) {
npSet_ = null;
onChanged();
} else {
npSet_ = null;
npSetBuilder_ = null;
}
return this;
}
/**
* <pre>
* κ³ μ λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet np_set = 2;</code>
*/
public ai.bareun.protos.DictSet.Builder getNpSetBuilder() {
onChanged();
return getNpSetFieldBuilder().getBuilder();
}
/**
* <pre>
* κ³ μ λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet np_set = 2;</code>
*/
public ai.bareun.protos.DictSetOrBuilder getNpSetOrBuilder() {
if (npSetBuilder_ != null) {
return npSetBuilder_.getMessageOrBuilder();
} else {
return npSet_ == null ?
ai.bareun.protos.DictSet.getDefaultInstance() : npSet_;
}
}
/**
* <pre>
* κ³ μ λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet np_set = 2;</code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.DictSet, ai.bareun.protos.DictSet.Builder, ai.bareun.protos.DictSetOrBuilder>
getNpSetFieldBuilder() {
if (npSetBuilder_ == null) {
npSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.DictSet, ai.bareun.protos.DictSet.Builder, ai.bareun.protos.DictSetOrBuilder>(
getNpSet(),
getParentForChildren(),
isClean());
npSet_ = null;
}
return npSetBuilder_;
}
private ai.bareun.protos.DictSet cpSet_;
private com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.DictSet, ai.bareun.protos.DictSet.Builder, ai.bareun.protos.DictSetOrBuilder> cpSetBuilder_;
/**
* <pre>
* 볡ν©λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet cp_set = 3;</code>
*/
public boolean hasCpSet() {
return cpSetBuilder_ != null || cpSet_ != null;
}
/**
* <pre>
* 볡ν©λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet cp_set = 3;</code>
*/
public ai.bareun.protos.DictSet getCpSet() {
if (cpSetBuilder_ == null) {
return cpSet_ == null ? ai.bareun.protos.DictSet.getDefaultInstance() : cpSet_;
} else {
return cpSetBuilder_.getMessage();
}
}
/**
* <pre>
* 볡ν©λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet cp_set = 3;</code>
*/
public Builder setCpSet(ai.bareun.protos.DictSet value) {
if (cpSetBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
cpSet_ = value;
onChanged();
} else {
cpSetBuilder_.setMessage(value);
}
return this;
}
/**
* <pre>
* 볡ν©λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet cp_set = 3;</code>
*/
public Builder setCpSet(
ai.bareun.protos.DictSet.Builder builderForValue) {
if (cpSetBuilder_ == null) {
cpSet_ = builderForValue.build();
onChanged();
} else {
cpSetBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* <pre>
* 볡ν©λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet cp_set = 3;</code>
*/
public Builder mergeCpSet(ai.bareun.protos.DictSet value) {
if (cpSetBuilder_ == null) {
if (cpSet_ != null) {
cpSet_ =
ai.bareun.protos.DictSet.newBuilder(cpSet_).mergeFrom(value).buildPartial();
} else {
cpSet_ = value;
}
onChanged();
} else {
cpSetBuilder_.mergeFrom(value);
}
return this;
}
/**
* <pre>
* 볡ν©λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet cp_set = 3;</code>
*/
public Builder clearCpSet() {
if (cpSetBuilder_ == null) {
cpSet_ = null;
onChanged();
} else {
cpSet_ = null;
cpSetBuilder_ = null;
}
return this;
}
/**
* <pre>
* 볡ν©λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet cp_set = 3;</code>
*/
public ai.bareun.protos.DictSet.Builder getCpSetBuilder() {
onChanged();
return getCpSetFieldBuilder().getBuilder();
}
/**
* <pre>
* 볡ν©λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet cp_set = 3;</code>
*/
public ai.bareun.protos.DictSetOrBuilder getCpSetOrBuilder() {
if (cpSetBuilder_ != null) {
return cpSetBuilder_.getMessageOrBuilder();
} else {
return cpSet_ == null ?
ai.bareun.protos.DictSet.getDefaultInstance() : cpSet_;
}
}
/**
* <pre>
* 볡ν©λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet cp_set = 3;</code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.DictSet, ai.bareun.protos.DictSet.Builder, ai.bareun.protos.DictSetOrBuilder>
getCpSetFieldBuilder() {
if (cpSetBuilder_ == null) {
cpSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.DictSet, ai.bareun.protos.DictSet.Builder, ai.bareun.protos.DictSetOrBuilder>(
getCpSet(),
getParentForChildren(),
isClean());
cpSet_ = null;
}
return cpSetBuilder_;
}
private ai.bareun.protos.DictSet cpCaretSet_;
private com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.DictSet, ai.bareun.protos.DictSet.Builder, ai.bareun.protos.DictSetOrBuilder> cpCaretSetBuilder_;
/**
* <pre>
* 볡ν©λͺ
μ¬ λΆλ¦¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet cp_caret_set = 4;</code>
*/
public boolean hasCpCaretSet() {
return cpCaretSetBuilder_ != null || cpCaretSet_ != null;
}
/**
* <pre>
* 볡ν©λͺ
μ¬ λΆλ¦¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet cp_caret_set = 4;</code>
*/
public ai.bareun.protos.DictSet getCpCaretSet() {
if (cpCaretSetBuilder_ == null) {
return cpCaretSet_ == null ? ai.bareun.protos.DictSet.getDefaultInstance() : cpCaretSet_;
} else {
return cpCaretSetBuilder_.getMessage();
}
}
/**
* <pre>
* 볡ν©λͺ
μ¬ λΆλ¦¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet cp_caret_set = 4;</code>
*/
public Builder setCpCaretSet(ai.bareun.protos.DictSet value) {
if (cpCaretSetBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
cpCaretSet_ = value;
onChanged();
} else {
cpCaretSetBuilder_.setMessage(value);
}
return this;
}
/**
* <pre>
* 볡ν©λͺ
μ¬ λΆλ¦¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet cp_caret_set = 4;</code>
*/
public Builder setCpCaretSet(
ai.bareun.protos.DictSet.Builder builderForValue) {
if (cpCaretSetBuilder_ == null) {
cpCaretSet_ = builderForValue.build();
onChanged();
} else {
cpCaretSetBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* <pre>
* 볡ν©λͺ
μ¬ λΆλ¦¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet cp_caret_set = 4;</code>
*/
public Builder mergeCpCaretSet(ai.bareun.protos.DictSet value) {
if (cpCaretSetBuilder_ == null) {
if (cpCaretSet_ != null) {
cpCaretSet_ =
ai.bareun.protos.DictSet.newBuilder(cpCaretSet_).mergeFrom(value).buildPartial();
} else {
cpCaretSet_ = value;
}
onChanged();
} else {
cpCaretSetBuilder_.mergeFrom(value);
}
return this;
}
/**
* <pre>
* 볡ν©λͺ
μ¬ λΆλ¦¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet cp_caret_set = 4;</code>
*/
public Builder clearCpCaretSet() {
if (cpCaretSetBuilder_ == null) {
cpCaretSet_ = null;
onChanged();
} else {
cpCaretSet_ = null;
cpCaretSetBuilder_ = null;
}
return this;
}
/**
* <pre>
* 볡ν©λͺ
μ¬ λΆλ¦¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet cp_caret_set = 4;</code>
*/
public ai.bareun.protos.DictSet.Builder getCpCaretSetBuilder() {
onChanged();
return getCpCaretSetFieldBuilder().getBuilder();
}
/**
* <pre>
* 볡ν©λͺ
μ¬ λΆλ¦¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet cp_caret_set = 4;</code>
*/
public ai.bareun.protos.DictSetOrBuilder getCpCaretSetOrBuilder() {
if (cpCaretSetBuilder_ != null) {
return cpCaretSetBuilder_.getMessageOrBuilder();
} else {
return cpCaretSet_ == null ?
ai.bareun.protos.DictSet.getDefaultInstance() : cpCaretSet_;
}
}
/**
* <pre>
* 볡ν©λͺ
μ¬ λΆλ¦¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet cp_caret_set = 4;</code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.DictSet, ai.bareun.protos.DictSet.Builder, ai.bareun.protos.DictSetOrBuilder>
getCpCaretSetFieldBuilder() {
if (cpCaretSetBuilder_ == null) {
cpCaretSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.DictSet, ai.bareun.protos.DictSet.Builder, ai.bareun.protos.DictSetOrBuilder>(
getCpCaretSet(),
getParentForChildren(),
isClean());
cpCaretSet_ = null;
}
return cpCaretSetBuilder_;
}
private ai.bareun.protos.DictSet vvSet_;
private com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.DictSet, ai.bareun.protos.DictSet.Builder, ai.bareun.protos.DictSetOrBuilder> vvSetBuilder_;
/**
* <pre>
* λμ¬ μ¬μ
* </pre>
*
* <code>.bareun.DictSet vv_set = 5;</code>
*/
public boolean hasVvSet() {
return vvSetBuilder_ != null || vvSet_ != null;
}
/**
* <pre>
* λμ¬ μ¬μ
* </pre>
*
* <code>.bareun.DictSet vv_set = 5;</code>
*/
public ai.bareun.protos.DictSet getVvSet() {
if (vvSetBuilder_ == null) {
return vvSet_ == null ? ai.bareun.protos.DictSet.getDefaultInstance() : vvSet_;
} else {
return vvSetBuilder_.getMessage();
}
}
/**
* <pre>
* λμ¬ μ¬μ
* </pre>
*
* <code>.bareun.DictSet vv_set = 5;</code>
*/
public Builder setVvSet(ai.bareun.protos.DictSet value) {
if (vvSetBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
vvSet_ = value;
onChanged();
} else {
vvSetBuilder_.setMessage(value);
}
return this;
}
/**
* <pre>
* λμ¬ μ¬μ
* </pre>
*
* <code>.bareun.DictSet vv_set = 5;</code>
*/
public Builder setVvSet(
ai.bareun.protos.DictSet.Builder builderForValue) {
if (vvSetBuilder_ == null) {
vvSet_ = builderForValue.build();
onChanged();
} else {
vvSetBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* <pre>
* λμ¬ μ¬μ
* </pre>
*
* <code>.bareun.DictSet vv_set = 5;</code>
*/
public Builder mergeVvSet(ai.bareun.protos.DictSet value) {
if (vvSetBuilder_ == null) {
if (vvSet_ != null) {
vvSet_ =
ai.bareun.protos.DictSet.newBuilder(vvSet_).mergeFrom(value).buildPartial();
} else {
vvSet_ = value;
}
onChanged();
} else {
vvSetBuilder_.mergeFrom(value);
}
return this;
}
/**
* <pre>
* λμ¬ μ¬μ
* </pre>
*
* <code>.bareun.DictSet vv_set = 5;</code>
*/
public Builder clearVvSet() {
if (vvSetBuilder_ == null) {
vvSet_ = null;
onChanged();
} else {
vvSet_ = null;
vvSetBuilder_ = null;
}
return this;
}
/**
* <pre>
* λμ¬ μ¬μ
* </pre>
*
* <code>.bareun.DictSet vv_set = 5;</code>
*/
public ai.bareun.protos.DictSet.Builder getVvSetBuilder() {
onChanged();
return getVvSetFieldBuilder().getBuilder();
}
/**
* <pre>
* λμ¬ μ¬μ
* </pre>
*
* <code>.bareun.DictSet vv_set = 5;</code>
*/
public ai.bareun.protos.DictSetOrBuilder getVvSetOrBuilder() {
if (vvSetBuilder_ != null) {
return vvSetBuilder_.getMessageOrBuilder();
} else {
return vvSet_ == null ?
ai.bareun.protos.DictSet.getDefaultInstance() : vvSet_;
}
}
/**
* <pre>
* λμ¬ μ¬μ
* </pre>
*
* <code>.bareun.DictSet vv_set = 5;</code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.DictSet, ai.bareun.protos.DictSet.Builder, ai.bareun.protos.DictSetOrBuilder>
getVvSetFieldBuilder() {
if (vvSetBuilder_ == null) {
vvSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.DictSet, ai.bareun.protos.DictSet.Builder, ai.bareun.protos.DictSetOrBuilder>(
getVvSet(),
getParentForChildren(),
isClean());
vvSet_ = null;
}
return vvSetBuilder_;
}
private ai.bareun.protos.DictSet vaSet_;
private com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.DictSet, ai.bareun.protos.DictSet.Builder, ai.bareun.protos.DictSetOrBuilder> vaSetBuilder_;
/**
* <pre>
* νμ©μ¬ μ¬μ
* </pre>
*
* <code>.bareun.DictSet va_set = 6;</code>
*/
public boolean hasVaSet() {
return vaSetBuilder_ != null || vaSet_ != null;
}
/**
* <pre>
* νμ©μ¬ μ¬μ
* </pre>
*
* <code>.bareun.DictSet va_set = 6;</code>
*/
public ai.bareun.protos.DictSet getVaSet() {
if (vaSetBuilder_ == null) {
return vaSet_ == null ? ai.bareun.protos.DictSet.getDefaultInstance() : vaSet_;
} else {
return vaSetBuilder_.getMessage();
}
}
/**
* <pre>
* νμ©μ¬ μ¬μ
* </pre>
*
* <code>.bareun.DictSet va_set = 6;</code>
*/
public Builder setVaSet(ai.bareun.protos.DictSet value) {
if (vaSetBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
vaSet_ = value;
onChanged();
} else {
vaSetBuilder_.setMessage(value);
}
return this;
}
/**
* <pre>
* νμ©μ¬ μ¬μ
* </pre>
*
* <code>.bareun.DictSet va_set = 6;</code>
*/
public Builder setVaSet(
ai.bareun.protos.DictSet.Builder builderForValue) {
if (vaSetBuilder_ == null) {
vaSet_ = builderForValue.build();
onChanged();
} else {
vaSetBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* <pre>
* νμ©μ¬ μ¬μ
* </pre>
*
* <code>.bareun.DictSet va_set = 6;</code>
*/
public Builder mergeVaSet(ai.bareun.protos.DictSet value) {
if (vaSetBuilder_ == null) {
if (vaSet_ != null) {
vaSet_ =
ai.bareun.protos.DictSet.newBuilder(vaSet_).mergeFrom(value).buildPartial();
} else {
vaSet_ = value;
}
onChanged();
} else {
vaSetBuilder_.mergeFrom(value);
}
return this;
}
/**
* <pre>
* νμ©μ¬ μ¬μ
* </pre>
*
* <code>.bareun.DictSet va_set = 6;</code>
*/
public Builder clearVaSet() {
if (vaSetBuilder_ == null) {
vaSet_ = null;
onChanged();
} else {
vaSet_ = null;
vaSetBuilder_ = null;
}
return this;
}
/**
* <pre>
* νμ©μ¬ μ¬μ
* </pre>
*
* <code>.bareun.DictSet va_set = 6;</code>
*/
public ai.bareun.protos.DictSet.Builder getVaSetBuilder() {
onChanged();
return getVaSetFieldBuilder().getBuilder();
}
/**
* <pre>
* νμ©μ¬ μ¬μ
* </pre>
*
* <code>.bareun.DictSet va_set = 6;</code>
*/
public ai.bareun.protos.DictSetOrBuilder getVaSetOrBuilder() {
if (vaSetBuilder_ != null) {
return vaSetBuilder_.getMessageOrBuilder();
} else {
return vaSet_ == null ?
ai.bareun.protos.DictSet.getDefaultInstance() : vaSet_;
}
}
/**
* <pre>
* νμ©μ¬ μ¬μ
* </pre>
*
* <code>.bareun.DictSet va_set = 6;</code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.DictSet, ai.bareun.protos.DictSet.Builder, ai.bareun.protos.DictSetOrBuilder>
getVaSetFieldBuilder() {
if (vaSetBuilder_ == null) {
vaSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.DictSet, ai.bareun.protos.DictSet.Builder, ai.bareun.protos.DictSetOrBuilder>(
getVaSet(),
getParentForChildren(),
isClean());
vaSet_ = null;
}
return vaSetBuilder_;
}
@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:bareun.CustomDictionary)
}
// @@protoc_insertion_point(class_scope:bareun.CustomDictionary)
private static final ai.bareun.protos.CustomDictionary DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new ai.bareun.protos.CustomDictionary();
}
public static ai.bareun.protos.CustomDictionary getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<CustomDictionary>
PARSER = new com.google.protobuf.AbstractParser<CustomDictionary>() {
@java.lang.Override
public CustomDictionary parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new CustomDictionary(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<CustomDictionary> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<CustomDictionary> getParserForType() {
return PARSER;
}
@java.lang.Override
public ai.bareun.protos.CustomDictionary getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
|
0
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun/protos/CustomDictionaryMap.java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bareun/custom_dict.proto
package ai.bareun.protos;
/**
* <pre>
* νλ‘μΈμ€ λ΄λΆμμ μλΉμ€ μ€μΈ λλ©μΈ Dictionary μ¬μ
* </pre>
*
* Protobuf type {@code bareun.CustomDictionaryMap}
*/
public final class CustomDictionaryMap extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:bareun.CustomDictionaryMap)
CustomDictionaryMapOrBuilder {
private static final long serialVersionUID = 0L;
// Use CustomDictionaryMap.newBuilder() to construct.
private CustomDictionaryMap(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private CustomDictionaryMap() {
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private CustomDictionaryMap(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
customDictMap_ = com.google.protobuf.MapField.newMapField(
CustomDictMapDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000001;
}
com.google.protobuf.MapEntry<java.lang.String, ai.bareun.protos.CustomDictionary>
customDictMap__ = input.readMessage(
CustomDictMapDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
customDictMap_.getMutableMap().put(
customDictMap__.getKey(), customDictMap__.getValue());
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_CustomDictionaryMap_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 1:
return internalGetCustomDictMap();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_CustomDictionaryMap_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.bareun.protos.CustomDictionaryMap.class, ai.bareun.protos.CustomDictionaryMap.Builder.class);
}
public static final int CUSTOM_DICT_MAP_FIELD_NUMBER = 1;
private static final class CustomDictMapDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, ai.bareun.protos.CustomDictionary> defaultEntry =
com.google.protobuf.MapEntry
.<java.lang.String, ai.bareun.protos.CustomDictionary>newDefaultInstance(
ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_CustomDictionaryMap_CustomDictMapEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.MESSAGE,
ai.bareun.protos.CustomDictionary.getDefaultInstance());
}
private com.google.protobuf.MapField<
java.lang.String, ai.bareun.protos.CustomDictionary> customDictMap_;
private com.google.protobuf.MapField<java.lang.String, ai.bareun.protos.CustomDictionary>
internalGetCustomDictMap() {
if (customDictMap_ == null) {
return com.google.protobuf.MapField.emptyMapField(
CustomDictMapDefaultEntryHolder.defaultEntry);
}
return customDictMap_;
}
public int getCustomDictMapCount() {
return internalGetCustomDictMap().getMap().size();
}
/**
* <code>map<string, .bareun.CustomDictionary> custom_dict_map = 1;</code>
*/
public boolean containsCustomDictMap(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetCustomDictMap().getMap().containsKey(key);
}
/**
* Use {@link #getCustomDictMapMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map<java.lang.String, ai.bareun.protos.CustomDictionary> getCustomDictMap() {
return getCustomDictMapMap();
}
/**
* <code>map<string, .bareun.CustomDictionary> custom_dict_map = 1;</code>
*/
public java.util.Map<java.lang.String, ai.bareun.protos.CustomDictionary> getCustomDictMapMap() {
return internalGetCustomDictMap().getMap();
}
/**
* <code>map<string, .bareun.CustomDictionary> custom_dict_map = 1;</code>
*/
public ai.bareun.protos.CustomDictionary getCustomDictMapOrDefault(
java.lang.String key,
ai.bareun.protos.CustomDictionary defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map<java.lang.String, ai.bareun.protos.CustomDictionary> map =
internalGetCustomDictMap().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* <code>map<string, .bareun.CustomDictionary> custom_dict_map = 1;</code>
*/
public ai.bareun.protos.CustomDictionary getCustomDictMapOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map<java.lang.String, ai.bareun.protos.CustomDictionary> map =
internalGetCustomDictMap().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
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 {
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetCustomDictMap(),
CustomDictMapDefaultEntryHolder.defaultEntry,
1);
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (java.util.Map.Entry<java.lang.String, ai.bareun.protos.CustomDictionary> entry
: internalGetCustomDictMap().getMap().entrySet()) {
com.google.protobuf.MapEntry<java.lang.String, ai.bareun.protos.CustomDictionary>
customDictMap__ = CustomDictMapDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, customDictMap__);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof ai.bareun.protos.CustomDictionaryMap)) {
return super.equals(obj);
}
ai.bareun.protos.CustomDictionaryMap other = (ai.bareun.protos.CustomDictionaryMap) obj;
if (!internalGetCustomDictMap().equals(
other.internalGetCustomDictMap())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (!internalGetCustomDictMap().getMap().isEmpty()) {
hash = (37 * hash) + CUSTOM_DICT_MAP_FIELD_NUMBER;
hash = (53 * hash) + internalGetCustomDictMap().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static ai.bareun.protos.CustomDictionaryMap parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.CustomDictionaryMap parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.CustomDictionaryMap parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.CustomDictionaryMap parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.CustomDictionaryMap parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.CustomDictionaryMap parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.CustomDictionaryMap parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.bareun.protos.CustomDictionaryMap 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.bareun.protos.CustomDictionaryMap parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static ai.bareun.protos.CustomDictionaryMap 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.bareun.protos.CustomDictionaryMap parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.bareun.protos.CustomDictionaryMap 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.bareun.protos.CustomDictionaryMap 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>
* νλ‘μΈμ€ λ΄λΆμμ μλΉμ€ μ€μΈ λλ©μΈ Dictionary μ¬μ
* </pre>
*
* Protobuf type {@code bareun.CustomDictionaryMap}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:bareun.CustomDictionaryMap)
ai.bareun.protos.CustomDictionaryMapOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_CustomDictionaryMap_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 1:
return internalGetCustomDictMap();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 1:
return internalGetMutableCustomDictMap();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_CustomDictionaryMap_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.bareun.protos.CustomDictionaryMap.class, ai.bareun.protos.CustomDictionaryMap.Builder.class);
}
// Construct using ai.bareun.protos.CustomDictionaryMap.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
internalGetMutableCustomDictMap().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_CustomDictionaryMap_descriptor;
}
@java.lang.Override
public ai.bareun.protos.CustomDictionaryMap getDefaultInstanceForType() {
return ai.bareun.protos.CustomDictionaryMap.getDefaultInstance();
}
@java.lang.Override
public ai.bareun.protos.CustomDictionaryMap build() {
ai.bareun.protos.CustomDictionaryMap result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ai.bareun.protos.CustomDictionaryMap buildPartial() {
ai.bareun.protos.CustomDictionaryMap result = new ai.bareun.protos.CustomDictionaryMap(this);
int from_bitField0_ = bitField0_;
result.customDictMap_ = internalGetCustomDictMap();
result.customDictMap_.makeImmutable();
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.bareun.protos.CustomDictionaryMap) {
return mergeFrom((ai.bareun.protos.CustomDictionaryMap)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ai.bareun.protos.CustomDictionaryMap other) {
if (other == ai.bareun.protos.CustomDictionaryMap.getDefaultInstance()) return this;
internalGetMutableCustomDictMap().mergeFrom(
other.internalGetCustomDictMap());
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
ai.bareun.protos.CustomDictionaryMap parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (ai.bareun.protos.CustomDictionaryMap) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.protobuf.MapField<
java.lang.String, ai.bareun.protos.CustomDictionary> customDictMap_;
private com.google.protobuf.MapField<java.lang.String, ai.bareun.protos.CustomDictionary>
internalGetCustomDictMap() {
if (customDictMap_ == null) {
return com.google.protobuf.MapField.emptyMapField(
CustomDictMapDefaultEntryHolder.defaultEntry);
}
return customDictMap_;
}
private com.google.protobuf.MapField<java.lang.String, ai.bareun.protos.CustomDictionary>
internalGetMutableCustomDictMap() {
onChanged();;
if (customDictMap_ == null) {
customDictMap_ = com.google.protobuf.MapField.newMapField(
CustomDictMapDefaultEntryHolder.defaultEntry);
}
if (!customDictMap_.isMutable()) {
customDictMap_ = customDictMap_.copy();
}
return customDictMap_;
}
public int getCustomDictMapCount() {
return internalGetCustomDictMap().getMap().size();
}
/**
* <code>map<string, .bareun.CustomDictionary> custom_dict_map = 1;</code>
*/
public boolean containsCustomDictMap(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetCustomDictMap().getMap().containsKey(key);
}
/**
* Use {@link #getCustomDictMapMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map<java.lang.String, ai.bareun.protos.CustomDictionary> getCustomDictMap() {
return getCustomDictMapMap();
}
/**
* <code>map<string, .bareun.CustomDictionary> custom_dict_map = 1;</code>
*/
public java.util.Map<java.lang.String, ai.bareun.protos.CustomDictionary> getCustomDictMapMap() {
return internalGetCustomDictMap().getMap();
}
/**
* <code>map<string, .bareun.CustomDictionary> custom_dict_map = 1;</code>
*/
public ai.bareun.protos.CustomDictionary getCustomDictMapOrDefault(
java.lang.String key,
ai.bareun.protos.CustomDictionary defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map<java.lang.String, ai.bareun.protos.CustomDictionary> map =
internalGetCustomDictMap().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* <code>map<string, .bareun.CustomDictionary> custom_dict_map = 1;</code>
*/
public ai.bareun.protos.CustomDictionary getCustomDictMapOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map<java.lang.String, ai.bareun.protos.CustomDictionary> map =
internalGetCustomDictMap().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearCustomDictMap() {
internalGetMutableCustomDictMap().getMutableMap()
.clear();
return this;
}
/**
* <code>map<string, .bareun.CustomDictionary> custom_dict_map = 1;</code>
*/
public Builder removeCustomDictMap(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
internalGetMutableCustomDictMap().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map<java.lang.String, ai.bareun.protos.CustomDictionary>
getMutableCustomDictMap() {
return internalGetMutableCustomDictMap().getMutableMap();
}
/**
* <code>map<string, .bareun.CustomDictionary> custom_dict_map = 1;</code>
*/
public Builder putCustomDictMap(
java.lang.String key,
ai.bareun.protos.CustomDictionary value) {
if (key == null) { throw new java.lang.NullPointerException(); }
if (value == null) { throw new java.lang.NullPointerException(); }
internalGetMutableCustomDictMap().getMutableMap()
.put(key, value);
return this;
}
/**
* <code>map<string, .bareun.CustomDictionary> custom_dict_map = 1;</code>
*/
public Builder putAllCustomDictMap(
java.util.Map<java.lang.String, ai.bareun.protos.CustomDictionary> values) {
internalGetMutableCustomDictMap().getMutableMap()
.putAll(values);
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:bareun.CustomDictionaryMap)
}
// @@protoc_insertion_point(class_scope:bareun.CustomDictionaryMap)
private static final ai.bareun.protos.CustomDictionaryMap DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new ai.bareun.protos.CustomDictionaryMap();
}
public static ai.bareun.protos.CustomDictionaryMap getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<CustomDictionaryMap>
PARSER = new com.google.protobuf.AbstractParser<CustomDictionaryMap>() {
@java.lang.Override
public CustomDictionaryMap parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new CustomDictionaryMap(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<CustomDictionaryMap> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<CustomDictionaryMap> getParserForType() {
return PARSER;
}
@java.lang.Override
public ai.bareun.protos.CustomDictionaryMap getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
|
0
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun/protos/CustomDictionaryMapOrBuilder.java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bareun/custom_dict.proto
package ai.bareun.protos;
public interface CustomDictionaryMapOrBuilder extends
// @@protoc_insertion_point(interface_extends:bareun.CustomDictionaryMap)
com.google.protobuf.MessageOrBuilder {
/**
* <code>map<string, .bareun.CustomDictionary> custom_dict_map = 1;</code>
*/
int getCustomDictMapCount();
/**
* <code>map<string, .bareun.CustomDictionary> custom_dict_map = 1;</code>
*/
boolean containsCustomDictMap(
java.lang.String key);
/**
* Use {@link #getCustomDictMapMap()} instead.
*/
@java.lang.Deprecated
java.util.Map<java.lang.String, ai.bareun.protos.CustomDictionary>
getCustomDictMap();
/**
* <code>map<string, .bareun.CustomDictionary> custom_dict_map = 1;</code>
*/
java.util.Map<java.lang.String, ai.bareun.protos.CustomDictionary>
getCustomDictMapMap();
/**
* <code>map<string, .bareun.CustomDictionary> custom_dict_map = 1;</code>
*/
ai.bareun.protos.CustomDictionary getCustomDictMapOrDefault(
java.lang.String key,
ai.bareun.protos.CustomDictionary defaultValue);
/**
* <code>map<string, .bareun.CustomDictionary> custom_dict_map = 1;</code>
*/
ai.bareun.protos.CustomDictionary getCustomDictMapOrThrow(
java.lang.String key);
}
|
0
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun/protos/CustomDictionaryMeta.java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bareun/custom_dict.proto
package ai.bareun.protos;
/**
* <pre>
* νλμ λλ©μΈμ© 컀μ€ν
μ¬μ λ°μ΄ν°
* </pre>
*
* Protobuf type {@code bareun.CustomDictionaryMeta}
*/
public final class CustomDictionaryMeta extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:bareun.CustomDictionaryMeta)
CustomDictionaryMetaOrBuilder {
private static final long serialVersionUID = 0L;
// Use CustomDictionaryMeta.newBuilder() to construct.
private CustomDictionaryMeta(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private CustomDictionaryMeta() {
domainName_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private CustomDictionaryMeta(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
domainName_ = s;
break;
}
case 18: {
ai.bareun.protos.CustomDictionaryMeta.DictMeta.Builder subBuilder = null;
if (npSet_ != null) {
subBuilder = npSet_.toBuilder();
}
npSet_ = input.readMessage(ai.bareun.protos.CustomDictionaryMeta.DictMeta.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(npSet_);
npSet_ = subBuilder.buildPartial();
}
break;
}
case 26: {
ai.bareun.protos.CustomDictionaryMeta.DictMeta.Builder subBuilder = null;
if (cpSet_ != null) {
subBuilder = cpSet_.toBuilder();
}
cpSet_ = input.readMessage(ai.bareun.protos.CustomDictionaryMeta.DictMeta.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(cpSet_);
cpSet_ = subBuilder.buildPartial();
}
break;
}
case 34: {
ai.bareun.protos.CustomDictionaryMeta.DictMeta.Builder subBuilder = null;
if (cpCaretSet_ != null) {
subBuilder = cpCaretSet_.toBuilder();
}
cpCaretSet_ = input.readMessage(ai.bareun.protos.CustomDictionaryMeta.DictMeta.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(cpCaretSet_);
cpCaretSet_ = subBuilder.buildPartial();
}
break;
}
case 42: {
ai.bareun.protos.CustomDictionaryMeta.DictMeta.Builder subBuilder = null;
if (vvSet_ != null) {
subBuilder = vvSet_.toBuilder();
}
vvSet_ = input.readMessage(ai.bareun.protos.CustomDictionaryMeta.DictMeta.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(vvSet_);
vvSet_ = subBuilder.buildPartial();
}
break;
}
case 50: {
ai.bareun.protos.CustomDictionaryMeta.DictMeta.Builder subBuilder = null;
if (vaSet_ != null) {
subBuilder = vaSet_.toBuilder();
}
vaSet_ = input.readMessage(ai.bareun.protos.CustomDictionaryMeta.DictMeta.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(vaSet_);
vaSet_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_CustomDictionaryMeta_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_CustomDictionaryMeta_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.bareun.protos.CustomDictionaryMeta.class, ai.bareun.protos.CustomDictionaryMeta.Builder.class);
}
public interface DictMetaOrBuilder extends
// @@protoc_insertion_point(interface_extends:bareun.CustomDictionaryMeta.DictMeta)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* μ¬μ μ μ ν
* </pre>
*
* <code>.bareun.DictType type = 1;</code>
*/
int getTypeValue();
/**
* <pre>
* μ¬μ μ μ ν
* </pre>
*
* <code>.bareun.DictType type = 1;</code>
*/
ai.bareun.protos.DictType getType();
/**
* <pre>
* μ¬μ μ μ΄λ¦
* μ¬μ μ μ΄λ¦μ λ°λμ "[DomainName]-"λ‘ μμν΄μΌ νλ€.
* μ¬μ μ μ΄λ¦μ λ€μ κ·μΉμ λ°λΌμ λ§λ λ€.
* κ³ μ λͺ
μ¬λ np-set
* 볡ν©λͺ
μ¬λ cp-set
* 볡ν©λͺ
μ¬λΆλ¦¬μ¬μ μ `cp-caret-set`
* </pre>
*
* <code>string name = 2;</code>
*/
java.lang.String getName();
/**
* <pre>
* μ¬μ μ μ΄λ¦
* μ¬μ μ μ΄λ¦μ λ°λμ "[DomainName]-"λ‘ μμν΄μΌ νλ€.
* μ¬μ μ μ΄λ¦μ λ€μ κ·μΉμ λ°λΌμ λ§λ λ€.
* κ³ μ λͺ
μ¬λ np-set
* 볡ν©λͺ
μ¬λ cp-set
* 볡ν©λͺ
μ¬λΆλ¦¬μ¬μ μ `cp-caret-set`
* </pre>
*
* <code>string name = 2;</code>
*/
com.google.protobuf.ByteString
getNameBytes();
/**
* <pre>
* μ¬μ λ°μ΄ν°μ κ°μ
* </pre>
*
* <code>int32 items_count = 3;</code>
*/
int getItemsCount();
}
/**
* Protobuf type {@code bareun.CustomDictionaryMeta.DictMeta}
*/
public static final class DictMeta extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:bareun.CustomDictionaryMeta.DictMeta)
DictMetaOrBuilder {
private static final long serialVersionUID = 0L;
// Use DictMeta.newBuilder() to construct.
private DictMeta(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private DictMeta() {
type_ = 0;
name_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private DictMeta(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
int rawValue = input.readEnum();
type_ = rawValue;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 24: {
itemsCount_ = input.readInt32();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_CustomDictionaryMeta_DictMeta_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_CustomDictionaryMeta_DictMeta_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.bareun.protos.CustomDictionaryMeta.DictMeta.class, ai.bareun.protos.CustomDictionaryMeta.DictMeta.Builder.class);
}
public static final int TYPE_FIELD_NUMBER = 1;
private int type_;
/**
* <pre>
* μ¬μ μ μ ν
* </pre>
*
* <code>.bareun.DictType type = 1;</code>
*/
public int getTypeValue() {
return type_;
}
/**
* <pre>
* μ¬μ μ μ ν
* </pre>
*
* <code>.bareun.DictType type = 1;</code>
*/
public ai.bareun.protos.DictType getType() {
@SuppressWarnings("deprecation")
ai.bareun.protos.DictType result = ai.bareun.protos.DictType.valueOf(type_);
return result == null ? ai.bareun.protos.DictType.UNRECOGNIZED : result;
}
public static final int NAME_FIELD_NUMBER = 2;
private volatile java.lang.Object name_;
/**
* <pre>
* μ¬μ μ μ΄λ¦
* μ¬μ μ μ΄λ¦μ λ°λμ "[DomainName]-"λ‘ μμν΄μΌ νλ€.
* μ¬μ μ μ΄λ¦μ λ€μ κ·μΉμ λ°λΌμ λ§λ λ€.
* κ³ μ λͺ
μ¬λ np-set
* 볡ν©λͺ
μ¬λ cp-set
* 볡ν©λͺ
μ¬λΆλ¦¬μ¬μ μ `cp-caret-set`
* </pre>
*
* <code>string name = 2;</code>
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
}
}
/**
* <pre>
* μ¬μ μ μ΄λ¦
* μ¬μ μ μ΄λ¦μ λ°λμ "[DomainName]-"λ‘ μμν΄μΌ νλ€.
* μ¬μ μ μ΄λ¦μ λ€μ κ·μΉμ λ°λΌμ λ§λ λ€.
* κ³ μ λͺ
μ¬λ np-set
* 볡ν©λͺ
μ¬λ cp-set
* 볡ν©λͺ
μ¬λΆλ¦¬μ¬μ μ `cp-caret-set`
* </pre>
*
* <code>string name = 2;</code>
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ITEMS_COUNT_FIELD_NUMBER = 3;
private int itemsCount_;
/**
* <pre>
* μ¬μ λ°μ΄ν°μ κ°μ
* </pre>
*
* <code>int32 items_count = 3;</code>
*/
public int getItemsCount() {
return itemsCount_;
}
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 (type_ != ai.bareun.protos.DictType.TOKEN_INDEX.getNumber()) {
output.writeEnum(1, type_);
}
if (!getNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_);
}
if (itemsCount_ != 0) {
output.writeInt32(3, itemsCount_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (type_ != ai.bareun.protos.DictType.TOKEN_INDEX.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, type_);
}
if (!getNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_);
}
if (itemsCount_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(3, itemsCount_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof ai.bareun.protos.CustomDictionaryMeta.DictMeta)) {
return super.equals(obj);
}
ai.bareun.protos.CustomDictionaryMeta.DictMeta other = (ai.bareun.protos.CustomDictionaryMeta.DictMeta) obj;
if (type_ != other.type_) return false;
if (!getName()
.equals(other.getName())) return false;
if (getItemsCount()
!= other.getItemsCount()) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + type_;
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + ITEMS_COUNT_FIELD_NUMBER;
hash = (53 * hash) + getItemsCount();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static ai.bareun.protos.CustomDictionaryMeta.DictMeta parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.CustomDictionaryMeta.DictMeta parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.CustomDictionaryMeta.DictMeta parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.CustomDictionaryMeta.DictMeta parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.CustomDictionaryMeta.DictMeta parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.CustomDictionaryMeta.DictMeta parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.CustomDictionaryMeta.DictMeta parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.bareun.protos.CustomDictionaryMeta.DictMeta 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.bareun.protos.CustomDictionaryMeta.DictMeta parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static ai.bareun.protos.CustomDictionaryMeta.DictMeta 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.bareun.protos.CustomDictionaryMeta.DictMeta parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.bareun.protos.CustomDictionaryMeta.DictMeta 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.bareun.protos.CustomDictionaryMeta.DictMeta 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 bareun.CustomDictionaryMeta.DictMeta}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:bareun.CustomDictionaryMeta.DictMeta)
ai.bareun.protos.CustomDictionaryMeta.DictMetaOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_CustomDictionaryMeta_DictMeta_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_CustomDictionaryMeta_DictMeta_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.bareun.protos.CustomDictionaryMeta.DictMeta.class, ai.bareun.protos.CustomDictionaryMeta.DictMeta.Builder.class);
}
// Construct using ai.bareun.protos.CustomDictionaryMeta.DictMeta.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
type_ = 0;
name_ = "";
itemsCount_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_CustomDictionaryMeta_DictMeta_descriptor;
}
@java.lang.Override
public ai.bareun.protos.CustomDictionaryMeta.DictMeta getDefaultInstanceForType() {
return ai.bareun.protos.CustomDictionaryMeta.DictMeta.getDefaultInstance();
}
@java.lang.Override
public ai.bareun.protos.CustomDictionaryMeta.DictMeta build() {
ai.bareun.protos.CustomDictionaryMeta.DictMeta result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ai.bareun.protos.CustomDictionaryMeta.DictMeta buildPartial() {
ai.bareun.protos.CustomDictionaryMeta.DictMeta result = new ai.bareun.protos.CustomDictionaryMeta.DictMeta(this);
result.type_ = type_;
result.name_ = name_;
result.itemsCount_ = itemsCount_;
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.bareun.protos.CustomDictionaryMeta.DictMeta) {
return mergeFrom((ai.bareun.protos.CustomDictionaryMeta.DictMeta)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ai.bareun.protos.CustomDictionaryMeta.DictMeta other) {
if (other == ai.bareun.protos.CustomDictionaryMeta.DictMeta.getDefaultInstance()) return this;
if (other.type_ != 0) {
setTypeValue(other.getTypeValue());
}
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (other.getItemsCount() != 0) {
setItemsCount(other.getItemsCount());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
ai.bareun.protos.CustomDictionaryMeta.DictMeta parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (ai.bareun.protos.CustomDictionaryMeta.DictMeta) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int type_ = 0;
/**
* <pre>
* μ¬μ μ μ ν
* </pre>
*
* <code>.bareun.DictType type = 1;</code>
*/
public int getTypeValue() {
return type_;
}
/**
* <pre>
* μ¬μ μ μ ν
* </pre>
*
* <code>.bareun.DictType type = 1;</code>
*/
public Builder setTypeValue(int value) {
type_ = value;
onChanged();
return this;
}
/**
* <pre>
* μ¬μ μ μ ν
* </pre>
*
* <code>.bareun.DictType type = 1;</code>
*/
public ai.bareun.protos.DictType getType() {
@SuppressWarnings("deprecation")
ai.bareun.protos.DictType result = ai.bareun.protos.DictType.valueOf(type_);
return result == null ? ai.bareun.protos.DictType.UNRECOGNIZED : result;
}
/**
* <pre>
* μ¬μ μ μ ν
* </pre>
*
* <code>.bareun.DictType type = 1;</code>
*/
public Builder setType(ai.bareun.protos.DictType value) {
if (value == null) {
throw new NullPointerException();
}
type_ = value.getNumber();
onChanged();
return this;
}
/**
* <pre>
* μ¬μ μ μ ν
* </pre>
*
* <code>.bareun.DictType type = 1;</code>
*/
public Builder clearType() {
type_ = 0;
onChanged();
return this;
}
private java.lang.Object name_ = "";
/**
* <pre>
* μ¬μ μ μ΄λ¦
* μ¬μ μ μ΄λ¦μ λ°λμ "[DomainName]-"λ‘ μμν΄μΌ νλ€.
* μ¬μ μ μ΄λ¦μ λ€μ κ·μΉμ λ°λΌμ λ§λ λ€.
* κ³ μ λͺ
μ¬λ np-set
* 볡ν©λͺ
μ¬λ cp-set
* 볡ν©λͺ
μ¬λΆλ¦¬μ¬μ μ `cp-caret-set`
* </pre>
*
* <code>string name = 2;</code>
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* μ¬μ μ μ΄λ¦
* μ¬μ μ μ΄λ¦μ λ°λμ "[DomainName]-"λ‘ μμν΄μΌ νλ€.
* μ¬μ μ μ΄λ¦μ λ€μ κ·μΉμ λ°λΌμ λ§λ λ€.
* κ³ μ λͺ
μ¬λ np-set
* 볡ν©λͺ
μ¬λ cp-set
* 볡ν©λͺ
μ¬λΆλ¦¬μ¬μ μ `cp-caret-set`
* </pre>
*
* <code>string name = 2;</code>
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* μ¬μ μ μ΄λ¦
* μ¬μ μ μ΄λ¦μ λ°λμ "[DomainName]-"λ‘ μμν΄μΌ νλ€.
* μ¬μ μ μ΄λ¦μ λ€μ κ·μΉμ λ°λΌμ λ§λ λ€.
* κ³ μ λͺ
μ¬λ np-set
* 볡ν©λͺ
μ¬λ cp-set
* 볡ν©λͺ
μ¬λΆλ¦¬μ¬μ μ `cp-caret-set`
* </pre>
*
* <code>string name = 2;</code>
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
* <pre>
* μ¬μ μ μ΄λ¦
* μ¬μ μ μ΄λ¦μ λ°λμ "[DomainName]-"λ‘ μμν΄μΌ νλ€.
* μ¬μ μ μ΄λ¦μ λ€μ κ·μΉμ λ°λΌμ λ§λ λ€.
* κ³ μ λͺ
μ¬λ np-set
* 볡ν©λͺ
μ¬λ cp-set
* 볡ν©λͺ
μ¬λΆλ¦¬μ¬μ μ `cp-caret-set`
* </pre>
*
* <code>string name = 2;</code>
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
* <pre>
* μ¬μ μ μ΄λ¦
* μ¬μ μ μ΄λ¦μ λ°λμ "[DomainName]-"λ‘ μμν΄μΌ νλ€.
* μ¬μ μ μ΄λ¦μ λ€μ κ·μΉμ λ°λΌμ λ§λ λ€.
* κ³ μ λͺ
μ¬λ np-set
* 볡ν©λͺ
μ¬λ cp-set
* 볡ν©λͺ
μ¬λΆλ¦¬μ¬μ μ `cp-caret-set`
* </pre>
*
* <code>string name = 2;</code>
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
private int itemsCount_ ;
/**
* <pre>
* μ¬μ λ°μ΄ν°μ κ°μ
* </pre>
*
* <code>int32 items_count = 3;</code>
*/
public int getItemsCount() {
return itemsCount_;
}
/**
* <pre>
* μ¬μ λ°μ΄ν°μ κ°μ
* </pre>
*
* <code>int32 items_count = 3;</code>
*/
public Builder setItemsCount(int value) {
itemsCount_ = value;
onChanged();
return this;
}
/**
* <pre>
* μ¬μ λ°μ΄ν°μ κ°μ
* </pre>
*
* <code>int32 items_count = 3;</code>
*/
public Builder clearItemsCount() {
itemsCount_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:bareun.CustomDictionaryMeta.DictMeta)
}
// @@protoc_insertion_point(class_scope:bareun.CustomDictionaryMeta.DictMeta)
private static final ai.bareun.protos.CustomDictionaryMeta.DictMeta DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new ai.bareun.protos.CustomDictionaryMeta.DictMeta();
}
public static ai.bareun.protos.CustomDictionaryMeta.DictMeta getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<DictMeta>
PARSER = new com.google.protobuf.AbstractParser<DictMeta>() {
@java.lang.Override
public DictMeta parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new DictMeta(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<DictMeta> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<DictMeta> getParserForType() {
return PARSER;
}
@java.lang.Override
public ai.bareun.protos.CustomDictionaryMeta.DictMeta getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int DOMAIN_NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object domainName_;
/**
* <code>string domain_name = 1;</code>
*/
public java.lang.String getDomainName() {
java.lang.Object ref = domainName_;
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();
domainName_ = s;
return s;
}
}
/**
* <code>string domain_name = 1;</code>
*/
public com.google.protobuf.ByteString
getDomainNameBytes() {
java.lang.Object ref = domainName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
domainName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int NP_SET_FIELD_NUMBER = 2;
private ai.bareun.protos.CustomDictionaryMeta.DictMeta npSet_;
/**
* <pre>
* κ³ μ λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta np_set = 2;</code>
*/
public boolean hasNpSet() {
return npSet_ != null;
}
/**
* <pre>
* κ³ μ λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta np_set = 2;</code>
*/
public ai.bareun.protos.CustomDictionaryMeta.DictMeta getNpSet() {
return npSet_ == null ? ai.bareun.protos.CustomDictionaryMeta.DictMeta.getDefaultInstance() : npSet_;
}
/**
* <pre>
* κ³ μ λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta np_set = 2;</code>
*/
public ai.bareun.protos.CustomDictionaryMeta.DictMetaOrBuilder getNpSetOrBuilder() {
return getNpSet();
}
public static final int CP_SET_FIELD_NUMBER = 3;
private ai.bareun.protos.CustomDictionaryMeta.DictMeta cpSet_;
/**
* <pre>
* 볡ν©λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta cp_set = 3;</code>
*/
public boolean hasCpSet() {
return cpSet_ != null;
}
/**
* <pre>
* 볡ν©λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta cp_set = 3;</code>
*/
public ai.bareun.protos.CustomDictionaryMeta.DictMeta getCpSet() {
return cpSet_ == null ? ai.bareun.protos.CustomDictionaryMeta.DictMeta.getDefaultInstance() : cpSet_;
}
/**
* <pre>
* 볡ν©λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta cp_set = 3;</code>
*/
public ai.bareun.protos.CustomDictionaryMeta.DictMetaOrBuilder getCpSetOrBuilder() {
return getCpSet();
}
public static final int CP_CARET_SET_FIELD_NUMBER = 4;
private ai.bareun.protos.CustomDictionaryMeta.DictMeta cpCaretSet_;
/**
* <pre>
* 볡ν©λͺ
μ¬ λΆλ¦¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta cp_caret_set = 4;</code>
*/
public boolean hasCpCaretSet() {
return cpCaretSet_ != null;
}
/**
* <pre>
* 볡ν©λͺ
μ¬ λΆλ¦¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta cp_caret_set = 4;</code>
*/
public ai.bareun.protos.CustomDictionaryMeta.DictMeta getCpCaretSet() {
return cpCaretSet_ == null ? ai.bareun.protos.CustomDictionaryMeta.DictMeta.getDefaultInstance() : cpCaretSet_;
}
/**
* <pre>
* 볡ν©λͺ
μ¬ λΆλ¦¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta cp_caret_set = 4;</code>
*/
public ai.bareun.protos.CustomDictionaryMeta.DictMetaOrBuilder getCpCaretSetOrBuilder() {
return getCpCaretSet();
}
public static final int VV_SET_FIELD_NUMBER = 5;
private ai.bareun.protos.CustomDictionaryMeta.DictMeta vvSet_;
/**
* <pre>
* λμ¬ μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta vv_set = 5;</code>
*/
public boolean hasVvSet() {
return vvSet_ != null;
}
/**
* <pre>
* λμ¬ μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta vv_set = 5;</code>
*/
public ai.bareun.protos.CustomDictionaryMeta.DictMeta getVvSet() {
return vvSet_ == null ? ai.bareun.protos.CustomDictionaryMeta.DictMeta.getDefaultInstance() : vvSet_;
}
/**
* <pre>
* λμ¬ μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta vv_set = 5;</code>
*/
public ai.bareun.protos.CustomDictionaryMeta.DictMetaOrBuilder getVvSetOrBuilder() {
return getVvSet();
}
public static final int VA_SET_FIELD_NUMBER = 6;
private ai.bareun.protos.CustomDictionaryMeta.DictMeta vaSet_;
/**
* <pre>
* νμ©μ¬ μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta va_set = 6;</code>
*/
public boolean hasVaSet() {
return vaSet_ != null;
}
/**
* <pre>
* νμ©μ¬ μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta va_set = 6;</code>
*/
public ai.bareun.protos.CustomDictionaryMeta.DictMeta getVaSet() {
return vaSet_ == null ? ai.bareun.protos.CustomDictionaryMeta.DictMeta.getDefaultInstance() : vaSet_;
}
/**
* <pre>
* νμ©μ¬ μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta va_set = 6;</code>
*/
public ai.bareun.protos.CustomDictionaryMeta.DictMetaOrBuilder getVaSetOrBuilder() {
return getVaSet();
}
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 (!getDomainNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, domainName_);
}
if (npSet_ != null) {
output.writeMessage(2, getNpSet());
}
if (cpSet_ != null) {
output.writeMessage(3, getCpSet());
}
if (cpCaretSet_ != null) {
output.writeMessage(4, getCpCaretSet());
}
if (vvSet_ != null) {
output.writeMessage(5, getVvSet());
}
if (vaSet_ != null) {
output.writeMessage(6, getVaSet());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getDomainNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, domainName_);
}
if (npSet_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getNpSet());
}
if (cpSet_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getCpSet());
}
if (cpCaretSet_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getCpCaretSet());
}
if (vvSet_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getVvSet());
}
if (vaSet_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getVaSet());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof ai.bareun.protos.CustomDictionaryMeta)) {
return super.equals(obj);
}
ai.bareun.protos.CustomDictionaryMeta other = (ai.bareun.protos.CustomDictionaryMeta) obj;
if (!getDomainName()
.equals(other.getDomainName())) return false;
if (hasNpSet() != other.hasNpSet()) return false;
if (hasNpSet()) {
if (!getNpSet()
.equals(other.getNpSet())) return false;
}
if (hasCpSet() != other.hasCpSet()) return false;
if (hasCpSet()) {
if (!getCpSet()
.equals(other.getCpSet())) return false;
}
if (hasCpCaretSet() != other.hasCpCaretSet()) return false;
if (hasCpCaretSet()) {
if (!getCpCaretSet()
.equals(other.getCpCaretSet())) return false;
}
if (hasVvSet() != other.hasVvSet()) return false;
if (hasVvSet()) {
if (!getVvSet()
.equals(other.getVvSet())) return false;
}
if (hasVaSet() != other.hasVaSet()) return false;
if (hasVaSet()) {
if (!getVaSet()
.equals(other.getVaSet())) return false;
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + DOMAIN_NAME_FIELD_NUMBER;
hash = (53 * hash) + getDomainName().hashCode();
if (hasNpSet()) {
hash = (37 * hash) + NP_SET_FIELD_NUMBER;
hash = (53 * hash) + getNpSet().hashCode();
}
if (hasCpSet()) {
hash = (37 * hash) + CP_SET_FIELD_NUMBER;
hash = (53 * hash) + getCpSet().hashCode();
}
if (hasCpCaretSet()) {
hash = (37 * hash) + CP_CARET_SET_FIELD_NUMBER;
hash = (53 * hash) + getCpCaretSet().hashCode();
}
if (hasVvSet()) {
hash = (37 * hash) + VV_SET_FIELD_NUMBER;
hash = (53 * hash) + getVvSet().hashCode();
}
if (hasVaSet()) {
hash = (37 * hash) + VA_SET_FIELD_NUMBER;
hash = (53 * hash) + getVaSet().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static ai.bareun.protos.CustomDictionaryMeta parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.CustomDictionaryMeta parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.CustomDictionaryMeta parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.CustomDictionaryMeta parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.CustomDictionaryMeta parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.CustomDictionaryMeta parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.CustomDictionaryMeta parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.bareun.protos.CustomDictionaryMeta 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.bareun.protos.CustomDictionaryMeta parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static ai.bareun.protos.CustomDictionaryMeta 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.bareun.protos.CustomDictionaryMeta parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.bareun.protos.CustomDictionaryMeta 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.bareun.protos.CustomDictionaryMeta 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>
* νλμ λλ©μΈμ© 컀μ€ν
μ¬μ λ°μ΄ν°
* </pre>
*
* Protobuf type {@code bareun.CustomDictionaryMeta}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:bareun.CustomDictionaryMeta)
ai.bareun.protos.CustomDictionaryMetaOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_CustomDictionaryMeta_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_CustomDictionaryMeta_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.bareun.protos.CustomDictionaryMeta.class, ai.bareun.protos.CustomDictionaryMeta.Builder.class);
}
// Construct using ai.bareun.protos.CustomDictionaryMeta.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
domainName_ = "";
if (npSetBuilder_ == null) {
npSet_ = null;
} else {
npSet_ = null;
npSetBuilder_ = null;
}
if (cpSetBuilder_ == null) {
cpSet_ = null;
} else {
cpSet_ = null;
cpSetBuilder_ = null;
}
if (cpCaretSetBuilder_ == null) {
cpCaretSet_ = null;
} else {
cpCaretSet_ = null;
cpCaretSetBuilder_ = null;
}
if (vvSetBuilder_ == null) {
vvSet_ = null;
} else {
vvSet_ = null;
vvSetBuilder_ = null;
}
if (vaSetBuilder_ == null) {
vaSet_ = null;
} else {
vaSet_ = null;
vaSetBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_CustomDictionaryMeta_descriptor;
}
@java.lang.Override
public ai.bareun.protos.CustomDictionaryMeta getDefaultInstanceForType() {
return ai.bareun.protos.CustomDictionaryMeta.getDefaultInstance();
}
@java.lang.Override
public ai.bareun.protos.CustomDictionaryMeta build() {
ai.bareun.protos.CustomDictionaryMeta result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ai.bareun.protos.CustomDictionaryMeta buildPartial() {
ai.bareun.protos.CustomDictionaryMeta result = new ai.bareun.protos.CustomDictionaryMeta(this);
result.domainName_ = domainName_;
if (npSetBuilder_ == null) {
result.npSet_ = npSet_;
} else {
result.npSet_ = npSetBuilder_.build();
}
if (cpSetBuilder_ == null) {
result.cpSet_ = cpSet_;
} else {
result.cpSet_ = cpSetBuilder_.build();
}
if (cpCaretSetBuilder_ == null) {
result.cpCaretSet_ = cpCaretSet_;
} else {
result.cpCaretSet_ = cpCaretSetBuilder_.build();
}
if (vvSetBuilder_ == null) {
result.vvSet_ = vvSet_;
} else {
result.vvSet_ = vvSetBuilder_.build();
}
if (vaSetBuilder_ == null) {
result.vaSet_ = vaSet_;
} else {
result.vaSet_ = vaSetBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof ai.bareun.protos.CustomDictionaryMeta) {
return mergeFrom((ai.bareun.protos.CustomDictionaryMeta)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ai.bareun.protos.CustomDictionaryMeta other) {
if (other == ai.bareun.protos.CustomDictionaryMeta.getDefaultInstance()) return this;
if (!other.getDomainName().isEmpty()) {
domainName_ = other.domainName_;
onChanged();
}
if (other.hasNpSet()) {
mergeNpSet(other.getNpSet());
}
if (other.hasCpSet()) {
mergeCpSet(other.getCpSet());
}
if (other.hasCpCaretSet()) {
mergeCpCaretSet(other.getCpCaretSet());
}
if (other.hasVvSet()) {
mergeVvSet(other.getVvSet());
}
if (other.hasVaSet()) {
mergeVaSet(other.getVaSet());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
ai.bareun.protos.CustomDictionaryMeta parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (ai.bareun.protos.CustomDictionaryMeta) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object domainName_ = "";
/**
* <code>string domain_name = 1;</code>
*/
public java.lang.String getDomainName() {
java.lang.Object ref = domainName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
domainName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <code>string domain_name = 1;</code>
*/
public com.google.protobuf.ByteString
getDomainNameBytes() {
java.lang.Object ref = domainName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
domainName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <code>string domain_name = 1;</code>
*/
public Builder setDomainName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
domainName_ = value;
onChanged();
return this;
}
/**
* <code>string domain_name = 1;</code>
*/
public Builder clearDomainName() {
domainName_ = getDefaultInstance().getDomainName();
onChanged();
return this;
}
/**
* <code>string domain_name = 1;</code>
*/
public Builder setDomainNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
domainName_ = value;
onChanged();
return this;
}
private ai.bareun.protos.CustomDictionaryMeta.DictMeta npSet_;
private com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.CustomDictionaryMeta.DictMeta, ai.bareun.protos.CustomDictionaryMeta.DictMeta.Builder, ai.bareun.protos.CustomDictionaryMeta.DictMetaOrBuilder> npSetBuilder_;
/**
* <pre>
* κ³ μ λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta np_set = 2;</code>
*/
public boolean hasNpSet() {
return npSetBuilder_ != null || npSet_ != null;
}
/**
* <pre>
* κ³ μ λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta np_set = 2;</code>
*/
public ai.bareun.protos.CustomDictionaryMeta.DictMeta getNpSet() {
if (npSetBuilder_ == null) {
return npSet_ == null ? ai.bareun.protos.CustomDictionaryMeta.DictMeta.getDefaultInstance() : npSet_;
} else {
return npSetBuilder_.getMessage();
}
}
/**
* <pre>
* κ³ μ λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta np_set = 2;</code>
*/
public Builder setNpSet(ai.bareun.protos.CustomDictionaryMeta.DictMeta value) {
if (npSetBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
npSet_ = value;
onChanged();
} else {
npSetBuilder_.setMessage(value);
}
return this;
}
/**
* <pre>
* κ³ μ λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta np_set = 2;</code>
*/
public Builder setNpSet(
ai.bareun.protos.CustomDictionaryMeta.DictMeta.Builder builderForValue) {
if (npSetBuilder_ == null) {
npSet_ = builderForValue.build();
onChanged();
} else {
npSetBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* <pre>
* κ³ μ λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta np_set = 2;</code>
*/
public Builder mergeNpSet(ai.bareun.protos.CustomDictionaryMeta.DictMeta value) {
if (npSetBuilder_ == null) {
if (npSet_ != null) {
npSet_ =
ai.bareun.protos.CustomDictionaryMeta.DictMeta.newBuilder(npSet_).mergeFrom(value).buildPartial();
} else {
npSet_ = value;
}
onChanged();
} else {
npSetBuilder_.mergeFrom(value);
}
return this;
}
/**
* <pre>
* κ³ μ λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta np_set = 2;</code>
*/
public Builder clearNpSet() {
if (npSetBuilder_ == null) {
npSet_ = null;
onChanged();
} else {
npSet_ = null;
npSetBuilder_ = null;
}
return this;
}
/**
* <pre>
* κ³ μ λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta np_set = 2;</code>
*/
public ai.bareun.protos.CustomDictionaryMeta.DictMeta.Builder getNpSetBuilder() {
onChanged();
return getNpSetFieldBuilder().getBuilder();
}
/**
* <pre>
* κ³ μ λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta np_set = 2;</code>
*/
public ai.bareun.protos.CustomDictionaryMeta.DictMetaOrBuilder getNpSetOrBuilder() {
if (npSetBuilder_ != null) {
return npSetBuilder_.getMessageOrBuilder();
} else {
return npSet_ == null ?
ai.bareun.protos.CustomDictionaryMeta.DictMeta.getDefaultInstance() : npSet_;
}
}
/**
* <pre>
* κ³ μ λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta np_set = 2;</code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.CustomDictionaryMeta.DictMeta, ai.bareun.protos.CustomDictionaryMeta.DictMeta.Builder, ai.bareun.protos.CustomDictionaryMeta.DictMetaOrBuilder>
getNpSetFieldBuilder() {
if (npSetBuilder_ == null) {
npSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.CustomDictionaryMeta.DictMeta, ai.bareun.protos.CustomDictionaryMeta.DictMeta.Builder, ai.bareun.protos.CustomDictionaryMeta.DictMetaOrBuilder>(
getNpSet(),
getParentForChildren(),
isClean());
npSet_ = null;
}
return npSetBuilder_;
}
private ai.bareun.protos.CustomDictionaryMeta.DictMeta cpSet_;
private com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.CustomDictionaryMeta.DictMeta, ai.bareun.protos.CustomDictionaryMeta.DictMeta.Builder, ai.bareun.protos.CustomDictionaryMeta.DictMetaOrBuilder> cpSetBuilder_;
/**
* <pre>
* 볡ν©λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta cp_set = 3;</code>
*/
public boolean hasCpSet() {
return cpSetBuilder_ != null || cpSet_ != null;
}
/**
* <pre>
* 볡ν©λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta cp_set = 3;</code>
*/
public ai.bareun.protos.CustomDictionaryMeta.DictMeta getCpSet() {
if (cpSetBuilder_ == null) {
return cpSet_ == null ? ai.bareun.protos.CustomDictionaryMeta.DictMeta.getDefaultInstance() : cpSet_;
} else {
return cpSetBuilder_.getMessage();
}
}
/**
* <pre>
* 볡ν©λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta cp_set = 3;</code>
*/
public Builder setCpSet(ai.bareun.protos.CustomDictionaryMeta.DictMeta value) {
if (cpSetBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
cpSet_ = value;
onChanged();
} else {
cpSetBuilder_.setMessage(value);
}
return this;
}
/**
* <pre>
* 볡ν©λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta cp_set = 3;</code>
*/
public Builder setCpSet(
ai.bareun.protos.CustomDictionaryMeta.DictMeta.Builder builderForValue) {
if (cpSetBuilder_ == null) {
cpSet_ = builderForValue.build();
onChanged();
} else {
cpSetBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* <pre>
* 볡ν©λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta cp_set = 3;</code>
*/
public Builder mergeCpSet(ai.bareun.protos.CustomDictionaryMeta.DictMeta value) {
if (cpSetBuilder_ == null) {
if (cpSet_ != null) {
cpSet_ =
ai.bareun.protos.CustomDictionaryMeta.DictMeta.newBuilder(cpSet_).mergeFrom(value).buildPartial();
} else {
cpSet_ = value;
}
onChanged();
} else {
cpSetBuilder_.mergeFrom(value);
}
return this;
}
/**
* <pre>
* 볡ν©λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta cp_set = 3;</code>
*/
public Builder clearCpSet() {
if (cpSetBuilder_ == null) {
cpSet_ = null;
onChanged();
} else {
cpSet_ = null;
cpSetBuilder_ = null;
}
return this;
}
/**
* <pre>
* 볡ν©λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta cp_set = 3;</code>
*/
public ai.bareun.protos.CustomDictionaryMeta.DictMeta.Builder getCpSetBuilder() {
onChanged();
return getCpSetFieldBuilder().getBuilder();
}
/**
* <pre>
* 볡ν©λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta cp_set = 3;</code>
*/
public ai.bareun.protos.CustomDictionaryMeta.DictMetaOrBuilder getCpSetOrBuilder() {
if (cpSetBuilder_ != null) {
return cpSetBuilder_.getMessageOrBuilder();
} else {
return cpSet_ == null ?
ai.bareun.protos.CustomDictionaryMeta.DictMeta.getDefaultInstance() : cpSet_;
}
}
/**
* <pre>
* 볡ν©λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta cp_set = 3;</code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.CustomDictionaryMeta.DictMeta, ai.bareun.protos.CustomDictionaryMeta.DictMeta.Builder, ai.bareun.protos.CustomDictionaryMeta.DictMetaOrBuilder>
getCpSetFieldBuilder() {
if (cpSetBuilder_ == null) {
cpSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.CustomDictionaryMeta.DictMeta, ai.bareun.protos.CustomDictionaryMeta.DictMeta.Builder, ai.bareun.protos.CustomDictionaryMeta.DictMetaOrBuilder>(
getCpSet(),
getParentForChildren(),
isClean());
cpSet_ = null;
}
return cpSetBuilder_;
}
private ai.bareun.protos.CustomDictionaryMeta.DictMeta cpCaretSet_;
private com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.CustomDictionaryMeta.DictMeta, ai.bareun.protos.CustomDictionaryMeta.DictMeta.Builder, ai.bareun.protos.CustomDictionaryMeta.DictMetaOrBuilder> cpCaretSetBuilder_;
/**
* <pre>
* 볡ν©λͺ
μ¬ λΆλ¦¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta cp_caret_set = 4;</code>
*/
public boolean hasCpCaretSet() {
return cpCaretSetBuilder_ != null || cpCaretSet_ != null;
}
/**
* <pre>
* 볡ν©λͺ
μ¬ λΆλ¦¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta cp_caret_set = 4;</code>
*/
public ai.bareun.protos.CustomDictionaryMeta.DictMeta getCpCaretSet() {
if (cpCaretSetBuilder_ == null) {
return cpCaretSet_ == null ? ai.bareun.protos.CustomDictionaryMeta.DictMeta.getDefaultInstance() : cpCaretSet_;
} else {
return cpCaretSetBuilder_.getMessage();
}
}
/**
* <pre>
* 볡ν©λͺ
μ¬ λΆλ¦¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta cp_caret_set = 4;</code>
*/
public Builder setCpCaretSet(ai.bareun.protos.CustomDictionaryMeta.DictMeta value) {
if (cpCaretSetBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
cpCaretSet_ = value;
onChanged();
} else {
cpCaretSetBuilder_.setMessage(value);
}
return this;
}
/**
* <pre>
* 볡ν©λͺ
μ¬ λΆλ¦¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta cp_caret_set = 4;</code>
*/
public Builder setCpCaretSet(
ai.bareun.protos.CustomDictionaryMeta.DictMeta.Builder builderForValue) {
if (cpCaretSetBuilder_ == null) {
cpCaretSet_ = builderForValue.build();
onChanged();
} else {
cpCaretSetBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* <pre>
* 볡ν©λͺ
μ¬ λΆλ¦¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta cp_caret_set = 4;</code>
*/
public Builder mergeCpCaretSet(ai.bareun.protos.CustomDictionaryMeta.DictMeta value) {
if (cpCaretSetBuilder_ == null) {
if (cpCaretSet_ != null) {
cpCaretSet_ =
ai.bareun.protos.CustomDictionaryMeta.DictMeta.newBuilder(cpCaretSet_).mergeFrom(value).buildPartial();
} else {
cpCaretSet_ = value;
}
onChanged();
} else {
cpCaretSetBuilder_.mergeFrom(value);
}
return this;
}
/**
* <pre>
* 볡ν©λͺ
μ¬ λΆλ¦¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta cp_caret_set = 4;</code>
*/
public Builder clearCpCaretSet() {
if (cpCaretSetBuilder_ == null) {
cpCaretSet_ = null;
onChanged();
} else {
cpCaretSet_ = null;
cpCaretSetBuilder_ = null;
}
return this;
}
/**
* <pre>
* 볡ν©λͺ
μ¬ λΆλ¦¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta cp_caret_set = 4;</code>
*/
public ai.bareun.protos.CustomDictionaryMeta.DictMeta.Builder getCpCaretSetBuilder() {
onChanged();
return getCpCaretSetFieldBuilder().getBuilder();
}
/**
* <pre>
* 볡ν©λͺ
μ¬ λΆλ¦¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta cp_caret_set = 4;</code>
*/
public ai.bareun.protos.CustomDictionaryMeta.DictMetaOrBuilder getCpCaretSetOrBuilder() {
if (cpCaretSetBuilder_ != null) {
return cpCaretSetBuilder_.getMessageOrBuilder();
} else {
return cpCaretSet_ == null ?
ai.bareun.protos.CustomDictionaryMeta.DictMeta.getDefaultInstance() : cpCaretSet_;
}
}
/**
* <pre>
* 볡ν©λͺ
μ¬ λΆλ¦¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta cp_caret_set = 4;</code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.CustomDictionaryMeta.DictMeta, ai.bareun.protos.CustomDictionaryMeta.DictMeta.Builder, ai.bareun.protos.CustomDictionaryMeta.DictMetaOrBuilder>
getCpCaretSetFieldBuilder() {
if (cpCaretSetBuilder_ == null) {
cpCaretSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.CustomDictionaryMeta.DictMeta, ai.bareun.protos.CustomDictionaryMeta.DictMeta.Builder, ai.bareun.protos.CustomDictionaryMeta.DictMetaOrBuilder>(
getCpCaretSet(),
getParentForChildren(),
isClean());
cpCaretSet_ = null;
}
return cpCaretSetBuilder_;
}
private ai.bareun.protos.CustomDictionaryMeta.DictMeta vvSet_;
private com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.CustomDictionaryMeta.DictMeta, ai.bareun.protos.CustomDictionaryMeta.DictMeta.Builder, ai.bareun.protos.CustomDictionaryMeta.DictMetaOrBuilder> vvSetBuilder_;
/**
* <pre>
* λμ¬ μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta vv_set = 5;</code>
*/
public boolean hasVvSet() {
return vvSetBuilder_ != null || vvSet_ != null;
}
/**
* <pre>
* λμ¬ μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta vv_set = 5;</code>
*/
public ai.bareun.protos.CustomDictionaryMeta.DictMeta getVvSet() {
if (vvSetBuilder_ == null) {
return vvSet_ == null ? ai.bareun.protos.CustomDictionaryMeta.DictMeta.getDefaultInstance() : vvSet_;
} else {
return vvSetBuilder_.getMessage();
}
}
/**
* <pre>
* λμ¬ μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta vv_set = 5;</code>
*/
public Builder setVvSet(ai.bareun.protos.CustomDictionaryMeta.DictMeta value) {
if (vvSetBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
vvSet_ = value;
onChanged();
} else {
vvSetBuilder_.setMessage(value);
}
return this;
}
/**
* <pre>
* λμ¬ μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta vv_set = 5;</code>
*/
public Builder setVvSet(
ai.bareun.protos.CustomDictionaryMeta.DictMeta.Builder builderForValue) {
if (vvSetBuilder_ == null) {
vvSet_ = builderForValue.build();
onChanged();
} else {
vvSetBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* <pre>
* λμ¬ μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta vv_set = 5;</code>
*/
public Builder mergeVvSet(ai.bareun.protos.CustomDictionaryMeta.DictMeta value) {
if (vvSetBuilder_ == null) {
if (vvSet_ != null) {
vvSet_ =
ai.bareun.protos.CustomDictionaryMeta.DictMeta.newBuilder(vvSet_).mergeFrom(value).buildPartial();
} else {
vvSet_ = value;
}
onChanged();
} else {
vvSetBuilder_.mergeFrom(value);
}
return this;
}
/**
* <pre>
* λμ¬ μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta vv_set = 5;</code>
*/
public Builder clearVvSet() {
if (vvSetBuilder_ == null) {
vvSet_ = null;
onChanged();
} else {
vvSet_ = null;
vvSetBuilder_ = null;
}
return this;
}
/**
* <pre>
* λμ¬ μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta vv_set = 5;</code>
*/
public ai.bareun.protos.CustomDictionaryMeta.DictMeta.Builder getVvSetBuilder() {
onChanged();
return getVvSetFieldBuilder().getBuilder();
}
/**
* <pre>
* λμ¬ μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta vv_set = 5;</code>
*/
public ai.bareun.protos.CustomDictionaryMeta.DictMetaOrBuilder getVvSetOrBuilder() {
if (vvSetBuilder_ != null) {
return vvSetBuilder_.getMessageOrBuilder();
} else {
return vvSet_ == null ?
ai.bareun.protos.CustomDictionaryMeta.DictMeta.getDefaultInstance() : vvSet_;
}
}
/**
* <pre>
* λμ¬ μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta vv_set = 5;</code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.CustomDictionaryMeta.DictMeta, ai.bareun.protos.CustomDictionaryMeta.DictMeta.Builder, ai.bareun.protos.CustomDictionaryMeta.DictMetaOrBuilder>
getVvSetFieldBuilder() {
if (vvSetBuilder_ == null) {
vvSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.CustomDictionaryMeta.DictMeta, ai.bareun.protos.CustomDictionaryMeta.DictMeta.Builder, ai.bareun.protos.CustomDictionaryMeta.DictMetaOrBuilder>(
getVvSet(),
getParentForChildren(),
isClean());
vvSet_ = null;
}
return vvSetBuilder_;
}
private ai.bareun.protos.CustomDictionaryMeta.DictMeta vaSet_;
private com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.CustomDictionaryMeta.DictMeta, ai.bareun.protos.CustomDictionaryMeta.DictMeta.Builder, ai.bareun.protos.CustomDictionaryMeta.DictMetaOrBuilder> vaSetBuilder_;
/**
* <pre>
* νμ©μ¬ μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta va_set = 6;</code>
*/
public boolean hasVaSet() {
return vaSetBuilder_ != null || vaSet_ != null;
}
/**
* <pre>
* νμ©μ¬ μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta va_set = 6;</code>
*/
public ai.bareun.protos.CustomDictionaryMeta.DictMeta getVaSet() {
if (vaSetBuilder_ == null) {
return vaSet_ == null ? ai.bareun.protos.CustomDictionaryMeta.DictMeta.getDefaultInstance() : vaSet_;
} else {
return vaSetBuilder_.getMessage();
}
}
/**
* <pre>
* νμ©μ¬ μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta va_set = 6;</code>
*/
public Builder setVaSet(ai.bareun.protos.CustomDictionaryMeta.DictMeta value) {
if (vaSetBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
vaSet_ = value;
onChanged();
} else {
vaSetBuilder_.setMessage(value);
}
return this;
}
/**
* <pre>
* νμ©μ¬ μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta va_set = 6;</code>
*/
public Builder setVaSet(
ai.bareun.protos.CustomDictionaryMeta.DictMeta.Builder builderForValue) {
if (vaSetBuilder_ == null) {
vaSet_ = builderForValue.build();
onChanged();
} else {
vaSetBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* <pre>
* νμ©μ¬ μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta va_set = 6;</code>
*/
public Builder mergeVaSet(ai.bareun.protos.CustomDictionaryMeta.DictMeta value) {
if (vaSetBuilder_ == null) {
if (vaSet_ != null) {
vaSet_ =
ai.bareun.protos.CustomDictionaryMeta.DictMeta.newBuilder(vaSet_).mergeFrom(value).buildPartial();
} else {
vaSet_ = value;
}
onChanged();
} else {
vaSetBuilder_.mergeFrom(value);
}
return this;
}
/**
* <pre>
* νμ©μ¬ μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta va_set = 6;</code>
*/
public Builder clearVaSet() {
if (vaSetBuilder_ == null) {
vaSet_ = null;
onChanged();
} else {
vaSet_ = null;
vaSetBuilder_ = null;
}
return this;
}
/**
* <pre>
* νμ©μ¬ μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta va_set = 6;</code>
*/
public ai.bareun.protos.CustomDictionaryMeta.DictMeta.Builder getVaSetBuilder() {
onChanged();
return getVaSetFieldBuilder().getBuilder();
}
/**
* <pre>
* νμ©μ¬ μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta va_set = 6;</code>
*/
public ai.bareun.protos.CustomDictionaryMeta.DictMetaOrBuilder getVaSetOrBuilder() {
if (vaSetBuilder_ != null) {
return vaSetBuilder_.getMessageOrBuilder();
} else {
return vaSet_ == null ?
ai.bareun.protos.CustomDictionaryMeta.DictMeta.getDefaultInstance() : vaSet_;
}
}
/**
* <pre>
* νμ©μ¬ μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta va_set = 6;</code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.CustomDictionaryMeta.DictMeta, ai.bareun.protos.CustomDictionaryMeta.DictMeta.Builder, ai.bareun.protos.CustomDictionaryMeta.DictMetaOrBuilder>
getVaSetFieldBuilder() {
if (vaSetBuilder_ == null) {
vaSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.CustomDictionaryMeta.DictMeta, ai.bareun.protos.CustomDictionaryMeta.DictMeta.Builder, ai.bareun.protos.CustomDictionaryMeta.DictMetaOrBuilder>(
getVaSet(),
getParentForChildren(),
isClean());
vaSet_ = null;
}
return vaSetBuilder_;
}
@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:bareun.CustomDictionaryMeta)
}
// @@protoc_insertion_point(class_scope:bareun.CustomDictionaryMeta)
private static final ai.bareun.protos.CustomDictionaryMeta DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new ai.bareun.protos.CustomDictionaryMeta();
}
public static ai.bareun.protos.CustomDictionaryMeta getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<CustomDictionaryMeta>
PARSER = new com.google.protobuf.AbstractParser<CustomDictionaryMeta>() {
@java.lang.Override
public CustomDictionaryMeta parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new CustomDictionaryMeta(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<CustomDictionaryMeta> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<CustomDictionaryMeta> getParserForType() {
return PARSER;
}
@java.lang.Override
public ai.bareun.protos.CustomDictionaryMeta getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
|
0
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun/protos/CustomDictionaryMetaOrBuilder.java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bareun/custom_dict.proto
package ai.bareun.protos;
public interface CustomDictionaryMetaOrBuilder extends
// @@protoc_insertion_point(interface_extends:bareun.CustomDictionaryMeta)
com.google.protobuf.MessageOrBuilder {
/**
* <code>string domain_name = 1;</code>
*/
java.lang.String getDomainName();
/**
* <code>string domain_name = 1;</code>
*/
com.google.protobuf.ByteString
getDomainNameBytes();
/**
* <pre>
* κ³ μ λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta np_set = 2;</code>
*/
boolean hasNpSet();
/**
* <pre>
* κ³ μ λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta np_set = 2;</code>
*/
ai.bareun.protos.CustomDictionaryMeta.DictMeta getNpSet();
/**
* <pre>
* κ³ μ λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta np_set = 2;</code>
*/
ai.bareun.protos.CustomDictionaryMeta.DictMetaOrBuilder getNpSetOrBuilder();
/**
* <pre>
* 볡ν©λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta cp_set = 3;</code>
*/
boolean hasCpSet();
/**
* <pre>
* 볡ν©λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta cp_set = 3;</code>
*/
ai.bareun.protos.CustomDictionaryMeta.DictMeta getCpSet();
/**
* <pre>
* 볡ν©λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta cp_set = 3;</code>
*/
ai.bareun.protos.CustomDictionaryMeta.DictMetaOrBuilder getCpSetOrBuilder();
/**
* <pre>
* 볡ν©λͺ
μ¬ λΆλ¦¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta cp_caret_set = 4;</code>
*/
boolean hasCpCaretSet();
/**
* <pre>
* 볡ν©λͺ
μ¬ λΆλ¦¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta cp_caret_set = 4;</code>
*/
ai.bareun.protos.CustomDictionaryMeta.DictMeta getCpCaretSet();
/**
* <pre>
* 볡ν©λͺ
μ¬ λΆλ¦¬μ© μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta cp_caret_set = 4;</code>
*/
ai.bareun.protos.CustomDictionaryMeta.DictMetaOrBuilder getCpCaretSetOrBuilder();
/**
* <pre>
* λμ¬ μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta vv_set = 5;</code>
*/
boolean hasVvSet();
/**
* <pre>
* λμ¬ μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta vv_set = 5;</code>
*/
ai.bareun.protos.CustomDictionaryMeta.DictMeta getVvSet();
/**
* <pre>
* λμ¬ μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta vv_set = 5;</code>
*/
ai.bareun.protos.CustomDictionaryMeta.DictMetaOrBuilder getVvSetOrBuilder();
/**
* <pre>
* νμ©μ¬ μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta va_set = 6;</code>
*/
boolean hasVaSet();
/**
* <pre>
* νμ©μ¬ μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta va_set = 6;</code>
*/
ai.bareun.protos.CustomDictionaryMeta.DictMeta getVaSet();
/**
* <pre>
* νμ©μ¬ μ¬μ
* </pre>
*
* <code>.bareun.CustomDictionaryMeta.DictMeta va_set = 6;</code>
*/
ai.bareun.protos.CustomDictionaryMeta.DictMetaOrBuilder getVaSetOrBuilder();
}
|
0
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun/protos/CustomDictionaryOrBuilder.java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bareun/custom_dict.proto
package ai.bareun.protos;
public interface CustomDictionaryOrBuilder extends
// @@protoc_insertion_point(interface_extends:bareun.CustomDictionary)
com.google.protobuf.MessageOrBuilder {
/**
* <code>string domain_name = 1;</code>
*/
java.lang.String getDomainName();
/**
* <code>string domain_name = 1;</code>
*/
com.google.protobuf.ByteString
getDomainNameBytes();
/**
* <pre>
* κ³ μ λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet np_set = 2;</code>
*/
boolean hasNpSet();
/**
* <pre>
* κ³ μ λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet np_set = 2;</code>
*/
ai.bareun.protos.DictSet getNpSet();
/**
* <pre>
* κ³ μ λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet np_set = 2;</code>
*/
ai.bareun.protos.DictSetOrBuilder getNpSetOrBuilder();
/**
* <pre>
* 볡ν©λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet cp_set = 3;</code>
*/
boolean hasCpSet();
/**
* <pre>
* 볡ν©λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet cp_set = 3;</code>
*/
ai.bareun.protos.DictSet getCpSet();
/**
* <pre>
* 볡ν©λͺ
μ¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet cp_set = 3;</code>
*/
ai.bareun.protos.DictSetOrBuilder getCpSetOrBuilder();
/**
* <pre>
* 볡ν©λͺ
μ¬ λΆλ¦¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet cp_caret_set = 4;</code>
*/
boolean hasCpCaretSet();
/**
* <pre>
* 볡ν©λͺ
μ¬ λΆλ¦¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet cp_caret_set = 4;</code>
*/
ai.bareun.protos.DictSet getCpCaretSet();
/**
* <pre>
* 볡ν©λͺ
μ¬ λΆλ¦¬μ© μ¬μ
* </pre>
*
* <code>.bareun.DictSet cp_caret_set = 4;</code>
*/
ai.bareun.protos.DictSetOrBuilder getCpCaretSetOrBuilder();
/**
* <pre>
* λμ¬ μ¬μ
* </pre>
*
* <code>.bareun.DictSet vv_set = 5;</code>
*/
boolean hasVvSet();
/**
* <pre>
* λμ¬ μ¬μ
* </pre>
*
* <code>.bareun.DictSet vv_set = 5;</code>
*/
ai.bareun.protos.DictSet getVvSet();
/**
* <pre>
* λμ¬ μ¬μ
* </pre>
*
* <code>.bareun.DictSet vv_set = 5;</code>
*/
ai.bareun.protos.DictSetOrBuilder getVvSetOrBuilder();
/**
* <pre>
* νμ©μ¬ μ¬μ
* </pre>
*
* <code>.bareun.DictSet va_set = 6;</code>
*/
boolean hasVaSet();
/**
* <pre>
* νμ©μ¬ μ¬μ
* </pre>
*
* <code>.bareun.DictSet va_set = 6;</code>
*/
ai.bareun.protos.DictSet getVaSet();
/**
* <pre>
* νμ©μ¬ μ¬μ
* </pre>
*
* <code>.bareun.DictSet va_set = 6;</code>
*/
ai.bareun.protos.DictSetOrBuilder getVaSetOrBuilder();
}
|
0
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun/protos/CustomDictionaryServiceGrpc.java
|
package ai.bareun.protos;
import static io.grpc.MethodDescriptor.generateFullMethodName;
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
import static io.grpc.stub.ClientCalls.asyncUnaryCall;
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
import static io.grpc.stub.ClientCalls.futureUnaryCall;
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.21.0)",
comments = "Source: bareun/custom_dict.proto")
public final class CustomDictionaryServiceGrpc {
private CustomDictionaryServiceGrpc() {}
public static final String SERVICE_NAME = "bareun.CustomDictionaryService";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor<com.google.protobuf.Empty,
ai.bareun.protos.GetCustomDictionaryListResponse> getGetCustomDictionaryListMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetCustomDictionaryList",
requestType = com.google.protobuf.Empty.class,
responseType = ai.bareun.protos.GetCustomDictionaryListResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<com.google.protobuf.Empty,
ai.bareun.protos.GetCustomDictionaryListResponse> getGetCustomDictionaryListMethod() {
io.grpc.MethodDescriptor<com.google.protobuf.Empty, ai.bareun.protos.GetCustomDictionaryListResponse> getGetCustomDictionaryListMethod;
if ((getGetCustomDictionaryListMethod = CustomDictionaryServiceGrpc.getGetCustomDictionaryListMethod) == null) {
synchronized (CustomDictionaryServiceGrpc.class) {
if ((getGetCustomDictionaryListMethod = CustomDictionaryServiceGrpc.getGetCustomDictionaryListMethod) == null) {
CustomDictionaryServiceGrpc.getGetCustomDictionaryListMethod = getGetCustomDictionaryListMethod =
io.grpc.MethodDescriptor.<com.google.protobuf.Empty, ai.bareun.protos.GetCustomDictionaryListResponse>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"bareun.CustomDictionaryService", "GetCustomDictionaryList"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.google.protobuf.Empty.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
ai.bareun.protos.GetCustomDictionaryListResponse.getDefaultInstance()))
.setSchemaDescriptor(new CustomDictionaryServiceMethodDescriptorSupplier("GetCustomDictionaryList"))
.build();
}
}
}
return getGetCustomDictionaryListMethod;
}
private static volatile io.grpc.MethodDescriptor<ai.bareun.protos.GetCustomDictionaryRequest,
ai.bareun.protos.GetCustomDictionaryResponse> getGetCustomDictionaryMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetCustomDictionary",
requestType = ai.bareun.protos.GetCustomDictionaryRequest.class,
responseType = ai.bareun.protos.GetCustomDictionaryResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<ai.bareun.protos.GetCustomDictionaryRequest,
ai.bareun.protos.GetCustomDictionaryResponse> getGetCustomDictionaryMethod() {
io.grpc.MethodDescriptor<ai.bareun.protos.GetCustomDictionaryRequest, ai.bareun.protos.GetCustomDictionaryResponse> getGetCustomDictionaryMethod;
if ((getGetCustomDictionaryMethod = CustomDictionaryServiceGrpc.getGetCustomDictionaryMethod) == null) {
synchronized (CustomDictionaryServiceGrpc.class) {
if ((getGetCustomDictionaryMethod = CustomDictionaryServiceGrpc.getGetCustomDictionaryMethod) == null) {
CustomDictionaryServiceGrpc.getGetCustomDictionaryMethod = getGetCustomDictionaryMethod =
io.grpc.MethodDescriptor.<ai.bareun.protos.GetCustomDictionaryRequest, ai.bareun.protos.GetCustomDictionaryResponse>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"bareun.CustomDictionaryService", "GetCustomDictionary"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
ai.bareun.protos.GetCustomDictionaryRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
ai.bareun.protos.GetCustomDictionaryResponse.getDefaultInstance()))
.setSchemaDescriptor(new CustomDictionaryServiceMethodDescriptorSupplier("GetCustomDictionary"))
.build();
}
}
}
return getGetCustomDictionaryMethod;
}
private static volatile io.grpc.MethodDescriptor<ai.bareun.protos.UpdateCustomDictionaryRequest,
ai.bareun.protos.UpdateCustomDictionaryResponse> getUpdateCustomDictionaryMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "UpdateCustomDictionary",
requestType = ai.bareun.protos.UpdateCustomDictionaryRequest.class,
responseType = ai.bareun.protos.UpdateCustomDictionaryResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<ai.bareun.protos.UpdateCustomDictionaryRequest,
ai.bareun.protos.UpdateCustomDictionaryResponse> getUpdateCustomDictionaryMethod() {
io.grpc.MethodDescriptor<ai.bareun.protos.UpdateCustomDictionaryRequest, ai.bareun.protos.UpdateCustomDictionaryResponse> getUpdateCustomDictionaryMethod;
if ((getUpdateCustomDictionaryMethod = CustomDictionaryServiceGrpc.getUpdateCustomDictionaryMethod) == null) {
synchronized (CustomDictionaryServiceGrpc.class) {
if ((getUpdateCustomDictionaryMethod = CustomDictionaryServiceGrpc.getUpdateCustomDictionaryMethod) == null) {
CustomDictionaryServiceGrpc.getUpdateCustomDictionaryMethod = getUpdateCustomDictionaryMethod =
io.grpc.MethodDescriptor.<ai.bareun.protos.UpdateCustomDictionaryRequest, ai.bareun.protos.UpdateCustomDictionaryResponse>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"bareun.CustomDictionaryService", "UpdateCustomDictionary"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
ai.bareun.protos.UpdateCustomDictionaryRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
ai.bareun.protos.UpdateCustomDictionaryResponse.getDefaultInstance()))
.setSchemaDescriptor(new CustomDictionaryServiceMethodDescriptorSupplier("UpdateCustomDictionary"))
.build();
}
}
}
return getUpdateCustomDictionaryMethod;
}
private static volatile io.grpc.MethodDescriptor<ai.bareun.protos.RemoveCustomDictionariesRequest,
ai.bareun.protos.RemoveCustomDictionariesResponse> getRemoveCustomDictionariesMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "RemoveCustomDictionaries",
requestType = ai.bareun.protos.RemoveCustomDictionariesRequest.class,
responseType = ai.bareun.protos.RemoveCustomDictionariesResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<ai.bareun.protos.RemoveCustomDictionariesRequest,
ai.bareun.protos.RemoveCustomDictionariesResponse> getRemoveCustomDictionariesMethod() {
io.grpc.MethodDescriptor<ai.bareun.protos.RemoveCustomDictionariesRequest, ai.bareun.protos.RemoveCustomDictionariesResponse> getRemoveCustomDictionariesMethod;
if ((getRemoveCustomDictionariesMethod = CustomDictionaryServiceGrpc.getRemoveCustomDictionariesMethod) == null) {
synchronized (CustomDictionaryServiceGrpc.class) {
if ((getRemoveCustomDictionariesMethod = CustomDictionaryServiceGrpc.getRemoveCustomDictionariesMethod) == null) {
CustomDictionaryServiceGrpc.getRemoveCustomDictionariesMethod = getRemoveCustomDictionariesMethod =
io.grpc.MethodDescriptor.<ai.bareun.protos.RemoveCustomDictionariesRequest, ai.bareun.protos.RemoveCustomDictionariesResponse>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"bareun.CustomDictionaryService", "RemoveCustomDictionaries"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
ai.bareun.protos.RemoveCustomDictionariesRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
ai.bareun.protos.RemoveCustomDictionariesResponse.getDefaultInstance()))
.setSchemaDescriptor(new CustomDictionaryServiceMethodDescriptorSupplier("RemoveCustomDictionaries"))
.build();
}
}
}
return getRemoveCustomDictionariesMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static CustomDictionaryServiceStub newStub(io.grpc.Channel channel) {
return new CustomDictionaryServiceStub(channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static CustomDictionaryServiceBlockingStub newBlockingStub(
io.grpc.Channel channel) {
return new CustomDictionaryServiceBlockingStub(channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static CustomDictionaryServiceFutureStub newFutureStub(
io.grpc.Channel channel) {
return new CustomDictionaryServiceFutureStub(channel);
}
/**
*/
public static abstract class CustomDictionaryServiceImplBase implements io.grpc.BindableService {
/**
* <pre>
* μ 체 λͺ©λ‘μ λ€ κ°μ Έμ€κΈ°
* </pre>
*/
public void getCustomDictionaryList(com.google.protobuf.Empty request,
io.grpc.stub.StreamObserver<ai.bareun.protos.GetCustomDictionaryListResponse> responseObserver) {
asyncUnimplementedUnaryCall(getGetCustomDictionaryListMethod(), responseObserver);
}
/**
* <pre>
* νμ¬ μ μ₯λμ΄ μλ μ¬μ νλλ§ κ°μ Έμ¨λ€.
* </pre>
*/
public void getCustomDictionary(ai.bareun.protos.GetCustomDictionaryRequest request,
io.grpc.stub.StreamObserver<ai.bareun.protos.GetCustomDictionaryResponse> responseObserver) {
asyncUnimplementedUnaryCall(getGetCustomDictionaryMethod(), responseObserver);
}
/**
* <pre>
* μ 체λ₯Ό λͺ¨λ λ€ λ°κΏμΉκΈ°νλ κ²½μ°
* </pre>
*/
public void updateCustomDictionary(ai.bareun.protos.UpdateCustomDictionaryRequest request,
io.grpc.stub.StreamObserver<ai.bareun.protos.UpdateCustomDictionaryResponse> responseObserver) {
asyncUnimplementedUnaryCall(getUpdateCustomDictionaryMethod(), responseObserver);
}
/**
* <pre>
* μ¬λ¬ κ°λ₯Ό νκΊΌλ²μ μ§μ΄λ€.
* </pre>
*/
public void removeCustomDictionaries(ai.bareun.protos.RemoveCustomDictionariesRequest request,
io.grpc.stub.StreamObserver<ai.bareun.protos.RemoveCustomDictionariesResponse> responseObserver) {
asyncUnimplementedUnaryCall(getRemoveCustomDictionariesMethod(), responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getGetCustomDictionaryListMethod(),
asyncUnaryCall(
new MethodHandlers<
com.google.protobuf.Empty,
ai.bareun.protos.GetCustomDictionaryListResponse>(
this, METHODID_GET_CUSTOM_DICTIONARY_LIST)))
.addMethod(
getGetCustomDictionaryMethod(),
asyncUnaryCall(
new MethodHandlers<
ai.bareun.protos.GetCustomDictionaryRequest,
ai.bareun.protos.GetCustomDictionaryResponse>(
this, METHODID_GET_CUSTOM_DICTIONARY)))
.addMethod(
getUpdateCustomDictionaryMethod(),
asyncUnaryCall(
new MethodHandlers<
ai.bareun.protos.UpdateCustomDictionaryRequest,
ai.bareun.protos.UpdateCustomDictionaryResponse>(
this, METHODID_UPDATE_CUSTOM_DICTIONARY)))
.addMethod(
getRemoveCustomDictionariesMethod(),
asyncUnaryCall(
new MethodHandlers<
ai.bareun.protos.RemoveCustomDictionariesRequest,
ai.bareun.protos.RemoveCustomDictionariesResponse>(
this, METHODID_REMOVE_CUSTOM_DICTIONARIES)))
.build();
}
}
/**
*/
public static final class CustomDictionaryServiceStub extends io.grpc.stub.AbstractStub<CustomDictionaryServiceStub> {
private CustomDictionaryServiceStub(io.grpc.Channel channel) {
super(channel);
}
private CustomDictionaryServiceStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected CustomDictionaryServiceStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new CustomDictionaryServiceStub(channel, callOptions);
}
/**
* <pre>
* μ 체 λͺ©λ‘μ λ€ κ°μ Έμ€κΈ°
* </pre>
*/
public void getCustomDictionaryList(com.google.protobuf.Empty request,
io.grpc.stub.StreamObserver<ai.bareun.protos.GetCustomDictionaryListResponse> responseObserver) {
asyncUnaryCall(
getChannel().newCall(getGetCustomDictionaryListMethod(), getCallOptions()), request, responseObserver);
}
/**
* <pre>
* νμ¬ μ μ₯λμ΄ μλ μ¬μ νλλ§ κ°μ Έμ¨λ€.
* </pre>
*/
public void getCustomDictionary(ai.bareun.protos.GetCustomDictionaryRequest request,
io.grpc.stub.StreamObserver<ai.bareun.protos.GetCustomDictionaryResponse> responseObserver) {
asyncUnaryCall(
getChannel().newCall(getGetCustomDictionaryMethod(), getCallOptions()), request, responseObserver);
}
/**
* <pre>
* μ 체λ₯Ό λͺ¨λ λ€ λ°κΏμΉκΈ°νλ κ²½μ°
* </pre>
*/
public void updateCustomDictionary(ai.bareun.protos.UpdateCustomDictionaryRequest request,
io.grpc.stub.StreamObserver<ai.bareun.protos.UpdateCustomDictionaryResponse> responseObserver) {
asyncUnaryCall(
getChannel().newCall(getUpdateCustomDictionaryMethod(), getCallOptions()), request, responseObserver);
}
/**
* <pre>
* μ¬λ¬ κ°λ₯Ό νκΊΌλ²μ μ§μ΄λ€.
* </pre>
*/
public void removeCustomDictionaries(ai.bareun.protos.RemoveCustomDictionariesRequest request,
io.grpc.stub.StreamObserver<ai.bareun.protos.RemoveCustomDictionariesResponse> responseObserver) {
asyncUnaryCall(
getChannel().newCall(getRemoveCustomDictionariesMethod(), getCallOptions()), request, responseObserver);
}
}
/**
*/
public static final class CustomDictionaryServiceBlockingStub extends io.grpc.stub.AbstractStub<CustomDictionaryServiceBlockingStub> {
private CustomDictionaryServiceBlockingStub(io.grpc.Channel channel) {
super(channel);
}
private CustomDictionaryServiceBlockingStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected CustomDictionaryServiceBlockingStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new CustomDictionaryServiceBlockingStub(channel, callOptions);
}
/**
* <pre>
* μ 체 λͺ©λ‘μ λ€ κ°μ Έμ€κΈ°
* </pre>
*/
public ai.bareun.protos.GetCustomDictionaryListResponse getCustomDictionaryList(com.google.protobuf.Empty request) {
return blockingUnaryCall(
getChannel(), getGetCustomDictionaryListMethod(), getCallOptions(), request);
}
/**
* <pre>
* νμ¬ μ μ₯λμ΄ μλ μ¬μ νλλ§ κ°μ Έμ¨λ€.
* </pre>
*/
public ai.bareun.protos.GetCustomDictionaryResponse getCustomDictionary(ai.bareun.protos.GetCustomDictionaryRequest request) {
return blockingUnaryCall(
getChannel(), getGetCustomDictionaryMethod(), getCallOptions(), request);
}
/**
* <pre>
* μ 체λ₯Ό λͺ¨λ λ€ λ°κΏμΉκΈ°νλ κ²½μ°
* </pre>
*/
public ai.bareun.protos.UpdateCustomDictionaryResponse updateCustomDictionary(ai.bareun.protos.UpdateCustomDictionaryRequest request) {
return blockingUnaryCall(
getChannel(), getUpdateCustomDictionaryMethod(), getCallOptions(), request);
}
/**
* <pre>
* μ¬λ¬ κ°λ₯Ό νκΊΌλ²μ μ§μ΄λ€.
* </pre>
*/
public ai.bareun.protos.RemoveCustomDictionariesResponse removeCustomDictionaries(ai.bareun.protos.RemoveCustomDictionariesRequest request) {
return blockingUnaryCall(
getChannel(), getRemoveCustomDictionariesMethod(), getCallOptions(), request);
}
}
/**
*/
public static final class CustomDictionaryServiceFutureStub extends io.grpc.stub.AbstractStub<CustomDictionaryServiceFutureStub> {
private CustomDictionaryServiceFutureStub(io.grpc.Channel channel) {
super(channel);
}
private CustomDictionaryServiceFutureStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected CustomDictionaryServiceFutureStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new CustomDictionaryServiceFutureStub(channel, callOptions);
}
/**
* <pre>
* μ 체 λͺ©λ‘μ λ€ κ°μ Έμ€κΈ°
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<ai.bareun.protos.GetCustomDictionaryListResponse> getCustomDictionaryList(
com.google.protobuf.Empty request) {
return futureUnaryCall(
getChannel().newCall(getGetCustomDictionaryListMethod(), getCallOptions()), request);
}
/**
* <pre>
* νμ¬ μ μ₯λμ΄ μλ μ¬μ νλλ§ κ°μ Έμ¨λ€.
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<ai.bareun.protos.GetCustomDictionaryResponse> getCustomDictionary(
ai.bareun.protos.GetCustomDictionaryRequest request) {
return futureUnaryCall(
getChannel().newCall(getGetCustomDictionaryMethod(), getCallOptions()), request);
}
/**
* <pre>
* μ 체λ₯Ό λͺ¨λ λ€ λ°κΏμΉκΈ°νλ κ²½μ°
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<ai.bareun.protos.UpdateCustomDictionaryResponse> updateCustomDictionary(
ai.bareun.protos.UpdateCustomDictionaryRequest request) {
return futureUnaryCall(
getChannel().newCall(getUpdateCustomDictionaryMethod(), getCallOptions()), request);
}
/**
* <pre>
* μ¬λ¬ κ°λ₯Ό νκΊΌλ²μ μ§μ΄λ€.
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<ai.bareun.protos.RemoveCustomDictionariesResponse> removeCustomDictionaries(
ai.bareun.protos.RemoveCustomDictionariesRequest request) {
return futureUnaryCall(
getChannel().newCall(getRemoveCustomDictionariesMethod(), getCallOptions()), request);
}
}
private static final int METHODID_GET_CUSTOM_DICTIONARY_LIST = 0;
private static final int METHODID_GET_CUSTOM_DICTIONARY = 1;
private static final int METHODID_UPDATE_CUSTOM_DICTIONARY = 2;
private static final int METHODID_REMOVE_CUSTOM_DICTIONARIES = 3;
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 CustomDictionaryServiceImplBase serviceImpl;
private final int methodId;
MethodHandlers(CustomDictionaryServiceImplBase 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_GET_CUSTOM_DICTIONARY_LIST:
serviceImpl.getCustomDictionaryList((com.google.protobuf.Empty) request,
(io.grpc.stub.StreamObserver<ai.bareun.protos.GetCustomDictionaryListResponse>) responseObserver);
break;
case METHODID_GET_CUSTOM_DICTIONARY:
serviceImpl.getCustomDictionary((ai.bareun.protos.GetCustomDictionaryRequest) request,
(io.grpc.stub.StreamObserver<ai.bareun.protos.GetCustomDictionaryResponse>) responseObserver);
break;
case METHODID_UPDATE_CUSTOM_DICTIONARY:
serviceImpl.updateCustomDictionary((ai.bareun.protos.UpdateCustomDictionaryRequest) request,
(io.grpc.stub.StreamObserver<ai.bareun.protos.UpdateCustomDictionaryResponse>) responseObserver);
break;
case METHODID_REMOVE_CUSTOM_DICTIONARIES:
serviceImpl.removeCustomDictionaries((ai.bareun.protos.RemoveCustomDictionariesRequest) request,
(io.grpc.stub.StreamObserver<ai.bareun.protos.RemoveCustomDictionariesResponse>) 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();
}
}
}
private static abstract class CustomDictionaryServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
CustomDictionaryServiceBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return ai.bareun.protos.CustomDictionaryServiceProto.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("CustomDictionaryService");
}
}
private static final class CustomDictionaryServiceFileDescriptorSupplier
extends CustomDictionaryServiceBaseDescriptorSupplier {
CustomDictionaryServiceFileDescriptorSupplier() {}
}
private static final class CustomDictionaryServiceMethodDescriptorSupplier
extends CustomDictionaryServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
CustomDictionaryServiceMethodDescriptorSupplier(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 (CustomDictionaryServiceGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new CustomDictionaryServiceFileDescriptorSupplier())
.addMethod(getGetCustomDictionaryListMethod())
.addMethod(getGetCustomDictionaryMethod())
.addMethod(getUpdateCustomDictionaryMethod())
.addMethod(getRemoveCustomDictionariesMethod())
.build();
}
}
}
return result;
}
}
|
0
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun/protos/CustomDictionaryServiceProto.java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bareun/custom_dict.proto
package ai.bareun.protos;
public final class CustomDictionaryServiceProto {
private CustomDictionaryServiceProto() {}
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_bareun_CustomDictionaryMeta_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_bareun_CustomDictionaryMeta_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_bareun_CustomDictionaryMeta_DictMeta_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_bareun_CustomDictionaryMeta_DictMeta_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_bareun_CustomDictionary_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_bareun_CustomDictionary_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_bareun_CustomDictionaryMap_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_bareun_CustomDictionaryMap_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_bareun_CustomDictionaryMap_CustomDictMapEntry_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_bareun_CustomDictionaryMap_CustomDictMapEntry_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_bareun_GetCustomDictionaryListResponse_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_bareun_GetCustomDictionaryListResponse_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_bareun_GetCustomDictionaryRequest_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_bareun_GetCustomDictionaryRequest_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_bareun_GetCustomDictionaryResponse_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_bareun_GetCustomDictionaryResponse_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_bareun_UpdateCustomDictionaryRequest_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_bareun_UpdateCustomDictionaryRequest_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_bareun_UpdateCustomDictionaryResponse_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_bareun_UpdateCustomDictionaryResponse_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_bareun_RemoveCustomDictionariesRequest_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_bareun_RemoveCustomDictionariesRequest_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_bareun_RemoveCustomDictionariesResponse_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_bareun_RemoveCustomDictionariesResponse_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_bareun_RemoveCustomDictionariesResponse_DeletedDomainNamesEntry_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_bareun_RemoveCustomDictionariesResponse_DeletedDomainNamesEntry_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\030bareun/custom_dict.proto\022\006bareun\032\030bare" +
"un/dict_common.proto\032\033google/protobuf/em" +
"pty.proto\032\034google/api/annotations.proto\"" +
"\223\003\n\024CustomDictionaryMeta\022\023\n\013domain_name\030" +
"\001 \001(\t\0225\n\006np_set\030\002 \001(\0132%.bareun.CustomDic" +
"tionaryMeta.DictMeta\0225\n\006cp_set\030\003 \001(\0132%.b" +
"areun.CustomDictionaryMeta.DictMeta\022;\n\014c" +
"p_caret_set\030\004 \001(\0132%.bareun.CustomDiction" +
"aryMeta.DictMeta\0225\n\006vv_set\030\005 \001(\0132%.bareu" +
"n.CustomDictionaryMeta.DictMeta\0225\n\006va_se" +
"t\030\006 \001(\0132%.bareun.CustomDictionaryMeta.Di" +
"ctMeta\032M\n\010DictMeta\022\036\n\004type\030\001 \001(\0162\020.bareu" +
"n.DictType\022\014\n\004name\030\002 \001(\t\022\023\n\013items_count\030" +
"\003 \001(\005\"\322\001\n\020CustomDictionary\022\023\n\013domain_nam" +
"e\030\001 \001(\t\022\037\n\006np_set\030\002 \001(\0132\017.bareun.DictSet" +
"\022\037\n\006cp_set\030\003 \001(\0132\017.bareun.DictSet\022%\n\014cp_" +
"caret_set\030\004 \001(\0132\017.bareun.DictSet\022\037\n\006vv_s" +
"et\030\005 \001(\0132\017.bareun.DictSet\022\037\n\006va_set\030\006 \001(" +
"\0132\017.bareun.DictSet\"\256\001\n\023CustomDictionaryM" +
"ap\022G\n\017custom_dict_map\030\001 \003(\0132..bareun.Cus" +
"tomDictionaryMap.CustomDictMapEntry\032N\n\022C" +
"ustomDictMapEntry\022\013\n\003key\030\001 \001(\t\022\'\n\005value\030" +
"\002 \001(\0132\030.bareun.CustomDictionary:\0028\001\"U\n\037G" +
"etCustomDictionaryListResponse\0222\n\014domain" +
"_dicts\030\001 \003(\0132\034.bareun.CustomDictionaryMe" +
"ta\"1\n\032GetCustomDictionaryRequest\022\023\n\013doma" +
"in_name\030\001 \001(\t\"Z\n\033GetCustomDictionaryResp" +
"onse\022\023\n\013domain_name\030\001 \001(\t\022&\n\004dict\030\002 \001(\0132" +
"\030.bareun.CustomDictionary\"\\\n\035UpdateCusto" +
"mDictionaryRequest\022\023\n\013domain_name\030\001 \001(\t\022" +
"&\n\004dict\030\002 \001(\0132\030.bareun.CustomDictionary\"" +
"=\n\036UpdateCustomDictionaryResponse\022\033\n\023upd" +
"ated_domain_name\030\001 \001(\t\"D\n\037RemoveCustomDi" +
"ctionariesRequest\022\024\n\014domain_names\030\001 \003(\t\022" +
"\013\n\003all\030\002 \001(\010\"\275\001\n RemoveCustomDictionarie" +
"sResponse\022^\n\024deleted_domain_names\030\001 \003(\0132" +
"@.bareun.RemoveCustomDictionariesRespons" +
"e.DeletedDomainNamesEntry\0329\n\027DeletedDoma" +
"inNamesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\010" +
":\0028\0012\354\004\n\027CustomDictionaryService\022\200\001\n\027Get" +
"CustomDictionaryList\022\026.google.protobuf.E" +
"mpty\032\'.bareun.GetCustomDictionaryListRes" +
"ponse\"$\202\323\344\223\002\036\022\031/bareun/api/v1/customdict" +
":\001*\022\222\001\n\023GetCustomDictionary\022\".bareun.Get" +
"CustomDictionaryRequest\032#.bareun.GetCust" +
"omDictionaryResponse\"2\202\323\344\223\002,\022\'/bareun/ap" +
"i/v1/customdict/{domain_name}:\001*\022\233\001\n\026Upd" +
"ateCustomDictionary\022%.bareun.UpdateCusto" +
"mDictionaryRequest\032&.bareun.UpdateCustom" +
"DictionaryResponse\"2\202\323\344\223\002,\"\'/bareun/api/" +
"v1/customdict/{domain_name}:\001*\022\232\001\n\030Remov" +
"eCustomDictionaries\022\'.bareun.RemoveCusto" +
"mDictionariesRequest\032(.bareun.RemoveCust" +
"omDictionariesResponse\"+\202\323\344\223\002%\" /bareun/" +
"api/v1/customdict/delete:\001*BJ\n\020ai.bareun" +
".protosB\034CustomDictionaryServiceProtoP\001Z" +
"\026ai.bareun/proto/bareunb\006proto3"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
public com.google.protobuf.ExtensionRegistry assignDescriptors(
com.google.protobuf.Descriptors.FileDescriptor root) {
descriptor = root;
return null;
}
};
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
ai.bareun.protos.DictionaryCommonProto.getDescriptor(),
com.google.protobuf.EmptyProto.getDescriptor(),
com.google.api.AnnotationsProto.getDescriptor(),
}, assigner);
internal_static_bareun_CustomDictionaryMeta_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_bareun_CustomDictionaryMeta_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_bareun_CustomDictionaryMeta_descriptor,
new java.lang.String[] { "DomainName", "NpSet", "CpSet", "CpCaretSet", "VvSet", "VaSet", });
internal_static_bareun_CustomDictionaryMeta_DictMeta_descriptor =
internal_static_bareun_CustomDictionaryMeta_descriptor.getNestedTypes().get(0);
internal_static_bareun_CustomDictionaryMeta_DictMeta_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_bareun_CustomDictionaryMeta_DictMeta_descriptor,
new java.lang.String[] { "Type", "Name", "ItemsCount", });
internal_static_bareun_CustomDictionary_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_bareun_CustomDictionary_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_bareun_CustomDictionary_descriptor,
new java.lang.String[] { "DomainName", "NpSet", "CpSet", "CpCaretSet", "VvSet", "VaSet", });
internal_static_bareun_CustomDictionaryMap_descriptor =
getDescriptor().getMessageTypes().get(2);
internal_static_bareun_CustomDictionaryMap_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_bareun_CustomDictionaryMap_descriptor,
new java.lang.String[] { "CustomDictMap", });
internal_static_bareun_CustomDictionaryMap_CustomDictMapEntry_descriptor =
internal_static_bareun_CustomDictionaryMap_descriptor.getNestedTypes().get(0);
internal_static_bareun_CustomDictionaryMap_CustomDictMapEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_bareun_CustomDictionaryMap_CustomDictMapEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
internal_static_bareun_GetCustomDictionaryListResponse_descriptor =
getDescriptor().getMessageTypes().get(3);
internal_static_bareun_GetCustomDictionaryListResponse_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_bareun_GetCustomDictionaryListResponse_descriptor,
new java.lang.String[] { "DomainDicts", });
internal_static_bareun_GetCustomDictionaryRequest_descriptor =
getDescriptor().getMessageTypes().get(4);
internal_static_bareun_GetCustomDictionaryRequest_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_bareun_GetCustomDictionaryRequest_descriptor,
new java.lang.String[] { "DomainName", });
internal_static_bareun_GetCustomDictionaryResponse_descriptor =
getDescriptor().getMessageTypes().get(5);
internal_static_bareun_GetCustomDictionaryResponse_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_bareun_GetCustomDictionaryResponse_descriptor,
new java.lang.String[] { "DomainName", "Dict", });
internal_static_bareun_UpdateCustomDictionaryRequest_descriptor =
getDescriptor().getMessageTypes().get(6);
internal_static_bareun_UpdateCustomDictionaryRequest_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_bareun_UpdateCustomDictionaryRequest_descriptor,
new java.lang.String[] { "DomainName", "Dict", });
internal_static_bareun_UpdateCustomDictionaryResponse_descriptor =
getDescriptor().getMessageTypes().get(7);
internal_static_bareun_UpdateCustomDictionaryResponse_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_bareun_UpdateCustomDictionaryResponse_descriptor,
new java.lang.String[] { "UpdatedDomainName", });
internal_static_bareun_RemoveCustomDictionariesRequest_descriptor =
getDescriptor().getMessageTypes().get(8);
internal_static_bareun_RemoveCustomDictionariesRequest_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_bareun_RemoveCustomDictionariesRequest_descriptor,
new java.lang.String[] { "DomainNames", "All", });
internal_static_bareun_RemoveCustomDictionariesResponse_descriptor =
getDescriptor().getMessageTypes().get(9);
internal_static_bareun_RemoveCustomDictionariesResponse_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_bareun_RemoveCustomDictionariesResponse_descriptor,
new java.lang.String[] { "DeletedDomainNames", });
internal_static_bareun_RemoveCustomDictionariesResponse_DeletedDomainNamesEntry_descriptor =
internal_static_bareun_RemoveCustomDictionariesResponse_descriptor.getNestedTypes().get(0);
internal_static_bareun_RemoveCustomDictionariesResponse_DeletedDomainNamesEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_bareun_RemoveCustomDictionariesResponse_DeletedDomainNamesEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
com.google.protobuf.ExtensionRegistry registry =
com.google.protobuf.ExtensionRegistry.newInstance();
registry.add(com.google.api.AnnotationsProto.http);
com.google.protobuf.Descriptors.FileDescriptor
.internalUpdateFileDescriptor(descriptor, registry);
ai.bareun.protos.DictionaryCommonProto.getDescriptor();
com.google.protobuf.EmptyProto.getDescriptor();
com.google.api.AnnotationsProto.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}
|
0
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun/protos/DictSet.java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bareun/dict_common.proto
package ai.bareun.protos;
/**
* <pre>
* λ©λͺ¨λ¦¬ μμμ 볡ν©λͺ
μ¬λ κ³ μ λͺ
μ¬λ₯Ό μ²λ¦¬νκΈ° μν΄μ μ°λ μ¬μ
* μ¬μ μ΄ mapμΌλ‘ μ°μ΄λ μ΄μ λ λ©λͺ¨λ¦¬ μμμ λΉ λ₯΄κ² μ¬μ λ°μ΄ν°μ μ‘΄μ¬μ¬λΆλ₯Ό μ κ²νκΈ°
* μν λͺ©μ μ΄λ€.
* </pre>
*
* Protobuf type {@code bareun.DictSet}
*/
public final class DictSet extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:bareun.DictSet)
DictSetOrBuilder {
private static final long serialVersionUID = 0L;
// Use DictSet.newBuilder() to construct.
private DictSet(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private DictSet() {
type_ = 0;
name_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private DictSet(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
items_ = com.google.protobuf.MapField.newMapField(
ItemsDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000001;
}
com.google.protobuf.MapEntry<java.lang.String, java.lang.Integer>
items__ = input.readMessage(
ItemsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
items_.getMutableMap().put(
items__.getKey(), items__.getValue());
break;
}
case 16: {
int rawValue = input.readEnum();
type_ = rawValue;
break;
}
case 82: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.bareun.protos.DictionaryCommonProto.internal_static_bareun_DictSet_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 1:
return internalGetItems();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.bareun.protos.DictionaryCommonProto.internal_static_bareun_DictSet_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.bareun.protos.DictSet.class, ai.bareun.protos.DictSet.Builder.class);
}
private int bitField0_;
public static final int ITEMS_FIELD_NUMBER = 1;
private static final class ItemsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, java.lang.Integer> defaultEntry =
com.google.protobuf.MapEntry
.<java.lang.String, java.lang.Integer>newDefaultInstance(
ai.bareun.protos.DictionaryCommonProto.internal_static_bareun_DictSet_ItemsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.INT32,
0);
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.Integer> items_;
private com.google.protobuf.MapField<java.lang.String, java.lang.Integer>
internalGetItems() {
if (items_ == null) {
return com.google.protobuf.MapField.emptyMapField(
ItemsDefaultEntryHolder.defaultEntry);
}
return items_;
}
public int getItemsCount() {
return internalGetItems().getMap().size();
}
/**
* <code>map<string, int32> items = 1;</code>
*/
public boolean containsItems(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetItems().getMap().containsKey(key);
}
/**
* Use {@link #getItemsMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map<java.lang.String, java.lang.Integer> getItems() {
return getItemsMap();
}
/**
* <code>map<string, int32> items = 1;</code>
*/
public java.util.Map<java.lang.String, java.lang.Integer> getItemsMap() {
return internalGetItems().getMap();
}
/**
* <code>map<string, int32> items = 1;</code>
*/
public int getItemsOrDefault(
java.lang.String key,
int defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map<java.lang.String, java.lang.Integer> map =
internalGetItems().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* <code>map<string, int32> items = 1;</code>
*/
public int getItemsOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map<java.lang.String, java.lang.Integer> map =
internalGetItems().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int TYPE_FIELD_NUMBER = 2;
private int type_;
/**
* <code>.bareun.DictType type = 2;</code>
*/
public int getTypeValue() {
return type_;
}
/**
* <code>.bareun.DictType type = 2;</code>
*/
public ai.bareun.protos.DictType getType() {
@SuppressWarnings("deprecation")
ai.bareun.protos.DictType result = ai.bareun.protos.DictType.valueOf(type_);
return result == null ? ai.bareun.protos.DictType.UNRECOGNIZED : result;
}
public static final int NAME_FIELD_NUMBER = 10;
private volatile java.lang.Object name_;
/**
* <code>string name = 10;</code>
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
}
}
/**
* <code>string name = 10;</code>
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetItems(),
ItemsDefaultEntryHolder.defaultEntry,
1);
if (type_ != ai.bareun.protos.DictType.TOKEN_INDEX.getNumber()) {
output.writeEnum(2, type_);
}
if (!getNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 10, name_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (java.util.Map.Entry<java.lang.String, java.lang.Integer> entry
: internalGetItems().getMap().entrySet()) {
com.google.protobuf.MapEntry<java.lang.String, java.lang.Integer>
items__ = ItemsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, items__);
}
if (type_ != ai.bareun.protos.DictType.TOKEN_INDEX.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(2, type_);
}
if (!getNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, name_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof ai.bareun.protos.DictSet)) {
return super.equals(obj);
}
ai.bareun.protos.DictSet other = (ai.bareun.protos.DictSet) obj;
if (!internalGetItems().equals(
other.internalGetItems())) return false;
if (type_ != other.type_) return false;
if (!getName()
.equals(other.getName())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (!internalGetItems().getMap().isEmpty()) {
hash = (37 * hash) + ITEMS_FIELD_NUMBER;
hash = (53 * hash) + internalGetItems().hashCode();
}
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + type_;
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static ai.bareun.protos.DictSet parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.DictSet parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.DictSet parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.DictSet parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.DictSet parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.DictSet parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.DictSet parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.bareun.protos.DictSet 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.bareun.protos.DictSet parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static ai.bareun.protos.DictSet 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.bareun.protos.DictSet parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.bareun.protos.DictSet 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.bareun.protos.DictSet 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>
* λ©λͺ¨λ¦¬ μμμ 볡ν©λͺ
μ¬λ κ³ μ λͺ
μ¬λ₯Ό μ²λ¦¬νκΈ° μν΄μ μ°λ μ¬μ
* μ¬μ μ΄ mapμΌλ‘ μ°μ΄λ μ΄μ λ λ©λͺ¨λ¦¬ μμμ λΉ λ₯΄κ² μ¬μ λ°μ΄ν°μ μ‘΄μ¬μ¬λΆλ₯Ό μ κ²νκΈ°
* μν λͺ©μ μ΄λ€.
* </pre>
*
* Protobuf type {@code bareun.DictSet}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:bareun.DictSet)
ai.bareun.protos.DictSetOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.bareun.protos.DictionaryCommonProto.internal_static_bareun_DictSet_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 1:
return internalGetItems();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 1:
return internalGetMutableItems();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.bareun.protos.DictionaryCommonProto.internal_static_bareun_DictSet_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.bareun.protos.DictSet.class, ai.bareun.protos.DictSet.Builder.class);
}
// Construct using ai.bareun.protos.DictSet.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
internalGetMutableItems().clear();
type_ = 0;
name_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ai.bareun.protos.DictionaryCommonProto.internal_static_bareun_DictSet_descriptor;
}
@java.lang.Override
public ai.bareun.protos.DictSet getDefaultInstanceForType() {
return ai.bareun.protos.DictSet.getDefaultInstance();
}
@java.lang.Override
public ai.bareun.protos.DictSet build() {
ai.bareun.protos.DictSet result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ai.bareun.protos.DictSet buildPartial() {
ai.bareun.protos.DictSet result = new ai.bareun.protos.DictSet(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.items_ = internalGetItems();
result.items_.makeImmutable();
result.type_ = type_;
result.name_ = name_;
result.bitField0_ = to_bitField0_;
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.bareun.protos.DictSet) {
return mergeFrom((ai.bareun.protos.DictSet)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ai.bareun.protos.DictSet other) {
if (other == ai.bareun.protos.DictSet.getDefaultInstance()) return this;
internalGetMutableItems().mergeFrom(
other.internalGetItems());
if (other.type_ != 0) {
setTypeValue(other.getTypeValue());
}
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
ai.bareun.protos.DictSet parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (ai.bareun.protos.DictSet) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.protobuf.MapField<
java.lang.String, java.lang.Integer> items_;
private com.google.protobuf.MapField<java.lang.String, java.lang.Integer>
internalGetItems() {
if (items_ == null) {
return com.google.protobuf.MapField.emptyMapField(
ItemsDefaultEntryHolder.defaultEntry);
}
return items_;
}
private com.google.protobuf.MapField<java.lang.String, java.lang.Integer>
internalGetMutableItems() {
onChanged();;
if (items_ == null) {
items_ = com.google.protobuf.MapField.newMapField(
ItemsDefaultEntryHolder.defaultEntry);
}
if (!items_.isMutable()) {
items_ = items_.copy();
}
return items_;
}
public int getItemsCount() {
return internalGetItems().getMap().size();
}
/**
* <code>map<string, int32> items = 1;</code>
*/
public boolean containsItems(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetItems().getMap().containsKey(key);
}
/**
* Use {@link #getItemsMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map<java.lang.String, java.lang.Integer> getItems() {
return getItemsMap();
}
/**
* <code>map<string, int32> items = 1;</code>
*/
public java.util.Map<java.lang.String, java.lang.Integer> getItemsMap() {
return internalGetItems().getMap();
}
/**
* <code>map<string, int32> items = 1;</code>
*/
public int getItemsOrDefault(
java.lang.String key,
int defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map<java.lang.String, java.lang.Integer> map =
internalGetItems().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* <code>map<string, int32> items = 1;</code>
*/
public int getItemsOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map<java.lang.String, java.lang.Integer> map =
internalGetItems().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearItems() {
internalGetMutableItems().getMutableMap()
.clear();
return this;
}
/**
* <code>map<string, int32> items = 1;</code>
*/
public Builder removeItems(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
internalGetMutableItems().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map<java.lang.String, java.lang.Integer>
getMutableItems() {
return internalGetMutableItems().getMutableMap();
}
/**
* <code>map<string, int32> items = 1;</code>
*/
public Builder putItems(
java.lang.String key,
int value) {
if (key == null) { throw new java.lang.NullPointerException(); }
internalGetMutableItems().getMutableMap()
.put(key, value);
return this;
}
/**
* <code>map<string, int32> items = 1;</code>
*/
public Builder putAllItems(
java.util.Map<java.lang.String, java.lang.Integer> values) {
internalGetMutableItems().getMutableMap()
.putAll(values);
return this;
}
private int type_ = 0;
/**
* <code>.bareun.DictType type = 2;</code>
*/
public int getTypeValue() {
return type_;
}
/**
* <code>.bareun.DictType type = 2;</code>
*/
public Builder setTypeValue(int value) {
type_ = value;
onChanged();
return this;
}
/**
* <code>.bareun.DictType type = 2;</code>
*/
public ai.bareun.protos.DictType getType() {
@SuppressWarnings("deprecation")
ai.bareun.protos.DictType result = ai.bareun.protos.DictType.valueOf(type_);
return result == null ? ai.bareun.protos.DictType.UNRECOGNIZED : result;
}
/**
* <code>.bareun.DictType type = 2;</code>
*/
public Builder setType(ai.bareun.protos.DictType value) {
if (value == null) {
throw new NullPointerException();
}
type_ = value.getNumber();
onChanged();
return this;
}
/**
* <code>.bareun.DictType type = 2;</code>
*/
public Builder clearType() {
type_ = 0;
onChanged();
return this;
}
private java.lang.Object name_ = "";
/**
* <code>string name = 10;</code>
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <code>string name = 10;</code>
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <code>string name = 10;</code>
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
* <code>string name = 10;</code>
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
* <code>string name = 10;</code>
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:bareun.DictSet)
}
// @@protoc_insertion_point(class_scope:bareun.DictSet)
private static final ai.bareun.protos.DictSet DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new ai.bareun.protos.DictSet();
}
public static ai.bareun.protos.DictSet getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<DictSet>
PARSER = new com.google.protobuf.AbstractParser<DictSet>() {
@java.lang.Override
public DictSet parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new DictSet(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<DictSet> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<DictSet> getParserForType() {
return PARSER;
}
@java.lang.Override
public ai.bareun.protos.DictSet getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
|
0
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun/protos/DictSetOrBuilder.java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bareun/dict_common.proto
package ai.bareun.protos;
public interface DictSetOrBuilder extends
// @@protoc_insertion_point(interface_extends:bareun.DictSet)
com.google.protobuf.MessageOrBuilder {
/**
* <code>map<string, int32> items = 1;</code>
*/
int getItemsCount();
/**
* <code>map<string, int32> items = 1;</code>
*/
boolean containsItems(
java.lang.String key);
/**
* Use {@link #getItemsMap()} instead.
*/
@java.lang.Deprecated
java.util.Map<java.lang.String, java.lang.Integer>
getItems();
/**
* <code>map<string, int32> items = 1;</code>
*/
java.util.Map<java.lang.String, java.lang.Integer>
getItemsMap();
/**
* <code>map<string, int32> items = 1;</code>
*/
int getItemsOrDefault(
java.lang.String key,
int defaultValue);
/**
* <code>map<string, int32> items = 1;</code>
*/
int getItemsOrThrow(
java.lang.String key);
/**
* <code>.bareun.DictType type = 2;</code>
*/
int getTypeValue();
/**
* <code>.bareun.DictType type = 2;</code>
*/
ai.bareun.protos.DictType getType();
/**
* <code>string name = 10;</code>
*/
java.lang.String getName();
/**
* <code>string name = 10;</code>
*/
com.google.protobuf.ByteString
getNameBytes();
}
|
0
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun/protos/DictType.java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bareun/dict_common.proto
package ai.bareun.protos;
/**
* <pre>
* μ¬μ μ μ’
λ₯
* </pre>
*
* Protobuf enum {@code bareun.DictType}
*/
public enum DictType
implements com.google.protobuf.ProtocolMessageEnum {
/**
* <pre>
* κΈ°λ³Έ λ°°ν¬μ¬μ μ μ¬μ©λλ ν¬λ§·
* μ μ‘μμλ μ°μ΄μ§ μλλ€.
* </pre>
*
* <code>TOKEN_INDEX = 0;</code>
*/
TOKEN_INDEX(0),
/**
* <pre>
* κ³ μ λͺ
μ¬λ 볡ν©λͺ
μ¬λ₯Ό νκΈ°ν λ μ¬μ©νλ€.
* </pre>
*
* <code>WORD_LIST = 1;</code>
*/
WORD_LIST(1),
/**
* <pre>
* # μ μ‘μμλ§ μ¬μ©νκ³ μ€μ λ‘λ μ°μ΄μ§ μΆλ‘ μμλ μ°μ΄μ§ μλλ€.
* </pre>
*
* <code>WORD_LIST_COMPOUND = 2;</code>
*/
WORD_LIST_COMPOUND(2),
UNRECOGNIZED(-1),
;
/**
* <pre>
* κΈ°λ³Έ λ°°ν¬μ¬μ μ μ¬μ©λλ ν¬λ§·
* μ μ‘μμλ μ°μ΄μ§ μλλ€.
* </pre>
*
* <code>TOKEN_INDEX = 0;</code>
*/
public static final int TOKEN_INDEX_VALUE = 0;
/**
* <pre>
* κ³ μ λͺ
μ¬λ 볡ν©λͺ
μ¬λ₯Ό νκΈ°ν λ μ¬μ©νλ€.
* </pre>
*
* <code>WORD_LIST = 1;</code>
*/
public static final int WORD_LIST_VALUE = 1;
/**
* <pre>
* # μ μ‘μμλ§ μ¬μ©νκ³ μ€μ λ‘λ μ°μ΄μ§ μΆλ‘ μμλ μ°μ΄μ§ μλλ€.
* </pre>
*
* <code>WORD_LIST_COMPOUND = 2;</code>
*/
public static final int WORD_LIST_COMPOUND_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static DictType valueOf(int value) {
return forNumber(value);
}
public static DictType forNumber(int value) {
switch (value) {
case 0: return TOKEN_INDEX;
case 1: return WORD_LIST;
case 2: return WORD_LIST_COMPOUND;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap<DictType>
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
DictType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap<DictType>() {
public DictType findValueByNumber(int number) {
return DictType.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return ai.bareun.protos.DictionaryCommonProto.getDescriptor().getEnumTypes().get(0);
}
private static final DictType[] VALUES = values();
public static DictType valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private DictType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:bareun.DictType)
}
|
0
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun/protos/DictionaryCommonProto.java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bareun/dict_common.proto
package ai.bareun.protos;
public final class DictionaryCommonProto {
private DictionaryCommonProto() {}
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_bareun_DictSet_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_bareun_DictSet_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_bareun_DictSet_ItemsEntry_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_bareun_DictSet_ItemsEntry_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\030bareun/dict_common.proto\022\006bareun\"\220\001\n\007D" +
"ictSet\022)\n\005items\030\001 \003(\0132\032.bareun.DictSet.I" +
"temsEntry\022\036\n\004type\030\002 \001(\0162\020.bareun.DictTyp" +
"e\022\014\n\004name\030\n \001(\t\032,\n\nItemsEntry\022\013\n\003key\030\001 \001" +
"(\t\022\r\n\005value\030\002 \001(\005:\0028\001*B\n\010DictType\022\017\n\013TOK" +
"EN_INDEX\020\000\022\r\n\tWORD_LIST\020\001\022\026\n\022WORD_LIST_C" +
"OMPOUND\020\002BC\n\020ai.bareun.protosB\025Dictionar" +
"yCommonProtoP\001Z\026ai.bareun/proto/bareunb\006" +
"proto3"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
public com.google.protobuf.ExtensionRegistry assignDescriptors(
com.google.protobuf.Descriptors.FileDescriptor root) {
descriptor = root;
return null;
}
};
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
}, assigner);
internal_static_bareun_DictSet_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_bareun_DictSet_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_bareun_DictSet_descriptor,
new java.lang.String[] { "Items", "Type", "Name", });
internal_static_bareun_DictSet_ItemsEntry_descriptor =
internal_static_bareun_DictSet_descriptor.getNestedTypes().get(0);
internal_static_bareun_DictSet_ItemsEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_bareun_DictSet_ItemsEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
}
// @@protoc_insertion_point(outer_class_scope)
}
|
0
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun/protos/Document.java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bareun/language_service.proto
package ai.bareun.protos;
/**
* <pre>
* ################################################################ #
* Represents the input to API methods.
* </pre>
*
* Protobuf type {@code bareun.Document}
*/
public final class Document extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:bareun.Document)
DocumentOrBuilder {
private static final long serialVersionUID = 0L;
// Use Document.newBuilder() to construct.
private Document(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private Document() {
content_ = "";
language_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Document(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 18: {
java.lang.String s = input.readStringRequireUtf8();
content_ = s;
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
language_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_Document_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_Document_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.bareun.protos.Document.class, ai.bareun.protos.Document.Builder.class);
}
public static final int CONTENT_FIELD_NUMBER = 2;
private volatile java.lang.Object content_;
/**
* <pre>
* μ
λ ₯ μ 체μ λ΄μ©
* μ¬λ¬ λ¬Έμ₯μ΄ μ
λ ₯λλ©΄ "\n"μ λ£μ΄μ€λ€.
* </pre>
*
* <code>string content = 2;</code>
*/
public java.lang.String getContent() {
java.lang.Object ref = content_;
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();
content_ = s;
return s;
}
}
/**
* <pre>
* μ
λ ₯ μ 체μ λ΄μ©
* μ¬λ¬ λ¬Έμ₯μ΄ μ
λ ₯λλ©΄ "\n"μ λ£μ΄μ€λ€.
* </pre>
*
* <code>string content = 2;</code>
*/
public com.google.protobuf.ByteString
getContentBytes() {
java.lang.Object ref = content_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
content_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int LANGUAGE_FIELD_NUMBER = 4;
private volatile java.lang.Object language_;
/**
* <pre>
* λ¬Έμμ μΈμ΄. νμ¬λ ko_KR λ§ μ§μνλ€.
* </pre>
*
* <code>string language = 4;</code>
*/
public java.lang.String getLanguage() {
java.lang.Object ref = language_;
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();
language_ = s;
return s;
}
}
/**
* <pre>
* λ¬Έμμ μΈμ΄. νμ¬λ ko_KR λ§ μ§μνλ€.
* </pre>
*
* <code>string language = 4;</code>
*/
public com.google.protobuf.ByteString
getLanguageBytes() {
java.lang.Object ref = language_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
language_ = 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 (!getContentBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, content_);
}
if (!getLanguageBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, language_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getContentBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, content_);
}
if (!getLanguageBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, language_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof ai.bareun.protos.Document)) {
return super.equals(obj);
}
ai.bareun.protos.Document other = (ai.bareun.protos.Document) obj;
if (!getContent()
.equals(other.getContent())) return false;
if (!getLanguage()
.equals(other.getLanguage())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + CONTENT_FIELD_NUMBER;
hash = (53 * hash) + getContent().hashCode();
hash = (37 * hash) + LANGUAGE_FIELD_NUMBER;
hash = (53 * hash) + getLanguage().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static ai.bareun.protos.Document parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.Document parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.Document parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.Document parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.Document parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.Document parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.Document parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.bareun.protos.Document 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.bareun.protos.Document parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static ai.bareun.protos.Document 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.bareun.protos.Document parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.bareun.protos.Document 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.bareun.protos.Document 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>
* ################################################################ #
* Represents the input to API methods.
* </pre>
*
* Protobuf type {@code bareun.Document}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:bareun.Document)
ai.bareun.protos.DocumentOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_Document_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_Document_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.bareun.protos.Document.class, ai.bareun.protos.Document.Builder.class);
}
// Construct using ai.bareun.protos.Document.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
content_ = "";
language_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_Document_descriptor;
}
@java.lang.Override
public ai.bareun.protos.Document getDefaultInstanceForType() {
return ai.bareun.protos.Document.getDefaultInstance();
}
@java.lang.Override
public ai.bareun.protos.Document build() {
ai.bareun.protos.Document result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ai.bareun.protos.Document buildPartial() {
ai.bareun.protos.Document result = new ai.bareun.protos.Document(this);
result.content_ = content_;
result.language_ = language_;
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.bareun.protos.Document) {
return mergeFrom((ai.bareun.protos.Document)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ai.bareun.protos.Document other) {
if (other == ai.bareun.protos.Document.getDefaultInstance()) return this;
if (!other.getContent().isEmpty()) {
content_ = other.content_;
onChanged();
}
if (!other.getLanguage().isEmpty()) {
language_ = other.language_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
ai.bareun.protos.Document parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (ai.bareun.protos.Document) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object content_ = "";
/**
* <pre>
* μ
λ ₯ μ 체μ λ΄μ©
* μ¬λ¬ λ¬Έμ₯μ΄ μ
λ ₯λλ©΄ "\n"μ λ£μ΄μ€λ€.
* </pre>
*
* <code>string content = 2;</code>
*/
public java.lang.String getContent() {
java.lang.Object ref = content_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
content_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* μ
λ ₯ μ 체μ λ΄μ©
* μ¬λ¬ λ¬Έμ₯μ΄ μ
λ ₯λλ©΄ "\n"μ λ£μ΄μ€λ€.
* </pre>
*
* <code>string content = 2;</code>
*/
public com.google.protobuf.ByteString
getContentBytes() {
java.lang.Object ref = content_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
content_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* μ
λ ₯ μ 체μ λ΄μ©
* μ¬λ¬ λ¬Έμ₯μ΄ μ
λ ₯λλ©΄ "\n"μ λ£μ΄μ€λ€.
* </pre>
*
* <code>string content = 2;</code>
*/
public Builder setContent(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
content_ = value;
onChanged();
return this;
}
/**
* <pre>
* μ
λ ₯ μ 체μ λ΄μ©
* μ¬λ¬ λ¬Έμ₯μ΄ μ
λ ₯λλ©΄ "\n"μ λ£μ΄μ€λ€.
* </pre>
*
* <code>string content = 2;</code>
*/
public Builder clearContent() {
content_ = getDefaultInstance().getContent();
onChanged();
return this;
}
/**
* <pre>
* μ
λ ₯ μ 체μ λ΄μ©
* μ¬λ¬ λ¬Έμ₯μ΄ μ
λ ₯λλ©΄ "\n"μ λ£μ΄μ€λ€.
* </pre>
*
* <code>string content = 2;</code>
*/
public Builder setContentBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
content_ = value;
onChanged();
return this;
}
private java.lang.Object language_ = "";
/**
* <pre>
* λ¬Έμμ μΈμ΄. νμ¬λ ko_KR λ§ μ§μνλ€.
* </pre>
*
* <code>string language = 4;</code>
*/
public java.lang.String getLanguage() {
java.lang.Object ref = language_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
language_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* λ¬Έμμ μΈμ΄. νμ¬λ ko_KR λ§ μ§μνλ€.
* </pre>
*
* <code>string language = 4;</code>
*/
public com.google.protobuf.ByteString
getLanguageBytes() {
java.lang.Object ref = language_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
language_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* λ¬Έμμ μΈμ΄. νμ¬λ ko_KR λ§ μ§μνλ€.
* </pre>
*
* <code>string language = 4;</code>
*/
public Builder setLanguage(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
language_ = value;
onChanged();
return this;
}
/**
* <pre>
* λ¬Έμμ μΈμ΄. νμ¬λ ko_KR λ§ μ§μνλ€.
* </pre>
*
* <code>string language = 4;</code>
*/
public Builder clearLanguage() {
language_ = getDefaultInstance().getLanguage();
onChanged();
return this;
}
/**
* <pre>
* λ¬Έμμ μΈμ΄. νμ¬λ ko_KR λ§ μ§μνλ€.
* </pre>
*
* <code>string language = 4;</code>
*/
public Builder setLanguageBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
language_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:bareun.Document)
}
// @@protoc_insertion_point(class_scope:bareun.Document)
private static final ai.bareun.protos.Document DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new ai.bareun.protos.Document();
}
public static ai.bareun.protos.Document getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<Document>
PARSER = new com.google.protobuf.AbstractParser<Document>() {
@java.lang.Override
public Document parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Document(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<Document> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<Document> getParserForType() {
return PARSER;
}
@java.lang.Override
public ai.bareun.protos.Document getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
|
0
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun/protos/DocumentOrBuilder.java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bareun/language_service.proto
package ai.bareun.protos;
public interface DocumentOrBuilder extends
// @@protoc_insertion_point(interface_extends:bareun.Document)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* μ
λ ₯ μ 체μ λ΄μ©
* μ¬λ¬ λ¬Έμ₯μ΄ μ
λ ₯λλ©΄ "\n"μ λ£μ΄μ€λ€.
* </pre>
*
* <code>string content = 2;</code>
*/
java.lang.String getContent();
/**
* <pre>
* μ
λ ₯ μ 체μ λ΄μ©
* μ¬λ¬ λ¬Έμ₯μ΄ μ
λ ₯λλ©΄ "\n"μ λ£μ΄μ€λ€.
* </pre>
*
* <code>string content = 2;</code>
*/
com.google.protobuf.ByteString
getContentBytes();
/**
* <pre>
* λ¬Έμμ μΈμ΄. νμ¬λ ko_KR λ§ μ§μνλ€.
* </pre>
*
* <code>string language = 4;</code>
*/
java.lang.String getLanguage();
/**
* <pre>
* λ¬Έμμ μΈμ΄. νμ¬λ ko_KR λ§ μ§μνλ€.
* </pre>
*
* <code>string language = 4;</code>
*/
com.google.protobuf.ByteString
getLanguageBytes();
}
|
0
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun/protos/EncodingType.java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bareun/language_service.proto
package ai.bareun.protos;
/**
* <pre>
* Represents the text encoding that the caller uses to process the output.
* Providing an `EncodingType` is recommended because the API provides the
* beginning offsets for various outputs, such as tokens and mentions, and
* languages that natively use different text encodings may access offsets
* differently.
* </pre>
*
* Protobuf enum {@code bareun.EncodingType}
*/
public enum EncodingType
implements com.google.protobuf.ProtocolMessageEnum {
/**
* <pre>
* If `EncodingType` is not specified, encoding-dependent information (such as
* `begin_offset`) will be set at `-1`.
* </pre>
*
* <code>NONE = 0;</code>
*/
NONE(0),
/**
* <pre>
* Encoding-dependent information (such as `begin_offset`) is calculated based
* on the UTF-8 encoding of the input. C++ and Go are examples of languages
* that use this encoding natively.
* </pre>
*
* <code>UTF8 = 1;</code>
*/
UTF8(1),
/**
* <pre>
* Encoding-dependent information (such as `begin_offset`) is calculated based
* on the UTF-16 encoding of the input. Java and JavaScript are examples of
* languages that use this encoding natively.
* </pre>
*
* <code>UTF16 = 2;</code>
*/
UTF16(2),
/**
* <pre>
* Encoding-dependent information (such as `begin_offset`) is calculated based
* on the UTF-32 encoding of the input. Python is an example of a language
* that uses this encoding natively.
* </pre>
*
* <code>UTF32 = 3;</code>
*/
UTF32(3),
UNRECOGNIZED(-1),
;
/**
* <pre>
* If `EncodingType` is not specified, encoding-dependent information (such as
* `begin_offset`) will be set at `-1`.
* </pre>
*
* <code>NONE = 0;</code>
*/
public static final int NONE_VALUE = 0;
/**
* <pre>
* Encoding-dependent information (such as `begin_offset`) is calculated based
* on the UTF-8 encoding of the input. C++ and Go are examples of languages
* that use this encoding natively.
* </pre>
*
* <code>UTF8 = 1;</code>
*/
public static final int UTF8_VALUE = 1;
/**
* <pre>
* Encoding-dependent information (such as `begin_offset`) is calculated based
* on the UTF-16 encoding of the input. Java and JavaScript are examples of
* languages that use this encoding natively.
* </pre>
*
* <code>UTF16 = 2;</code>
*/
public static final int UTF16_VALUE = 2;
/**
* <pre>
* Encoding-dependent information (such as `begin_offset`) is calculated based
* on the UTF-32 encoding of the input. Python is an example of a language
* that uses this encoding natively.
* </pre>
*
* <code>UTF32 = 3;</code>
*/
public static final int UTF32_VALUE = 3;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static EncodingType valueOf(int value) {
return forNumber(value);
}
public static EncodingType forNumber(int value) {
switch (value) {
case 0: return NONE;
case 1: return UTF8;
case 2: return UTF16;
case 3: return UTF32;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap<EncodingType>
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
EncodingType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap<EncodingType>() {
public EncodingType findValueByNumber(int number) {
return EncodingType.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return ai.bareun.protos.LanguageServiceProto.getDescriptor().getEnumTypes().get(0);
}
private static final EncodingType[] VALUES = values();
public static EncodingType valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private EncodingType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:bareun.EncodingType)
}
|
0
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun/protos/GetCustomDictionaryListResponse.java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bareun/custom_dict.proto
package ai.bareun.protos;
/**
* <pre>
* 컀μ€ν
μ¬μ λͺ©λ‘μ κ°μ Έμ¨λ€.
* </pre>
*
* Protobuf type {@code bareun.GetCustomDictionaryListResponse}
*/
public final class GetCustomDictionaryListResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:bareun.GetCustomDictionaryListResponse)
GetCustomDictionaryListResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use GetCustomDictionaryListResponse.newBuilder() to construct.
private GetCustomDictionaryListResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private GetCustomDictionaryListResponse() {
domainDicts_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private GetCustomDictionaryListResponse(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
domainDicts_ = new java.util.ArrayList<ai.bareun.protos.CustomDictionaryMeta>();
mutable_bitField0_ |= 0x00000001;
}
domainDicts_.add(
input.readMessage(ai.bareun.protos.CustomDictionaryMeta.parser(), extensionRegistry));
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
domainDicts_ = java.util.Collections.unmodifiableList(domainDicts_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_GetCustomDictionaryListResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_GetCustomDictionaryListResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.bareun.protos.GetCustomDictionaryListResponse.class, ai.bareun.protos.GetCustomDictionaryListResponse.Builder.class);
}
public static final int DOMAIN_DICTS_FIELD_NUMBER = 1;
private java.util.List<ai.bareun.protos.CustomDictionaryMeta> domainDicts_;
/**
* <code>repeated .bareun.CustomDictionaryMeta domain_dicts = 1;</code>
*/
public java.util.List<ai.bareun.protos.CustomDictionaryMeta> getDomainDictsList() {
return domainDicts_;
}
/**
* <code>repeated .bareun.CustomDictionaryMeta domain_dicts = 1;</code>
*/
public java.util.List<? extends ai.bareun.protos.CustomDictionaryMetaOrBuilder>
getDomainDictsOrBuilderList() {
return domainDicts_;
}
/**
* <code>repeated .bareun.CustomDictionaryMeta domain_dicts = 1;</code>
*/
public int getDomainDictsCount() {
return domainDicts_.size();
}
/**
* <code>repeated .bareun.CustomDictionaryMeta domain_dicts = 1;</code>
*/
public ai.bareun.protos.CustomDictionaryMeta getDomainDicts(int index) {
return domainDicts_.get(index);
}
/**
* <code>repeated .bareun.CustomDictionaryMeta domain_dicts = 1;</code>
*/
public ai.bareun.protos.CustomDictionaryMetaOrBuilder getDomainDictsOrBuilder(
int index) {
return domainDicts_.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 < domainDicts_.size(); i++) {
output.writeMessage(1, domainDicts_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < domainDicts_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, domainDicts_.get(i));
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof ai.bareun.protos.GetCustomDictionaryListResponse)) {
return super.equals(obj);
}
ai.bareun.protos.GetCustomDictionaryListResponse other = (ai.bareun.protos.GetCustomDictionaryListResponse) obj;
if (!getDomainDictsList()
.equals(other.getDomainDictsList())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getDomainDictsCount() > 0) {
hash = (37 * hash) + DOMAIN_DICTS_FIELD_NUMBER;
hash = (53 * hash) + getDomainDictsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static ai.bareun.protos.GetCustomDictionaryListResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.GetCustomDictionaryListResponse parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.GetCustomDictionaryListResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.GetCustomDictionaryListResponse parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.GetCustomDictionaryListResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.GetCustomDictionaryListResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.GetCustomDictionaryListResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.bareun.protos.GetCustomDictionaryListResponse 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.bareun.protos.GetCustomDictionaryListResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static ai.bareun.protos.GetCustomDictionaryListResponse 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.bareun.protos.GetCustomDictionaryListResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.bareun.protos.GetCustomDictionaryListResponse 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.bareun.protos.GetCustomDictionaryListResponse 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>
* 컀μ€ν
μ¬μ λͺ©λ‘μ κ°μ Έμ¨λ€.
* </pre>
*
* Protobuf type {@code bareun.GetCustomDictionaryListResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:bareun.GetCustomDictionaryListResponse)
ai.bareun.protos.GetCustomDictionaryListResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_GetCustomDictionaryListResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_GetCustomDictionaryListResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.bareun.protos.GetCustomDictionaryListResponse.class, ai.bareun.protos.GetCustomDictionaryListResponse.Builder.class);
}
// Construct using ai.bareun.protos.GetCustomDictionaryListResponse.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getDomainDictsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (domainDictsBuilder_ == null) {
domainDicts_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
domainDictsBuilder_.clear();
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_GetCustomDictionaryListResponse_descriptor;
}
@java.lang.Override
public ai.bareun.protos.GetCustomDictionaryListResponse getDefaultInstanceForType() {
return ai.bareun.protos.GetCustomDictionaryListResponse.getDefaultInstance();
}
@java.lang.Override
public ai.bareun.protos.GetCustomDictionaryListResponse build() {
ai.bareun.protos.GetCustomDictionaryListResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ai.bareun.protos.GetCustomDictionaryListResponse buildPartial() {
ai.bareun.protos.GetCustomDictionaryListResponse result = new ai.bareun.protos.GetCustomDictionaryListResponse(this);
int from_bitField0_ = bitField0_;
if (domainDictsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
domainDicts_ = java.util.Collections.unmodifiableList(domainDicts_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.domainDicts_ = domainDicts_;
} else {
result.domainDicts_ = domainDictsBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof ai.bareun.protos.GetCustomDictionaryListResponse) {
return mergeFrom((ai.bareun.protos.GetCustomDictionaryListResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ai.bareun.protos.GetCustomDictionaryListResponse other) {
if (other == ai.bareun.protos.GetCustomDictionaryListResponse.getDefaultInstance()) return this;
if (domainDictsBuilder_ == null) {
if (!other.domainDicts_.isEmpty()) {
if (domainDicts_.isEmpty()) {
domainDicts_ = other.domainDicts_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureDomainDictsIsMutable();
domainDicts_.addAll(other.domainDicts_);
}
onChanged();
}
} else {
if (!other.domainDicts_.isEmpty()) {
if (domainDictsBuilder_.isEmpty()) {
domainDictsBuilder_.dispose();
domainDictsBuilder_ = null;
domainDicts_ = other.domainDicts_;
bitField0_ = (bitField0_ & ~0x00000001);
domainDictsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getDomainDictsFieldBuilder() : null;
} else {
domainDictsBuilder_.addAllMessages(other.domainDicts_);
}
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
ai.bareun.protos.GetCustomDictionaryListResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (ai.bareun.protos.GetCustomDictionaryListResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List<ai.bareun.protos.CustomDictionaryMeta> domainDicts_ =
java.util.Collections.emptyList();
private void ensureDomainDictsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
domainDicts_ = new java.util.ArrayList<ai.bareun.protos.CustomDictionaryMeta>(domainDicts_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
ai.bareun.protos.CustomDictionaryMeta, ai.bareun.protos.CustomDictionaryMeta.Builder, ai.bareun.protos.CustomDictionaryMetaOrBuilder> domainDictsBuilder_;
/**
* <code>repeated .bareun.CustomDictionaryMeta domain_dicts = 1;</code>
*/
public java.util.List<ai.bareun.protos.CustomDictionaryMeta> getDomainDictsList() {
if (domainDictsBuilder_ == null) {
return java.util.Collections.unmodifiableList(domainDicts_);
} else {
return domainDictsBuilder_.getMessageList();
}
}
/**
* <code>repeated .bareun.CustomDictionaryMeta domain_dicts = 1;</code>
*/
public int getDomainDictsCount() {
if (domainDictsBuilder_ == null) {
return domainDicts_.size();
} else {
return domainDictsBuilder_.getCount();
}
}
/**
* <code>repeated .bareun.CustomDictionaryMeta domain_dicts = 1;</code>
*/
public ai.bareun.protos.CustomDictionaryMeta getDomainDicts(int index) {
if (domainDictsBuilder_ == null) {
return domainDicts_.get(index);
} else {
return domainDictsBuilder_.getMessage(index);
}
}
/**
* <code>repeated .bareun.CustomDictionaryMeta domain_dicts = 1;</code>
*/
public Builder setDomainDicts(
int index, ai.bareun.protos.CustomDictionaryMeta value) {
if (domainDictsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDomainDictsIsMutable();
domainDicts_.set(index, value);
onChanged();
} else {
domainDictsBuilder_.setMessage(index, value);
}
return this;
}
/**
* <code>repeated .bareun.CustomDictionaryMeta domain_dicts = 1;</code>
*/
public Builder setDomainDicts(
int index, ai.bareun.protos.CustomDictionaryMeta.Builder builderForValue) {
if (domainDictsBuilder_ == null) {
ensureDomainDictsIsMutable();
domainDicts_.set(index, builderForValue.build());
onChanged();
} else {
domainDictsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* <code>repeated .bareun.CustomDictionaryMeta domain_dicts = 1;</code>
*/
public Builder addDomainDicts(ai.bareun.protos.CustomDictionaryMeta value) {
if (domainDictsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDomainDictsIsMutable();
domainDicts_.add(value);
onChanged();
} else {
domainDictsBuilder_.addMessage(value);
}
return this;
}
/**
* <code>repeated .bareun.CustomDictionaryMeta domain_dicts = 1;</code>
*/
public Builder addDomainDicts(
int index, ai.bareun.protos.CustomDictionaryMeta value) {
if (domainDictsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDomainDictsIsMutable();
domainDicts_.add(index, value);
onChanged();
} else {
domainDictsBuilder_.addMessage(index, value);
}
return this;
}
/**
* <code>repeated .bareun.CustomDictionaryMeta domain_dicts = 1;</code>
*/
public Builder addDomainDicts(
ai.bareun.protos.CustomDictionaryMeta.Builder builderForValue) {
if (domainDictsBuilder_ == null) {
ensureDomainDictsIsMutable();
domainDicts_.add(builderForValue.build());
onChanged();
} else {
domainDictsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* <code>repeated .bareun.CustomDictionaryMeta domain_dicts = 1;</code>
*/
public Builder addDomainDicts(
int index, ai.bareun.protos.CustomDictionaryMeta.Builder builderForValue) {
if (domainDictsBuilder_ == null) {
ensureDomainDictsIsMutable();
domainDicts_.add(index, builderForValue.build());
onChanged();
} else {
domainDictsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* <code>repeated .bareun.CustomDictionaryMeta domain_dicts = 1;</code>
*/
public Builder addAllDomainDicts(
java.lang.Iterable<? extends ai.bareun.protos.CustomDictionaryMeta> values) {
if (domainDictsBuilder_ == null) {
ensureDomainDictsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, domainDicts_);
onChanged();
} else {
domainDictsBuilder_.addAllMessages(values);
}
return this;
}
/**
* <code>repeated .bareun.CustomDictionaryMeta domain_dicts = 1;</code>
*/
public Builder clearDomainDicts() {
if (domainDictsBuilder_ == null) {
domainDicts_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
domainDictsBuilder_.clear();
}
return this;
}
/**
* <code>repeated .bareun.CustomDictionaryMeta domain_dicts = 1;</code>
*/
public Builder removeDomainDicts(int index) {
if (domainDictsBuilder_ == null) {
ensureDomainDictsIsMutable();
domainDicts_.remove(index);
onChanged();
} else {
domainDictsBuilder_.remove(index);
}
return this;
}
/**
* <code>repeated .bareun.CustomDictionaryMeta domain_dicts = 1;</code>
*/
public ai.bareun.protos.CustomDictionaryMeta.Builder getDomainDictsBuilder(
int index) {
return getDomainDictsFieldBuilder().getBuilder(index);
}
/**
* <code>repeated .bareun.CustomDictionaryMeta domain_dicts = 1;</code>
*/
public ai.bareun.protos.CustomDictionaryMetaOrBuilder getDomainDictsOrBuilder(
int index) {
if (domainDictsBuilder_ == null) {
return domainDicts_.get(index); } else {
return domainDictsBuilder_.getMessageOrBuilder(index);
}
}
/**
* <code>repeated .bareun.CustomDictionaryMeta domain_dicts = 1;</code>
*/
public java.util.List<? extends ai.bareun.protos.CustomDictionaryMetaOrBuilder>
getDomainDictsOrBuilderList() {
if (domainDictsBuilder_ != null) {
return domainDictsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(domainDicts_);
}
}
/**
* <code>repeated .bareun.CustomDictionaryMeta domain_dicts = 1;</code>
*/
public ai.bareun.protos.CustomDictionaryMeta.Builder addDomainDictsBuilder() {
return getDomainDictsFieldBuilder().addBuilder(
ai.bareun.protos.CustomDictionaryMeta.getDefaultInstance());
}
/**
* <code>repeated .bareun.CustomDictionaryMeta domain_dicts = 1;</code>
*/
public ai.bareun.protos.CustomDictionaryMeta.Builder addDomainDictsBuilder(
int index) {
return getDomainDictsFieldBuilder().addBuilder(
index, ai.bareun.protos.CustomDictionaryMeta.getDefaultInstance());
}
/**
* <code>repeated .bareun.CustomDictionaryMeta domain_dicts = 1;</code>
*/
public java.util.List<ai.bareun.protos.CustomDictionaryMeta.Builder>
getDomainDictsBuilderList() {
return getDomainDictsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
ai.bareun.protos.CustomDictionaryMeta, ai.bareun.protos.CustomDictionaryMeta.Builder, ai.bareun.protos.CustomDictionaryMetaOrBuilder>
getDomainDictsFieldBuilder() {
if (domainDictsBuilder_ == null) {
domainDictsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
ai.bareun.protos.CustomDictionaryMeta, ai.bareun.protos.CustomDictionaryMeta.Builder, ai.bareun.protos.CustomDictionaryMetaOrBuilder>(
domainDicts_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
domainDicts_ = null;
}
return domainDictsBuilder_;
}
@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:bareun.GetCustomDictionaryListResponse)
}
// @@protoc_insertion_point(class_scope:bareun.GetCustomDictionaryListResponse)
private static final ai.bareun.protos.GetCustomDictionaryListResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new ai.bareun.protos.GetCustomDictionaryListResponse();
}
public static ai.bareun.protos.GetCustomDictionaryListResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<GetCustomDictionaryListResponse>
PARSER = new com.google.protobuf.AbstractParser<GetCustomDictionaryListResponse>() {
@java.lang.Override
public GetCustomDictionaryListResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new GetCustomDictionaryListResponse(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<GetCustomDictionaryListResponse> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<GetCustomDictionaryListResponse> getParserForType() {
return PARSER;
}
@java.lang.Override
public ai.bareun.protos.GetCustomDictionaryListResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
|
0
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun/protos/GetCustomDictionaryListResponseOrBuilder.java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bareun/custom_dict.proto
package ai.bareun.protos;
public interface GetCustomDictionaryListResponseOrBuilder extends
// @@protoc_insertion_point(interface_extends:bareun.GetCustomDictionaryListResponse)
com.google.protobuf.MessageOrBuilder {
/**
* <code>repeated .bareun.CustomDictionaryMeta domain_dicts = 1;</code>
*/
java.util.List<ai.bareun.protos.CustomDictionaryMeta>
getDomainDictsList();
/**
* <code>repeated .bareun.CustomDictionaryMeta domain_dicts = 1;</code>
*/
ai.bareun.protos.CustomDictionaryMeta getDomainDicts(int index);
/**
* <code>repeated .bareun.CustomDictionaryMeta domain_dicts = 1;</code>
*/
int getDomainDictsCount();
/**
* <code>repeated .bareun.CustomDictionaryMeta domain_dicts = 1;</code>
*/
java.util.List<? extends ai.bareun.protos.CustomDictionaryMetaOrBuilder>
getDomainDictsOrBuilderList();
/**
* <code>repeated .bareun.CustomDictionaryMeta domain_dicts = 1;</code>
*/
ai.bareun.protos.CustomDictionaryMetaOrBuilder getDomainDictsOrBuilder(
int index);
}
|
0
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun/protos/GetCustomDictionaryRequest.java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bareun/custom_dict.proto
package ai.bareun.protos;
/**
* Protobuf type {@code bareun.GetCustomDictionaryRequest}
*/
public final class GetCustomDictionaryRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:bareun.GetCustomDictionaryRequest)
GetCustomDictionaryRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use GetCustomDictionaryRequest.newBuilder() to construct.
private GetCustomDictionaryRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private GetCustomDictionaryRequest() {
domainName_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private GetCustomDictionaryRequest(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
domainName_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_GetCustomDictionaryRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_GetCustomDictionaryRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.bareun.protos.GetCustomDictionaryRequest.class, ai.bareun.protos.GetCustomDictionaryRequest.Builder.class);
}
public static final int DOMAIN_NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object domainName_;
/**
* <code>string domain_name = 1;</code>
*/
public java.lang.String getDomainName() {
java.lang.Object ref = domainName_;
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();
domainName_ = s;
return s;
}
}
/**
* <code>string domain_name = 1;</code>
*/
public com.google.protobuf.ByteString
getDomainNameBytes() {
java.lang.Object ref = domainName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
domainName_ = 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 (!getDomainNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, domainName_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getDomainNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, domainName_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof ai.bareun.protos.GetCustomDictionaryRequest)) {
return super.equals(obj);
}
ai.bareun.protos.GetCustomDictionaryRequest other = (ai.bareun.protos.GetCustomDictionaryRequest) obj;
if (!getDomainName()
.equals(other.getDomainName())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + DOMAIN_NAME_FIELD_NUMBER;
hash = (53 * hash) + getDomainName().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static ai.bareun.protos.GetCustomDictionaryRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.GetCustomDictionaryRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.GetCustomDictionaryRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.GetCustomDictionaryRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.GetCustomDictionaryRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.GetCustomDictionaryRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.GetCustomDictionaryRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.bareun.protos.GetCustomDictionaryRequest 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.bareun.protos.GetCustomDictionaryRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static ai.bareun.protos.GetCustomDictionaryRequest 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.bareun.protos.GetCustomDictionaryRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.bareun.protos.GetCustomDictionaryRequest 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.bareun.protos.GetCustomDictionaryRequest 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 bareun.GetCustomDictionaryRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:bareun.GetCustomDictionaryRequest)
ai.bareun.protos.GetCustomDictionaryRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_GetCustomDictionaryRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_GetCustomDictionaryRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.bareun.protos.GetCustomDictionaryRequest.class, ai.bareun.protos.GetCustomDictionaryRequest.Builder.class);
}
// Construct using ai.bareun.protos.GetCustomDictionaryRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
domainName_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_GetCustomDictionaryRequest_descriptor;
}
@java.lang.Override
public ai.bareun.protos.GetCustomDictionaryRequest getDefaultInstanceForType() {
return ai.bareun.protos.GetCustomDictionaryRequest.getDefaultInstance();
}
@java.lang.Override
public ai.bareun.protos.GetCustomDictionaryRequest build() {
ai.bareun.protos.GetCustomDictionaryRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ai.bareun.protos.GetCustomDictionaryRequest buildPartial() {
ai.bareun.protos.GetCustomDictionaryRequest result = new ai.bareun.protos.GetCustomDictionaryRequest(this);
result.domainName_ = domainName_;
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.bareun.protos.GetCustomDictionaryRequest) {
return mergeFrom((ai.bareun.protos.GetCustomDictionaryRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ai.bareun.protos.GetCustomDictionaryRequest other) {
if (other == ai.bareun.protos.GetCustomDictionaryRequest.getDefaultInstance()) return this;
if (!other.getDomainName().isEmpty()) {
domainName_ = other.domainName_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
ai.bareun.protos.GetCustomDictionaryRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (ai.bareun.protos.GetCustomDictionaryRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object domainName_ = "";
/**
* <code>string domain_name = 1;</code>
*/
public java.lang.String getDomainName() {
java.lang.Object ref = domainName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
domainName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <code>string domain_name = 1;</code>
*/
public com.google.protobuf.ByteString
getDomainNameBytes() {
java.lang.Object ref = domainName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
domainName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <code>string domain_name = 1;</code>
*/
public Builder setDomainName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
domainName_ = value;
onChanged();
return this;
}
/**
* <code>string domain_name = 1;</code>
*/
public Builder clearDomainName() {
domainName_ = getDefaultInstance().getDomainName();
onChanged();
return this;
}
/**
* <code>string domain_name = 1;</code>
*/
public Builder setDomainNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
domainName_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:bareun.GetCustomDictionaryRequest)
}
// @@protoc_insertion_point(class_scope:bareun.GetCustomDictionaryRequest)
private static final ai.bareun.protos.GetCustomDictionaryRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new ai.bareun.protos.GetCustomDictionaryRequest();
}
public static ai.bareun.protos.GetCustomDictionaryRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<GetCustomDictionaryRequest>
PARSER = new com.google.protobuf.AbstractParser<GetCustomDictionaryRequest>() {
@java.lang.Override
public GetCustomDictionaryRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new GetCustomDictionaryRequest(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<GetCustomDictionaryRequest> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<GetCustomDictionaryRequest> getParserForType() {
return PARSER;
}
@java.lang.Override
public ai.bareun.protos.GetCustomDictionaryRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
|
0
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun/protos/GetCustomDictionaryRequestOrBuilder.java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bareun/custom_dict.proto
package ai.bareun.protos;
public interface GetCustomDictionaryRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:bareun.GetCustomDictionaryRequest)
com.google.protobuf.MessageOrBuilder {
/**
* <code>string domain_name = 1;</code>
*/
java.lang.String getDomainName();
/**
* <code>string domain_name = 1;</code>
*/
com.google.protobuf.ByteString
getDomainNameBytes();
}
|
0
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun/protos/GetCustomDictionaryResponse.java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bareun/custom_dict.proto
package ai.bareun.protos;
/**
* Protobuf type {@code bareun.GetCustomDictionaryResponse}
*/
public final class GetCustomDictionaryResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:bareun.GetCustomDictionaryResponse)
GetCustomDictionaryResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use GetCustomDictionaryResponse.newBuilder() to construct.
private GetCustomDictionaryResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private GetCustomDictionaryResponse() {
domainName_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private GetCustomDictionaryResponse(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
domainName_ = s;
break;
}
case 18: {
ai.bareun.protos.CustomDictionary.Builder subBuilder = null;
if (dict_ != null) {
subBuilder = dict_.toBuilder();
}
dict_ = input.readMessage(ai.bareun.protos.CustomDictionary.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(dict_);
dict_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_GetCustomDictionaryResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_GetCustomDictionaryResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.bareun.protos.GetCustomDictionaryResponse.class, ai.bareun.protos.GetCustomDictionaryResponse.Builder.class);
}
public static final int DOMAIN_NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object domainName_;
/**
* <code>string domain_name = 1;</code>
*/
public java.lang.String getDomainName() {
java.lang.Object ref = domainName_;
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();
domainName_ = s;
return s;
}
}
/**
* <code>string domain_name = 1;</code>
*/
public com.google.protobuf.ByteString
getDomainNameBytes() {
java.lang.Object ref = domainName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
domainName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DICT_FIELD_NUMBER = 2;
private ai.bareun.protos.CustomDictionary dict_;
/**
* <code>.bareun.CustomDictionary dict = 2;</code>
*/
public boolean hasDict() {
return dict_ != null;
}
/**
* <code>.bareun.CustomDictionary dict = 2;</code>
*/
public ai.bareun.protos.CustomDictionary getDict() {
return dict_ == null ? ai.bareun.protos.CustomDictionary.getDefaultInstance() : dict_;
}
/**
* <code>.bareun.CustomDictionary dict = 2;</code>
*/
public ai.bareun.protos.CustomDictionaryOrBuilder getDictOrBuilder() {
return getDict();
}
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 (!getDomainNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, domainName_);
}
if (dict_ != null) {
output.writeMessage(2, getDict());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getDomainNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, domainName_);
}
if (dict_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getDict());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof ai.bareun.protos.GetCustomDictionaryResponse)) {
return super.equals(obj);
}
ai.bareun.protos.GetCustomDictionaryResponse other = (ai.bareun.protos.GetCustomDictionaryResponse) obj;
if (!getDomainName()
.equals(other.getDomainName())) return false;
if (hasDict() != other.hasDict()) return false;
if (hasDict()) {
if (!getDict()
.equals(other.getDict())) return false;
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + DOMAIN_NAME_FIELD_NUMBER;
hash = (53 * hash) + getDomainName().hashCode();
if (hasDict()) {
hash = (37 * hash) + DICT_FIELD_NUMBER;
hash = (53 * hash) + getDict().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static ai.bareun.protos.GetCustomDictionaryResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.GetCustomDictionaryResponse parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.GetCustomDictionaryResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.GetCustomDictionaryResponse parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.GetCustomDictionaryResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.GetCustomDictionaryResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.GetCustomDictionaryResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.bareun.protos.GetCustomDictionaryResponse 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.bareun.protos.GetCustomDictionaryResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static ai.bareun.protos.GetCustomDictionaryResponse 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.bareun.protos.GetCustomDictionaryResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.bareun.protos.GetCustomDictionaryResponse 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.bareun.protos.GetCustomDictionaryResponse 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 bareun.GetCustomDictionaryResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:bareun.GetCustomDictionaryResponse)
ai.bareun.protos.GetCustomDictionaryResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_GetCustomDictionaryResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_GetCustomDictionaryResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.bareun.protos.GetCustomDictionaryResponse.class, ai.bareun.protos.GetCustomDictionaryResponse.Builder.class);
}
// Construct using ai.bareun.protos.GetCustomDictionaryResponse.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
domainName_ = "";
if (dictBuilder_ == null) {
dict_ = null;
} else {
dict_ = null;
dictBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_GetCustomDictionaryResponse_descriptor;
}
@java.lang.Override
public ai.bareun.protos.GetCustomDictionaryResponse getDefaultInstanceForType() {
return ai.bareun.protos.GetCustomDictionaryResponse.getDefaultInstance();
}
@java.lang.Override
public ai.bareun.protos.GetCustomDictionaryResponse build() {
ai.bareun.protos.GetCustomDictionaryResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ai.bareun.protos.GetCustomDictionaryResponse buildPartial() {
ai.bareun.protos.GetCustomDictionaryResponse result = new ai.bareun.protos.GetCustomDictionaryResponse(this);
result.domainName_ = domainName_;
if (dictBuilder_ == null) {
result.dict_ = dict_;
} else {
result.dict_ = dictBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof ai.bareun.protos.GetCustomDictionaryResponse) {
return mergeFrom((ai.bareun.protos.GetCustomDictionaryResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ai.bareun.protos.GetCustomDictionaryResponse other) {
if (other == ai.bareun.protos.GetCustomDictionaryResponse.getDefaultInstance()) return this;
if (!other.getDomainName().isEmpty()) {
domainName_ = other.domainName_;
onChanged();
}
if (other.hasDict()) {
mergeDict(other.getDict());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
ai.bareun.protos.GetCustomDictionaryResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (ai.bareun.protos.GetCustomDictionaryResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object domainName_ = "";
/**
* <code>string domain_name = 1;</code>
*/
public java.lang.String getDomainName() {
java.lang.Object ref = domainName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
domainName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <code>string domain_name = 1;</code>
*/
public com.google.protobuf.ByteString
getDomainNameBytes() {
java.lang.Object ref = domainName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
domainName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <code>string domain_name = 1;</code>
*/
public Builder setDomainName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
domainName_ = value;
onChanged();
return this;
}
/**
* <code>string domain_name = 1;</code>
*/
public Builder clearDomainName() {
domainName_ = getDefaultInstance().getDomainName();
onChanged();
return this;
}
/**
* <code>string domain_name = 1;</code>
*/
public Builder setDomainNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
domainName_ = value;
onChanged();
return this;
}
private ai.bareun.protos.CustomDictionary dict_;
private com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.CustomDictionary, ai.bareun.protos.CustomDictionary.Builder, ai.bareun.protos.CustomDictionaryOrBuilder> dictBuilder_;
/**
* <code>.bareun.CustomDictionary dict = 2;</code>
*/
public boolean hasDict() {
return dictBuilder_ != null || dict_ != null;
}
/**
* <code>.bareun.CustomDictionary dict = 2;</code>
*/
public ai.bareun.protos.CustomDictionary getDict() {
if (dictBuilder_ == null) {
return dict_ == null ? ai.bareun.protos.CustomDictionary.getDefaultInstance() : dict_;
} else {
return dictBuilder_.getMessage();
}
}
/**
* <code>.bareun.CustomDictionary dict = 2;</code>
*/
public Builder setDict(ai.bareun.protos.CustomDictionary value) {
if (dictBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
dict_ = value;
onChanged();
} else {
dictBuilder_.setMessage(value);
}
return this;
}
/**
* <code>.bareun.CustomDictionary dict = 2;</code>
*/
public Builder setDict(
ai.bareun.protos.CustomDictionary.Builder builderForValue) {
if (dictBuilder_ == null) {
dict_ = builderForValue.build();
onChanged();
} else {
dictBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* <code>.bareun.CustomDictionary dict = 2;</code>
*/
public Builder mergeDict(ai.bareun.protos.CustomDictionary value) {
if (dictBuilder_ == null) {
if (dict_ != null) {
dict_ =
ai.bareun.protos.CustomDictionary.newBuilder(dict_).mergeFrom(value).buildPartial();
} else {
dict_ = value;
}
onChanged();
} else {
dictBuilder_.mergeFrom(value);
}
return this;
}
/**
* <code>.bareun.CustomDictionary dict = 2;</code>
*/
public Builder clearDict() {
if (dictBuilder_ == null) {
dict_ = null;
onChanged();
} else {
dict_ = null;
dictBuilder_ = null;
}
return this;
}
/**
* <code>.bareun.CustomDictionary dict = 2;</code>
*/
public ai.bareun.protos.CustomDictionary.Builder getDictBuilder() {
onChanged();
return getDictFieldBuilder().getBuilder();
}
/**
* <code>.bareun.CustomDictionary dict = 2;</code>
*/
public ai.bareun.protos.CustomDictionaryOrBuilder getDictOrBuilder() {
if (dictBuilder_ != null) {
return dictBuilder_.getMessageOrBuilder();
} else {
return dict_ == null ?
ai.bareun.protos.CustomDictionary.getDefaultInstance() : dict_;
}
}
/**
* <code>.bareun.CustomDictionary dict = 2;</code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.CustomDictionary, ai.bareun.protos.CustomDictionary.Builder, ai.bareun.protos.CustomDictionaryOrBuilder>
getDictFieldBuilder() {
if (dictBuilder_ == null) {
dictBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.CustomDictionary, ai.bareun.protos.CustomDictionary.Builder, ai.bareun.protos.CustomDictionaryOrBuilder>(
getDict(),
getParentForChildren(),
isClean());
dict_ = null;
}
return dictBuilder_;
}
@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:bareun.GetCustomDictionaryResponse)
}
// @@protoc_insertion_point(class_scope:bareun.GetCustomDictionaryResponse)
private static final ai.bareun.protos.GetCustomDictionaryResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new ai.bareun.protos.GetCustomDictionaryResponse();
}
public static ai.bareun.protos.GetCustomDictionaryResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<GetCustomDictionaryResponse>
PARSER = new com.google.protobuf.AbstractParser<GetCustomDictionaryResponse>() {
@java.lang.Override
public GetCustomDictionaryResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new GetCustomDictionaryResponse(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<GetCustomDictionaryResponse> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<GetCustomDictionaryResponse> getParserForType() {
return PARSER;
}
@java.lang.Override
public ai.bareun.protos.GetCustomDictionaryResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
|
0
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun/protos/GetCustomDictionaryResponseOrBuilder.java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bareun/custom_dict.proto
package ai.bareun.protos;
public interface GetCustomDictionaryResponseOrBuilder extends
// @@protoc_insertion_point(interface_extends:bareun.GetCustomDictionaryResponse)
com.google.protobuf.MessageOrBuilder {
/**
* <code>string domain_name = 1;</code>
*/
java.lang.String getDomainName();
/**
* <code>string domain_name = 1;</code>
*/
com.google.protobuf.ByteString
getDomainNameBytes();
/**
* <code>.bareun.CustomDictionary dict = 2;</code>
*/
boolean hasDict();
/**
* <code>.bareun.CustomDictionary dict = 2;</code>
*/
ai.bareun.protos.CustomDictionary getDict();
/**
* <code>.bareun.CustomDictionary dict = 2;</code>
*/
ai.bareun.protos.CustomDictionaryOrBuilder getDictOrBuilder();
}
|
0
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun/protos/LanguageServiceGrpc.java
|
package ai.bareun.protos;
import static io.grpc.MethodDescriptor.generateFullMethodName;
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
import static io.grpc.stub.ClientCalls.asyncUnaryCall;
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
import static io.grpc.stub.ClientCalls.futureUnaryCall;
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
/**
* <pre>
* νκ΅μ΄μ λν λΆμ μλΉμ€λ₯Ό μ 곡νλ μλΉμ€.
* </pre>
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.21.0)",
comments = "Source: bareun/language_service.proto")
public final class LanguageServiceGrpc {
private LanguageServiceGrpc() {}
public static final String SERVICE_NAME = "bareun.LanguageService";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor<ai.bareun.protos.AnalyzeSyntaxRequest,
ai.bareun.protos.AnalyzeSyntaxResponse> getAnalyzeSyntaxMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "AnalyzeSyntax",
requestType = ai.bareun.protos.AnalyzeSyntaxRequest.class,
responseType = ai.bareun.protos.AnalyzeSyntaxResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<ai.bareun.protos.AnalyzeSyntaxRequest,
ai.bareun.protos.AnalyzeSyntaxResponse> getAnalyzeSyntaxMethod() {
io.grpc.MethodDescriptor<ai.bareun.protos.AnalyzeSyntaxRequest, ai.bareun.protos.AnalyzeSyntaxResponse> getAnalyzeSyntaxMethod;
if ((getAnalyzeSyntaxMethod = LanguageServiceGrpc.getAnalyzeSyntaxMethod) == null) {
synchronized (LanguageServiceGrpc.class) {
if ((getAnalyzeSyntaxMethod = LanguageServiceGrpc.getAnalyzeSyntaxMethod) == null) {
LanguageServiceGrpc.getAnalyzeSyntaxMethod = getAnalyzeSyntaxMethod =
io.grpc.MethodDescriptor.<ai.bareun.protos.AnalyzeSyntaxRequest, ai.bareun.protos.AnalyzeSyntaxResponse>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"bareun.LanguageService", "AnalyzeSyntax"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
ai.bareun.protos.AnalyzeSyntaxRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
ai.bareun.protos.AnalyzeSyntaxResponse.getDefaultInstance()))
.setSchemaDescriptor(new LanguageServiceMethodDescriptorSupplier("AnalyzeSyntax"))
.build();
}
}
}
return getAnalyzeSyntaxMethod;
}
private static volatile io.grpc.MethodDescriptor<ai.bareun.protos.AnalyzeSyntaxListRequest,
ai.bareun.protos.AnalyzeSyntaxListResponse> getAnalyzeSyntaxListMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "AnalyzeSyntaxList",
requestType = ai.bareun.protos.AnalyzeSyntaxListRequest.class,
responseType = ai.bareun.protos.AnalyzeSyntaxListResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<ai.bareun.protos.AnalyzeSyntaxListRequest,
ai.bareun.protos.AnalyzeSyntaxListResponse> getAnalyzeSyntaxListMethod() {
io.grpc.MethodDescriptor<ai.bareun.protos.AnalyzeSyntaxListRequest, ai.bareun.protos.AnalyzeSyntaxListResponse> getAnalyzeSyntaxListMethod;
if ((getAnalyzeSyntaxListMethod = LanguageServiceGrpc.getAnalyzeSyntaxListMethod) == null) {
synchronized (LanguageServiceGrpc.class) {
if ((getAnalyzeSyntaxListMethod = LanguageServiceGrpc.getAnalyzeSyntaxListMethod) == null) {
LanguageServiceGrpc.getAnalyzeSyntaxListMethod = getAnalyzeSyntaxListMethod =
io.grpc.MethodDescriptor.<ai.bareun.protos.AnalyzeSyntaxListRequest, ai.bareun.protos.AnalyzeSyntaxListResponse>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"bareun.LanguageService", "AnalyzeSyntaxList"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
ai.bareun.protos.AnalyzeSyntaxListRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
ai.bareun.protos.AnalyzeSyntaxListResponse.getDefaultInstance()))
.setSchemaDescriptor(new LanguageServiceMethodDescriptorSupplier("AnalyzeSyntaxList"))
.build();
}
}
}
return getAnalyzeSyntaxListMethod;
}
private static volatile io.grpc.MethodDescriptor<ai.bareun.protos.TokenizeRequest,
ai.bareun.protos.TokenizeResponse> getTokenizeMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "Tokenize",
requestType = ai.bareun.protos.TokenizeRequest.class,
responseType = ai.bareun.protos.TokenizeResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<ai.bareun.protos.TokenizeRequest,
ai.bareun.protos.TokenizeResponse> getTokenizeMethod() {
io.grpc.MethodDescriptor<ai.bareun.protos.TokenizeRequest, ai.bareun.protos.TokenizeResponse> getTokenizeMethod;
if ((getTokenizeMethod = LanguageServiceGrpc.getTokenizeMethod) == null) {
synchronized (LanguageServiceGrpc.class) {
if ((getTokenizeMethod = LanguageServiceGrpc.getTokenizeMethod) == null) {
LanguageServiceGrpc.getTokenizeMethod = getTokenizeMethod =
io.grpc.MethodDescriptor.<ai.bareun.protos.TokenizeRequest, ai.bareun.protos.TokenizeResponse>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"bareun.LanguageService", "Tokenize"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
ai.bareun.protos.TokenizeRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
ai.bareun.protos.TokenizeResponse.getDefaultInstance()))
.setSchemaDescriptor(new LanguageServiceMethodDescriptorSupplier("Tokenize"))
.build();
}
}
}
return getTokenizeMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static LanguageServiceStub newStub(io.grpc.Channel channel) {
return new LanguageServiceStub(channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static LanguageServiceBlockingStub newBlockingStub(
io.grpc.Channel channel) {
return new LanguageServiceBlockingStub(channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static LanguageServiceFutureStub newFutureStub(
io.grpc.Channel channel) {
return new LanguageServiceFutureStub(channel);
}
/**
* <pre>
* νκ΅μ΄μ λν λΆμ μλΉμ€λ₯Ό μ 곡νλ μλΉμ€.
* </pre>
*/
public static abstract class LanguageServiceImplBase implements io.grpc.BindableService {
/**
* <pre>
* ν
μ€νΈμ ννλ₯Ό λΆμνκ³ , λ¬Έμ₯ κ²½κ³λ₯Ό νμ
νμ¬ ν ν° λ¨μλ‘ μλΌλΈλ€.
* </pre>
*/
public void analyzeSyntax(ai.bareun.protos.AnalyzeSyntaxRequest request,
io.grpc.stub.StreamObserver<ai.bareun.protos.AnalyzeSyntaxResponse> responseObserver) {
asyncUnimplementedUnaryCall(getAnalyzeSyntaxMethod(), responseObserver);
}
/**
* <pre>
* 볡μμ λ¬Έμ₯μ λμμΌλ‘ ν
μ€νΈμ ννλ₯Ό λΆμνκ³ , ν ν° λ¨μλ‘ μλΌλΈλ€.
* 볡μμ λ¬Έμ₯μ λν μμλ₯Ό κ·Έλλ‘ λ°ννκ³ λ¬Έμ₯μ λΆν νμ§ μλλ€.
* </pre>
*/
public void analyzeSyntaxList(ai.bareun.protos.AnalyzeSyntaxListRequest request,
io.grpc.stub.StreamObserver<ai.bareun.protos.AnalyzeSyntaxListResponse> responseObserver) {
asyncUnimplementedUnaryCall(getAnalyzeSyntaxListMethod(), responseObserver);
}
/**
* <pre>
* νκ΅μ΄μ νΉμ±μ λ°λΌμ ν
μ€νΈλ₯Ό λΆμ λ¨λ€Όλ‘ ꡬλΆν΄ λΈλ€.
* </pre>
*/
public void tokenize(ai.bareun.protos.TokenizeRequest request,
io.grpc.stub.StreamObserver<ai.bareun.protos.TokenizeResponse> responseObserver) {
asyncUnimplementedUnaryCall(getTokenizeMethod(), responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getAnalyzeSyntaxMethod(),
asyncUnaryCall(
new MethodHandlers<
ai.bareun.protos.AnalyzeSyntaxRequest,
ai.bareun.protos.AnalyzeSyntaxResponse>(
this, METHODID_ANALYZE_SYNTAX)))
.addMethod(
getAnalyzeSyntaxListMethod(),
asyncUnaryCall(
new MethodHandlers<
ai.bareun.protos.AnalyzeSyntaxListRequest,
ai.bareun.protos.AnalyzeSyntaxListResponse>(
this, METHODID_ANALYZE_SYNTAX_LIST)))
.addMethod(
getTokenizeMethod(),
asyncUnaryCall(
new MethodHandlers<
ai.bareun.protos.TokenizeRequest,
ai.bareun.protos.TokenizeResponse>(
this, METHODID_TOKENIZE)))
.build();
}
}
/**
* <pre>
* νκ΅μ΄μ λν λΆμ μλΉμ€λ₯Ό μ 곡νλ μλΉμ€.
* </pre>
*/
public static final class LanguageServiceStub extends io.grpc.stub.AbstractStub<LanguageServiceStub> {
private LanguageServiceStub(io.grpc.Channel channel) {
super(channel);
}
private LanguageServiceStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected LanguageServiceStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new LanguageServiceStub(channel, callOptions);
}
/**
* <pre>
* ν
μ€νΈμ ννλ₯Ό λΆμνκ³ , λ¬Έμ₯ κ²½κ³λ₯Ό νμ
νμ¬ ν ν° λ¨μλ‘ μλΌλΈλ€.
* </pre>
*/
public void analyzeSyntax(ai.bareun.protos.AnalyzeSyntaxRequest request,
io.grpc.stub.StreamObserver<ai.bareun.protos.AnalyzeSyntaxResponse> responseObserver) {
asyncUnaryCall(
getChannel().newCall(getAnalyzeSyntaxMethod(), getCallOptions()), request, responseObserver);
}
/**
* <pre>
* 볡μμ λ¬Έμ₯μ λμμΌλ‘ ν
μ€νΈμ ννλ₯Ό λΆμνκ³ , ν ν° λ¨μλ‘ μλΌλΈλ€.
* 볡μμ λ¬Έμ₯μ λν μμλ₯Ό κ·Έλλ‘ λ°ννκ³ λ¬Έμ₯μ λΆν νμ§ μλλ€.
* </pre>
*/
public void analyzeSyntaxList(ai.bareun.protos.AnalyzeSyntaxListRequest request,
io.grpc.stub.StreamObserver<ai.bareun.protos.AnalyzeSyntaxListResponse> responseObserver) {
asyncUnaryCall(
getChannel().newCall(getAnalyzeSyntaxListMethod(), getCallOptions()), request, responseObserver);
}
/**
* <pre>
* νκ΅μ΄μ νΉμ±μ λ°λΌμ ν
μ€νΈλ₯Ό λΆμ λ¨λ€Όλ‘ ꡬλΆν΄ λΈλ€.
* </pre>
*/
public void tokenize(ai.bareun.protos.TokenizeRequest request,
io.grpc.stub.StreamObserver<ai.bareun.protos.TokenizeResponse> responseObserver) {
asyncUnaryCall(
getChannel().newCall(getTokenizeMethod(), getCallOptions()), request, responseObserver);
}
}
/**
* <pre>
* νκ΅μ΄μ λν λΆμ μλΉμ€λ₯Ό μ 곡νλ μλΉμ€.
* </pre>
*/
public static final class LanguageServiceBlockingStub extends io.grpc.stub.AbstractStub<LanguageServiceBlockingStub> {
private LanguageServiceBlockingStub(io.grpc.Channel channel) {
super(channel);
}
private LanguageServiceBlockingStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected LanguageServiceBlockingStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new LanguageServiceBlockingStub(channel, callOptions);
}
/**
* <pre>
* ν
μ€νΈμ ννλ₯Ό λΆμνκ³ , λ¬Έμ₯ κ²½κ³λ₯Ό νμ
νμ¬ ν ν° λ¨μλ‘ μλΌλΈλ€.
* </pre>
*/
public ai.bareun.protos.AnalyzeSyntaxResponse analyzeSyntax(ai.bareun.protos.AnalyzeSyntaxRequest request) {
return blockingUnaryCall(
getChannel(), getAnalyzeSyntaxMethod(), getCallOptions(), request);
}
/**
* <pre>
* 볡μμ λ¬Έμ₯μ λμμΌλ‘ ν
μ€νΈμ ννλ₯Ό λΆμνκ³ , ν ν° λ¨μλ‘ μλΌλΈλ€.
* 볡μμ λ¬Έμ₯μ λν μμλ₯Ό κ·Έλλ‘ λ°ννκ³ λ¬Έμ₯μ λΆν νμ§ μλλ€.
* </pre>
*/
public ai.bareun.protos.AnalyzeSyntaxListResponse analyzeSyntaxList(ai.bareun.protos.AnalyzeSyntaxListRequest request) {
return blockingUnaryCall(
getChannel(), getAnalyzeSyntaxListMethod(), getCallOptions(), request);
}
/**
* <pre>
* νκ΅μ΄μ νΉμ±μ λ°λΌμ ν
μ€νΈλ₯Ό λΆμ λ¨λ€Όλ‘ ꡬλΆν΄ λΈλ€.
* </pre>
*/
public ai.bareun.protos.TokenizeResponse tokenize(ai.bareun.protos.TokenizeRequest request) {
return blockingUnaryCall(
getChannel(), getTokenizeMethod(), getCallOptions(), request);
}
}
/**
* <pre>
* νκ΅μ΄μ λν λΆμ μλΉμ€λ₯Ό μ 곡νλ μλΉμ€.
* </pre>
*/
public static final class LanguageServiceFutureStub extends io.grpc.stub.AbstractStub<LanguageServiceFutureStub> {
private LanguageServiceFutureStub(io.grpc.Channel channel) {
super(channel);
}
private LanguageServiceFutureStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected LanguageServiceFutureStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new LanguageServiceFutureStub(channel, callOptions);
}
/**
* <pre>
* ν
μ€νΈμ ννλ₯Ό λΆμνκ³ , λ¬Έμ₯ κ²½κ³λ₯Ό νμ
νμ¬ ν ν° λ¨μλ‘ μλΌλΈλ€.
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<ai.bareun.protos.AnalyzeSyntaxResponse> analyzeSyntax(
ai.bareun.protos.AnalyzeSyntaxRequest request) {
return futureUnaryCall(
getChannel().newCall(getAnalyzeSyntaxMethod(), getCallOptions()), request);
}
/**
* <pre>
* 볡μμ λ¬Έμ₯μ λμμΌλ‘ ν
μ€νΈμ ννλ₯Ό λΆμνκ³ , ν ν° λ¨μλ‘ μλΌλΈλ€.
* 볡μμ λ¬Έμ₯μ λν μμλ₯Ό κ·Έλλ‘ λ°ννκ³ λ¬Έμ₯μ λΆν νμ§ μλλ€.
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<ai.bareun.protos.AnalyzeSyntaxListResponse> analyzeSyntaxList(
ai.bareun.protos.AnalyzeSyntaxListRequest request) {
return futureUnaryCall(
getChannel().newCall(getAnalyzeSyntaxListMethod(), getCallOptions()), request);
}
/**
* <pre>
* νκ΅μ΄μ νΉμ±μ λ°λΌμ ν
μ€νΈλ₯Ό λΆμ λ¨λ€Όλ‘ ꡬλΆν΄ λΈλ€.
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<ai.bareun.protos.TokenizeResponse> tokenize(
ai.bareun.protos.TokenizeRequest request) {
return futureUnaryCall(
getChannel().newCall(getTokenizeMethod(), getCallOptions()), request);
}
}
private static final int METHODID_ANALYZE_SYNTAX = 0;
private static final int METHODID_ANALYZE_SYNTAX_LIST = 1;
private static final int METHODID_TOKENIZE = 2;
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 LanguageServiceImplBase serviceImpl;
private final int methodId;
MethodHandlers(LanguageServiceImplBase 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_ANALYZE_SYNTAX:
serviceImpl.analyzeSyntax((ai.bareun.protos.AnalyzeSyntaxRequest) request,
(io.grpc.stub.StreamObserver<ai.bareun.protos.AnalyzeSyntaxResponse>) responseObserver);
break;
case METHODID_ANALYZE_SYNTAX_LIST:
serviceImpl.analyzeSyntaxList((ai.bareun.protos.AnalyzeSyntaxListRequest) request,
(io.grpc.stub.StreamObserver<ai.bareun.protos.AnalyzeSyntaxListResponse>) responseObserver);
break;
case METHODID_TOKENIZE:
serviceImpl.tokenize((ai.bareun.protos.TokenizeRequest) request,
(io.grpc.stub.StreamObserver<ai.bareun.protos.TokenizeResponse>) 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();
}
}
}
private static abstract class LanguageServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
LanguageServiceBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return ai.bareun.protos.LanguageServiceProto.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("LanguageService");
}
}
private static final class LanguageServiceFileDescriptorSupplier
extends LanguageServiceBaseDescriptorSupplier {
LanguageServiceFileDescriptorSupplier() {}
}
private static final class LanguageServiceMethodDescriptorSupplier
extends LanguageServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
LanguageServiceMethodDescriptorSupplier(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 (LanguageServiceGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new LanguageServiceFileDescriptorSupplier())
.addMethod(getAnalyzeSyntaxMethod())
.addMethod(getAnalyzeSyntaxListMethod())
.addMethod(getTokenizeMethod())
.build();
}
}
}
return result;
}
}
|
0
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun/protos/LanguageServiceProto.java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bareun/language_service.proto
package ai.bareun.protos;
public final class LanguageServiceProto {
private LanguageServiceProto() {}
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_bareun_Document_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_bareun_Document_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_bareun_Sentence_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_bareun_Sentence_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_bareun_Morpheme_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_bareun_Morpheme_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_bareun_Token_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_bareun_Token_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_bareun_TextSpan_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_bareun_TextSpan_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_bareun_AnalyzeSyntaxRequest_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_bareun_AnalyzeSyntaxRequest_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_bareun_AnalyzeSyntaxResponse_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_bareun_AnalyzeSyntaxResponse_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_bareun_AnalyzeSyntaxListRequest_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_bareun_AnalyzeSyntaxListRequest_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_bareun_AnalyzeSyntaxListResponse_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_bareun_AnalyzeSyntaxListResponse_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_bareun_TokenizeRequest_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_bareun_TokenizeRequest_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_bareun_Segment_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_bareun_Segment_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_bareun_SegmentToken_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_bareun_SegmentToken_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_bareun_SegmentSentence_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_bareun_SegmentSentence_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_bareun_TokenizeResponse_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_bareun_TokenizeResponse_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\035bareun/language_service.proto\022\006bareun\032" +
"\034google/api/annotations.proto\"-\n\010Documen" +
"t\022\017\n\007content\030\002 \001(\t\022\020\n\010language\030\004 \001(\t\"Z\n\010" +
"Sentence\022\036\n\004text\030\001 \001(\0132\020.bareun.TextSpan" +
"\022\035\n\006tokens\030\002 \003(\0132\r.bareun.Token\022\017\n\007refin" +
"ed\030\003 \001(\t\"\225\005\n\010Morpheme\022\036\n\004text\030\001 \001(\0132\020.ba" +
"reun.TextSpan\022!\n\003tag\030\002 \001(\0162\024.bareun.Morp" +
"heme.Tag\022\023\n\013probability\030\003 \001(\002\0221\n\014out_of_" +
"vocab\030\005 \001(\0162\033.bareun.Morpheme.OutOfVocab" +
"\"^\n\nOutOfVocab\022\025\n\021IN_WORD_EMBEDDING\020\000\022\020\n" +
"\014OUT_OF_VOCAB\020\001\022\022\n\016IN_CUSTOM_DICT\020\002\022\023\n\017I" +
"N_BUILTIN_DICT\020\003\"\235\003\n\003Tag\022\007\n\003UNK\020\000\022\007\n\003NNG" +
"\020\030\022\007\n\003NNP\020\031\022\007\n\003NNB\020\027\022\006\n\002NP\020\032\022\006\n\002NR\020\033\022\006\n\002" +
"NF\020\026\022\006\n\002NA\020\025\022\006\n\002NV\020\034\022\006\n\002VV\020)\022\006\n\002VA\020&\022\006\n\002" +
"VX\020*\022\007\n\003VCP\020(\022\007\n\003VCN\020\'\022\007\n\003MMA\020\022\022\007\n\003MMD\020\023" +
"\022\007\n\003MMN\020\024\022\007\n\003MAG\020\020\022\007\n\003MAJ\020\021\022\006\n\002IC\020\006\022\007\n\003J" +
"KS\020\r\022\007\n\003JKC\020\t\022\007\n\003JKG\020\n\022\007\n\003JKO\020\013\022\007\n\003JKB\020\010" +
"\022\007\n\003JKV\020\016\022\007\n\003JKQ\020\014\022\006\n\002JX\020\017\022\006\n\002JC\020\007\022\006\n\002EP" +
"\020\003\022\006\n\002EF\020\002\022\006\n\002EC\020\001\022\007\n\003ETN\020\005\022\007\n\003ETM\020\004\022\007\n\003" +
"XPN\020+\022\007\n\003XSN\020.\022\007\n\003XSV\020/\022\007\n\003XSA\020-\022\006\n\002XR\020," +
"\022\006\n\002SF\020\036\022\006\n\002SP\020#\022\006\n\002SS\020$\022\006\n\002SE\020\035\022\006\n\002SO\020\"" +
"\022\006\n\002SW\020%\022\006\n\002SL\020 \022\006\n\002SH\020\037\022\006\n\002SN\020!\"}\n\005Toke" +
"n\022\036\n\004text\030\001 \001(\0132\020.bareun.TextSpan\022#\n\tmor" +
"phemes\030\002 \003(\0132\020.bareun.Morpheme\022\r\n\005lemma\030" +
"\004 \001(\t\022\016\n\006tagged\030\005 \001(\t\022\020\n\010modified\030\013 \001(\t\"" +
"A\n\010TextSpan\022\017\n\007content\030\001 \001(\t\022\024\n\014begin_of" +
"fset\030\002 \001(\005\022\016\n\006length\030\003 \001(\005\"\310\001\n\024AnalyzeSy" +
"ntaxRequest\022\"\n\010document\030\001 \001(\0132\020.bareun.D" +
"ocument\022+\n\rencoding_type\030\002 \001(\0162\024.bareun." +
"EncodingType\022\033\n\023auto_split_sentence\030\003 \001(" +
"\010\022\025\n\rcustom_domain\030\004 \001(\t\022\024\n\014auto_spacing" +
"\030\005 \001(\010\022\025\n\rauto_jointing\030\006 \001(\010\"N\n\025Analyze" +
"SyntaxResponse\022#\n\tsentences\030\001 \003(\0132\020.bare" +
"un.Sentence\022\020\n\010language\030\003 \001(\t\"\260\001\n\030Analyz" +
"eSyntaxListRequest\022\021\n\tsentences\030\001 \003(\t\022\020\n" +
"\010language\030\002 \001(\t\022+\n\rencoding_type\030\003 \001(\0162\024" +
".bareun.EncodingType\022\025\n\rcustom_domain\030\004 " +
"\001(\t\022\024\n\014auto_spacing\030\005 \001(\010\022\025\n\rauto_jointi" +
"ng\030\006 \001(\010\"R\n\031AnalyzeSyntaxListResponse\022#\n" +
"\tsentences\030\001 \003(\0132\020.bareun.Sentence\022\020\n\010la" +
"nguage\030\003 \001(\t\"\225\001\n\017TokenizeRequest\022\"\n\010docu" +
"ment\030\001 \001(\0132\020.bareun.Document\022+\n\rencoding" +
"_type\030\002 \001(\0162\024.bareun.EncodingType\022\033\n\023aut" +
"o_split_sentence\030\003 \001(\010\022\024\n\014auto_spacing\030\005" +
" \001(\010\"7\n\007Segment\022\036\n\004text\030\001 \001(\0132\020.bareun.T" +
"extSpan\022\014\n\004hint\030\002 \001(\t\"a\n\014SegmentToken\022\036\n" +
"\004text\030\001 \001(\0132\020.bareun.TextSpan\022!\n\010segment" +
"s\030\002 \003(\0132\017.bareun.Segment\022\016\n\006tagged\030\005 \001(\t" +
"\"W\n\017SegmentSentence\022\036\n\004text\030\001 \001(\0132\020.bare" +
"un.TextSpan\022$\n\006tokens\030\002 \003(\0132\024.bareun.Seg" +
"mentToken\"P\n\020TokenizeResponse\022*\n\tsentenc" +
"es\030\001 \003(\0132\027.bareun.SegmentSentence\022\020\n\010lan" +
"guage\030\003 \001(\t*8\n\014EncodingType\022\010\n\004NONE\020\000\022\010\n" +
"\004UTF8\020\001\022\t\n\005UTF16\020\002\022\t\n\005UTF32\020\0032\350\002\n\017Langua" +
"geService\022o\n\rAnalyzeSyntax\022\034.bareun.Anal" +
"yzeSyntaxRequest\032\035.bareun.AnalyzeSyntaxR" +
"esponse\"!\202\323\344\223\002\033\"\026/bareun/api/v1/analyze:" +
"\001*\022\200\001\n\021AnalyzeSyntaxList\022 .bareun.Analyz" +
"eSyntaxListRequest\032!.bareun.AnalyzeSynta" +
"xListResponse\"&\202\323\344\223\002 \"\033/bareun/api/v1/an" +
"alyze-list:\001*\022a\n\010Tokenize\022\027.bareun.Token" +
"izeRequest\032\030.bareun.TokenizeResponse\"\"\202\323" +
"\344\223\002\034\"\027/bareun/api/v1/tokenize:\001*BB\n\020ai.b" +
"areun.protosB\024LanguageServiceProtoP\001Z\026ai" +
".bareun/proto/bareunb\006proto3"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
public com.google.protobuf.ExtensionRegistry assignDescriptors(
com.google.protobuf.Descriptors.FileDescriptor root) {
descriptor = root;
return null;
}
};
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
com.google.api.AnnotationsProto.getDescriptor(),
}, assigner);
internal_static_bareun_Document_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_bareun_Document_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_bareun_Document_descriptor,
new java.lang.String[] { "Content", "Language", });
internal_static_bareun_Sentence_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_bareun_Sentence_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_bareun_Sentence_descriptor,
new java.lang.String[] { "Text", "Tokens", "Refined", });
internal_static_bareun_Morpheme_descriptor =
getDescriptor().getMessageTypes().get(2);
internal_static_bareun_Morpheme_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_bareun_Morpheme_descriptor,
new java.lang.String[] { "Text", "Tag", "Probability", "OutOfVocab", });
internal_static_bareun_Token_descriptor =
getDescriptor().getMessageTypes().get(3);
internal_static_bareun_Token_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_bareun_Token_descriptor,
new java.lang.String[] { "Text", "Morphemes", "Lemma", "Tagged", "Modified", });
internal_static_bareun_TextSpan_descriptor =
getDescriptor().getMessageTypes().get(4);
internal_static_bareun_TextSpan_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_bareun_TextSpan_descriptor,
new java.lang.String[] { "Content", "BeginOffset", "Length", });
internal_static_bareun_AnalyzeSyntaxRequest_descriptor =
getDescriptor().getMessageTypes().get(5);
internal_static_bareun_AnalyzeSyntaxRequest_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_bareun_AnalyzeSyntaxRequest_descriptor,
new java.lang.String[] { "Document", "EncodingType", "AutoSplitSentence", "CustomDomain", "AutoSpacing", "AutoJointing", });
internal_static_bareun_AnalyzeSyntaxResponse_descriptor =
getDescriptor().getMessageTypes().get(6);
internal_static_bareun_AnalyzeSyntaxResponse_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_bareun_AnalyzeSyntaxResponse_descriptor,
new java.lang.String[] { "Sentences", "Language", });
internal_static_bareun_AnalyzeSyntaxListRequest_descriptor =
getDescriptor().getMessageTypes().get(7);
internal_static_bareun_AnalyzeSyntaxListRequest_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_bareun_AnalyzeSyntaxListRequest_descriptor,
new java.lang.String[] { "Sentences", "Language", "EncodingType", "CustomDomain", "AutoSpacing", "AutoJointing", });
internal_static_bareun_AnalyzeSyntaxListResponse_descriptor =
getDescriptor().getMessageTypes().get(8);
internal_static_bareun_AnalyzeSyntaxListResponse_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_bareun_AnalyzeSyntaxListResponse_descriptor,
new java.lang.String[] { "Sentences", "Language", });
internal_static_bareun_TokenizeRequest_descriptor =
getDescriptor().getMessageTypes().get(9);
internal_static_bareun_TokenizeRequest_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_bareun_TokenizeRequest_descriptor,
new java.lang.String[] { "Document", "EncodingType", "AutoSplitSentence", "AutoSpacing", });
internal_static_bareun_Segment_descriptor =
getDescriptor().getMessageTypes().get(10);
internal_static_bareun_Segment_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_bareun_Segment_descriptor,
new java.lang.String[] { "Text", "Hint", });
internal_static_bareun_SegmentToken_descriptor =
getDescriptor().getMessageTypes().get(11);
internal_static_bareun_SegmentToken_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_bareun_SegmentToken_descriptor,
new java.lang.String[] { "Text", "Segments", "Tagged", });
internal_static_bareun_SegmentSentence_descriptor =
getDescriptor().getMessageTypes().get(12);
internal_static_bareun_SegmentSentence_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_bareun_SegmentSentence_descriptor,
new java.lang.String[] { "Text", "Tokens", });
internal_static_bareun_TokenizeResponse_descriptor =
getDescriptor().getMessageTypes().get(13);
internal_static_bareun_TokenizeResponse_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_bareun_TokenizeResponse_descriptor,
new java.lang.String[] { "Sentences", "Language", });
com.google.protobuf.ExtensionRegistry registry =
com.google.protobuf.ExtensionRegistry.newInstance();
registry.add(com.google.api.AnnotationsProto.http);
com.google.protobuf.Descriptors.FileDescriptor
.internalUpdateFileDescriptor(descriptor, registry);
com.google.api.AnnotationsProto.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}
|
0
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun/protos/Morpheme.java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bareun/language_service.proto
package ai.bareun.protos;
/**
* <pre>
* ννμ
* </pre>
*
* Protobuf type {@code bareun.Morpheme}
*/
public final class Morpheme extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:bareun.Morpheme)
MorphemeOrBuilder {
private static final long serialVersionUID = 0L;
// Use Morpheme.newBuilder() to construct.
private Morpheme(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private Morpheme() {
tag_ = 0;
outOfVocab_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Morpheme(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
ai.bareun.protos.TextSpan.Builder subBuilder = null;
if (text_ != null) {
subBuilder = text_.toBuilder();
}
text_ = input.readMessage(ai.bareun.protos.TextSpan.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(text_);
text_ = subBuilder.buildPartial();
}
break;
}
case 16: {
int rawValue = input.readEnum();
tag_ = rawValue;
break;
}
case 29: {
probability_ = input.readFloat();
break;
}
case 40: {
int rawValue = input.readEnum();
outOfVocab_ = rawValue;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_Morpheme_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_Morpheme_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.bareun.protos.Morpheme.class, ai.bareun.protos.Morpheme.Builder.class);
}
/**
* <pre>
* μ¬μ μ μλ λ¨μ΄ μ 보 μ²λ¦¬ κ²°κ³Ό
* </pre>
*
* Protobuf enum {@code bareun.Morpheme.OutOfVocab}
*/
public enum OutOfVocab
implements com.google.protobuf.ProtocolMessageEnum {
/**
* <pre>
* μλ μλ² λ©μ ν¬ν¨λ λ΄μ©
* </pre>
*
* <code>IN_WORD_EMBEDDING = 0;</code>
*/
IN_WORD_EMBEDDING(0),
/**
* <pre>
* μλ μΆμΈ‘, λ―Έλ±λ‘ λ¨μ΄
* </pre>
*
* <code>OUT_OF_VOCAB = 1;</code>
*/
OUT_OF_VOCAB(1),
/**
* <pre>
* μ¬μ©μ μ 곡 μ¬μ μ μλ λ΄μ©
* </pre>
*
* <code>IN_CUSTOM_DICT = 2;</code>
*/
IN_CUSTOM_DICT(2),
/**
* <pre>
* κΈ°λ³Έ μ¬μ μ ν¬ν¨λ λ΄μ©
* </pre>
*
* <code>IN_BUILTIN_DICT = 3;</code>
*/
IN_BUILTIN_DICT(3),
UNRECOGNIZED(-1),
;
/**
* <pre>
* μλ μλ² λ©μ ν¬ν¨λ λ΄μ©
* </pre>
*
* <code>IN_WORD_EMBEDDING = 0;</code>
*/
public static final int IN_WORD_EMBEDDING_VALUE = 0;
/**
* <pre>
* μλ μΆμΈ‘, λ―Έλ±λ‘ λ¨μ΄
* </pre>
*
* <code>OUT_OF_VOCAB = 1;</code>
*/
public static final int OUT_OF_VOCAB_VALUE = 1;
/**
* <pre>
* μ¬μ©μ μ 곡 μ¬μ μ μλ λ΄μ©
* </pre>
*
* <code>IN_CUSTOM_DICT = 2;</code>
*/
public static final int IN_CUSTOM_DICT_VALUE = 2;
/**
* <pre>
* κΈ°λ³Έ μ¬μ μ ν¬ν¨λ λ΄μ©
* </pre>
*
* <code>IN_BUILTIN_DICT = 3;</code>
*/
public static final int IN_BUILTIN_DICT_VALUE = 3;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static OutOfVocab valueOf(int value) {
return forNumber(value);
}
public static OutOfVocab forNumber(int value) {
switch (value) {
case 0: return IN_WORD_EMBEDDING;
case 1: return OUT_OF_VOCAB;
case 2: return IN_CUSTOM_DICT;
case 3: return IN_BUILTIN_DICT;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap<OutOfVocab>
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
OutOfVocab> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap<OutOfVocab>() {
public OutOfVocab findValueByNumber(int number) {
return OutOfVocab.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return ai.bareun.protos.Morpheme.getDescriptor().getEnumTypes().get(0);
}
private static final OutOfVocab[] VALUES = values();
public static OutOfVocab valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private OutOfVocab(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:bareun.Morpheme.OutOfVocab)
}
/**
* <pre>
* λ΄λΆμ μΌλ‘ pred λ ννμλ 0~42κΉμ§ λ°ννμ§λ§,
* 1~43κΉμ§ μ«μλ‘ μ°κ³ , UNKμ 0μΌλ‘ λ°κΎΌλ€.
* </pre>
*
* Protobuf enum {@code bareun.Morpheme.Tag}
*/
public enum Tag
implements com.google.protobuf.ProtocolMessageEnum {
/**
* <pre>
*// 0 1 EC
* // 1 2 EF
* // 2 3 EP
* // 3 4 ETM
* // 4 5 ETN
* // 5 6 IC
* // 6 7 JC
* // 7 8 JKB
* // 8 9 JKC
* // 9 10 JKG
* // 10 11 JKO
* // 11 12 JKQ
* // 12 13 JKS
* // 13 14 JKV
* // 14 15 JX
* // 15 16 MAG
* // 16 17 MAJ
* // 17 18 MMA
* // 18 19 MMD
* // 19 20 MMN
* // 20 21 NA
* // 21 22 NF
* // 22 23 NNB
* // 23 24 NNG
* // 24 25 NNP
* // 25 26 NP
* // 26 27 NR
* // 27 28 NV
* // 28 29 SE
* // 29 30 SF
* // 30 31 SH
* // 31 32 SL
* // 32 33 SN
* // 33 34 SO
* // 34 35 SP
* // 35 36 SS
* // 36 37 SW
* // 37 38 VA
* // 38 39 VCN
* // 39 40 VCP
* // 40 41 VV
* // 41 42 VX
* // 42 43 XPN
* // 43 44 XR
* // 44 45 XSA
* // 45 46 XSN
* // 46 47 XSV
* </pre>
*
* <code>UNK = 0;</code>
*/
UNK(0),
/**
* <pre>
* μΌλ° λͺ
μ¬
* </pre>
*
* <code>NNG = 24;</code>
*/
NNG(24),
/**
* <pre>
* κ³ μ λͺ
μ¬
* </pre>
*
* <code>NNP = 25;</code>
*/
NNP(25),
/**
* <pre>
* μμ‘΄ λͺ
μ¬
* </pre>
*
* <code>NNB = 23;</code>
*/
NNB(23),
/**
* <pre>
* λλͺ
μ¬
* </pre>
*
* <code>NP = 26;</code>
*/
NP(26),
/**
* <pre>
* μμ¬
* </pre>
*
* <code>NR = 27;</code>
*/
NR(27),
/**
* <pre>
* λͺ
μ¬ μΆμ λ²μ£Ό
* </pre>
*
* <code>NF = 22;</code>
*/
NF(22),
/**
* <pre>
* λΆμλΆλ₯λ²μ£Ό
* </pre>
*
* <code>NA = 21;</code>
*/
NA(21),
/**
* <pre>
* μ©μΈ μΆμ λ²μ£Ό
* </pre>
*
* <code>NV = 28;</code>
*/
NV(28),
/**
* <pre>
* λμ¬
* </pre>
*
* <code>VV = 41;</code>
*/
VV(41),
/**
* <pre>
* νμ©μ¬
* </pre>
*
* <code>VA = 38;</code>
*/
VA(38),
/**
* <pre>
* 보쑰 μ©μΈ
* </pre>
*
* <code>VX = 42;</code>
*/
VX(42),
/**
* <pre>
* κΈμ μ§μ μ¬
* </pre>
*
* <code>VCP = 40;</code>
*/
VCP(40),
/**
* <pre>
* λΆμ μ§μ μ¬
* </pre>
*
* <code>VCN = 39;</code>
*/
VCN(39),
/**
* <pre>
* μ±μ κ΄νμ¬
* </pre>
*
* <code>MMA = 18;</code>
*/
MMA(18),
/**
* <pre>
* μ§μ κ΄νμ¬
* </pre>
*
* <code>MMD = 19;</code>
*/
MMD(19),
/**
* <pre>
* μ κ΄νμ¬
* </pre>
*
* <code>MMN = 20;</code>
*/
MMN(20),
/**
* <pre>
* μΌλ° λΆμ¬
* </pre>
*
* <code>MAG = 16;</code>
*/
MAG(16),
/**
* <pre>
* μ μ λΆμ¬
* </pre>
*
* <code>MAJ = 17;</code>
*/
MAJ(17),
/**
* <pre>
* κ°νμ¬
* </pre>
*
* <code>IC = 6;</code>
*/
IC(6),
/**
* <pre>
* 주격 μ‘°μ¬
* </pre>
*
* <code>JKS = 13;</code>
*/
JKS(13),
/**
* <pre>
* 보격 μ‘°μ¬
* </pre>
*
* <code>JKC = 9;</code>
*/
JKC(9),
/**
* <pre>
* κ΄ν격 μ‘°μ¬
* </pre>
*
* <code>JKG = 10;</code>
*/
JKG(10),
/**
* <pre>
* λͺ©μ 격 μ‘°μ¬
* </pre>
*
* <code>JKO = 11;</code>
*/
JKO(11),
/**
* <pre>
* λΆμ¬κ²© μ‘°μ¬
* </pre>
*
* <code>JKB = 8;</code>
*/
JKB(8),
/**
* <pre>
* νΈκ²© μ‘°μ¬
* </pre>
*
* <code>JKV = 14;</code>
*/
JKV(14),
/**
* <pre>
* μΈμ©κ²© μ‘°μ¬
* </pre>
*
* <code>JKQ = 12;</code>
*/
JKQ(12),
/**
* <pre>
* 보쑰μ¬
* </pre>
*
* <code>JX = 15;</code>
*/
JX(15),
/**
* <pre>
* μ μ μ‘°μ¬
* </pre>
*
* <code>JC = 7;</code>
*/
JC(7),
/**
* <pre>
* μ μ΄λ§ μ΄λ―Έ
* </pre>
*
* <code>EP = 3;</code>
*/
EP(3),
/**
* <pre>
* μ’
κ²° μ΄λ―Έ
* </pre>
*
* <code>EF = 2;</code>
*/
EF(2),
/**
* <pre>
* μ°κ²° μ΄λ―Έ
* </pre>
*
* <code>EC = 1;</code>
*/
EC(1),
/**
* <pre>
* λͺ
μ¬ν μ μ± μ΄λ―Έ
* </pre>
*
* <code>ETN = 5;</code>
*/
ETN(5),
/**
* <pre>
* κ΄νν μ μ± μ΄λ―Έ
* </pre>
*
* <code>ETM = 4;</code>
*/
ETM(4),
/**
* <pre>
* μ²΄μΈ μ λμ¬
* </pre>
*
* <code>XPN = 43;</code>
*/
XPN(43),
/**
* <pre>
* λͺ
μ¬ νμ μ λ―Έμ¬
* </pre>
*
* <code>XSN = 46;</code>
*/
XSN(46),
/**
* <pre>
* λμ¬ νμ μ λ―Έμ¬
* </pre>
*
* <code>XSV = 47;</code>
*/
XSV(47),
/**
* <pre>
* νμ©μ¬ νμ μ λ―Έμ¬
* </pre>
*
* <code>XSA = 45;</code>
*/
XSA(45),
/**
* <pre>
* μ΄κ·Ό
* </pre>
*
* <code>XR = 44;</code>
*/
XR(44),
/**
* <pre>
* λ§μΉ¨ν,λ¬Όμν,λλν
* </pre>
*
* <code>SF = 30;</code>
*/
SF(30),
/**
* <pre>
* μΌν,κ°μ΄λμ ,μ½λ‘ ,λΉκΈ
* </pre>
*
* <code>SP = 35;</code>
*/
SP(35),
/**
* <pre>
* λ°μ΄ν,κ΄νΈν,μ€ν
* </pre>
*
* <code>SS = 36;</code>
*/
SS(36),
/**
* <pre>
* μ€μν
* </pre>
*
* <code>SE = 29;</code>
*/
SE(29),
/**
* <pre>
* λΆμν(λ¬Όκ²°,μ¨κΉ,λΉ μ§)
* </pre>
*
* <code>SO = 34;</code>
*/
SO(34),
/**
* <pre>
* κΈ°νκΈ°νΈ (λ
Όλ¦¬μνκΈ°νΈ,ννκΈ°νΈ)
* </pre>
*
* <code>SW = 37;</code>
*/
SW(37),
/**
* <pre>
* μΈκ΅μ΄
* </pre>
*
* <code>SL = 32;</code>
*/
SL(32),
/**
* <pre>
* νμ
* </pre>
*
* <code>SH = 31;</code>
*/
SH(31),
/**
* <pre>
* μ«μ
* </pre>
*
* <code>SN = 33;</code>
*/
SN(33),
UNRECOGNIZED(-1),
;
/**
* <pre>
*// 0 1 EC
* // 1 2 EF
* // 2 3 EP
* // 3 4 ETM
* // 4 5 ETN
* // 5 6 IC
* // 6 7 JC
* // 7 8 JKB
* // 8 9 JKC
* // 9 10 JKG
* // 10 11 JKO
* // 11 12 JKQ
* // 12 13 JKS
* // 13 14 JKV
* // 14 15 JX
* // 15 16 MAG
* // 16 17 MAJ
* // 17 18 MMA
* // 18 19 MMD
* // 19 20 MMN
* // 20 21 NA
* // 21 22 NF
* // 22 23 NNB
* // 23 24 NNG
* // 24 25 NNP
* // 25 26 NP
* // 26 27 NR
* // 27 28 NV
* // 28 29 SE
* // 29 30 SF
* // 30 31 SH
* // 31 32 SL
* // 32 33 SN
* // 33 34 SO
* // 34 35 SP
* // 35 36 SS
* // 36 37 SW
* // 37 38 VA
* // 38 39 VCN
* // 39 40 VCP
* // 40 41 VV
* // 41 42 VX
* // 42 43 XPN
* // 43 44 XR
* // 44 45 XSA
* // 45 46 XSN
* // 46 47 XSV
* </pre>
*
* <code>UNK = 0;</code>
*/
public static final int UNK_VALUE = 0;
/**
* <pre>
* μΌλ° λͺ
μ¬
* </pre>
*
* <code>NNG = 24;</code>
*/
public static final int NNG_VALUE = 24;
/**
* <pre>
* κ³ μ λͺ
μ¬
* </pre>
*
* <code>NNP = 25;</code>
*/
public static final int NNP_VALUE = 25;
/**
* <pre>
* μμ‘΄ λͺ
μ¬
* </pre>
*
* <code>NNB = 23;</code>
*/
public static final int NNB_VALUE = 23;
/**
* <pre>
* λλͺ
μ¬
* </pre>
*
* <code>NP = 26;</code>
*/
public static final int NP_VALUE = 26;
/**
* <pre>
* μμ¬
* </pre>
*
* <code>NR = 27;</code>
*/
public static final int NR_VALUE = 27;
/**
* <pre>
* λͺ
μ¬ μΆμ λ²μ£Ό
* </pre>
*
* <code>NF = 22;</code>
*/
public static final int NF_VALUE = 22;
/**
* <pre>
* λΆμλΆλ₯λ²μ£Ό
* </pre>
*
* <code>NA = 21;</code>
*/
public static final int NA_VALUE = 21;
/**
* <pre>
* μ©μΈ μΆμ λ²μ£Ό
* </pre>
*
* <code>NV = 28;</code>
*/
public static final int NV_VALUE = 28;
/**
* <pre>
* λμ¬
* </pre>
*
* <code>VV = 41;</code>
*/
public static final int VV_VALUE = 41;
/**
* <pre>
* νμ©μ¬
* </pre>
*
* <code>VA = 38;</code>
*/
public static final int VA_VALUE = 38;
/**
* <pre>
* 보쑰 μ©μΈ
* </pre>
*
* <code>VX = 42;</code>
*/
public static final int VX_VALUE = 42;
/**
* <pre>
* κΈμ μ§μ μ¬
* </pre>
*
* <code>VCP = 40;</code>
*/
public static final int VCP_VALUE = 40;
/**
* <pre>
* λΆμ μ§μ μ¬
* </pre>
*
* <code>VCN = 39;</code>
*/
public static final int VCN_VALUE = 39;
/**
* <pre>
* μ±μ κ΄νμ¬
* </pre>
*
* <code>MMA = 18;</code>
*/
public static final int MMA_VALUE = 18;
/**
* <pre>
* μ§μ κ΄νμ¬
* </pre>
*
* <code>MMD = 19;</code>
*/
public static final int MMD_VALUE = 19;
/**
* <pre>
* μ κ΄νμ¬
* </pre>
*
* <code>MMN = 20;</code>
*/
public static final int MMN_VALUE = 20;
/**
* <pre>
* μΌλ° λΆμ¬
* </pre>
*
* <code>MAG = 16;</code>
*/
public static final int MAG_VALUE = 16;
/**
* <pre>
* μ μ λΆμ¬
* </pre>
*
* <code>MAJ = 17;</code>
*/
public static final int MAJ_VALUE = 17;
/**
* <pre>
* κ°νμ¬
* </pre>
*
* <code>IC = 6;</code>
*/
public static final int IC_VALUE = 6;
/**
* <pre>
* 주격 μ‘°μ¬
* </pre>
*
* <code>JKS = 13;</code>
*/
public static final int JKS_VALUE = 13;
/**
* <pre>
* 보격 μ‘°μ¬
* </pre>
*
* <code>JKC = 9;</code>
*/
public static final int JKC_VALUE = 9;
/**
* <pre>
* κ΄ν격 μ‘°μ¬
* </pre>
*
* <code>JKG = 10;</code>
*/
public static final int JKG_VALUE = 10;
/**
* <pre>
* λͺ©μ 격 μ‘°μ¬
* </pre>
*
* <code>JKO = 11;</code>
*/
public static final int JKO_VALUE = 11;
/**
* <pre>
* λΆμ¬κ²© μ‘°μ¬
* </pre>
*
* <code>JKB = 8;</code>
*/
public static final int JKB_VALUE = 8;
/**
* <pre>
* νΈκ²© μ‘°μ¬
* </pre>
*
* <code>JKV = 14;</code>
*/
public static final int JKV_VALUE = 14;
/**
* <pre>
* μΈμ©κ²© μ‘°μ¬
* </pre>
*
* <code>JKQ = 12;</code>
*/
public static final int JKQ_VALUE = 12;
/**
* <pre>
* 보쑰μ¬
* </pre>
*
* <code>JX = 15;</code>
*/
public static final int JX_VALUE = 15;
/**
* <pre>
* μ μ μ‘°μ¬
* </pre>
*
* <code>JC = 7;</code>
*/
public static final int JC_VALUE = 7;
/**
* <pre>
* μ μ΄λ§ μ΄λ―Έ
* </pre>
*
* <code>EP = 3;</code>
*/
public static final int EP_VALUE = 3;
/**
* <pre>
* μ’
κ²° μ΄λ―Έ
* </pre>
*
* <code>EF = 2;</code>
*/
public static final int EF_VALUE = 2;
/**
* <pre>
* μ°κ²° μ΄λ―Έ
* </pre>
*
* <code>EC = 1;</code>
*/
public static final int EC_VALUE = 1;
/**
* <pre>
* λͺ
μ¬ν μ μ± μ΄λ―Έ
* </pre>
*
* <code>ETN = 5;</code>
*/
public static final int ETN_VALUE = 5;
/**
* <pre>
* κ΄νν μ μ± μ΄λ―Έ
* </pre>
*
* <code>ETM = 4;</code>
*/
public static final int ETM_VALUE = 4;
/**
* <pre>
* μ²΄μΈ μ λμ¬
* </pre>
*
* <code>XPN = 43;</code>
*/
public static final int XPN_VALUE = 43;
/**
* <pre>
* λͺ
μ¬ νμ μ λ―Έμ¬
* </pre>
*
* <code>XSN = 46;</code>
*/
public static final int XSN_VALUE = 46;
/**
* <pre>
* λμ¬ νμ μ λ―Έμ¬
* </pre>
*
* <code>XSV = 47;</code>
*/
public static final int XSV_VALUE = 47;
/**
* <pre>
* νμ©μ¬ νμ μ λ―Έμ¬
* </pre>
*
* <code>XSA = 45;</code>
*/
public static final int XSA_VALUE = 45;
/**
* <pre>
* μ΄κ·Ό
* </pre>
*
* <code>XR = 44;</code>
*/
public static final int XR_VALUE = 44;
/**
* <pre>
* λ§μΉ¨ν,λ¬Όμν,λλν
* </pre>
*
* <code>SF = 30;</code>
*/
public static final int SF_VALUE = 30;
/**
* <pre>
* μΌν,κ°μ΄λμ ,μ½λ‘ ,λΉκΈ
* </pre>
*
* <code>SP = 35;</code>
*/
public static final int SP_VALUE = 35;
/**
* <pre>
* λ°μ΄ν,κ΄νΈν,μ€ν
* </pre>
*
* <code>SS = 36;</code>
*/
public static final int SS_VALUE = 36;
/**
* <pre>
* μ€μν
* </pre>
*
* <code>SE = 29;</code>
*/
public static final int SE_VALUE = 29;
/**
* <pre>
* λΆμν(λ¬Όκ²°,μ¨κΉ,λΉ μ§)
* </pre>
*
* <code>SO = 34;</code>
*/
public static final int SO_VALUE = 34;
/**
* <pre>
* κΈ°νκΈ°νΈ (λ
Όλ¦¬μνκΈ°νΈ,ννκΈ°νΈ)
* </pre>
*
* <code>SW = 37;</code>
*/
public static final int SW_VALUE = 37;
/**
* <pre>
* μΈκ΅μ΄
* </pre>
*
* <code>SL = 32;</code>
*/
public static final int SL_VALUE = 32;
/**
* <pre>
* νμ
* </pre>
*
* <code>SH = 31;</code>
*/
public static final int SH_VALUE = 31;
/**
* <pre>
* μ«μ
* </pre>
*
* <code>SN = 33;</code>
*/
public static final int SN_VALUE = 33;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static Tag valueOf(int value) {
return forNumber(value);
}
public static Tag forNumber(int value) {
switch (value) {
case 0: return UNK;
case 24: return NNG;
case 25: return NNP;
case 23: return NNB;
case 26: return NP;
case 27: return NR;
case 22: return NF;
case 21: return NA;
case 28: return NV;
case 41: return VV;
case 38: return VA;
case 42: return VX;
case 40: return VCP;
case 39: return VCN;
case 18: return MMA;
case 19: return MMD;
case 20: return MMN;
case 16: return MAG;
case 17: return MAJ;
case 6: return IC;
case 13: return JKS;
case 9: return JKC;
case 10: return JKG;
case 11: return JKO;
case 8: return JKB;
case 14: return JKV;
case 12: return JKQ;
case 15: return JX;
case 7: return JC;
case 3: return EP;
case 2: return EF;
case 1: return EC;
case 5: return ETN;
case 4: return ETM;
case 43: return XPN;
case 46: return XSN;
case 47: return XSV;
case 45: return XSA;
case 44: return XR;
case 30: return SF;
case 35: return SP;
case 36: return SS;
case 29: return SE;
case 34: return SO;
case 37: return SW;
case 32: return SL;
case 31: return SH;
case 33: return SN;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap<Tag>
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Tag> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap<Tag>() {
public Tag findValueByNumber(int number) {
return Tag.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return ai.bareun.protos.Morpheme.getDescriptor().getEnumTypes().get(1);
}
private static final Tag[] VALUES = values();
public static Tag valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private Tag(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:bareun.Morpheme.Tag)
}
public static final int TEXT_FIELD_NUMBER = 1;
private ai.bareun.protos.TextSpan text_;
/**
* <pre>
* The sentence text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public boolean hasText() {
return text_ != null;
}
/**
* <pre>
* The sentence text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public ai.bareun.protos.TextSpan getText() {
return text_ == null ? ai.bareun.protos.TextSpan.getDefaultInstance() : text_;
}
/**
* <pre>
* The sentence text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public ai.bareun.protos.TextSpanOrBuilder getTextOrBuilder() {
return getText();
}
public static final int TAG_FIELD_NUMBER = 2;
private int tag_;
/**
* <pre>
* ννμ νκ·Έ
* </pre>
*
* <code>.bareun.Morpheme.Tag tag = 2;</code>
*/
public int getTagValue() {
return tag_;
}
/**
* <pre>
* ννμ νκ·Έ
* </pre>
*
* <code>.bareun.Morpheme.Tag tag = 2;</code>
*/
public ai.bareun.protos.Morpheme.Tag getTag() {
@SuppressWarnings("deprecation")
ai.bareun.protos.Morpheme.Tag result = ai.bareun.protos.Morpheme.Tag.valueOf(tag_);
return result == null ? ai.bareun.protos.Morpheme.Tag.UNRECOGNIZED : result;
}
public static final int PROBABILITY_FIELD_NUMBER = 3;
private float probability_;
/**
* <pre>
* ννμ λΆμ κ²°κ³Ό νλ₯
* </pre>
*
* <code>float probability = 3;</code>
*/
public float getProbability() {
return probability_;
}
public static final int OUT_OF_VOCAB_FIELD_NUMBER = 5;
private int outOfVocab_;
/**
* <pre>
* μ¬μ μ μλ λ¨μ΄ νμ
* </pre>
*
* <code>.bareun.Morpheme.OutOfVocab out_of_vocab = 5;</code>
*/
public int getOutOfVocabValue() {
return outOfVocab_;
}
/**
* <pre>
* μ¬μ μ μλ λ¨μ΄ νμ
* </pre>
*
* <code>.bareun.Morpheme.OutOfVocab out_of_vocab = 5;</code>
*/
public ai.bareun.protos.Morpheme.OutOfVocab getOutOfVocab() {
@SuppressWarnings("deprecation")
ai.bareun.protos.Morpheme.OutOfVocab result = ai.bareun.protos.Morpheme.OutOfVocab.valueOf(outOfVocab_);
return result == null ? ai.bareun.protos.Morpheme.OutOfVocab.UNRECOGNIZED : result;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (text_ != null) {
output.writeMessage(1, getText());
}
if (tag_ != ai.bareun.protos.Morpheme.Tag.UNK.getNumber()) {
output.writeEnum(2, tag_);
}
if (probability_ != 0F) {
output.writeFloat(3, probability_);
}
if (outOfVocab_ != ai.bareun.protos.Morpheme.OutOfVocab.IN_WORD_EMBEDDING.getNumber()) {
output.writeEnum(5, outOfVocab_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (text_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getText());
}
if (tag_ != ai.bareun.protos.Morpheme.Tag.UNK.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(2, tag_);
}
if (probability_ != 0F) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(3, probability_);
}
if (outOfVocab_ != ai.bareun.protos.Morpheme.OutOfVocab.IN_WORD_EMBEDDING.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(5, outOfVocab_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof ai.bareun.protos.Morpheme)) {
return super.equals(obj);
}
ai.bareun.protos.Morpheme other = (ai.bareun.protos.Morpheme) obj;
if (hasText() != other.hasText()) return false;
if (hasText()) {
if (!getText()
.equals(other.getText())) return false;
}
if (tag_ != other.tag_) return false;
if (java.lang.Float.floatToIntBits(getProbability())
!= java.lang.Float.floatToIntBits(
other.getProbability())) return false;
if (outOfVocab_ != other.outOfVocab_) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasText()) {
hash = (37 * hash) + TEXT_FIELD_NUMBER;
hash = (53 * hash) + getText().hashCode();
}
hash = (37 * hash) + TAG_FIELD_NUMBER;
hash = (53 * hash) + tag_;
hash = (37 * hash) + PROBABILITY_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(
getProbability());
hash = (37 * hash) + OUT_OF_VOCAB_FIELD_NUMBER;
hash = (53 * hash) + outOfVocab_;
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static ai.bareun.protos.Morpheme parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.Morpheme parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.Morpheme parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.Morpheme parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.Morpheme parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.Morpheme parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.Morpheme parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.bareun.protos.Morpheme 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.bareun.protos.Morpheme parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static ai.bareun.protos.Morpheme 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.bareun.protos.Morpheme parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.bareun.protos.Morpheme 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.bareun.protos.Morpheme 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>
* ννμ
* </pre>
*
* Protobuf type {@code bareun.Morpheme}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:bareun.Morpheme)
ai.bareun.protos.MorphemeOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_Morpheme_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_Morpheme_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.bareun.protos.Morpheme.class, ai.bareun.protos.Morpheme.Builder.class);
}
// Construct using ai.bareun.protos.Morpheme.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (textBuilder_ == null) {
text_ = null;
} else {
text_ = null;
textBuilder_ = null;
}
tag_ = 0;
probability_ = 0F;
outOfVocab_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_Morpheme_descriptor;
}
@java.lang.Override
public ai.bareun.protos.Morpheme getDefaultInstanceForType() {
return ai.bareun.protos.Morpheme.getDefaultInstance();
}
@java.lang.Override
public ai.bareun.protos.Morpheme build() {
ai.bareun.protos.Morpheme result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ai.bareun.protos.Morpheme buildPartial() {
ai.bareun.protos.Morpheme result = new ai.bareun.protos.Morpheme(this);
if (textBuilder_ == null) {
result.text_ = text_;
} else {
result.text_ = textBuilder_.build();
}
result.tag_ = tag_;
result.probability_ = probability_;
result.outOfVocab_ = outOfVocab_;
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.bareun.protos.Morpheme) {
return mergeFrom((ai.bareun.protos.Morpheme)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ai.bareun.protos.Morpheme other) {
if (other == ai.bareun.protos.Morpheme.getDefaultInstance()) return this;
if (other.hasText()) {
mergeText(other.getText());
}
if (other.tag_ != 0) {
setTagValue(other.getTagValue());
}
if (other.getProbability() != 0F) {
setProbability(other.getProbability());
}
if (other.outOfVocab_ != 0) {
setOutOfVocabValue(other.getOutOfVocabValue());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
ai.bareun.protos.Morpheme parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (ai.bareun.protos.Morpheme) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private ai.bareun.protos.TextSpan text_;
private com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.TextSpan, ai.bareun.protos.TextSpan.Builder, ai.bareun.protos.TextSpanOrBuilder> textBuilder_;
/**
* <pre>
* The sentence text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public boolean hasText() {
return textBuilder_ != null || text_ != null;
}
/**
* <pre>
* The sentence text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public ai.bareun.protos.TextSpan getText() {
if (textBuilder_ == null) {
return text_ == null ? ai.bareun.protos.TextSpan.getDefaultInstance() : text_;
} else {
return textBuilder_.getMessage();
}
}
/**
* <pre>
* The sentence text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public Builder setText(ai.bareun.protos.TextSpan value) {
if (textBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
text_ = value;
onChanged();
} else {
textBuilder_.setMessage(value);
}
return this;
}
/**
* <pre>
* The sentence text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public Builder setText(
ai.bareun.protos.TextSpan.Builder builderForValue) {
if (textBuilder_ == null) {
text_ = builderForValue.build();
onChanged();
} else {
textBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* <pre>
* The sentence text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public Builder mergeText(ai.bareun.protos.TextSpan value) {
if (textBuilder_ == null) {
if (text_ != null) {
text_ =
ai.bareun.protos.TextSpan.newBuilder(text_).mergeFrom(value).buildPartial();
} else {
text_ = value;
}
onChanged();
} else {
textBuilder_.mergeFrom(value);
}
return this;
}
/**
* <pre>
* The sentence text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public Builder clearText() {
if (textBuilder_ == null) {
text_ = null;
onChanged();
} else {
text_ = null;
textBuilder_ = null;
}
return this;
}
/**
* <pre>
* The sentence text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public ai.bareun.protos.TextSpan.Builder getTextBuilder() {
onChanged();
return getTextFieldBuilder().getBuilder();
}
/**
* <pre>
* The sentence text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public ai.bareun.protos.TextSpanOrBuilder getTextOrBuilder() {
if (textBuilder_ != null) {
return textBuilder_.getMessageOrBuilder();
} else {
return text_ == null ?
ai.bareun.protos.TextSpan.getDefaultInstance() : text_;
}
}
/**
* <pre>
* The sentence text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.TextSpan, ai.bareun.protos.TextSpan.Builder, ai.bareun.protos.TextSpanOrBuilder>
getTextFieldBuilder() {
if (textBuilder_ == null) {
textBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.TextSpan, ai.bareun.protos.TextSpan.Builder, ai.bareun.protos.TextSpanOrBuilder>(
getText(),
getParentForChildren(),
isClean());
text_ = null;
}
return textBuilder_;
}
private int tag_ = 0;
/**
* <pre>
* ννμ νκ·Έ
* </pre>
*
* <code>.bareun.Morpheme.Tag tag = 2;</code>
*/
public int getTagValue() {
return tag_;
}
/**
* <pre>
* ννμ νκ·Έ
* </pre>
*
* <code>.bareun.Morpheme.Tag tag = 2;</code>
*/
public Builder setTagValue(int value) {
tag_ = value;
onChanged();
return this;
}
/**
* <pre>
* ννμ νκ·Έ
* </pre>
*
* <code>.bareun.Morpheme.Tag tag = 2;</code>
*/
public ai.bareun.protos.Morpheme.Tag getTag() {
@SuppressWarnings("deprecation")
ai.bareun.protos.Morpheme.Tag result = ai.bareun.protos.Morpheme.Tag.valueOf(tag_);
return result == null ? ai.bareun.protos.Morpheme.Tag.UNRECOGNIZED : result;
}
/**
* <pre>
* ννμ νκ·Έ
* </pre>
*
* <code>.bareun.Morpheme.Tag tag = 2;</code>
*/
public Builder setTag(ai.bareun.protos.Morpheme.Tag value) {
if (value == null) {
throw new NullPointerException();
}
tag_ = value.getNumber();
onChanged();
return this;
}
/**
* <pre>
* ννμ νκ·Έ
* </pre>
*
* <code>.bareun.Morpheme.Tag tag = 2;</code>
*/
public Builder clearTag() {
tag_ = 0;
onChanged();
return this;
}
private float probability_ ;
/**
* <pre>
* ννμ λΆμ κ²°κ³Ό νλ₯
* </pre>
*
* <code>float probability = 3;</code>
*/
public float getProbability() {
return probability_;
}
/**
* <pre>
* ννμ λΆμ κ²°κ³Ό νλ₯
* </pre>
*
* <code>float probability = 3;</code>
*/
public Builder setProbability(float value) {
probability_ = value;
onChanged();
return this;
}
/**
* <pre>
* ννμ λΆμ κ²°κ³Ό νλ₯
* </pre>
*
* <code>float probability = 3;</code>
*/
public Builder clearProbability() {
probability_ = 0F;
onChanged();
return this;
}
private int outOfVocab_ = 0;
/**
* <pre>
* μ¬μ μ μλ λ¨μ΄ νμ
* </pre>
*
* <code>.bareun.Morpheme.OutOfVocab out_of_vocab = 5;</code>
*/
public int getOutOfVocabValue() {
return outOfVocab_;
}
/**
* <pre>
* μ¬μ μ μλ λ¨μ΄ νμ
* </pre>
*
* <code>.bareun.Morpheme.OutOfVocab out_of_vocab = 5;</code>
*/
public Builder setOutOfVocabValue(int value) {
outOfVocab_ = value;
onChanged();
return this;
}
/**
* <pre>
* μ¬μ μ μλ λ¨μ΄ νμ
* </pre>
*
* <code>.bareun.Morpheme.OutOfVocab out_of_vocab = 5;</code>
*/
public ai.bareun.protos.Morpheme.OutOfVocab getOutOfVocab() {
@SuppressWarnings("deprecation")
ai.bareun.protos.Morpheme.OutOfVocab result = ai.bareun.protos.Morpheme.OutOfVocab.valueOf(outOfVocab_);
return result == null ? ai.bareun.protos.Morpheme.OutOfVocab.UNRECOGNIZED : result;
}
/**
* <pre>
* μ¬μ μ μλ λ¨μ΄ νμ
* </pre>
*
* <code>.bareun.Morpheme.OutOfVocab out_of_vocab = 5;</code>
*/
public Builder setOutOfVocab(ai.bareun.protos.Morpheme.OutOfVocab value) {
if (value == null) {
throw new NullPointerException();
}
outOfVocab_ = value.getNumber();
onChanged();
return this;
}
/**
* <pre>
* μ¬μ μ μλ λ¨μ΄ νμ
* </pre>
*
* <code>.bareun.Morpheme.OutOfVocab out_of_vocab = 5;</code>
*/
public Builder clearOutOfVocab() {
outOfVocab_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:bareun.Morpheme)
}
// @@protoc_insertion_point(class_scope:bareun.Morpheme)
private static final ai.bareun.protos.Morpheme DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new ai.bareun.protos.Morpheme();
}
public static ai.bareun.protos.Morpheme getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<Morpheme>
PARSER = new com.google.protobuf.AbstractParser<Morpheme>() {
@java.lang.Override
public Morpheme parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Morpheme(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<Morpheme> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<Morpheme> getParserForType() {
return PARSER;
}
@java.lang.Override
public ai.bareun.protos.Morpheme getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
|
0
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun/protos/MorphemeOrBuilder.java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bareun/language_service.proto
package ai.bareun.protos;
public interface MorphemeOrBuilder extends
// @@protoc_insertion_point(interface_extends:bareun.Morpheme)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The sentence text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
boolean hasText();
/**
* <pre>
* The sentence text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
ai.bareun.protos.TextSpan getText();
/**
* <pre>
* The sentence text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
ai.bareun.protos.TextSpanOrBuilder getTextOrBuilder();
/**
* <pre>
* ννμ νκ·Έ
* </pre>
*
* <code>.bareun.Morpheme.Tag tag = 2;</code>
*/
int getTagValue();
/**
* <pre>
* ννμ νκ·Έ
* </pre>
*
* <code>.bareun.Morpheme.Tag tag = 2;</code>
*/
ai.bareun.protos.Morpheme.Tag getTag();
/**
* <pre>
* ννμ λΆμ κ²°κ³Ό νλ₯
* </pre>
*
* <code>float probability = 3;</code>
*/
float getProbability();
/**
* <pre>
* μ¬μ μ μλ λ¨μ΄ νμ
* </pre>
*
* <code>.bareun.Morpheme.OutOfVocab out_of_vocab = 5;</code>
*/
int getOutOfVocabValue();
/**
* <pre>
* μ¬μ μ μλ λ¨μ΄ νμ
* </pre>
*
* <code>.bareun.Morpheme.OutOfVocab out_of_vocab = 5;</code>
*/
ai.bareun.protos.Morpheme.OutOfVocab getOutOfVocab();
}
|
0
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun/protos/RemoveCustomDictionariesRequest.java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bareun/custom_dict.proto
package ai.bareun.protos;
/**
* Protobuf type {@code bareun.RemoveCustomDictionariesRequest}
*/
public final class RemoveCustomDictionariesRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:bareun.RemoveCustomDictionariesRequest)
RemoveCustomDictionariesRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use RemoveCustomDictionariesRequest.newBuilder() to construct.
private RemoveCustomDictionariesRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private RemoveCustomDictionariesRequest() {
domainNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private RemoveCustomDictionariesRequest(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
domainNames_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000001;
}
domainNames_.add(s);
break;
}
case 16: {
all_ = input.readBool();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
domainNames_ = domainNames_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_RemoveCustomDictionariesRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_RemoveCustomDictionariesRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.bareun.protos.RemoveCustomDictionariesRequest.class, ai.bareun.protos.RemoveCustomDictionariesRequest.Builder.class);
}
private int bitField0_;
public static final int DOMAIN_NAMES_FIELD_NUMBER = 1;
private com.google.protobuf.LazyStringList domainNames_;
/**
* <code>repeated string domain_names = 1;</code>
*/
public com.google.protobuf.ProtocolStringList
getDomainNamesList() {
return domainNames_;
}
/**
* <code>repeated string domain_names = 1;</code>
*/
public int getDomainNamesCount() {
return domainNames_.size();
}
/**
* <code>repeated string domain_names = 1;</code>
*/
public java.lang.String getDomainNames(int index) {
return domainNames_.get(index);
}
/**
* <code>repeated string domain_names = 1;</code>
*/
public com.google.protobuf.ByteString
getDomainNamesBytes(int index) {
return domainNames_.getByteString(index);
}
public static final int ALL_FIELD_NUMBER = 2;
private boolean all_;
/**
* <code>bool all = 2;</code>
*/
public boolean getAll() {
return all_;
}
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 < domainNames_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, domainNames_.getRaw(i));
}
if (all_ != false) {
output.writeBool(2, all_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
for (int i = 0; i < domainNames_.size(); i++) {
dataSize += computeStringSizeNoTag(domainNames_.getRaw(i));
}
size += dataSize;
size += 1 * getDomainNamesList().size();
}
if (all_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(2, all_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof ai.bareun.protos.RemoveCustomDictionariesRequest)) {
return super.equals(obj);
}
ai.bareun.protos.RemoveCustomDictionariesRequest other = (ai.bareun.protos.RemoveCustomDictionariesRequest) obj;
if (!getDomainNamesList()
.equals(other.getDomainNamesList())) return false;
if (getAll()
!= other.getAll()) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getDomainNamesCount() > 0) {
hash = (37 * hash) + DOMAIN_NAMES_FIELD_NUMBER;
hash = (53 * hash) + getDomainNamesList().hashCode();
}
hash = (37 * hash) + ALL_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getAll());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static ai.bareun.protos.RemoveCustomDictionariesRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.RemoveCustomDictionariesRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.RemoveCustomDictionariesRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.RemoveCustomDictionariesRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.RemoveCustomDictionariesRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.RemoveCustomDictionariesRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.RemoveCustomDictionariesRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.bareun.protos.RemoveCustomDictionariesRequest 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.bareun.protos.RemoveCustomDictionariesRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static ai.bareun.protos.RemoveCustomDictionariesRequest 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.bareun.protos.RemoveCustomDictionariesRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.bareun.protos.RemoveCustomDictionariesRequest 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.bareun.protos.RemoveCustomDictionariesRequest 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 bareun.RemoveCustomDictionariesRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:bareun.RemoveCustomDictionariesRequest)
ai.bareun.protos.RemoveCustomDictionariesRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_RemoveCustomDictionariesRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_RemoveCustomDictionariesRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.bareun.protos.RemoveCustomDictionariesRequest.class, ai.bareun.protos.RemoveCustomDictionariesRequest.Builder.class);
}
// Construct using ai.bareun.protos.RemoveCustomDictionariesRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
domainNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
all_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_RemoveCustomDictionariesRequest_descriptor;
}
@java.lang.Override
public ai.bareun.protos.RemoveCustomDictionariesRequest getDefaultInstanceForType() {
return ai.bareun.protos.RemoveCustomDictionariesRequest.getDefaultInstance();
}
@java.lang.Override
public ai.bareun.protos.RemoveCustomDictionariesRequest build() {
ai.bareun.protos.RemoveCustomDictionariesRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ai.bareun.protos.RemoveCustomDictionariesRequest buildPartial() {
ai.bareun.protos.RemoveCustomDictionariesRequest result = new ai.bareun.protos.RemoveCustomDictionariesRequest(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((bitField0_ & 0x00000001) != 0)) {
domainNames_ = domainNames_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.domainNames_ = domainNames_;
result.all_ = all_;
result.bitField0_ = to_bitField0_;
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.bareun.protos.RemoveCustomDictionariesRequest) {
return mergeFrom((ai.bareun.protos.RemoveCustomDictionariesRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ai.bareun.protos.RemoveCustomDictionariesRequest other) {
if (other == ai.bareun.protos.RemoveCustomDictionariesRequest.getDefaultInstance()) return this;
if (!other.domainNames_.isEmpty()) {
if (domainNames_.isEmpty()) {
domainNames_ = other.domainNames_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureDomainNamesIsMutable();
domainNames_.addAll(other.domainNames_);
}
onChanged();
}
if (other.getAll() != false) {
setAll(other.getAll());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
ai.bareun.protos.RemoveCustomDictionariesRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (ai.bareun.protos.RemoveCustomDictionariesRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.protobuf.LazyStringList domainNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureDomainNamesIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
domainNames_ = new com.google.protobuf.LazyStringArrayList(domainNames_);
bitField0_ |= 0x00000001;
}
}
/**
* <code>repeated string domain_names = 1;</code>
*/
public com.google.protobuf.ProtocolStringList
getDomainNamesList() {
return domainNames_.getUnmodifiableView();
}
/**
* <code>repeated string domain_names = 1;</code>
*/
public int getDomainNamesCount() {
return domainNames_.size();
}
/**
* <code>repeated string domain_names = 1;</code>
*/
public java.lang.String getDomainNames(int index) {
return domainNames_.get(index);
}
/**
* <code>repeated string domain_names = 1;</code>
*/
public com.google.protobuf.ByteString
getDomainNamesBytes(int index) {
return domainNames_.getByteString(index);
}
/**
* <code>repeated string domain_names = 1;</code>
*/
public Builder setDomainNames(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureDomainNamesIsMutable();
domainNames_.set(index, value);
onChanged();
return this;
}
/**
* <code>repeated string domain_names = 1;</code>
*/
public Builder addDomainNames(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureDomainNamesIsMutable();
domainNames_.add(value);
onChanged();
return this;
}
/**
* <code>repeated string domain_names = 1;</code>
*/
public Builder addAllDomainNames(
java.lang.Iterable<java.lang.String> values) {
ensureDomainNamesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, domainNames_);
onChanged();
return this;
}
/**
* <code>repeated string domain_names = 1;</code>
*/
public Builder clearDomainNames() {
domainNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* <code>repeated string domain_names = 1;</code>
*/
public Builder addDomainNamesBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureDomainNamesIsMutable();
domainNames_.add(value);
onChanged();
return this;
}
private boolean all_ ;
/**
* <code>bool all = 2;</code>
*/
public boolean getAll() {
return all_;
}
/**
* <code>bool all = 2;</code>
*/
public Builder setAll(boolean value) {
all_ = value;
onChanged();
return this;
}
/**
* <code>bool all = 2;</code>
*/
public Builder clearAll() {
all_ = 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:bareun.RemoveCustomDictionariesRequest)
}
// @@protoc_insertion_point(class_scope:bareun.RemoveCustomDictionariesRequest)
private static final ai.bareun.protos.RemoveCustomDictionariesRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new ai.bareun.protos.RemoveCustomDictionariesRequest();
}
public static ai.bareun.protos.RemoveCustomDictionariesRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<RemoveCustomDictionariesRequest>
PARSER = new com.google.protobuf.AbstractParser<RemoveCustomDictionariesRequest>() {
@java.lang.Override
public RemoveCustomDictionariesRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new RemoveCustomDictionariesRequest(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<RemoveCustomDictionariesRequest> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<RemoveCustomDictionariesRequest> getParserForType() {
return PARSER;
}
@java.lang.Override
public ai.bareun.protos.RemoveCustomDictionariesRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
|
0
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun/protos/RemoveCustomDictionariesRequestOrBuilder.java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bareun/custom_dict.proto
package ai.bareun.protos;
public interface RemoveCustomDictionariesRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:bareun.RemoveCustomDictionariesRequest)
com.google.protobuf.MessageOrBuilder {
/**
* <code>repeated string domain_names = 1;</code>
*/
java.util.List<java.lang.String>
getDomainNamesList();
/**
* <code>repeated string domain_names = 1;</code>
*/
int getDomainNamesCount();
/**
* <code>repeated string domain_names = 1;</code>
*/
java.lang.String getDomainNames(int index);
/**
* <code>repeated string domain_names = 1;</code>
*/
com.google.protobuf.ByteString
getDomainNamesBytes(int index);
/**
* <code>bool all = 2;</code>
*/
boolean getAll();
}
|
0
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun/protos/RemoveCustomDictionariesResponse.java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bareun/custom_dict.proto
package ai.bareun.protos;
/**
* <pre>
* μμ λ 컀μ€ν
μ¬μ μ λͺ©λ‘
* </pre>
*
* Protobuf type {@code bareun.RemoveCustomDictionariesResponse}
*/
public final class RemoveCustomDictionariesResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:bareun.RemoveCustomDictionariesResponse)
RemoveCustomDictionariesResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use RemoveCustomDictionariesResponse.newBuilder() to construct.
private RemoveCustomDictionariesResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private RemoveCustomDictionariesResponse() {
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private RemoveCustomDictionariesResponse(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
deletedDomainNames_ = com.google.protobuf.MapField.newMapField(
DeletedDomainNamesDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000001;
}
com.google.protobuf.MapEntry<java.lang.String, java.lang.Boolean>
deletedDomainNames__ = input.readMessage(
DeletedDomainNamesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
deletedDomainNames_.getMutableMap().put(
deletedDomainNames__.getKey(), deletedDomainNames__.getValue());
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_RemoveCustomDictionariesResponse_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 1:
return internalGetDeletedDomainNames();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_RemoveCustomDictionariesResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.bareun.protos.RemoveCustomDictionariesResponse.class, ai.bareun.protos.RemoveCustomDictionariesResponse.Builder.class);
}
public static final int DELETED_DOMAIN_NAMES_FIELD_NUMBER = 1;
private static final class DeletedDomainNamesDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, java.lang.Boolean> defaultEntry =
com.google.protobuf.MapEntry
.<java.lang.String, java.lang.Boolean>newDefaultInstance(
ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_RemoveCustomDictionariesResponse_DeletedDomainNamesEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.BOOL,
false);
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.Boolean> deletedDomainNames_;
private com.google.protobuf.MapField<java.lang.String, java.lang.Boolean>
internalGetDeletedDomainNames() {
if (deletedDomainNames_ == null) {
return com.google.protobuf.MapField.emptyMapField(
DeletedDomainNamesDefaultEntryHolder.defaultEntry);
}
return deletedDomainNames_;
}
public int getDeletedDomainNamesCount() {
return internalGetDeletedDomainNames().getMap().size();
}
/**
* <code>map<string, bool> deleted_domain_names = 1;</code>
*/
public boolean containsDeletedDomainNames(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetDeletedDomainNames().getMap().containsKey(key);
}
/**
* Use {@link #getDeletedDomainNamesMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map<java.lang.String, java.lang.Boolean> getDeletedDomainNames() {
return getDeletedDomainNamesMap();
}
/**
* <code>map<string, bool> deleted_domain_names = 1;</code>
*/
public java.util.Map<java.lang.String, java.lang.Boolean> getDeletedDomainNamesMap() {
return internalGetDeletedDomainNames().getMap();
}
/**
* <code>map<string, bool> deleted_domain_names = 1;</code>
*/
public boolean getDeletedDomainNamesOrDefault(
java.lang.String key,
boolean defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map<java.lang.String, java.lang.Boolean> map =
internalGetDeletedDomainNames().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* <code>map<string, bool> deleted_domain_names = 1;</code>
*/
public boolean getDeletedDomainNamesOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map<java.lang.String, java.lang.Boolean> map =
internalGetDeletedDomainNames().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
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 {
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetDeletedDomainNames(),
DeletedDomainNamesDefaultEntryHolder.defaultEntry,
1);
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (java.util.Map.Entry<java.lang.String, java.lang.Boolean> entry
: internalGetDeletedDomainNames().getMap().entrySet()) {
com.google.protobuf.MapEntry<java.lang.String, java.lang.Boolean>
deletedDomainNames__ = DeletedDomainNamesDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, deletedDomainNames__);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof ai.bareun.protos.RemoveCustomDictionariesResponse)) {
return super.equals(obj);
}
ai.bareun.protos.RemoveCustomDictionariesResponse other = (ai.bareun.protos.RemoveCustomDictionariesResponse) obj;
if (!internalGetDeletedDomainNames().equals(
other.internalGetDeletedDomainNames())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (!internalGetDeletedDomainNames().getMap().isEmpty()) {
hash = (37 * hash) + DELETED_DOMAIN_NAMES_FIELD_NUMBER;
hash = (53 * hash) + internalGetDeletedDomainNames().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static ai.bareun.protos.RemoveCustomDictionariesResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.RemoveCustomDictionariesResponse parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.RemoveCustomDictionariesResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.RemoveCustomDictionariesResponse parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.RemoveCustomDictionariesResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.RemoveCustomDictionariesResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.RemoveCustomDictionariesResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.bareun.protos.RemoveCustomDictionariesResponse 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.bareun.protos.RemoveCustomDictionariesResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static ai.bareun.protos.RemoveCustomDictionariesResponse 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.bareun.protos.RemoveCustomDictionariesResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.bareun.protos.RemoveCustomDictionariesResponse 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.bareun.protos.RemoveCustomDictionariesResponse 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>
* μμ λ 컀μ€ν
μ¬μ μ λͺ©λ‘
* </pre>
*
* Protobuf type {@code bareun.RemoveCustomDictionariesResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:bareun.RemoveCustomDictionariesResponse)
ai.bareun.protos.RemoveCustomDictionariesResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_RemoveCustomDictionariesResponse_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 1:
return internalGetDeletedDomainNames();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 1:
return internalGetMutableDeletedDomainNames();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_RemoveCustomDictionariesResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.bareun.protos.RemoveCustomDictionariesResponse.class, ai.bareun.protos.RemoveCustomDictionariesResponse.Builder.class);
}
// Construct using ai.bareun.protos.RemoveCustomDictionariesResponse.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
internalGetMutableDeletedDomainNames().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ai.bareun.protos.CustomDictionaryServiceProto.internal_static_bareun_RemoveCustomDictionariesResponse_descriptor;
}
@java.lang.Override
public ai.bareun.protos.RemoveCustomDictionariesResponse getDefaultInstanceForType() {
return ai.bareun.protos.RemoveCustomDictionariesResponse.getDefaultInstance();
}
@java.lang.Override
public ai.bareun.protos.RemoveCustomDictionariesResponse build() {
ai.bareun.protos.RemoveCustomDictionariesResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ai.bareun.protos.RemoveCustomDictionariesResponse buildPartial() {
ai.bareun.protos.RemoveCustomDictionariesResponse result = new ai.bareun.protos.RemoveCustomDictionariesResponse(this);
int from_bitField0_ = bitField0_;
result.deletedDomainNames_ = internalGetDeletedDomainNames();
result.deletedDomainNames_.makeImmutable();
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.bareun.protos.RemoveCustomDictionariesResponse) {
return mergeFrom((ai.bareun.protos.RemoveCustomDictionariesResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ai.bareun.protos.RemoveCustomDictionariesResponse other) {
if (other == ai.bareun.protos.RemoveCustomDictionariesResponse.getDefaultInstance()) return this;
internalGetMutableDeletedDomainNames().mergeFrom(
other.internalGetDeletedDomainNames());
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
ai.bareun.protos.RemoveCustomDictionariesResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (ai.bareun.protos.RemoveCustomDictionariesResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.protobuf.MapField<
java.lang.String, java.lang.Boolean> deletedDomainNames_;
private com.google.protobuf.MapField<java.lang.String, java.lang.Boolean>
internalGetDeletedDomainNames() {
if (deletedDomainNames_ == null) {
return com.google.protobuf.MapField.emptyMapField(
DeletedDomainNamesDefaultEntryHolder.defaultEntry);
}
return deletedDomainNames_;
}
private com.google.protobuf.MapField<java.lang.String, java.lang.Boolean>
internalGetMutableDeletedDomainNames() {
onChanged();;
if (deletedDomainNames_ == null) {
deletedDomainNames_ = com.google.protobuf.MapField.newMapField(
DeletedDomainNamesDefaultEntryHolder.defaultEntry);
}
if (!deletedDomainNames_.isMutable()) {
deletedDomainNames_ = deletedDomainNames_.copy();
}
return deletedDomainNames_;
}
public int getDeletedDomainNamesCount() {
return internalGetDeletedDomainNames().getMap().size();
}
/**
* <code>map<string, bool> deleted_domain_names = 1;</code>
*/
public boolean containsDeletedDomainNames(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetDeletedDomainNames().getMap().containsKey(key);
}
/**
* Use {@link #getDeletedDomainNamesMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map<java.lang.String, java.lang.Boolean> getDeletedDomainNames() {
return getDeletedDomainNamesMap();
}
/**
* <code>map<string, bool> deleted_domain_names = 1;</code>
*/
public java.util.Map<java.lang.String, java.lang.Boolean> getDeletedDomainNamesMap() {
return internalGetDeletedDomainNames().getMap();
}
/**
* <code>map<string, bool> deleted_domain_names = 1;</code>
*/
public boolean getDeletedDomainNamesOrDefault(
java.lang.String key,
boolean defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map<java.lang.String, java.lang.Boolean> map =
internalGetDeletedDomainNames().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* <code>map<string, bool> deleted_domain_names = 1;</code>
*/
public boolean getDeletedDomainNamesOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map<java.lang.String, java.lang.Boolean> map =
internalGetDeletedDomainNames().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearDeletedDomainNames() {
internalGetMutableDeletedDomainNames().getMutableMap()
.clear();
return this;
}
/**
* <code>map<string, bool> deleted_domain_names = 1;</code>
*/
public Builder removeDeletedDomainNames(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
internalGetMutableDeletedDomainNames().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map<java.lang.String, java.lang.Boolean>
getMutableDeletedDomainNames() {
return internalGetMutableDeletedDomainNames().getMutableMap();
}
/**
* <code>map<string, bool> deleted_domain_names = 1;</code>
*/
public Builder putDeletedDomainNames(
java.lang.String key,
boolean value) {
if (key == null) { throw new java.lang.NullPointerException(); }
internalGetMutableDeletedDomainNames().getMutableMap()
.put(key, value);
return this;
}
/**
* <code>map<string, bool> deleted_domain_names = 1;</code>
*/
public Builder putAllDeletedDomainNames(
java.util.Map<java.lang.String, java.lang.Boolean> values) {
internalGetMutableDeletedDomainNames().getMutableMap()
.putAll(values);
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:bareun.RemoveCustomDictionariesResponse)
}
// @@protoc_insertion_point(class_scope:bareun.RemoveCustomDictionariesResponse)
private static final ai.bareun.protos.RemoveCustomDictionariesResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new ai.bareun.protos.RemoveCustomDictionariesResponse();
}
public static ai.bareun.protos.RemoveCustomDictionariesResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<RemoveCustomDictionariesResponse>
PARSER = new com.google.protobuf.AbstractParser<RemoveCustomDictionariesResponse>() {
@java.lang.Override
public RemoveCustomDictionariesResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new RemoveCustomDictionariesResponse(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<RemoveCustomDictionariesResponse> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<RemoveCustomDictionariesResponse> getParserForType() {
return PARSER;
}
@java.lang.Override
public ai.bareun.protos.RemoveCustomDictionariesResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
|
0
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun/protos/RemoveCustomDictionariesResponseOrBuilder.java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bareun/custom_dict.proto
package ai.bareun.protos;
public interface RemoveCustomDictionariesResponseOrBuilder extends
// @@protoc_insertion_point(interface_extends:bareun.RemoveCustomDictionariesResponse)
com.google.protobuf.MessageOrBuilder {
/**
* <code>map<string, bool> deleted_domain_names = 1;</code>
*/
int getDeletedDomainNamesCount();
/**
* <code>map<string, bool> deleted_domain_names = 1;</code>
*/
boolean containsDeletedDomainNames(
java.lang.String key);
/**
* Use {@link #getDeletedDomainNamesMap()} instead.
*/
@java.lang.Deprecated
java.util.Map<java.lang.String, java.lang.Boolean>
getDeletedDomainNames();
/**
* <code>map<string, bool> deleted_domain_names = 1;</code>
*/
java.util.Map<java.lang.String, java.lang.Boolean>
getDeletedDomainNamesMap();
/**
* <code>map<string, bool> deleted_domain_names = 1;</code>
*/
boolean getDeletedDomainNamesOrDefault(
java.lang.String key,
boolean defaultValue);
/**
* <code>map<string, bool> deleted_domain_names = 1;</code>
*/
boolean getDeletedDomainNamesOrThrow(
java.lang.String key);
}
|
0
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun/protos/Segment.java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bareun/language_service.proto
package ai.bareun.protos;
/**
* <pre>
* ν ν°μ λΆμ λ λ΄μ©
* </pre>
*
* Protobuf type {@code bareun.Segment}
*/
public final class Segment extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:bareun.Segment)
SegmentOrBuilder {
private static final long serialVersionUID = 0L;
// Use Segment.newBuilder() to construct.
private Segment(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private Segment() {
hint_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Segment(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
ai.bareun.protos.TextSpan.Builder subBuilder = null;
if (text_ != null) {
subBuilder = text_.toBuilder();
}
text_ = input.readMessage(ai.bareun.protos.TextSpan.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(text_);
text_ = subBuilder.buildPartial();
}
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
hint_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_Segment_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_Segment_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.bareun.protos.Segment.class, ai.bareun.protos.Segment.Builder.class);
}
public static final int TEXT_FIELD_NUMBER = 1;
private ai.bareun.protos.TextSpan text_;
/**
* <pre>
* The token text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public boolean hasText() {
return text_ != null;
}
/**
* <pre>
* The token text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public ai.bareun.protos.TextSpan getText() {
return text_ == null ? ai.bareun.protos.TextSpan.getDefaultInstance() : text_;
}
/**
* <pre>
* The token text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public ai.bareun.protos.TextSpanOrBuilder getTextOrBuilder() {
return getText();
}
public static final int HINT_FIELD_NUMBER = 2;
private volatile java.lang.Object hint_;
/**
* <pre>
* κ° μμΉμ λν μ 보
* </pre>
*
* <code>string hint = 2;</code>
*/
public java.lang.String getHint() {
java.lang.Object ref = hint_;
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();
hint_ = s;
return s;
}
}
/**
* <pre>
* κ° μμΉμ λν μ 보
* </pre>
*
* <code>string hint = 2;</code>
*/
public com.google.protobuf.ByteString
getHintBytes() {
java.lang.Object ref = hint_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
hint_ = 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 (text_ != null) {
output.writeMessage(1, getText());
}
if (!getHintBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, hint_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (text_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getText());
}
if (!getHintBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, hint_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof ai.bareun.protos.Segment)) {
return super.equals(obj);
}
ai.bareun.protos.Segment other = (ai.bareun.protos.Segment) obj;
if (hasText() != other.hasText()) return false;
if (hasText()) {
if (!getText()
.equals(other.getText())) return false;
}
if (!getHint()
.equals(other.getHint())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasText()) {
hash = (37 * hash) + TEXT_FIELD_NUMBER;
hash = (53 * hash) + getText().hashCode();
}
hash = (37 * hash) + HINT_FIELD_NUMBER;
hash = (53 * hash) + getHint().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static ai.bareun.protos.Segment parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.Segment parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.Segment parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.Segment parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.Segment parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.Segment parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.Segment parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.bareun.protos.Segment 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.bareun.protos.Segment parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static ai.bareun.protos.Segment 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.bareun.protos.Segment parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.bareun.protos.Segment 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.bareun.protos.Segment 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>
* ν ν°μ λΆμ λ λ΄μ©
* </pre>
*
* Protobuf type {@code bareun.Segment}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:bareun.Segment)
ai.bareun.protos.SegmentOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_Segment_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_Segment_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.bareun.protos.Segment.class, ai.bareun.protos.Segment.Builder.class);
}
// Construct using ai.bareun.protos.Segment.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (textBuilder_ == null) {
text_ = null;
} else {
text_ = null;
textBuilder_ = null;
}
hint_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_Segment_descriptor;
}
@java.lang.Override
public ai.bareun.protos.Segment getDefaultInstanceForType() {
return ai.bareun.protos.Segment.getDefaultInstance();
}
@java.lang.Override
public ai.bareun.protos.Segment build() {
ai.bareun.protos.Segment result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ai.bareun.protos.Segment buildPartial() {
ai.bareun.protos.Segment result = new ai.bareun.protos.Segment(this);
if (textBuilder_ == null) {
result.text_ = text_;
} else {
result.text_ = textBuilder_.build();
}
result.hint_ = hint_;
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.bareun.protos.Segment) {
return mergeFrom((ai.bareun.protos.Segment)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ai.bareun.protos.Segment other) {
if (other == ai.bareun.protos.Segment.getDefaultInstance()) return this;
if (other.hasText()) {
mergeText(other.getText());
}
if (!other.getHint().isEmpty()) {
hint_ = other.hint_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
ai.bareun.protos.Segment parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (ai.bareun.protos.Segment) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private ai.bareun.protos.TextSpan text_;
private com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.TextSpan, ai.bareun.protos.TextSpan.Builder, ai.bareun.protos.TextSpanOrBuilder> textBuilder_;
/**
* <pre>
* The token text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public boolean hasText() {
return textBuilder_ != null || text_ != null;
}
/**
* <pre>
* The token text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public ai.bareun.protos.TextSpan getText() {
if (textBuilder_ == null) {
return text_ == null ? ai.bareun.protos.TextSpan.getDefaultInstance() : text_;
} else {
return textBuilder_.getMessage();
}
}
/**
* <pre>
* The token text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public Builder setText(ai.bareun.protos.TextSpan value) {
if (textBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
text_ = value;
onChanged();
} else {
textBuilder_.setMessage(value);
}
return this;
}
/**
* <pre>
* The token text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public Builder setText(
ai.bareun.protos.TextSpan.Builder builderForValue) {
if (textBuilder_ == null) {
text_ = builderForValue.build();
onChanged();
} else {
textBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* <pre>
* The token text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public Builder mergeText(ai.bareun.protos.TextSpan value) {
if (textBuilder_ == null) {
if (text_ != null) {
text_ =
ai.bareun.protos.TextSpan.newBuilder(text_).mergeFrom(value).buildPartial();
} else {
text_ = value;
}
onChanged();
} else {
textBuilder_.mergeFrom(value);
}
return this;
}
/**
* <pre>
* The token text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public Builder clearText() {
if (textBuilder_ == null) {
text_ = null;
onChanged();
} else {
text_ = null;
textBuilder_ = null;
}
return this;
}
/**
* <pre>
* The token text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public ai.bareun.protos.TextSpan.Builder getTextBuilder() {
onChanged();
return getTextFieldBuilder().getBuilder();
}
/**
* <pre>
* The token text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public ai.bareun.protos.TextSpanOrBuilder getTextOrBuilder() {
if (textBuilder_ != null) {
return textBuilder_.getMessageOrBuilder();
} else {
return text_ == null ?
ai.bareun.protos.TextSpan.getDefaultInstance() : text_;
}
}
/**
* <pre>
* The token text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.TextSpan, ai.bareun.protos.TextSpan.Builder, ai.bareun.protos.TextSpanOrBuilder>
getTextFieldBuilder() {
if (textBuilder_ == null) {
textBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.TextSpan, ai.bareun.protos.TextSpan.Builder, ai.bareun.protos.TextSpanOrBuilder>(
getText(),
getParentForChildren(),
isClean());
text_ = null;
}
return textBuilder_;
}
private java.lang.Object hint_ = "";
/**
* <pre>
* κ° μμΉμ λν μ 보
* </pre>
*
* <code>string hint = 2;</code>
*/
public java.lang.String getHint() {
java.lang.Object ref = hint_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
hint_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* κ° μμΉμ λν μ 보
* </pre>
*
* <code>string hint = 2;</code>
*/
public com.google.protobuf.ByteString
getHintBytes() {
java.lang.Object ref = hint_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
hint_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* κ° μμΉμ λν μ 보
* </pre>
*
* <code>string hint = 2;</code>
*/
public Builder setHint(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
hint_ = value;
onChanged();
return this;
}
/**
* <pre>
* κ° μμΉμ λν μ 보
* </pre>
*
* <code>string hint = 2;</code>
*/
public Builder clearHint() {
hint_ = getDefaultInstance().getHint();
onChanged();
return this;
}
/**
* <pre>
* κ° μμΉμ λν μ 보
* </pre>
*
* <code>string hint = 2;</code>
*/
public Builder setHintBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
hint_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:bareun.Segment)
}
// @@protoc_insertion_point(class_scope:bareun.Segment)
private static final ai.bareun.protos.Segment DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new ai.bareun.protos.Segment();
}
public static ai.bareun.protos.Segment getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<Segment>
PARSER = new com.google.protobuf.AbstractParser<Segment>() {
@java.lang.Override
public Segment parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Segment(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<Segment> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<Segment> getParserForType() {
return PARSER;
}
@java.lang.Override
public ai.bareun.protos.Segment getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
|
0
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun/protos/SegmentOrBuilder.java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bareun/language_service.proto
package ai.bareun.protos;
public interface SegmentOrBuilder extends
// @@protoc_insertion_point(interface_extends:bareun.Segment)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The token text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
boolean hasText();
/**
* <pre>
* The token text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
ai.bareun.protos.TextSpan getText();
/**
* <pre>
* The token text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
ai.bareun.protos.TextSpanOrBuilder getTextOrBuilder();
/**
* <pre>
* κ° μμΉμ λν μ 보
* </pre>
*
* <code>string hint = 2;</code>
*/
java.lang.String getHint();
/**
* <pre>
* κ° μμΉμ λν μ 보
* </pre>
*
* <code>string hint = 2;</code>
*/
com.google.protobuf.ByteString
getHintBytes();
}
|
0
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun/protos/SegmentSentence.java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bareun/language_service.proto
package ai.bareun.protos;
/**
* Protobuf type {@code bareun.SegmentSentence}
*/
public final class SegmentSentence extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:bareun.SegmentSentence)
SegmentSentenceOrBuilder {
private static final long serialVersionUID = 0L;
// Use SegmentSentence.newBuilder() to construct.
private SegmentSentence(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private SegmentSentence() {
tokens_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private SegmentSentence(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
ai.bareun.protos.TextSpan.Builder subBuilder = null;
if (text_ != null) {
subBuilder = text_.toBuilder();
}
text_ = input.readMessage(ai.bareun.protos.TextSpan.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(text_);
text_ = subBuilder.buildPartial();
}
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
tokens_ = new java.util.ArrayList<ai.bareun.protos.SegmentToken>();
mutable_bitField0_ |= 0x00000002;
}
tokens_.add(
input.readMessage(ai.bareun.protos.SegmentToken.parser(), extensionRegistry));
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000002) != 0)) {
tokens_ = java.util.Collections.unmodifiableList(tokens_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_SegmentSentence_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_SegmentSentence_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.bareun.protos.SegmentSentence.class, ai.bareun.protos.SegmentSentence.Builder.class);
}
private int bitField0_;
public static final int TEXT_FIELD_NUMBER = 1;
private ai.bareun.protos.TextSpan text_;
/**
* <pre>
* The token text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public boolean hasText() {
return text_ != null;
}
/**
* <pre>
* The token text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public ai.bareun.protos.TextSpan getText() {
return text_ == null ? ai.bareun.protos.TextSpan.getDefaultInstance() : text_;
}
/**
* <pre>
* The token text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public ai.bareun.protos.TextSpanOrBuilder getTextOrBuilder() {
return getText();
}
public static final int TOKENS_FIELD_NUMBER = 2;
private java.util.List<ai.bareun.protos.SegmentToken> tokens_;
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.SegmentToken tokens = 2;</code>
*/
public java.util.List<ai.bareun.protos.SegmentToken> getTokensList() {
return tokens_;
}
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.SegmentToken tokens = 2;</code>
*/
public java.util.List<? extends ai.bareun.protos.SegmentTokenOrBuilder>
getTokensOrBuilderList() {
return tokens_;
}
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.SegmentToken tokens = 2;</code>
*/
public int getTokensCount() {
return tokens_.size();
}
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.SegmentToken tokens = 2;</code>
*/
public ai.bareun.protos.SegmentToken getTokens(int index) {
return tokens_.get(index);
}
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.SegmentToken tokens = 2;</code>
*/
public ai.bareun.protos.SegmentTokenOrBuilder getTokensOrBuilder(
int index) {
return tokens_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (text_ != null) {
output.writeMessage(1, getText());
}
for (int i = 0; i < tokens_.size(); i++) {
output.writeMessage(2, tokens_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (text_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getText());
}
for (int i = 0; i < tokens_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, tokens_.get(i));
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof ai.bareun.protos.SegmentSentence)) {
return super.equals(obj);
}
ai.bareun.protos.SegmentSentence other = (ai.bareun.protos.SegmentSentence) obj;
if (hasText() != other.hasText()) return false;
if (hasText()) {
if (!getText()
.equals(other.getText())) return false;
}
if (!getTokensList()
.equals(other.getTokensList())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasText()) {
hash = (37 * hash) + TEXT_FIELD_NUMBER;
hash = (53 * hash) + getText().hashCode();
}
if (getTokensCount() > 0) {
hash = (37 * hash) + TOKENS_FIELD_NUMBER;
hash = (53 * hash) + getTokensList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static ai.bareun.protos.SegmentSentence parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.SegmentSentence parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.SegmentSentence parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.SegmentSentence parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.SegmentSentence parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.SegmentSentence parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.SegmentSentence parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.bareun.protos.SegmentSentence 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.bareun.protos.SegmentSentence parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static ai.bareun.protos.SegmentSentence 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.bareun.protos.SegmentSentence parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.bareun.protos.SegmentSentence 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.bareun.protos.SegmentSentence 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 bareun.SegmentSentence}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:bareun.SegmentSentence)
ai.bareun.protos.SegmentSentenceOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_SegmentSentence_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_SegmentSentence_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.bareun.protos.SegmentSentence.class, ai.bareun.protos.SegmentSentence.Builder.class);
}
// Construct using ai.bareun.protos.SegmentSentence.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getTokensFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (textBuilder_ == null) {
text_ = null;
} else {
text_ = null;
textBuilder_ = null;
}
if (tokensBuilder_ == null) {
tokens_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
} else {
tokensBuilder_.clear();
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_SegmentSentence_descriptor;
}
@java.lang.Override
public ai.bareun.protos.SegmentSentence getDefaultInstanceForType() {
return ai.bareun.protos.SegmentSentence.getDefaultInstance();
}
@java.lang.Override
public ai.bareun.protos.SegmentSentence build() {
ai.bareun.protos.SegmentSentence result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ai.bareun.protos.SegmentSentence buildPartial() {
ai.bareun.protos.SegmentSentence result = new ai.bareun.protos.SegmentSentence(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (textBuilder_ == null) {
result.text_ = text_;
} else {
result.text_ = textBuilder_.build();
}
if (tokensBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
tokens_ = java.util.Collections.unmodifiableList(tokens_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.tokens_ = tokens_;
} else {
result.tokens_ = tokensBuilder_.build();
}
result.bitField0_ = to_bitField0_;
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.bareun.protos.SegmentSentence) {
return mergeFrom((ai.bareun.protos.SegmentSentence)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ai.bareun.protos.SegmentSentence other) {
if (other == ai.bareun.protos.SegmentSentence.getDefaultInstance()) return this;
if (other.hasText()) {
mergeText(other.getText());
}
if (tokensBuilder_ == null) {
if (!other.tokens_.isEmpty()) {
if (tokens_.isEmpty()) {
tokens_ = other.tokens_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureTokensIsMutable();
tokens_.addAll(other.tokens_);
}
onChanged();
}
} else {
if (!other.tokens_.isEmpty()) {
if (tokensBuilder_.isEmpty()) {
tokensBuilder_.dispose();
tokensBuilder_ = null;
tokens_ = other.tokens_;
bitField0_ = (bitField0_ & ~0x00000002);
tokensBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getTokensFieldBuilder() : null;
} else {
tokensBuilder_.addAllMessages(other.tokens_);
}
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
ai.bareun.protos.SegmentSentence parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (ai.bareun.protos.SegmentSentence) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private ai.bareun.protos.TextSpan text_;
private com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.TextSpan, ai.bareun.protos.TextSpan.Builder, ai.bareun.protos.TextSpanOrBuilder> textBuilder_;
/**
* <pre>
* The token text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public boolean hasText() {
return textBuilder_ != null || text_ != null;
}
/**
* <pre>
* The token text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public ai.bareun.protos.TextSpan getText() {
if (textBuilder_ == null) {
return text_ == null ? ai.bareun.protos.TextSpan.getDefaultInstance() : text_;
} else {
return textBuilder_.getMessage();
}
}
/**
* <pre>
* The token text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public Builder setText(ai.bareun.protos.TextSpan value) {
if (textBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
text_ = value;
onChanged();
} else {
textBuilder_.setMessage(value);
}
return this;
}
/**
* <pre>
* The token text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public Builder setText(
ai.bareun.protos.TextSpan.Builder builderForValue) {
if (textBuilder_ == null) {
text_ = builderForValue.build();
onChanged();
} else {
textBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* <pre>
* The token text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public Builder mergeText(ai.bareun.protos.TextSpan value) {
if (textBuilder_ == null) {
if (text_ != null) {
text_ =
ai.bareun.protos.TextSpan.newBuilder(text_).mergeFrom(value).buildPartial();
} else {
text_ = value;
}
onChanged();
} else {
textBuilder_.mergeFrom(value);
}
return this;
}
/**
* <pre>
* The token text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public Builder clearText() {
if (textBuilder_ == null) {
text_ = null;
onChanged();
} else {
text_ = null;
textBuilder_ = null;
}
return this;
}
/**
* <pre>
* The token text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public ai.bareun.protos.TextSpan.Builder getTextBuilder() {
onChanged();
return getTextFieldBuilder().getBuilder();
}
/**
* <pre>
* The token text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public ai.bareun.protos.TextSpanOrBuilder getTextOrBuilder() {
if (textBuilder_ != null) {
return textBuilder_.getMessageOrBuilder();
} else {
return text_ == null ?
ai.bareun.protos.TextSpan.getDefaultInstance() : text_;
}
}
/**
* <pre>
* The token text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.TextSpan, ai.bareun.protos.TextSpan.Builder, ai.bareun.protos.TextSpanOrBuilder>
getTextFieldBuilder() {
if (textBuilder_ == null) {
textBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.TextSpan, ai.bareun.protos.TextSpan.Builder, ai.bareun.protos.TextSpanOrBuilder>(
getText(),
getParentForChildren(),
isClean());
text_ = null;
}
return textBuilder_;
}
private java.util.List<ai.bareun.protos.SegmentToken> tokens_ =
java.util.Collections.emptyList();
private void ensureTokensIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
tokens_ = new java.util.ArrayList<ai.bareun.protos.SegmentToken>(tokens_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
ai.bareun.protos.SegmentToken, ai.bareun.protos.SegmentToken.Builder, ai.bareun.protos.SegmentTokenOrBuilder> tokensBuilder_;
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.SegmentToken tokens = 2;</code>
*/
public java.util.List<ai.bareun.protos.SegmentToken> getTokensList() {
if (tokensBuilder_ == null) {
return java.util.Collections.unmodifiableList(tokens_);
} else {
return tokensBuilder_.getMessageList();
}
}
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.SegmentToken tokens = 2;</code>
*/
public int getTokensCount() {
if (tokensBuilder_ == null) {
return tokens_.size();
} else {
return tokensBuilder_.getCount();
}
}
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.SegmentToken tokens = 2;</code>
*/
public ai.bareun.protos.SegmentToken getTokens(int index) {
if (tokensBuilder_ == null) {
return tokens_.get(index);
} else {
return tokensBuilder_.getMessage(index);
}
}
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.SegmentToken tokens = 2;</code>
*/
public Builder setTokens(
int index, ai.bareun.protos.SegmentToken value) {
if (tokensBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTokensIsMutable();
tokens_.set(index, value);
onChanged();
} else {
tokensBuilder_.setMessage(index, value);
}
return this;
}
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.SegmentToken tokens = 2;</code>
*/
public Builder setTokens(
int index, ai.bareun.protos.SegmentToken.Builder builderForValue) {
if (tokensBuilder_ == null) {
ensureTokensIsMutable();
tokens_.set(index, builderForValue.build());
onChanged();
} else {
tokensBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.SegmentToken tokens = 2;</code>
*/
public Builder addTokens(ai.bareun.protos.SegmentToken value) {
if (tokensBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTokensIsMutable();
tokens_.add(value);
onChanged();
} else {
tokensBuilder_.addMessage(value);
}
return this;
}
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.SegmentToken tokens = 2;</code>
*/
public Builder addTokens(
int index, ai.bareun.protos.SegmentToken value) {
if (tokensBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTokensIsMutable();
tokens_.add(index, value);
onChanged();
} else {
tokensBuilder_.addMessage(index, value);
}
return this;
}
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.SegmentToken tokens = 2;</code>
*/
public Builder addTokens(
ai.bareun.protos.SegmentToken.Builder builderForValue) {
if (tokensBuilder_ == null) {
ensureTokensIsMutable();
tokens_.add(builderForValue.build());
onChanged();
} else {
tokensBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.SegmentToken tokens = 2;</code>
*/
public Builder addTokens(
int index, ai.bareun.protos.SegmentToken.Builder builderForValue) {
if (tokensBuilder_ == null) {
ensureTokensIsMutable();
tokens_.add(index, builderForValue.build());
onChanged();
} else {
tokensBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.SegmentToken tokens = 2;</code>
*/
public Builder addAllTokens(
java.lang.Iterable<? extends ai.bareun.protos.SegmentToken> values) {
if (tokensBuilder_ == null) {
ensureTokensIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, tokens_);
onChanged();
} else {
tokensBuilder_.addAllMessages(values);
}
return this;
}
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.SegmentToken tokens = 2;</code>
*/
public Builder clearTokens() {
if (tokensBuilder_ == null) {
tokens_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
tokensBuilder_.clear();
}
return this;
}
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.SegmentToken tokens = 2;</code>
*/
public Builder removeTokens(int index) {
if (tokensBuilder_ == null) {
ensureTokensIsMutable();
tokens_.remove(index);
onChanged();
} else {
tokensBuilder_.remove(index);
}
return this;
}
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.SegmentToken tokens = 2;</code>
*/
public ai.bareun.protos.SegmentToken.Builder getTokensBuilder(
int index) {
return getTokensFieldBuilder().getBuilder(index);
}
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.SegmentToken tokens = 2;</code>
*/
public ai.bareun.protos.SegmentTokenOrBuilder getTokensOrBuilder(
int index) {
if (tokensBuilder_ == null) {
return tokens_.get(index); } else {
return tokensBuilder_.getMessageOrBuilder(index);
}
}
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.SegmentToken tokens = 2;</code>
*/
public java.util.List<? extends ai.bareun.protos.SegmentTokenOrBuilder>
getTokensOrBuilderList() {
if (tokensBuilder_ != null) {
return tokensBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(tokens_);
}
}
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.SegmentToken tokens = 2;</code>
*/
public ai.bareun.protos.SegmentToken.Builder addTokensBuilder() {
return getTokensFieldBuilder().addBuilder(
ai.bareun.protos.SegmentToken.getDefaultInstance());
}
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.SegmentToken tokens = 2;</code>
*/
public ai.bareun.protos.SegmentToken.Builder addTokensBuilder(
int index) {
return getTokensFieldBuilder().addBuilder(
index, ai.bareun.protos.SegmentToken.getDefaultInstance());
}
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.SegmentToken tokens = 2;</code>
*/
public java.util.List<ai.bareun.protos.SegmentToken.Builder>
getTokensBuilderList() {
return getTokensFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
ai.bareun.protos.SegmentToken, ai.bareun.protos.SegmentToken.Builder, ai.bareun.protos.SegmentTokenOrBuilder>
getTokensFieldBuilder() {
if (tokensBuilder_ == null) {
tokensBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
ai.bareun.protos.SegmentToken, ai.bareun.protos.SegmentToken.Builder, ai.bareun.protos.SegmentTokenOrBuilder>(
tokens_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
tokens_ = null;
}
return tokensBuilder_;
}
@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:bareun.SegmentSentence)
}
// @@protoc_insertion_point(class_scope:bareun.SegmentSentence)
private static final ai.bareun.protos.SegmentSentence DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new ai.bareun.protos.SegmentSentence();
}
public static ai.bareun.protos.SegmentSentence getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<SegmentSentence>
PARSER = new com.google.protobuf.AbstractParser<SegmentSentence>() {
@java.lang.Override
public SegmentSentence parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new SegmentSentence(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<SegmentSentence> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<SegmentSentence> getParserForType() {
return PARSER;
}
@java.lang.Override
public ai.bareun.protos.SegmentSentence getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
|
0
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun/protos/SegmentSentenceOrBuilder.java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bareun/language_service.proto
package ai.bareun.protos;
public interface SegmentSentenceOrBuilder extends
// @@protoc_insertion_point(interface_extends:bareun.SegmentSentence)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* The token text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
boolean hasText();
/**
* <pre>
* The token text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
ai.bareun.protos.TextSpan getText();
/**
* <pre>
* The token text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
ai.bareun.protos.TextSpanOrBuilder getTextOrBuilder();
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.SegmentToken tokens = 2;</code>
*/
java.util.List<ai.bareun.protos.SegmentToken>
getTokensList();
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.SegmentToken tokens = 2;</code>
*/
ai.bareun.protos.SegmentToken getTokens(int index);
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.SegmentToken tokens = 2;</code>
*/
int getTokensCount();
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.SegmentToken tokens = 2;</code>
*/
java.util.List<? extends ai.bareun.protos.SegmentTokenOrBuilder>
getTokensOrBuilderList();
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.SegmentToken tokens = 2;</code>
*/
ai.bareun.protos.SegmentTokenOrBuilder getTokensOrBuilder(
int index);
}
|
0
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun
|
java-sources/ai/bareun/tagger/bareun/1.4.3/ai/bareun/protos/SegmentToken.java
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bareun/language_service.proto
package ai.bareun.protos;
/**
* Protobuf type {@code bareun.SegmentToken}
*/
public final class SegmentToken extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:bareun.SegmentToken)
SegmentTokenOrBuilder {
private static final long serialVersionUID = 0L;
// Use SegmentToken.newBuilder() to construct.
private SegmentToken(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private SegmentToken() {
segments_ = java.util.Collections.emptyList();
tagged_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private SegmentToken(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
ai.bareun.protos.TextSpan.Builder subBuilder = null;
if (text_ != null) {
subBuilder = text_.toBuilder();
}
text_ = input.readMessage(ai.bareun.protos.TextSpan.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(text_);
text_ = subBuilder.buildPartial();
}
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
segments_ = new java.util.ArrayList<ai.bareun.protos.Segment>();
mutable_bitField0_ |= 0x00000002;
}
segments_.add(
input.readMessage(ai.bareun.protos.Segment.parser(), extensionRegistry));
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
tagged_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000002) != 0)) {
segments_ = java.util.Collections.unmodifiableList(segments_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_SegmentToken_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_SegmentToken_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.bareun.protos.SegmentToken.class, ai.bareun.protos.SegmentToken.Builder.class);
}
private int bitField0_;
public static final int TEXT_FIELD_NUMBER = 1;
private ai.bareun.protos.TextSpan text_;
/**
* <pre>
* The token text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public boolean hasText() {
return text_ != null;
}
/**
* <pre>
* The token text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public ai.bareun.protos.TextSpan getText() {
return text_ == null ? ai.bareun.protos.TextSpan.getDefaultInstance() : text_;
}
/**
* <pre>
* The token text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public ai.bareun.protos.TextSpanOrBuilder getTextOrBuilder() {
return getText();
}
public static final int SEGMENTS_FIELD_NUMBER = 2;
private java.util.List<ai.bareun.protos.Segment> segments_;
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.Segment segments = 2;</code>
*/
public java.util.List<ai.bareun.protos.Segment> getSegmentsList() {
return segments_;
}
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.Segment segments = 2;</code>
*/
public java.util.List<? extends ai.bareun.protos.SegmentOrBuilder>
getSegmentsOrBuilderList() {
return segments_;
}
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.Segment segments = 2;</code>
*/
public int getSegmentsCount() {
return segments_.size();
}
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.Segment segments = 2;</code>
*/
public ai.bareun.protos.Segment getSegments(int index) {
return segments_.get(index);
}
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.Segment segments = 2;</code>
*/
public ai.bareun.protos.SegmentOrBuilder getSegmentsOrBuilder(
int index) {
return segments_.get(index);
}
public static final int TAGGED_FIELD_NUMBER = 5;
private volatile java.lang.Object tagged_;
/**
* <pre>
* μλ¦λ΅/V+γ΄/E
* </pre>
*
* <code>string tagged = 5;</code>
*/
public java.lang.String getTagged() {
java.lang.Object ref = tagged_;
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();
tagged_ = s;
return s;
}
}
/**
* <pre>
* μλ¦λ΅/V+γ΄/E
* </pre>
*
* <code>string tagged = 5;</code>
*/
public com.google.protobuf.ByteString
getTaggedBytes() {
java.lang.Object ref = tagged_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
tagged_ = 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 (text_ != null) {
output.writeMessage(1, getText());
}
for (int i = 0; i < segments_.size(); i++) {
output.writeMessage(2, segments_.get(i));
}
if (!getTaggedBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, tagged_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (text_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getText());
}
for (int i = 0; i < segments_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, segments_.get(i));
}
if (!getTaggedBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, tagged_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof ai.bareun.protos.SegmentToken)) {
return super.equals(obj);
}
ai.bareun.protos.SegmentToken other = (ai.bareun.protos.SegmentToken) obj;
if (hasText() != other.hasText()) return false;
if (hasText()) {
if (!getText()
.equals(other.getText())) return false;
}
if (!getSegmentsList()
.equals(other.getSegmentsList())) return false;
if (!getTagged()
.equals(other.getTagged())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasText()) {
hash = (37 * hash) + TEXT_FIELD_NUMBER;
hash = (53 * hash) + getText().hashCode();
}
if (getSegmentsCount() > 0) {
hash = (37 * hash) + SEGMENTS_FIELD_NUMBER;
hash = (53 * hash) + getSegmentsList().hashCode();
}
hash = (37 * hash) + TAGGED_FIELD_NUMBER;
hash = (53 * hash) + getTagged().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static ai.bareun.protos.SegmentToken parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.SegmentToken parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.SegmentToken parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.SegmentToken parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.SegmentToken parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ai.bareun.protos.SegmentToken parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ai.bareun.protos.SegmentToken parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.bareun.protos.SegmentToken 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.bareun.protos.SegmentToken parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static ai.bareun.protos.SegmentToken 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.bareun.protos.SegmentToken parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ai.bareun.protos.SegmentToken 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.bareun.protos.SegmentToken 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 bareun.SegmentToken}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:bareun.SegmentToken)
ai.bareun.protos.SegmentTokenOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_SegmentToken_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_SegmentToken_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ai.bareun.protos.SegmentToken.class, ai.bareun.protos.SegmentToken.Builder.class);
}
// Construct using ai.bareun.protos.SegmentToken.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getSegmentsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (textBuilder_ == null) {
text_ = null;
} else {
text_ = null;
textBuilder_ = null;
}
if (segmentsBuilder_ == null) {
segments_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
} else {
segmentsBuilder_.clear();
}
tagged_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ai.bareun.protos.LanguageServiceProto.internal_static_bareun_SegmentToken_descriptor;
}
@java.lang.Override
public ai.bareun.protos.SegmentToken getDefaultInstanceForType() {
return ai.bareun.protos.SegmentToken.getDefaultInstance();
}
@java.lang.Override
public ai.bareun.protos.SegmentToken build() {
ai.bareun.protos.SegmentToken result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ai.bareun.protos.SegmentToken buildPartial() {
ai.bareun.protos.SegmentToken result = new ai.bareun.protos.SegmentToken(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (textBuilder_ == null) {
result.text_ = text_;
} else {
result.text_ = textBuilder_.build();
}
if (segmentsBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
segments_ = java.util.Collections.unmodifiableList(segments_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.segments_ = segments_;
} else {
result.segments_ = segmentsBuilder_.build();
}
result.tagged_ = tagged_;
result.bitField0_ = to_bitField0_;
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.bareun.protos.SegmentToken) {
return mergeFrom((ai.bareun.protos.SegmentToken)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ai.bareun.protos.SegmentToken other) {
if (other == ai.bareun.protos.SegmentToken.getDefaultInstance()) return this;
if (other.hasText()) {
mergeText(other.getText());
}
if (segmentsBuilder_ == null) {
if (!other.segments_.isEmpty()) {
if (segments_.isEmpty()) {
segments_ = other.segments_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureSegmentsIsMutable();
segments_.addAll(other.segments_);
}
onChanged();
}
} else {
if (!other.segments_.isEmpty()) {
if (segmentsBuilder_.isEmpty()) {
segmentsBuilder_.dispose();
segmentsBuilder_ = null;
segments_ = other.segments_;
bitField0_ = (bitField0_ & ~0x00000002);
segmentsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getSegmentsFieldBuilder() : null;
} else {
segmentsBuilder_.addAllMessages(other.segments_);
}
}
}
if (!other.getTagged().isEmpty()) {
tagged_ = other.tagged_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
ai.bareun.protos.SegmentToken parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (ai.bareun.protos.SegmentToken) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private ai.bareun.protos.TextSpan text_;
private com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.TextSpan, ai.bareun.protos.TextSpan.Builder, ai.bareun.protos.TextSpanOrBuilder> textBuilder_;
/**
* <pre>
* The token text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public boolean hasText() {
return textBuilder_ != null || text_ != null;
}
/**
* <pre>
* The token text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public ai.bareun.protos.TextSpan getText() {
if (textBuilder_ == null) {
return text_ == null ? ai.bareun.protos.TextSpan.getDefaultInstance() : text_;
} else {
return textBuilder_.getMessage();
}
}
/**
* <pre>
* The token text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public Builder setText(ai.bareun.protos.TextSpan value) {
if (textBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
text_ = value;
onChanged();
} else {
textBuilder_.setMessage(value);
}
return this;
}
/**
* <pre>
* The token text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public Builder setText(
ai.bareun.protos.TextSpan.Builder builderForValue) {
if (textBuilder_ == null) {
text_ = builderForValue.build();
onChanged();
} else {
textBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* <pre>
* The token text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public Builder mergeText(ai.bareun.protos.TextSpan value) {
if (textBuilder_ == null) {
if (text_ != null) {
text_ =
ai.bareun.protos.TextSpan.newBuilder(text_).mergeFrom(value).buildPartial();
} else {
text_ = value;
}
onChanged();
} else {
textBuilder_.mergeFrom(value);
}
return this;
}
/**
* <pre>
* The token text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public Builder clearText() {
if (textBuilder_ == null) {
text_ = null;
onChanged();
} else {
text_ = null;
textBuilder_ = null;
}
return this;
}
/**
* <pre>
* The token text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public ai.bareun.protos.TextSpan.Builder getTextBuilder() {
onChanged();
return getTextFieldBuilder().getBuilder();
}
/**
* <pre>
* The token text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
public ai.bareun.protos.TextSpanOrBuilder getTextOrBuilder() {
if (textBuilder_ != null) {
return textBuilder_.getMessageOrBuilder();
} else {
return text_ == null ?
ai.bareun.protos.TextSpan.getDefaultInstance() : text_;
}
}
/**
* <pre>
* The token text.
* </pre>
*
* <code>.bareun.TextSpan text = 1;</code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.TextSpan, ai.bareun.protos.TextSpan.Builder, ai.bareun.protos.TextSpanOrBuilder>
getTextFieldBuilder() {
if (textBuilder_ == null) {
textBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
ai.bareun.protos.TextSpan, ai.bareun.protos.TextSpan.Builder, ai.bareun.protos.TextSpanOrBuilder>(
getText(),
getParentForChildren(),
isClean());
text_ = null;
}
return textBuilder_;
}
private java.util.List<ai.bareun.protos.Segment> segments_ =
java.util.Collections.emptyList();
private void ensureSegmentsIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
segments_ = new java.util.ArrayList<ai.bareun.protos.Segment>(segments_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
ai.bareun.protos.Segment, ai.bareun.protos.Segment.Builder, ai.bareun.protos.SegmentOrBuilder> segmentsBuilder_;
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.Segment segments = 2;</code>
*/
public java.util.List<ai.bareun.protos.Segment> getSegmentsList() {
if (segmentsBuilder_ == null) {
return java.util.Collections.unmodifiableList(segments_);
} else {
return segmentsBuilder_.getMessageList();
}
}
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.Segment segments = 2;</code>
*/
public int getSegmentsCount() {
if (segmentsBuilder_ == null) {
return segments_.size();
} else {
return segmentsBuilder_.getCount();
}
}
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.Segment segments = 2;</code>
*/
public ai.bareun.protos.Segment getSegments(int index) {
if (segmentsBuilder_ == null) {
return segments_.get(index);
} else {
return segmentsBuilder_.getMessage(index);
}
}
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.Segment segments = 2;</code>
*/
public Builder setSegments(
int index, ai.bareun.protos.Segment value) {
if (segmentsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSegmentsIsMutable();
segments_.set(index, value);
onChanged();
} else {
segmentsBuilder_.setMessage(index, value);
}
return this;
}
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.Segment segments = 2;</code>
*/
public Builder setSegments(
int index, ai.bareun.protos.Segment.Builder builderForValue) {
if (segmentsBuilder_ == null) {
ensureSegmentsIsMutable();
segments_.set(index, builderForValue.build());
onChanged();
} else {
segmentsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.Segment segments = 2;</code>
*/
public Builder addSegments(ai.bareun.protos.Segment value) {
if (segmentsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSegmentsIsMutable();
segments_.add(value);
onChanged();
} else {
segmentsBuilder_.addMessage(value);
}
return this;
}
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.Segment segments = 2;</code>
*/
public Builder addSegments(
int index, ai.bareun.protos.Segment value) {
if (segmentsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSegmentsIsMutable();
segments_.add(index, value);
onChanged();
} else {
segmentsBuilder_.addMessage(index, value);
}
return this;
}
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.Segment segments = 2;</code>
*/
public Builder addSegments(
ai.bareun.protos.Segment.Builder builderForValue) {
if (segmentsBuilder_ == null) {
ensureSegmentsIsMutable();
segments_.add(builderForValue.build());
onChanged();
} else {
segmentsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.Segment segments = 2;</code>
*/
public Builder addSegments(
int index, ai.bareun.protos.Segment.Builder builderForValue) {
if (segmentsBuilder_ == null) {
ensureSegmentsIsMutable();
segments_.add(index, builderForValue.build());
onChanged();
} else {
segmentsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.Segment segments = 2;</code>
*/
public Builder addAllSegments(
java.lang.Iterable<? extends ai.bareun.protos.Segment> values) {
if (segmentsBuilder_ == null) {
ensureSegmentsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, segments_);
onChanged();
} else {
segmentsBuilder_.addAllMessages(values);
}
return this;
}
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.Segment segments = 2;</code>
*/
public Builder clearSegments() {
if (segmentsBuilder_ == null) {
segments_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
segmentsBuilder_.clear();
}
return this;
}
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.Segment segments = 2;</code>
*/
public Builder removeSegments(int index) {
if (segmentsBuilder_ == null) {
ensureSegmentsIsMutable();
segments_.remove(index);
onChanged();
} else {
segmentsBuilder_.remove(index);
}
return this;
}
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.Segment segments = 2;</code>
*/
public ai.bareun.protos.Segment.Builder getSegmentsBuilder(
int index) {
return getSegmentsFieldBuilder().getBuilder(index);
}
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.Segment segments = 2;</code>
*/
public ai.bareun.protos.SegmentOrBuilder getSegmentsOrBuilder(
int index) {
if (segmentsBuilder_ == null) {
return segments_.get(index); } else {
return segmentsBuilder_.getMessageOrBuilder(index);
}
}
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.Segment segments = 2;</code>
*/
public java.util.List<? extends ai.bareun.protos.SegmentOrBuilder>
getSegmentsOrBuilderList() {
if (segmentsBuilder_ != null) {
return segmentsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(segments_);
}
}
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.Segment segments = 2;</code>
*/
public ai.bareun.protos.Segment.Builder addSegmentsBuilder() {
return getSegmentsFieldBuilder().addBuilder(
ai.bareun.protos.Segment.getDefaultInstance());
}
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.Segment segments = 2;</code>
*/
public ai.bareun.protos.Segment.Builder addSegmentsBuilder(
int index) {
return getSegmentsFieldBuilder().addBuilder(
index, ai.bareun.protos.Segment.getDefaultInstance());
}
/**
* <pre>
* μ΄μ λ΄λΆμ ννμ λΆλ¦¬
* </pre>
*
* <code>repeated .bareun.Segment segments = 2;</code>
*/
public java.util.List<ai.bareun.protos.Segment.Builder>
getSegmentsBuilderList() {
return getSegmentsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
ai.bareun.protos.Segment, ai.bareun.protos.Segment.Builder, ai.bareun.protos.SegmentOrBuilder>
getSegmentsFieldBuilder() {
if (segmentsBuilder_ == null) {
segmentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
ai.bareun.protos.Segment, ai.bareun.protos.Segment.Builder, ai.bareun.protos.SegmentOrBuilder>(
segments_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
segments_ = null;
}
return segmentsBuilder_;
}
private java.lang.Object tagged_ = "";
/**
* <pre>
* μλ¦λ΅/V+γ΄/E
* </pre>
*
* <code>string tagged = 5;</code>
*/
public java.lang.String getTagged() {
java.lang.Object ref = tagged_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
tagged_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* μλ¦λ΅/V+γ΄/E
* </pre>
*
* <code>string tagged = 5;</code>
*/
public com.google.protobuf.ByteString
getTaggedBytes() {
java.lang.Object ref = tagged_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
tagged_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* μλ¦λ΅/V+γ΄/E
* </pre>
*
* <code>string tagged = 5;</code>
*/
public Builder setTagged(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
tagged_ = value;
onChanged();
return this;
}
/**
* <pre>
* μλ¦λ΅/V+γ΄/E
* </pre>
*
* <code>string tagged = 5;</code>
*/
public Builder clearTagged() {
tagged_ = getDefaultInstance().getTagged();
onChanged();
return this;
}
/**
* <pre>
* μλ¦λ΅/V+γ΄/E
* </pre>
*
* <code>string tagged = 5;</code>
*/
public Builder setTaggedBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
tagged_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:bareun.SegmentToken)
}
// @@protoc_insertion_point(class_scope:bareun.SegmentToken)
private static final ai.bareun.protos.SegmentToken DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new ai.bareun.protos.SegmentToken();
}
public static ai.bareun.protos.SegmentToken getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<SegmentToken>
PARSER = new com.google.protobuf.AbstractParser<SegmentToken>() {
@java.lang.Override
public SegmentToken parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new SegmentToken(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<SegmentToken> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<SegmentToken> getParserForType() {
return PARSER;
}
@java.lang.Override
public ai.bareun.protos.SegmentToken getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.