diff --git a/alibabacloud-gateway-sls/Teafile b/alibabacloud-gateway-sls/Teafile index 5bb58792..f11876a3 100644 --- a/alibabacloud-gateway-sls/Teafile +++ b/alibabacloud-gateway-sls/Teafile @@ -1,7 +1,7 @@ { "scope": "alibabacloud", "name": "GatewaySLS", - "version": "0.1.11", + "version": "0.1.12", "main": "./main.tea", "maintainers": [ { @@ -93,7 +93,7 @@ }, "releaselog": { "changelog": [ - "feat: sls support auto compress." + "[java]feat: sls java sdk support PutLogs with protobuf." ], "compatible": true } diff --git a/alibabacloud-gateway-sls/java/pom.xml b/alibabacloud-gateway-sls/java/pom.xml index fdbebb95..a8eb0412 100644 --- a/alibabacloud-gateway-sls/java/pom.xml +++ b/alibabacloud-gateway-sls/java/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.aliyun alibabacloud-gateway-sls - 0.3.0 + 0.4.0 jar alibabacloud-gateway-sls @@ -49,12 +49,12 @@ com.aliyun alibabacloud-gateway-spi - 0.0.2 + 0.0.3 com.aliyun credentials-java - 0.3.6 + 1.0.2 com.aliyun @@ -64,7 +64,7 @@ com.aliyun openapiutil - 0.2.1 + 0.2.2 com.aliyun @@ -84,12 +84,12 @@ com.aliyun darabonba-encode-util - 0.0.2 + 0.0.3 com.aliyun darabonba-signature-util - 0.0.4 + 0.0.5 com.aliyun @@ -99,7 +99,7 @@ com.aliyun alibabacloud-gateway-sls-util - 0.3.0 + 0.4.0 diff --git a/alibabacloud-gateway-sls/java/src/main/java/com/aliyun/gateway/sls/Client.java b/alibabacloud-gateway-sls/java/src/main/java/com/aliyun/gateway/sls/Client.java index 56d8e2b7..75d76114 100644 --- a/alibabacloud-gateway-sls/java/src/main/java/com/aliyun/gateway/sls/Client.java +++ b/alibabacloud-gateway-sls/java/src/main/java/com/aliyun/gateway/sls/Client.java @@ -66,7 +66,11 @@ public void modifyRequest(com.aliyun.gateway.spi.models.InterceptorContext conte // get body bytes byte[] bodyBytes = null; if (!com.aliyun.teautil.Common.isUnset(request.body)) { - if (com.aliyun.darabonbastring.Client.equals(request.reqBodyType, "json") || com.aliyun.darabonbastring.Client.equals(request.reqBodyType, "formData")) { + // PutLogs + if (com.aliyun.darabonbastring.Client.equals(request.action, "PutLogs")) { + bodyBytes = com.aliyun.gateway.sls.util.Client.serializeLogGroupToPB(request.body); + request.headers.put("content-type", "application/x-protobuf"); + } else if (com.aliyun.darabonbastring.Client.equals(request.reqBodyType, "json") || com.aliyun.darabonbastring.Client.equals(request.reqBodyType, "formData")) { request.headers.put("content-type", "application/json"); String bodyStr = com.aliyun.teautil.Common.toJSONString(request.body); bodyBytes = com.aliyun.teautil.Common.toBytes(bodyStr); diff --git a/alibabacloud-gateway-sls/main.tea b/alibabacloud-gateway-sls/main.tea index 40cad4a0..783e2fbe 100644 --- a/alibabacloud-gateway-sls/main.tea +++ b/alibabacloud-gateway-sls/main.tea @@ -57,7 +57,12 @@ async function modifyRequest(context: SPI.InterceptorContext, attributeMap: SPI. // get body bytes var bodyBytes : bytes = null; if (!Util.isUnset(request.body)) { - if (String.equals(request.reqBodyType, 'json') || String.equals(request.reqBodyType, 'formData')) { + + // PutLogs + if (String.equals(request.action, 'PutLogs')) { + bodyBytes = SLS_Util.serializeLogGroupToPB(request.body); + request.headers['content-type'] = 'application/x-protobuf'; + } else if (String.equals(request.reqBodyType, 'json') || String.equals(request.reqBodyType, 'formData')) { request.headers['content-type'] = 'application/json'; var bodyStr = Util.toJSONString(request.body); bodyBytes = Util.toBytes(bodyStr); diff --git a/alibabacloud-gateway-sls/util/Teafile b/alibabacloud-gateway-sls/util/Teafile index 3ec91363..0c4e6941 100644 --- a/alibabacloud-gateway-sls/util/Teafile +++ b/alibabacloud-gateway-sls/util/Teafile @@ -1,7 +1,7 @@ { "scope": "alibabacloud", "name": "GatewaySLS_Util", - "version": "0.0.4", + "version": "0.0.5", "main": "./main.tea", "maintainers": [ { diff --git a/alibabacloud-gateway-sls/util/java/pom.xml b/alibabacloud-gateway-sls/util/java/pom.xml index 25fd8c4e..5187f0c1 100644 --- a/alibabacloud-gateway-sls/util/java/pom.xml +++ b/alibabacloud-gateway-sls/util/java/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.aliyun alibabacloud-gateway-sls-util - 0.3.0 + 0.4.0 jar alibabacloud-gateway-sls-util @@ -54,12 +54,12 @@ com.aliyun tea - 1.2.3 + 1.3.3 com.aliyun tea-util - 0.2.14 + 0.2.23 com.github.luben @@ -72,6 +72,11 @@ 4.11 test + + com.google.protobuf + protobuf-java + 2.5.0 + @@ -123,6 +128,44 @@ published + + org.apache.maven.plugins + maven-shade-plugin + 3.2.4 + + + + com.google.protobuf:protobuf-java + + + + + com.google.protobuf + com.aliyun.gateway.sls.thirdparty.com.google.protobuf + + + + + + *:* + + META-INF/*.SF + META-INF/*.DSA + META-INF/*.RSA + **/pom.xml + + + + + + + package + + shade + + + + \ No newline at end of file diff --git a/alibabacloud-gateway-sls/util/java/src/main/java/com/aliyun/gateway/sls/util/Client.java b/alibabacloud-gateway-sls/util/java/src/main/java/com/aliyun/gateway/sls/util/Client.java index 07fdade1..75398cc1 100644 --- a/alibabacloud-gateway-sls/util/java/src/main/java/com/aliyun/gateway/sls/util/Client.java +++ b/alibabacloud-gateway-sls/util/java/src/main/java/com/aliyun/gateway/sls/util/Client.java @@ -49,4 +49,8 @@ public static Boolean isDecompressorAvailable(String compressType) throws Except public static Long bytesLength(byte[] src) throws Exception { return (long) src.length; } + + public static byte[] serializeLogGroupToPB(Object logGroup) throws Exception { + return LogGroupSerializer.serializeLogGroupToPB(logGroup); + } } diff --git a/alibabacloud-gateway-sls/util/java/src/main/java/com/aliyun/gateway/sls/util/LogGroupSerializer.java b/alibabacloud-gateway-sls/util/java/src/main/java/com/aliyun/gateway/sls/util/LogGroupSerializer.java new file mode 100644 index 00000000..15e433a6 --- /dev/null +++ b/alibabacloud-gateway-sls/util/java/src/main/java/com/aliyun/gateway/sls/util/LogGroupSerializer.java @@ -0,0 +1,145 @@ +package com.aliyun.gateway.sls.util; + +import java.net.InetAddress; +import java.net.NetworkInterface; +import java.net.SocketException; +import java.util.ArrayList; +import java.util.Enumeration; +import java.util.HashMap; + +public class LogGroupSerializer { + @SuppressWarnings("unchecked") + public static byte[] serializeLogGroupToPB(Object logGroup) throws Exception { + if (!(logGroup instanceof HashMap)) { + throw new IllegalArgumentException("Invalid body type " + logGroup.getClass()); + } + + Logs.LogGroup.Builder logs = Logs.LogGroup.newBuilder(); + HashMap body = (HashMap) logGroup; + + String topic = (String) body.get("Topic"); + if (topic != null) { + logs.setTopic(topic); + } + + String source = (String) body.get("Source"); + if (source == null || source.isEmpty()) { + source = getSourceIP(); + } + if (source != null && !source.isEmpty()) { + logs.setSource(source); + } + + serializeLogTags(logs, body); + + serializeLogs(logs, body); + return logs.build().toByteArray(); + } + + @SuppressWarnings("unchecked") + private static void serializeLogs(Logs.LogGroup.Builder logs, HashMap body) { + ArrayList logItems = (ArrayList) body.get("LogItems"); + if (logItems == null) { + return; + } + for (Object obj : logItems) { + Logs.Log.Builder logsBuilder = logs.addLogsBuilder(); + HashMap logItem = (HashMap) obj; + if (logItem == null) { + continue; + } + logsBuilder.setTime((Integer) logItem.get("Time")); + ArrayList contents = (ArrayList) logItem.get("Contents"); + for (Object content : contents) { + HashMap realContent = (HashMap) content; + Logs.Log.Content.Builder contentBuilder = logsBuilder.addContentsBuilder(); + contentBuilder.setKey(realContent.get("Key")); + contentBuilder.setValue(realContent.get("Value")); + } + Integer nanoTime = (Integer) logItem.get("TimeNs"); + if (nanoTime != null) { + logsBuilder.setTimeNs(nanoTime); + } + } + } + + @SuppressWarnings("unchecked") + private static void serializeLogTags(Logs.LogGroup.Builder logs, HashMap body) { + ArrayList logTags = (ArrayList) body.get("LogTags"); + if (logTags == null) { + return; + } + for (Object obj : logTags) { + HashMap tag = (HashMap) obj; + Logs.LogTag.Builder tagBuilder = logs.addLogTagsBuilder(); + tagBuilder.setKey(tag.get("Key")); + tagBuilder.setValue(tag.get("Value")); + } + } + + + private static volatile String localMachineIP = null; + private static String getSourceIP() { + if (localMachineIP != null) { + return localMachineIP; + } + String ip = getLocalMachineIP(); + synchronized (LogGroupSerializer.class) { + localMachineIP = ip; // it's ok to overwrite + } + return localMachineIP; + } + + private static String getLocalMachineIP() { + try { + Enumeration networkInterfaces = NetworkInterface.getNetworkInterfaces(); + while (networkInterfaces.hasMoreElements()) { + NetworkInterface ni = networkInterfaces.nextElement(); + if (!ni.isUp()) { + continue; + } + Enumeration addresses = ni.getInetAddresses(); + while (addresses.hasMoreElements()) { + final InetAddress address = addresses.nextElement(); + if (!address.isLinkLocalAddress() && address.getHostAddress() != null) { + String ipAddress = address.getHostAddress(); + if (ipAddress.equals(CONST_LOCAL_IP)) { + continue; + } + if (isIPV4Addr(ipAddress)) { + return ipAddress; + } + } + } + } + } catch (SocketException ex) { + // swallow it + } catch (Exception ex) { + // swallow it + } + return ""; + } + + private static boolean isIPV4Addr(final String ipAddress) { + if (ipAddress == null || ipAddress.isEmpty()) { + return false; + } + try { + final String[] tokens = ipAddress.split("\\."); + if (tokens.length != 4) { + return false; + } + for (String token : tokens) { + int i = Integer.parseInt(token); + if (i < 0 || i > 255) { + return false; + } + } + return true; + } catch (Exception ex) { + return false; + } + } + + private static final String CONST_LOCAL_IP = "127.0.0.1"; +} diff --git a/alibabacloud-gateway-sls/util/java/src/main/java/com/aliyun/gateway/sls/util/Logs.java b/alibabacloud-gateway-sls/util/java/src/main/java/com/aliyun/gateway/sls/util/Logs.java new file mode 100644 index 00000000..b46b52cb --- /dev/null +++ b/alibabacloud-gateway-sls/util/java/src/main/java/com/aliyun/gateway/sls/util/Logs.java @@ -0,0 +1,4654 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: Logs.proto + +package com.aliyun.gateway.sls.util; + +public final class Logs { + private Logs() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + public interface LogOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required uint32 Time = 1; + /** + * required uint32 Time = 1; + * + *
+         * UNIX Time Format
+         * 
+ */ + boolean hasTime(); + /** + * required uint32 Time = 1; + * + *
+         * UNIX Time Format
+         * 
+ */ + int getTime(); + + // repeated .com.aliyun.gateway.sls.util.Log.Content Contents = 2; + /** + * repeated .com.aliyun.gateway.sls.util.Log.Content Contents = 2; + */ + java.util.List + getContentsList(); + /** + * repeated .com.aliyun.gateway.sls.util.Log.Content Contents = 2; + */ + com.aliyun.gateway.sls.util.Logs.Log.Content getContents(int index); + /** + * repeated .com.aliyun.gateway.sls.util.Log.Content Contents = 2; + */ + int getContentsCount(); + /** + * repeated .com.aliyun.gateway.sls.util.Log.Content Contents = 2; + */ + java.util.List + getContentsOrBuilderList(); + /** + * repeated .com.aliyun.gateway.sls.util.Log.Content Contents = 2; + */ + com.aliyun.gateway.sls.util.Logs.Log.ContentOrBuilder getContentsOrBuilder( + int index); + + // optional fixed32 Time_ns = 4; + /** + * optional fixed32 Time_ns = 4; + */ + boolean hasTimeNs(); + /** + * optional fixed32 Time_ns = 4; + */ + int getTimeNs(); + } + /** + * Protobuf type {@code com.aliyun.gateway.sls.util.Log} + */ + public static final class Log extends + com.google.protobuf.GeneratedMessage + implements LogOrBuilder { + // Use Log.newBuilder() to construct. + private Log(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private Log(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final Log defaultInstance; + public static Log getDefaultInstance() { + return defaultInstance; + } + + public Log getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Log( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + 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; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + time_ = input.readUInt32(); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + contents_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + contents_.add(input.readMessage(com.aliyun.gateway.sls.util.Logs.Log.Content.PARSER, extensionRegistry)); + break; + } + case 37: { + bitField0_ |= 0x00000002; + timeNs_ = input.readFixed32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + contents_ = java.util.Collections.unmodifiableList(contents_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.aliyun.gateway.sls.util.Logs.internal_static_com_aliyun_openservices_log_common_Log_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.aliyun.gateway.sls.util.Logs.internal_static_com_aliyun_openservices_log_common_Log_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.aliyun.gateway.sls.util.Logs.Log.class, com.aliyun.gateway.sls.util.Logs.Log.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Log parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Log(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public interface ContentOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string Key = 1; + /** + * required string Key = 1; + */ + boolean hasKey(); + /** + * required string Key = 1; + */ + java.lang.String getKey(); + /** + * required string Key = 1; + */ + com.google.protobuf.ByteString + getKeyBytes(); + + // required string Value = 2; + /** + * required string Value = 2; + */ + boolean hasValue(); + /** + * required string Value = 2; + */ + java.lang.String getValue(); + /** + * required string Value = 2; + */ + com.google.protobuf.ByteString + getValueBytes(); + } + /** + * Protobuf type {@code com.aliyun.gateway.sls.util.Log.Content} + */ + public static final class Content extends + com.google.protobuf.GeneratedMessage + implements ContentOrBuilder { + // Use Content.newBuilder() to construct. + private Content(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private Content(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final Content defaultInstance; + public static Content getDefaultInstance() { + return defaultInstance; + } + + public Content getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Content( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + 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; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + key_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + value_ = input.readBytes(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.aliyun.gateway.sls.util.Logs.internal_static_com_aliyun_openservices_log_common_Log_Content_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.aliyun.gateway.sls.util.Logs.internal_static_com_aliyun_openservices_log_common_Log_Content_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.aliyun.gateway.sls.util.Logs.Log.Content.class, com.aliyun.gateway.sls.util.Logs.Log.Content.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Content parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Content(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required string Key = 1; + public static final int KEY_FIELD_NUMBER = 1; + private java.lang.Object key_; + /** + * required string Key = 1; + */ + public boolean hasKey() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string Key = 1; + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + key_ = s; + } + return s; + } + } + /** + * required string Key = 1; + */ + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required string Value = 2; + public static final int VALUE_FIELD_NUMBER = 2; + private java.lang.Object value_; + /** + * required string Value = 2; + */ + public boolean hasValue() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * required string Value = 2; + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + value_ = s; + } + return s; + } + } + /** + * required string Value = 2; + */ + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + key_ = ""; + value_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasKey()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasValue()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getKeyBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getValueBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getKeyBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getValueBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.aliyun.gateway.sls.util.Logs.Log.Content parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.aliyun.gateway.sls.util.Logs.Log.Content parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.aliyun.gateway.sls.util.Logs.Log.Content parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.aliyun.gateway.sls.util.Logs.Log.Content parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.aliyun.gateway.sls.util.Logs.Log.Content parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.aliyun.gateway.sls.util.Logs.Log.Content parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.aliyun.gateway.sls.util.Logs.Log.Content parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.aliyun.gateway.sls.util.Logs.Log.Content parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.aliyun.gateway.sls.util.Logs.Log.Content parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.aliyun.gateway.sls.util.Logs.Log.Content parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.aliyun.gateway.sls.util.Logs.Log.Content prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code com.aliyun.gateway.sls.util.Log.Content} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.aliyun.gateway.sls.util.Logs.Log.ContentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.aliyun.gateway.sls.util.Logs.internal_static_com_aliyun_openservices_log_common_Log_Content_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.aliyun.gateway.sls.util.Logs.internal_static_com_aliyun_openservices_log_common_Log_Content_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.aliyun.gateway.sls.util.Logs.Log.Content.class, com.aliyun.gateway.sls.util.Logs.Log.Content.Builder.class); + } + + // Construct using com.aliyun.gateway.sls.util.Logs.Log.Content.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + key_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + value_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.aliyun.gateway.sls.util.Logs.internal_static_com_aliyun_openservices_log_common_Log_Content_descriptor; + } + + public com.aliyun.gateway.sls.util.Logs.Log.Content getDefaultInstanceForType() { + return com.aliyun.gateway.sls.util.Logs.Log.Content.getDefaultInstance(); + } + + public com.aliyun.gateway.sls.util.Logs.Log.Content build() { + com.aliyun.gateway.sls.util.Logs.Log.Content result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.aliyun.gateway.sls.util.Logs.Log.Content buildPartial() { + com.aliyun.gateway.sls.util.Logs.Log.Content result = new com.aliyun.gateway.sls.util.Logs.Log.Content(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.key_ = key_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.value_ = value_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.aliyun.gateway.sls.util.Logs.Log.Content) { + return mergeFrom((com.aliyun.gateway.sls.util.Logs.Log.Content)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.aliyun.gateway.sls.util.Logs.Log.Content other) { + if (other == com.aliyun.gateway.sls.util.Logs.Log.Content.getDefaultInstance()) return this; + if (other.hasKey()) { + bitField0_ |= 0x00000001; + key_ = other.key_; + onChanged(); + } + if (other.hasValue()) { + bitField0_ |= 0x00000002; + value_ = other.value_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasKey()) { + + return false; + } + if (!hasValue()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.aliyun.gateway.sls.util.Logs.Log.Content parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.aliyun.gateway.sls.util.Logs.Log.Content) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required string Key = 1; + private java.lang.Object key_ = ""; + /** + * required string Key = 1; + */ + public boolean hasKey() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string Key = 1; + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string Key = 1; + */ + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string Key = 1; + */ + public Builder setKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + key_ = value; + onChanged(); + return this; + } + /** + * required string Key = 1; + */ + public Builder clearKey() { + bitField0_ = (bitField0_ & ~0x00000001); + key_ = getDefaultInstance().getKey(); + onChanged(); + return this; + } + /** + * required string Key = 1; + */ + public Builder setKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + key_ = value; + onChanged(); + return this; + } + + // required string Value = 2; + private java.lang.Object value_ = ""; + /** + * required string Value = 2; + */ + public boolean hasValue() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * required string Value = 2; + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string Value = 2; + */ + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string Value = 2; + */ + public Builder setValue( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + value_ = value; + onChanged(); + return this; + } + /** + * required string Value = 2; + */ + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000002); + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + /** + * required string Value = 2; + */ + public Builder setValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + value_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.aliyun.gateway.sls.util.Log.Content) + } + + static { + defaultInstance = new Content(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.aliyun.gateway.sls.util.Log.Content) + } + + private int bitField0_; + // required uint32 Time = 1; + public static final int TIME_FIELD_NUMBER = 1; + private int time_; + /** + * required uint32 Time = 1; + * + *
+         * UNIX Time Format
+         * 
+ */ + public boolean hasTime() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required uint32 Time = 1; + * + *
+         * UNIX Time Format
+         * 
+ */ + public int getTime() { + return time_; + } + + // repeated .com.aliyun.gateway.sls.util.Log.Content Contents = 2; + public static final int CONTENTS_FIELD_NUMBER = 2; + private java.util.List contents_; + /** + * repeated .com.aliyun.gateway.sls.util.Log.Content Contents = 2; + */ + public java.util.List getContentsList() { + return contents_; + } + /** + * repeated .com.aliyun.gateway.sls.util.Log.Content Contents = 2; + */ + public java.util.List + getContentsOrBuilderList() { + return contents_; + } + /** + * repeated .com.aliyun.gateway.sls.util.Log.Content Contents = 2; + */ + public int getContentsCount() { + return contents_.size(); + } + /** + * repeated .com.aliyun.gateway.sls.util.Log.Content Contents = 2; + */ + public com.aliyun.gateway.sls.util.Logs.Log.Content getContents(int index) { + return contents_.get(index); + } + /** + * repeated .com.aliyun.gateway.sls.util.Log.Content Contents = 2; + */ + public com.aliyun.gateway.sls.util.Logs.Log.ContentOrBuilder getContentsOrBuilder( + int index) { + return contents_.get(index); + } + + // optional fixed32 Time_ns = 4; + public static final int TIME_NS_FIELD_NUMBER = 4; + private int timeNs_; + /** + * optional fixed32 Time_ns = 4; + */ + public boolean hasTimeNs() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional fixed32 Time_ns = 4; + */ + public int getTimeNs() { + return timeNs_; + } + + private void initFields() { + time_ = 0; + contents_ = java.util.Collections.emptyList(); + timeNs_ = 0; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasTime()) { + memoizedIsInitialized = 0; + return false; + } + for (int i = 0; i < getContentsCount(); i++) { + if (!getContents(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeUInt32(1, time_); + } + for (int i = 0; i < contents_.size(); i++) { + output.writeMessage(2, contents_.get(i)); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeFixed32(4, timeNs_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(1, time_); + } + for (int i = 0; i < contents_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, contents_.get(i)); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeFixed32Size(4, timeNs_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.aliyun.gateway.sls.util.Logs.Log parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.aliyun.gateway.sls.util.Logs.Log parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.aliyun.gateway.sls.util.Logs.Log parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.aliyun.gateway.sls.util.Logs.Log parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.aliyun.gateway.sls.util.Logs.Log parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.aliyun.gateway.sls.util.Logs.Log parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.aliyun.gateway.sls.util.Logs.Log parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.aliyun.gateway.sls.util.Logs.Log parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.aliyun.gateway.sls.util.Logs.Log parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.aliyun.gateway.sls.util.Logs.Log parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.aliyun.gateway.sls.util.Logs.Log prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code com.aliyun.gateway.sls.util.Log} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.aliyun.gateway.sls.util.Logs.LogOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.aliyun.gateway.sls.util.Logs.internal_static_com_aliyun_openservices_log_common_Log_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.aliyun.gateway.sls.util.Logs.internal_static_com_aliyun_openservices_log_common_Log_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.aliyun.gateway.sls.util.Logs.Log.class, com.aliyun.gateway.sls.util.Logs.Log.Builder.class); + } + + // Construct using com.aliyun.gateway.sls.util.Logs.Log.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getContentsFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + time_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + if (contentsBuilder_ == null) { + contents_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + contentsBuilder_.clear(); + } + timeNs_ = 0; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.aliyun.gateway.sls.util.Logs.internal_static_com_aliyun_openservices_log_common_Log_descriptor; + } + + public com.aliyun.gateway.sls.util.Logs.Log getDefaultInstanceForType() { + return com.aliyun.gateway.sls.util.Logs.Log.getDefaultInstance(); + } + + public com.aliyun.gateway.sls.util.Logs.Log build() { + com.aliyun.gateway.sls.util.Logs.Log result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.aliyun.gateway.sls.util.Logs.Log buildPartial() { + com.aliyun.gateway.sls.util.Logs.Log result = new com.aliyun.gateway.sls.util.Logs.Log(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.time_ = time_; + if (contentsBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + contents_ = java.util.Collections.unmodifiableList(contents_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.contents_ = contents_; + } else { + result.contents_ = contentsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000002; + } + result.timeNs_ = timeNs_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.aliyun.gateway.sls.util.Logs.Log) { + return mergeFrom((com.aliyun.gateway.sls.util.Logs.Log)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.aliyun.gateway.sls.util.Logs.Log other) { + if (other == com.aliyun.gateway.sls.util.Logs.Log.getDefaultInstance()) return this; + if (other.hasTime()) { + setTime(other.getTime()); + } + if (contentsBuilder_ == null) { + if (!other.contents_.isEmpty()) { + if (contents_.isEmpty()) { + contents_ = other.contents_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureContentsIsMutable(); + contents_.addAll(other.contents_); + } + onChanged(); + } + } else { + if (!other.contents_.isEmpty()) { + if (contentsBuilder_.isEmpty()) { + contentsBuilder_.dispose(); + contentsBuilder_ = null; + contents_ = other.contents_; + bitField0_ = (bitField0_ & ~0x00000002); + contentsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getContentsFieldBuilder() : null; + } else { + contentsBuilder_.addAllMessages(other.contents_); + } + } + } + if (other.hasTimeNs()) { + setTimeNs(other.getTimeNs()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasTime()) { + + return false; + } + for (int i = 0; i < getContentsCount(); i++) { + if (!getContents(i).isInitialized()) { + + return false; + } + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.aliyun.gateway.sls.util.Logs.Log parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.aliyun.gateway.sls.util.Logs.Log) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required uint32 Time = 1; + private int time_ ; + /** + * required uint32 Time = 1; + * + *
+             * UNIX Time Format
+             * 
+ */ + public boolean hasTime() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required uint32 Time = 1; + * + *
+             * UNIX Time Format
+             * 
+ */ + public int getTime() { + return time_; + } + /** + * required uint32 Time = 1; + * + *
+             * UNIX Time Format
+             * 
+ */ + public Builder setTime(int value) { + bitField0_ |= 0x00000001; + time_ = value; + onChanged(); + return this; + } + /** + * required uint32 Time = 1; + * + *
+             * UNIX Time Format
+             * 
+ */ + public Builder clearTime() { + bitField0_ = (bitField0_ & ~0x00000001); + time_ = 0; + onChanged(); + return this; + } + + // repeated .com.aliyun.gateway.sls.util.Log.Content Contents = 2; + private java.util.List contents_ = + java.util.Collections.emptyList(); + private void ensureContentsIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + contents_ = new java.util.ArrayList(contents_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.aliyun.gateway.sls.util.Logs.Log.Content, com.aliyun.gateway.sls.util.Logs.Log.Content.Builder, com.aliyun.gateway.sls.util.Logs.Log.ContentOrBuilder> contentsBuilder_; + + /** + * repeated .com.aliyun.gateway.sls.util.Log.Content Contents = 2; + */ + public java.util.List getContentsList() { + if (contentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(contents_); + } else { + return contentsBuilder_.getMessageList(); + } + } + /** + * repeated .com.aliyun.gateway.sls.util.Log.Content Contents = 2; + */ + public int getContentsCount() { + if (contentsBuilder_ == null) { + return contents_.size(); + } else { + return contentsBuilder_.getCount(); + } + } + /** + * repeated .com.aliyun.gateway.sls.util.Log.Content Contents = 2; + */ + public com.aliyun.gateway.sls.util.Logs.Log.Content getContents(int index) { + if (contentsBuilder_ == null) { + return contents_.get(index); + } else { + return contentsBuilder_.getMessage(index); + } + } + /** + * repeated .com.aliyun.gateway.sls.util.Log.Content Contents = 2; + */ + public Builder setContents( + int index, com.aliyun.gateway.sls.util.Logs.Log.Content value) { + if (contentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContentsIsMutable(); + contents_.set(index, value); + onChanged(); + } else { + contentsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .com.aliyun.gateway.sls.util.Log.Content Contents = 2; + */ + public Builder setContents( + int index, com.aliyun.gateway.sls.util.Logs.Log.Content.Builder builderForValue) { + if (contentsBuilder_ == null) { + ensureContentsIsMutable(); + contents_.set(index, builderForValue.build()); + onChanged(); + } else { + contentsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .com.aliyun.gateway.sls.util.Log.Content Contents = 2; + */ + public Builder addContents(com.aliyun.gateway.sls.util.Logs.Log.Content value) { + if (contentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContentsIsMutable(); + contents_.add(value); + onChanged(); + } else { + contentsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .com.aliyun.gateway.sls.util.Log.Content Contents = 2; + */ + public Builder addContents( + int index, com.aliyun.gateway.sls.util.Logs.Log.Content value) { + if (contentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContentsIsMutable(); + contents_.add(index, value); + onChanged(); + } else { + contentsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .com.aliyun.gateway.sls.util.Log.Content Contents = 2; + */ + public Builder addContents( + com.aliyun.gateway.sls.util.Logs.Log.Content.Builder builderForValue) { + if (contentsBuilder_ == null) { + ensureContentsIsMutable(); + contents_.add(builderForValue.build()); + onChanged(); + } else { + contentsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .com.aliyun.gateway.sls.util.Log.Content Contents = 2; + */ + public Builder addContents( + int index, com.aliyun.gateway.sls.util.Logs.Log.Content.Builder builderForValue) { + if (contentsBuilder_ == null) { + ensureContentsIsMutable(); + contents_.add(index, builderForValue.build()); + onChanged(); + } else { + contentsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .com.aliyun.gateway.sls.util.Log.Content Contents = 2; + */ + public Builder addAllContents( + java.lang.Iterable values) { + if (contentsBuilder_ == null) { + ensureContentsIsMutable(); + super.addAll(values, contents_); + onChanged(); + } else { + contentsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .com.aliyun.gateway.sls.util.Log.Content Contents = 2; + */ + public Builder clearContents() { + if (contentsBuilder_ == null) { + contents_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + contentsBuilder_.clear(); + } + return this; + } + /** + * repeated .com.aliyun.gateway.sls.util.Log.Content Contents = 2; + */ + public Builder removeContents(int index) { + if (contentsBuilder_ == null) { + ensureContentsIsMutable(); + contents_.remove(index); + onChanged(); + } else { + contentsBuilder_.remove(index); + } + return this; + } + /** + * repeated .com.aliyun.gateway.sls.util.Log.Content Contents = 2; + */ + public com.aliyun.gateway.sls.util.Logs.Log.Content.Builder getContentsBuilder( + int index) { + return getContentsFieldBuilder().getBuilder(index); + } + /** + * repeated .com.aliyun.gateway.sls.util.Log.Content Contents = 2; + */ + public com.aliyun.gateway.sls.util.Logs.Log.ContentOrBuilder getContentsOrBuilder( + int index) { + if (contentsBuilder_ == null) { + return contents_.get(index); } else { + return contentsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .com.aliyun.gateway.sls.util.Log.Content Contents = 2; + */ + public java.util.List + getContentsOrBuilderList() { + if (contentsBuilder_ != null) { + return contentsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(contents_); + } + } + /** + * repeated .com.aliyun.gateway.sls.util.Log.Content Contents = 2; + */ + public com.aliyun.gateway.sls.util.Logs.Log.Content.Builder addContentsBuilder() { + return getContentsFieldBuilder().addBuilder( + com.aliyun.gateway.sls.util.Logs.Log.Content.getDefaultInstance()); + } + /** + * repeated .com.aliyun.gateway.sls.util.Log.Content Contents = 2; + */ + public com.aliyun.gateway.sls.util.Logs.Log.Content.Builder addContentsBuilder( + int index) { + return getContentsFieldBuilder().addBuilder( + index, com.aliyun.gateway.sls.util.Logs.Log.Content.getDefaultInstance()); + } + /** + * repeated .com.aliyun.gateway.sls.util.Log.Content Contents = 2; + */ + public java.util.List + getContentsBuilderList() { + return getContentsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.aliyun.gateway.sls.util.Logs.Log.Content, com.aliyun.gateway.sls.util.Logs.Log.Content.Builder, com.aliyun.gateway.sls.util.Logs.Log.ContentOrBuilder> + getContentsFieldBuilder() { + if (contentsBuilder_ == null) { + contentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.aliyun.gateway.sls.util.Logs.Log.Content, com.aliyun.gateway.sls.util.Logs.Log.Content.Builder, com.aliyun.gateway.sls.util.Logs.Log.ContentOrBuilder>( + contents_, + ((bitField0_ & 0x00000002) == 0x00000002), + getParentForChildren(), + isClean()); + contents_ = null; + } + return contentsBuilder_; + } + + // optional fixed32 Time_ns = 4; + private int timeNs_ ; + /** + * optional fixed32 Time_ns = 4; + */ + public boolean hasTimeNs() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional fixed32 Time_ns = 4; + */ + public int getTimeNs() { + return timeNs_; + } + /** + * optional fixed32 Time_ns = 4; + */ + public Builder setTimeNs(int value) { + bitField0_ |= 0x00000004; + timeNs_ = value; + onChanged(); + return this; + } + /** + * optional fixed32 Time_ns = 4; + */ + public Builder clearTimeNs() { + bitField0_ = (bitField0_ & ~0x00000004); + timeNs_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.aliyun.gateway.sls.util.Log) + } + + static { + defaultInstance = new Log(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.aliyun.gateway.sls.util.Log) + } + + public interface LogTagOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string Key = 1; + /** + * required string Key = 1; + */ + boolean hasKey(); + /** + * required string Key = 1; + */ + java.lang.String getKey(); + /** + * required string Key = 1; + */ + com.google.protobuf.ByteString + getKeyBytes(); + + // required string Value = 2; + /** + * required string Value = 2; + */ + boolean hasValue(); + /** + * required string Value = 2; + */ + java.lang.String getValue(); + /** + * required string Value = 2; + */ + com.google.protobuf.ByteString + getValueBytes(); + } + /** + * Protobuf type {@code com.aliyun.gateway.sls.util.LogTag} + */ + public static final class LogTag extends + com.google.protobuf.GeneratedMessage + implements LogTagOrBuilder { + // Use LogTag.newBuilder() to construct. + private LogTag(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private LogTag(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final LogTag defaultInstance; + public static LogTag getDefaultInstance() { + return defaultInstance; + } + + public LogTag getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LogTag( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + 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; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + key_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + value_ = input.readBytes(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.aliyun.gateway.sls.util.Logs.internal_static_com_aliyun_openservices_log_common_LogTag_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.aliyun.gateway.sls.util.Logs.internal_static_com_aliyun_openservices_log_common_LogTag_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.aliyun.gateway.sls.util.Logs.LogTag.class, com.aliyun.gateway.sls.util.Logs.LogTag.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public LogTag parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LogTag(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required string Key = 1; + public static final int KEY_FIELD_NUMBER = 1; + private java.lang.Object key_; + /** + * required string Key = 1; + */ + public boolean hasKey() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string Key = 1; + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + key_ = s; + } + return s; + } + } + /** + * required string Key = 1; + */ + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required string Value = 2; + public static final int VALUE_FIELD_NUMBER = 2; + private java.lang.Object value_; + /** + * required string Value = 2; + */ + public boolean hasValue() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * required string Value = 2; + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + value_ = s; + } + return s; + } + } + /** + * required string Value = 2; + */ + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + key_ = ""; + value_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasKey()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasValue()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getKeyBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getValueBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getKeyBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getValueBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.aliyun.gateway.sls.util.Logs.LogTag parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.aliyun.gateway.sls.util.Logs.LogTag parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.aliyun.gateway.sls.util.Logs.LogTag parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.aliyun.gateway.sls.util.Logs.LogTag parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.aliyun.gateway.sls.util.Logs.LogTag parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.aliyun.gateway.sls.util.Logs.LogTag parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.aliyun.gateway.sls.util.Logs.LogTag parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.aliyun.gateway.sls.util.Logs.LogTag parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.aliyun.gateway.sls.util.Logs.LogTag parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.aliyun.gateway.sls.util.Logs.LogTag parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.aliyun.gateway.sls.util.Logs.LogTag prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code com.aliyun.gateway.sls.util.LogTag} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.aliyun.gateway.sls.util.Logs.LogTagOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.aliyun.gateway.sls.util.Logs.internal_static_com_aliyun_openservices_log_common_LogTag_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.aliyun.gateway.sls.util.Logs.internal_static_com_aliyun_openservices_log_common_LogTag_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.aliyun.gateway.sls.util.Logs.LogTag.class, com.aliyun.gateway.sls.util.Logs.LogTag.Builder.class); + } + + // Construct using com.aliyun.gateway.sls.util.Logs.LogTag.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + key_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + value_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.aliyun.gateway.sls.util.Logs.internal_static_com_aliyun_openservices_log_common_LogTag_descriptor; + } + + public com.aliyun.gateway.sls.util.Logs.LogTag getDefaultInstanceForType() { + return com.aliyun.gateway.sls.util.Logs.LogTag.getDefaultInstance(); + } + + public com.aliyun.gateway.sls.util.Logs.LogTag build() { + com.aliyun.gateway.sls.util.Logs.LogTag result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.aliyun.gateway.sls.util.Logs.LogTag buildPartial() { + com.aliyun.gateway.sls.util.Logs.LogTag result = new com.aliyun.gateway.sls.util.Logs.LogTag(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.key_ = key_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.value_ = value_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.aliyun.gateway.sls.util.Logs.LogTag) { + return mergeFrom((com.aliyun.gateway.sls.util.Logs.LogTag)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.aliyun.gateway.sls.util.Logs.LogTag other) { + if (other == com.aliyun.gateway.sls.util.Logs.LogTag.getDefaultInstance()) return this; + if (other.hasKey()) { + bitField0_ |= 0x00000001; + key_ = other.key_; + onChanged(); + } + if (other.hasValue()) { + bitField0_ |= 0x00000002; + value_ = other.value_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasKey()) { + + return false; + } + if (!hasValue()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.aliyun.gateway.sls.util.Logs.LogTag parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.aliyun.gateway.sls.util.Logs.LogTag) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required string Key = 1; + private java.lang.Object key_ = ""; + /** + * required string Key = 1; + */ + public boolean hasKey() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string Key = 1; + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string Key = 1; + */ + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string Key = 1; + */ + public Builder setKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + key_ = value; + onChanged(); + return this; + } + /** + * required string Key = 1; + */ + public Builder clearKey() { + bitField0_ = (bitField0_ & ~0x00000001); + key_ = getDefaultInstance().getKey(); + onChanged(); + return this; + } + /** + * required string Key = 1; + */ + public Builder setKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + key_ = value; + onChanged(); + return this; + } + + // required string Value = 2; + private java.lang.Object value_ = ""; + /** + * required string Value = 2; + */ + public boolean hasValue() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * required string Value = 2; + */ + public java.lang.String getValue() { + java.lang.Object ref = value_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + value_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string Value = 2; + */ + public com.google.protobuf.ByteString + getValueBytes() { + java.lang.Object ref = value_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + value_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string Value = 2; + */ + public Builder setValue( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + value_ = value; + onChanged(); + return this; + } + /** + * required string Value = 2; + */ + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000002); + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + /** + * required string Value = 2; + */ + public Builder setValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + value_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:com.aliyun.gateway.sls.util.LogTag) + } + + static { + defaultInstance = new LogTag(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.aliyun.gateway.sls.util.LogTag) + } + + public interface LogGroupOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // repeated .com.aliyun.gateway.sls.util.Log Logs = 1; + /** + * repeated .com.aliyun.gateway.sls.util.Log Logs = 1; + */ + java.util.List + getLogsList(); + /** + * repeated .com.aliyun.gateway.sls.util.Log Logs = 1; + */ + com.aliyun.gateway.sls.util.Logs.Log getLogs(int index); + /** + * repeated .com.aliyun.gateway.sls.util.Log Logs = 1; + */ + int getLogsCount(); + /** + * repeated .com.aliyun.gateway.sls.util.Log Logs = 1; + */ + java.util.List + getLogsOrBuilderList(); + /** + * repeated .com.aliyun.gateway.sls.util.Log Logs = 1; + */ + com.aliyun.gateway.sls.util.Logs.LogOrBuilder getLogsOrBuilder( + int index); + + // optional string Category = 2; + /** + * optional string Category = 2; + */ + boolean hasCategory(); + /** + * optional string Category = 2; + */ + java.lang.String getCategory(); + /** + * optional string Category = 2; + */ + com.google.protobuf.ByteString + getCategoryBytes(); + + // optional string Topic = 3; + /** + * optional string Topic = 3; + */ + boolean hasTopic(); + /** + * optional string Topic = 3; + */ + java.lang.String getTopic(); + /** + * optional string Topic = 3; + */ + com.google.protobuf.ByteString + getTopicBytes(); + + // optional string Source = 4; + /** + * optional string Source = 4; + */ + boolean hasSource(); + /** + * optional string Source = 4; + */ + java.lang.String getSource(); + /** + * optional string Source = 4; + */ + com.google.protobuf.ByteString + getSourceBytes(); + + // optional string MachineUUID = 5; + /** + * optional string MachineUUID = 5; + */ + boolean hasMachineUUID(); + /** + * optional string MachineUUID = 5; + */ + java.lang.String getMachineUUID(); + /** + * optional string MachineUUID = 5; + */ + com.google.protobuf.ByteString + getMachineUUIDBytes(); + + // repeated .com.aliyun.gateway.sls.util.LogTag LogTags = 6; + /** + * repeated .com.aliyun.gateway.sls.util.LogTag LogTags = 6; + */ + java.util.List + getLogTagsList(); + /** + * repeated .com.aliyun.gateway.sls.util.LogTag LogTags = 6; + */ + com.aliyun.gateway.sls.util.Logs.LogTag getLogTags(int index); + /** + * repeated .com.aliyun.gateway.sls.util.LogTag LogTags = 6; + */ + int getLogTagsCount(); + /** + * repeated .com.aliyun.gateway.sls.util.LogTag LogTags = 6; + */ + java.util.List + getLogTagsOrBuilderList(); + /** + * repeated .com.aliyun.gateway.sls.util.LogTag LogTags = 6; + */ + com.aliyun.gateway.sls.util.Logs.LogTagOrBuilder getLogTagsOrBuilder( + int index); + } + /** + * Protobuf type {@code com.aliyun.gateway.sls.util.LogGroup} + */ + public static final class LogGroup extends + com.google.protobuf.GeneratedMessage + implements LogGroupOrBuilder { + // Use LogGroup.newBuilder() to construct. + private LogGroup(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private LogGroup(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final LogGroup defaultInstance; + public static LogGroup getDefaultInstance() { + return defaultInstance; + } + + public LogGroup getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LogGroup( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + 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; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + logs_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + logs_.add(input.readMessage(com.aliyun.gateway.sls.util.Logs.Log.PARSER, extensionRegistry)); + break; + } + case 18: { + bitField0_ |= 0x00000001; + category_ = input.readBytes(); + break; + } + case 26: { + bitField0_ |= 0x00000002; + topic_ = input.readBytes(); + break; + } + case 34: { + bitField0_ |= 0x00000004; + source_ = input.readBytes(); + break; + } + case 42: { + bitField0_ |= 0x00000008; + machineUUID_ = input.readBytes(); + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + logTags_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000020; + } + logTags_.add(input.readMessage(com.aliyun.gateway.sls.util.Logs.LogTag.PARSER, extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + logs_ = java.util.Collections.unmodifiableList(logs_); + } + if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + logTags_ = java.util.Collections.unmodifiableList(logTags_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.aliyun.gateway.sls.util.Logs.internal_static_com_aliyun_openservices_log_common_LogGroup_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.aliyun.gateway.sls.util.Logs.internal_static_com_aliyun_openservices_log_common_LogGroup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.aliyun.gateway.sls.util.Logs.LogGroup.class, com.aliyun.gateway.sls.util.Logs.LogGroup.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public LogGroup parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LogGroup(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // repeated .com.aliyun.gateway.sls.util.Log Logs = 1; + public static final int LOGS_FIELD_NUMBER = 1; + private java.util.List logs_; + /** + * repeated .com.aliyun.gateway.sls.util.Log Logs = 1; + */ + public java.util.List getLogsList() { + return logs_; + } + /** + * repeated .com.aliyun.gateway.sls.util.Log Logs = 1; + */ + public java.util.List + getLogsOrBuilderList() { + return logs_; + } + /** + * repeated .com.aliyun.gateway.sls.util.Log Logs = 1; + */ + public int getLogsCount() { + return logs_.size(); + } + /** + * repeated .com.aliyun.gateway.sls.util.Log Logs = 1; + */ + public com.aliyun.gateway.sls.util.Logs.Log getLogs(int index) { + return logs_.get(index); + } + /** + * repeated .com.aliyun.gateway.sls.util.Log Logs = 1; + */ + public com.aliyun.gateway.sls.util.Logs.LogOrBuilder getLogsOrBuilder( + int index) { + return logs_.get(index); + } + + // optional string Category = 2; + public static final int CATEGORY_FIELD_NUMBER = 2; + private java.lang.Object category_; + /** + * optional string Category = 2; + */ + public boolean hasCategory() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string Category = 2; + */ + public java.lang.String getCategory() { + java.lang.Object ref = category_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + category_ = s; + } + return s; + } + } + /** + * optional string Category = 2; + */ + public com.google.protobuf.ByteString + getCategoryBytes() { + java.lang.Object ref = category_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + category_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string Topic = 3; + public static final int TOPIC_FIELD_NUMBER = 3; + private java.lang.Object topic_; + /** + * optional string Topic = 3; + */ + public boolean hasTopic() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string Topic = 3; + */ + public java.lang.String getTopic() { + java.lang.Object ref = topic_; + 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(); + if (bs.isValidUtf8()) { + topic_ = s; + } + return s; + } + } + /** + * optional string Topic = 3; + */ + public com.google.protobuf.ByteString + getTopicBytes() { + java.lang.Object ref = topic_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + topic_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string Source = 4; + public static final int SOURCE_FIELD_NUMBER = 4; + private java.lang.Object source_; + /** + * optional string Source = 4; + */ + public boolean hasSource() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional string Source = 4; + */ + public java.lang.String getSource() { + java.lang.Object ref = source_; + 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(); + if (bs.isValidUtf8()) { + source_ = s; + } + return s; + } + } + /** + * optional string Source = 4; + */ + public com.google.protobuf.ByteString + getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string MachineUUID = 5; + public static final int MACHINEUUID_FIELD_NUMBER = 5; + private java.lang.Object machineUUID_; + /** + * optional string MachineUUID = 5; + */ + public boolean hasMachineUUID() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional string MachineUUID = 5; + */ + public java.lang.String getMachineUUID() { + java.lang.Object ref = machineUUID_; + 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(); + if (bs.isValidUtf8()) { + machineUUID_ = s; + } + return s; + } + } + /** + * optional string MachineUUID = 5; + */ + public com.google.protobuf.ByteString + getMachineUUIDBytes() { + java.lang.Object ref = machineUUID_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + machineUUID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // repeated .com.aliyun.gateway.sls.util.LogTag LogTags = 6; + public static final int LOGTAGS_FIELD_NUMBER = 6; + private java.util.List logTags_; + /** + * repeated .com.aliyun.gateway.sls.util.LogTag LogTags = 6; + */ + public java.util.List getLogTagsList() { + return logTags_; + } + /** + * repeated .com.aliyun.gateway.sls.util.LogTag LogTags = 6; + */ + public java.util.List + getLogTagsOrBuilderList() { + return logTags_; + } + /** + * repeated .com.aliyun.gateway.sls.util.LogTag LogTags = 6; + */ + public int getLogTagsCount() { + return logTags_.size(); + } + /** + * repeated .com.aliyun.gateway.sls.util.LogTag LogTags = 6; + */ + public com.aliyun.gateway.sls.util.Logs.LogTag getLogTags(int index) { + return logTags_.get(index); + } + /** + * repeated .com.aliyun.gateway.sls.util.LogTag LogTags = 6; + */ + public com.aliyun.gateway.sls.util.Logs.LogTagOrBuilder getLogTagsOrBuilder( + int index) { + return logTags_.get(index); + } + + private void initFields() { + logs_ = java.util.Collections.emptyList(); + category_ = ""; + topic_ = ""; + source_ = ""; + machineUUID_ = ""; + logTags_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + for (int i = 0; i < getLogsCount(); i++) { + if (!getLogs(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + for (int i = 0; i < getLogTagsCount(); i++) { + if (!getLogTags(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < logs_.size(); i++) { + output.writeMessage(1, logs_.get(i)); + } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(2, getCategoryBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(3, getTopicBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBytes(4, getSourceBytes()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeBytes(5, getMachineUUIDBytes()); + } + for (int i = 0; i < logTags_.size(); i++) { + output.writeMessage(6, logTags_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < logs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, logs_.get(i)); + } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getCategoryBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, getTopicBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(4, getSourceBytes()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(5, getMachineUUIDBytes()); + } + for (int i = 0; i < logTags_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, logTags_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.aliyun.gateway.sls.util.Logs.LogGroup parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.aliyun.gateway.sls.util.Logs.LogGroup parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.aliyun.gateway.sls.util.Logs.LogGroup parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.aliyun.gateway.sls.util.Logs.LogGroup parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.aliyun.gateway.sls.util.Logs.LogGroup parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.aliyun.gateway.sls.util.Logs.LogGroup parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.aliyun.gateway.sls.util.Logs.LogGroup parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.aliyun.gateway.sls.util.Logs.LogGroup parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.aliyun.gateway.sls.util.Logs.LogGroup parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.aliyun.gateway.sls.util.Logs.LogGroup parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.aliyun.gateway.sls.util.Logs.LogGroup prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code com.aliyun.gateway.sls.util.LogGroup} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.aliyun.gateway.sls.util.Logs.LogGroupOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.aliyun.gateway.sls.util.Logs.internal_static_com_aliyun_openservices_log_common_LogGroup_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.aliyun.gateway.sls.util.Logs.internal_static_com_aliyun_openservices_log_common_LogGroup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.aliyun.gateway.sls.util.Logs.LogGroup.class, com.aliyun.gateway.sls.util.Logs.LogGroup.Builder.class); + } + + // Construct using com.aliyun.gateway.sls.util.Logs.LogGroup.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getLogsFieldBuilder(); + getLogTagsFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (logsBuilder_ == null) { + logs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + logsBuilder_.clear(); + } + category_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + topic_ = ""; + bitField0_ = (bitField0_ & ~0x00000004); + source_ = ""; + bitField0_ = (bitField0_ & ~0x00000008); + machineUUID_ = ""; + bitField0_ = (bitField0_ & ~0x00000010); + if (logTagsBuilder_ == null) { + logTags_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + } else { + logTagsBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.aliyun.gateway.sls.util.Logs.internal_static_com_aliyun_openservices_log_common_LogGroup_descriptor; + } + + public com.aliyun.gateway.sls.util.Logs.LogGroup getDefaultInstanceForType() { + return com.aliyun.gateway.sls.util.Logs.LogGroup.getDefaultInstance(); + } + + public com.aliyun.gateway.sls.util.Logs.LogGroup build() { + com.aliyun.gateway.sls.util.Logs.LogGroup result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.aliyun.gateway.sls.util.Logs.LogGroup buildPartial() { + com.aliyun.gateway.sls.util.Logs.LogGroup result = new com.aliyun.gateway.sls.util.Logs.LogGroup(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (logsBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + logs_ = java.util.Collections.unmodifiableList(logs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.logs_ = logs_; + } else { + result.logs_ = logsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000001; + } + result.category_ = category_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000002; + } + result.topic_ = topic_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000004; + } + result.source_ = source_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000008; + } + result.machineUUID_ = machineUUID_; + if (logTagsBuilder_ == null) { + if (((bitField0_ & 0x00000020) == 0x00000020)) { + logTags_ = java.util.Collections.unmodifiableList(logTags_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.logTags_ = logTags_; + } else { + result.logTags_ = logTagsBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.aliyun.gateway.sls.util.Logs.LogGroup) { + return mergeFrom((com.aliyun.gateway.sls.util.Logs.LogGroup)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.aliyun.gateway.sls.util.Logs.LogGroup other) { + if (other == com.aliyun.gateway.sls.util.Logs.LogGroup.getDefaultInstance()) return this; + if (logsBuilder_ == null) { + if (!other.logs_.isEmpty()) { + if (logs_.isEmpty()) { + logs_ = other.logs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLogsIsMutable(); + logs_.addAll(other.logs_); + } + onChanged(); + } + } else { + if (!other.logs_.isEmpty()) { + if (logsBuilder_.isEmpty()) { + logsBuilder_.dispose(); + logsBuilder_ = null; + logs_ = other.logs_; + bitField0_ = (bitField0_ & ~0x00000001); + logsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getLogsFieldBuilder() : null; + } else { + logsBuilder_.addAllMessages(other.logs_); + } + } + } + if (other.hasCategory()) { + bitField0_ |= 0x00000002; + category_ = other.category_; + onChanged(); + } + if (other.hasTopic()) { + bitField0_ |= 0x00000004; + topic_ = other.topic_; + onChanged(); + } + if (other.hasSource()) { + bitField0_ |= 0x00000008; + source_ = other.source_; + onChanged(); + } + if (other.hasMachineUUID()) { + bitField0_ |= 0x00000010; + machineUUID_ = other.machineUUID_; + onChanged(); + } + if (logTagsBuilder_ == null) { + if (!other.logTags_.isEmpty()) { + if (logTags_.isEmpty()) { + logTags_ = other.logTags_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureLogTagsIsMutable(); + logTags_.addAll(other.logTags_); + } + onChanged(); + } + } else { + if (!other.logTags_.isEmpty()) { + if (logTagsBuilder_.isEmpty()) { + logTagsBuilder_.dispose(); + logTagsBuilder_ = null; + logTags_ = other.logTags_; + bitField0_ = (bitField0_ & ~0x00000020); + logTagsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getLogTagsFieldBuilder() : null; + } else { + logTagsBuilder_.addAllMessages(other.logTags_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + for (int i = 0; i < getLogsCount(); i++) { + if (!getLogs(i).isInitialized()) { + + return false; + } + } + for (int i = 0; i < getLogTagsCount(); i++) { + if (!getLogTags(i).isInitialized()) { + + return false; + } + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.aliyun.gateway.sls.util.Logs.LogGroup parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.aliyun.gateway.sls.util.Logs.LogGroup) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // repeated .com.aliyun.gateway.sls.util.Log Logs = 1; + private java.util.List logs_ = + java.util.Collections.emptyList(); + private void ensureLogsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + logs_ = new java.util.ArrayList(logs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.aliyun.gateway.sls.util.Logs.Log, com.aliyun.gateway.sls.util.Logs.Log.Builder, com.aliyun.gateway.sls.util.Logs.LogOrBuilder> logsBuilder_; + + /** + * repeated .com.aliyun.gateway.sls.util.Log Logs = 1; + */ + public java.util.List getLogsList() { + if (logsBuilder_ == null) { + return java.util.Collections.unmodifiableList(logs_); + } else { + return logsBuilder_.getMessageList(); + } + } + /** + * repeated .com.aliyun.gateway.sls.util.Log Logs = 1; + */ + public int getLogsCount() { + if (logsBuilder_ == null) { + return logs_.size(); + } else { + return logsBuilder_.getCount(); + } + } + /** + * repeated .com.aliyun.gateway.sls.util.Log Logs = 1; + */ + public com.aliyun.gateway.sls.util.Logs.Log getLogs(int index) { + if (logsBuilder_ == null) { + return logs_.get(index); + } else { + return logsBuilder_.getMessage(index); + } + } + /** + * repeated .com.aliyun.gateway.sls.util.Log Logs = 1; + */ + public Builder setLogs( + int index, com.aliyun.gateway.sls.util.Logs.Log value) { + if (logsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogsIsMutable(); + logs_.set(index, value); + onChanged(); + } else { + logsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .com.aliyun.gateway.sls.util.Log Logs = 1; + */ + public Builder setLogs( + int index, com.aliyun.gateway.sls.util.Logs.Log.Builder builderForValue) { + if (logsBuilder_ == null) { + ensureLogsIsMutable(); + logs_.set(index, builderForValue.build()); + onChanged(); + } else { + logsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .com.aliyun.gateway.sls.util.Log Logs = 1; + */ + public Builder addLogs(com.aliyun.gateway.sls.util.Logs.Log value) { + if (logsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogsIsMutable(); + logs_.add(value); + onChanged(); + } else { + logsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .com.aliyun.gateway.sls.util.Log Logs = 1; + */ + public Builder addLogs( + int index, com.aliyun.gateway.sls.util.Logs.Log value) { + if (logsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogsIsMutable(); + logs_.add(index, value); + onChanged(); + } else { + logsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .com.aliyun.gateway.sls.util.Log Logs = 1; + */ + public Builder addLogs( + com.aliyun.gateway.sls.util.Logs.Log.Builder builderForValue) { + if (logsBuilder_ == null) { + ensureLogsIsMutable(); + logs_.add(builderForValue.build()); + onChanged(); + } else { + logsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .com.aliyun.gateway.sls.util.Log Logs = 1; + */ + public Builder addLogs( + int index, com.aliyun.gateway.sls.util.Logs.Log.Builder builderForValue) { + if (logsBuilder_ == null) { + ensureLogsIsMutable(); + logs_.add(index, builderForValue.build()); + onChanged(); + } else { + logsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .com.aliyun.gateway.sls.util.Log Logs = 1; + */ + public Builder addAllLogs( + java.lang.Iterable values) { + if (logsBuilder_ == null) { + ensureLogsIsMutable(); + super.addAll(values, logs_); + onChanged(); + } else { + logsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .com.aliyun.gateway.sls.util.Log Logs = 1; + */ + public Builder clearLogs() { + if (logsBuilder_ == null) { + logs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + logsBuilder_.clear(); + } + return this; + } + /** + * repeated .com.aliyun.gateway.sls.util.Log Logs = 1; + */ + public Builder removeLogs(int index) { + if (logsBuilder_ == null) { + ensureLogsIsMutable(); + logs_.remove(index); + onChanged(); + } else { + logsBuilder_.remove(index); + } + return this; + } + /** + * repeated .com.aliyun.gateway.sls.util.Log Logs = 1; + */ + public com.aliyun.gateway.sls.util.Logs.Log.Builder getLogsBuilder( + int index) { + return getLogsFieldBuilder().getBuilder(index); + } + /** + * repeated .com.aliyun.gateway.sls.util.Log Logs = 1; + */ + public com.aliyun.gateway.sls.util.Logs.LogOrBuilder getLogsOrBuilder( + int index) { + if (logsBuilder_ == null) { + return logs_.get(index); } else { + return logsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .com.aliyun.gateway.sls.util.Log Logs = 1; + */ + public java.util.List + getLogsOrBuilderList() { + if (logsBuilder_ != null) { + return logsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(logs_); + } + } + /** + * repeated .com.aliyun.gateway.sls.util.Log Logs = 1; + */ + public com.aliyun.gateway.sls.util.Logs.Log.Builder addLogsBuilder() { + return getLogsFieldBuilder().addBuilder( + com.aliyun.gateway.sls.util.Logs.Log.getDefaultInstance()); + } + /** + * repeated .com.aliyun.gateway.sls.util.Log Logs = 1; + */ + public com.aliyun.gateway.sls.util.Logs.Log.Builder addLogsBuilder( + int index) { + return getLogsFieldBuilder().addBuilder( + index, com.aliyun.gateway.sls.util.Logs.Log.getDefaultInstance()); + } + /** + * repeated .com.aliyun.gateway.sls.util.Log Logs = 1; + */ + public java.util.List + getLogsBuilderList() { + return getLogsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.aliyun.gateway.sls.util.Logs.Log, com.aliyun.gateway.sls.util.Logs.Log.Builder, com.aliyun.gateway.sls.util.Logs.LogOrBuilder> + getLogsFieldBuilder() { + if (logsBuilder_ == null) { + logsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.aliyun.gateway.sls.util.Logs.Log, com.aliyun.gateway.sls.util.Logs.Log.Builder, com.aliyun.gateway.sls.util.Logs.LogOrBuilder>( + logs_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + logs_ = null; + } + return logsBuilder_; + } + + // optional string Category = 2; + private java.lang.Object category_ = ""; + /** + * optional string Category = 2; + */ + public boolean hasCategory() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string Category = 2; + */ + public java.lang.String getCategory() { + java.lang.Object ref = category_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + category_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string Category = 2; + */ + public com.google.protobuf.ByteString + getCategoryBytes() { + java.lang.Object ref = category_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + category_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string Category = 2; + */ + public Builder setCategory( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + category_ = value; + onChanged(); + return this; + } + /** + * optional string Category = 2; + */ + public Builder clearCategory() { + bitField0_ = (bitField0_ & ~0x00000002); + category_ = getDefaultInstance().getCategory(); + onChanged(); + return this; + } + /** + * optional string Category = 2; + */ + public Builder setCategoryBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + category_ = value; + onChanged(); + return this; + } + + // optional string Topic = 3; + private java.lang.Object topic_ = ""; + /** + * optional string Topic = 3; + */ + public boolean hasTopic() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional string Topic = 3; + */ + public java.lang.String getTopic() { + java.lang.Object ref = topic_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + topic_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string Topic = 3; + */ + public com.google.protobuf.ByteString + getTopicBytes() { + java.lang.Object ref = topic_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + topic_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string Topic = 3; + */ + public Builder setTopic( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + topic_ = value; + onChanged(); + return this; + } + /** + * optional string Topic = 3; + */ + public Builder clearTopic() { + bitField0_ = (bitField0_ & ~0x00000004); + topic_ = getDefaultInstance().getTopic(); + onChanged(); + return this; + } + /** + * optional string Topic = 3; + */ + public Builder setTopicBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + topic_ = value; + onChanged(); + return this; + } + + // optional string Source = 4; + private java.lang.Object source_ = ""; + /** + * optional string Source = 4; + */ + public boolean hasSource() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional string Source = 4; + */ + public java.lang.String getSource() { + java.lang.Object ref = source_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + source_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string Source = 4; + */ + public com.google.protobuf.ByteString + getSourceBytes() { + java.lang.Object ref = source_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + source_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string Source = 4; + */ + public Builder setSource( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + source_ = value; + onChanged(); + return this; + } + /** + * optional string Source = 4; + */ + public Builder clearSource() { + bitField0_ = (bitField0_ & ~0x00000008); + source_ = getDefaultInstance().getSource(); + onChanged(); + return this; + } + /** + * optional string Source = 4; + */ + public Builder setSourceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + source_ = value; + onChanged(); + return this; + } + + // optional string MachineUUID = 5; + private java.lang.Object machineUUID_ = ""; + /** + * optional string MachineUUID = 5; + */ + public boolean hasMachineUUID() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional string MachineUUID = 5; + */ + public java.lang.String getMachineUUID() { + java.lang.Object ref = machineUUID_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + machineUUID_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string MachineUUID = 5; + */ + public com.google.protobuf.ByteString + getMachineUUIDBytes() { + java.lang.Object ref = machineUUID_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + machineUUID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string MachineUUID = 5; + */ + public Builder setMachineUUID( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + machineUUID_ = value; + onChanged(); + return this; + } + /** + * optional string MachineUUID = 5; + */ + public Builder clearMachineUUID() { + bitField0_ = (bitField0_ & ~0x00000010); + machineUUID_ = getDefaultInstance().getMachineUUID(); + onChanged(); + return this; + } + /** + * optional string MachineUUID = 5; + */ + public Builder setMachineUUIDBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + machineUUID_ = value; + onChanged(); + return this; + } + + // repeated .com.aliyun.gateway.sls.util.LogTag LogTags = 6; + private java.util.List logTags_ = + java.util.Collections.emptyList(); + private void ensureLogTagsIsMutable() { + if (!((bitField0_ & 0x00000020) == 0x00000020)) { + logTags_ = new java.util.ArrayList(logTags_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.aliyun.gateway.sls.util.Logs.LogTag, com.aliyun.gateway.sls.util.Logs.LogTag.Builder, com.aliyun.gateway.sls.util.Logs.LogTagOrBuilder> logTagsBuilder_; + + /** + * repeated .com.aliyun.gateway.sls.util.LogTag LogTags = 6; + */ + public java.util.List getLogTagsList() { + if (logTagsBuilder_ == null) { + return java.util.Collections.unmodifiableList(logTags_); + } else { + return logTagsBuilder_.getMessageList(); + } + } + /** + * repeated .com.aliyun.gateway.sls.util.LogTag LogTags = 6; + */ + public int getLogTagsCount() { + if (logTagsBuilder_ == null) { + return logTags_.size(); + } else { + return logTagsBuilder_.getCount(); + } + } + /** + * repeated .com.aliyun.gateway.sls.util.LogTag LogTags = 6; + */ + public com.aliyun.gateway.sls.util.Logs.LogTag getLogTags(int index) { + if (logTagsBuilder_ == null) { + return logTags_.get(index); + } else { + return logTagsBuilder_.getMessage(index); + } + } + /** + * repeated .com.aliyun.gateway.sls.util.LogTag LogTags = 6; + */ + public Builder setLogTags( + int index, com.aliyun.gateway.sls.util.Logs.LogTag value) { + if (logTagsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogTagsIsMutable(); + logTags_.set(index, value); + onChanged(); + } else { + logTagsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .com.aliyun.gateway.sls.util.LogTag LogTags = 6; + */ + public Builder setLogTags( + int index, com.aliyun.gateway.sls.util.Logs.LogTag.Builder builderForValue) { + if (logTagsBuilder_ == null) { + ensureLogTagsIsMutable(); + logTags_.set(index, builderForValue.build()); + onChanged(); + } else { + logTagsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .com.aliyun.gateway.sls.util.LogTag LogTags = 6; + */ + public Builder addLogTags(com.aliyun.gateway.sls.util.Logs.LogTag value) { + if (logTagsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogTagsIsMutable(); + logTags_.add(value); + onChanged(); + } else { + logTagsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .com.aliyun.gateway.sls.util.LogTag LogTags = 6; + */ + public Builder addLogTags( + int index, com.aliyun.gateway.sls.util.Logs.LogTag value) { + if (logTagsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogTagsIsMutable(); + logTags_.add(index, value); + onChanged(); + } else { + logTagsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .com.aliyun.gateway.sls.util.LogTag LogTags = 6; + */ + public Builder addLogTags( + com.aliyun.gateway.sls.util.Logs.LogTag.Builder builderForValue) { + if (logTagsBuilder_ == null) { + ensureLogTagsIsMutable(); + logTags_.add(builderForValue.build()); + onChanged(); + } else { + logTagsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .com.aliyun.gateway.sls.util.LogTag LogTags = 6; + */ + public Builder addLogTags( + int index, com.aliyun.gateway.sls.util.Logs.LogTag.Builder builderForValue) { + if (logTagsBuilder_ == null) { + ensureLogTagsIsMutable(); + logTags_.add(index, builderForValue.build()); + onChanged(); + } else { + logTagsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .com.aliyun.gateway.sls.util.LogTag LogTags = 6; + */ + public Builder addAllLogTags( + java.lang.Iterable values) { + if (logTagsBuilder_ == null) { + ensureLogTagsIsMutable(); + super.addAll(values, logTags_); + onChanged(); + } else { + logTagsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .com.aliyun.gateway.sls.util.LogTag LogTags = 6; + */ + public Builder clearLogTags() { + if (logTagsBuilder_ == null) { + logTags_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + logTagsBuilder_.clear(); + } + return this; + } + /** + * repeated .com.aliyun.gateway.sls.util.LogTag LogTags = 6; + */ + public Builder removeLogTags(int index) { + if (logTagsBuilder_ == null) { + ensureLogTagsIsMutable(); + logTags_.remove(index); + onChanged(); + } else { + logTagsBuilder_.remove(index); + } + return this; + } + /** + * repeated .com.aliyun.gateway.sls.util.LogTag LogTags = 6; + */ + public com.aliyun.gateway.sls.util.Logs.LogTag.Builder getLogTagsBuilder( + int index) { + return getLogTagsFieldBuilder().getBuilder(index); + } + /** + * repeated .com.aliyun.gateway.sls.util.LogTag LogTags = 6; + */ + public com.aliyun.gateway.sls.util.Logs.LogTagOrBuilder getLogTagsOrBuilder( + int index) { + if (logTagsBuilder_ == null) { + return logTags_.get(index); } else { + return logTagsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .com.aliyun.gateway.sls.util.LogTag LogTags = 6; + */ + public java.util.List + getLogTagsOrBuilderList() { + if (logTagsBuilder_ != null) { + return logTagsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(logTags_); + } + } + /** + * repeated .com.aliyun.gateway.sls.util.LogTag LogTags = 6; + */ + public com.aliyun.gateway.sls.util.Logs.LogTag.Builder addLogTagsBuilder() { + return getLogTagsFieldBuilder().addBuilder( + com.aliyun.gateway.sls.util.Logs.LogTag.getDefaultInstance()); + } + /** + * repeated .com.aliyun.gateway.sls.util.LogTag LogTags = 6; + */ + public com.aliyun.gateway.sls.util.Logs.LogTag.Builder addLogTagsBuilder( + int index) { + return getLogTagsFieldBuilder().addBuilder( + index, com.aliyun.gateway.sls.util.Logs.LogTag.getDefaultInstance()); + } + /** + * repeated .com.aliyun.gateway.sls.util.LogTag LogTags = 6; + */ + public java.util.List + getLogTagsBuilderList() { + return getLogTagsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.aliyun.gateway.sls.util.Logs.LogTag, com.aliyun.gateway.sls.util.Logs.LogTag.Builder, com.aliyun.gateway.sls.util.Logs.LogTagOrBuilder> + getLogTagsFieldBuilder() { + if (logTagsBuilder_ == null) { + logTagsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.aliyun.gateway.sls.util.Logs.LogTag, com.aliyun.gateway.sls.util.Logs.LogTag.Builder, com.aliyun.gateway.sls.util.Logs.LogTagOrBuilder>( + logTags_, + ((bitField0_ & 0x00000020) == 0x00000020), + getParentForChildren(), + isClean()); + logTags_ = null; + } + return logTagsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.aliyun.gateway.sls.util.LogGroup) + } + + static { + defaultInstance = new LogGroup(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.aliyun.gateway.sls.util.LogGroup) + } + + public interface LogGroupListOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // repeated .com.aliyun.gateway.sls.util.LogGroup logGroupList = 1; + /** + * repeated .com.aliyun.gateway.sls.util.LogGroup logGroupList = 1; + */ + java.util.List + getLogGroupListList(); + /** + * repeated .com.aliyun.gateway.sls.util.LogGroup logGroupList = 1; + */ + com.aliyun.gateway.sls.util.Logs.LogGroup getLogGroupList(int index); + /** + * repeated .com.aliyun.gateway.sls.util.LogGroup logGroupList = 1; + */ + int getLogGroupListCount(); + /** + * repeated .com.aliyun.gateway.sls.util.LogGroup logGroupList = 1; + */ + java.util.List + getLogGroupListOrBuilderList(); + /** + * repeated .com.aliyun.gateway.sls.util.LogGroup logGroupList = 1; + */ + com.aliyun.gateway.sls.util.Logs.LogGroupOrBuilder getLogGroupListOrBuilder( + int index); + } + /** + * Protobuf type {@code com.aliyun.gateway.sls.util.LogGroupList} + */ + public static final class LogGroupList extends + com.google.protobuf.GeneratedMessage + implements LogGroupListOrBuilder { + // Use LogGroupList.newBuilder() to construct. + private LogGroupList(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private LogGroupList(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final LogGroupList defaultInstance; + public static LogGroupList getDefaultInstance() { + return defaultInstance; + } + + public LogGroupList getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LogGroupList( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + 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; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + logGroupList_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + logGroupList_.add(input.readMessage(com.aliyun.gateway.sls.util.Logs.LogGroup.PARSER, extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + logGroupList_ = java.util.Collections.unmodifiableList(logGroupList_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.aliyun.gateway.sls.util.Logs.internal_static_com_aliyun_openservices_log_common_LogGroupList_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.aliyun.gateway.sls.util.Logs.internal_static_com_aliyun_openservices_log_common_LogGroupList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.aliyun.gateway.sls.util.Logs.LogGroupList.class, com.aliyun.gateway.sls.util.Logs.LogGroupList.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public LogGroupList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LogGroupList(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + // repeated .com.aliyun.gateway.sls.util.LogGroup logGroupList = 1; + public static final int LOGGROUPLIST_FIELD_NUMBER = 1; + private java.util.List logGroupList_; + /** + * repeated .com.aliyun.gateway.sls.util.LogGroup logGroupList = 1; + */ + public java.util.List getLogGroupListList() { + return logGroupList_; + } + /** + * repeated .com.aliyun.gateway.sls.util.LogGroup logGroupList = 1; + */ + public java.util.List + getLogGroupListOrBuilderList() { + return logGroupList_; + } + /** + * repeated .com.aliyun.gateway.sls.util.LogGroup logGroupList = 1; + */ + public int getLogGroupListCount() { + return logGroupList_.size(); + } + /** + * repeated .com.aliyun.gateway.sls.util.LogGroup logGroupList = 1; + */ + public com.aliyun.gateway.sls.util.Logs.LogGroup getLogGroupList(int index) { + return logGroupList_.get(index); + } + /** + * repeated .com.aliyun.gateway.sls.util.LogGroup logGroupList = 1; + */ + public com.aliyun.gateway.sls.util.Logs.LogGroupOrBuilder getLogGroupListOrBuilder( + int index) { + return logGroupList_.get(index); + } + + private void initFields() { + logGroupList_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + for (int i = 0; i < getLogGroupListCount(); i++) { + if (!getLogGroupList(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < logGroupList_.size(); i++) { + output.writeMessage(1, logGroupList_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < logGroupList_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, logGroupList_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static com.aliyun.gateway.sls.util.Logs.LogGroupList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.aliyun.gateway.sls.util.Logs.LogGroupList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.aliyun.gateway.sls.util.Logs.LogGroupList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.aliyun.gateway.sls.util.Logs.LogGroupList parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.aliyun.gateway.sls.util.Logs.LogGroupList parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.aliyun.gateway.sls.util.Logs.LogGroupList parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.aliyun.gateway.sls.util.Logs.LogGroupList parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.aliyun.gateway.sls.util.Logs.LogGroupList parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.aliyun.gateway.sls.util.Logs.LogGroupList parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.aliyun.gateway.sls.util.Logs.LogGroupList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(com.aliyun.gateway.sls.util.Logs.LogGroupList prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code com.aliyun.gateway.sls.util.LogGroupList} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements com.aliyun.gateway.sls.util.Logs.LogGroupListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.aliyun.gateway.sls.util.Logs.internal_static_com_aliyun_openservices_log_common_LogGroupList_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.aliyun.gateway.sls.util.Logs.internal_static_com_aliyun_openservices_log_common_LogGroupList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.aliyun.gateway.sls.util.Logs.LogGroupList.class, com.aliyun.gateway.sls.util.Logs.LogGroupList.Builder.class); + } + + // Construct using com.aliyun.gateway.sls.util.Logs.LogGroupList.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getLogGroupListFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (logGroupListBuilder_ == null) { + logGroupList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + logGroupListBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.aliyun.gateway.sls.util.Logs.internal_static_com_aliyun_openservices_log_common_LogGroupList_descriptor; + } + + public com.aliyun.gateway.sls.util.Logs.LogGroupList getDefaultInstanceForType() { + return com.aliyun.gateway.sls.util.Logs.LogGroupList.getDefaultInstance(); + } + + public com.aliyun.gateway.sls.util.Logs.LogGroupList build() { + com.aliyun.gateway.sls.util.Logs.LogGroupList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.aliyun.gateway.sls.util.Logs.LogGroupList buildPartial() { + com.aliyun.gateway.sls.util.Logs.LogGroupList result = new com.aliyun.gateway.sls.util.Logs.LogGroupList(this); + int from_bitField0_ = bitField0_; + if (logGroupListBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + logGroupList_ = java.util.Collections.unmodifiableList(logGroupList_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.logGroupList_ = logGroupList_; + } else { + result.logGroupList_ = logGroupListBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.aliyun.gateway.sls.util.Logs.LogGroupList) { + return mergeFrom((com.aliyun.gateway.sls.util.Logs.LogGroupList)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.aliyun.gateway.sls.util.Logs.LogGroupList other) { + if (other == com.aliyun.gateway.sls.util.Logs.LogGroupList.getDefaultInstance()) return this; + if (logGroupListBuilder_ == null) { + if (!other.logGroupList_.isEmpty()) { + if (logGroupList_.isEmpty()) { + logGroupList_ = other.logGroupList_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureLogGroupListIsMutable(); + logGroupList_.addAll(other.logGroupList_); + } + onChanged(); + } + } else { + if (!other.logGroupList_.isEmpty()) { + if (logGroupListBuilder_.isEmpty()) { + logGroupListBuilder_.dispose(); + logGroupListBuilder_ = null; + logGroupList_ = other.logGroupList_; + bitField0_ = (bitField0_ & ~0x00000001); + logGroupListBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getLogGroupListFieldBuilder() : null; + } else { + logGroupListBuilder_.addAllMessages(other.logGroupList_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + for (int i = 0; i < getLogGroupListCount(); i++) { + if (!getLogGroupList(i).isInitialized()) { + + return false; + } + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.aliyun.gateway.sls.util.Logs.LogGroupList parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.aliyun.gateway.sls.util.Logs.LogGroupList) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // repeated .com.aliyun.gateway.sls.util.LogGroup logGroupList = 1; + private java.util.List logGroupList_ = + java.util.Collections.emptyList(); + private void ensureLogGroupListIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + logGroupList_ = new java.util.ArrayList(logGroupList_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.aliyun.gateway.sls.util.Logs.LogGroup, com.aliyun.gateway.sls.util.Logs.LogGroup.Builder, com.aliyun.gateway.sls.util.Logs.LogGroupOrBuilder> logGroupListBuilder_; + + /** + * repeated .com.aliyun.gateway.sls.util.LogGroup logGroupList = 1; + */ + public java.util.List getLogGroupListList() { + if (logGroupListBuilder_ == null) { + return java.util.Collections.unmodifiableList(logGroupList_); + } else { + return logGroupListBuilder_.getMessageList(); + } + } + /** + * repeated .com.aliyun.gateway.sls.util.LogGroup logGroupList = 1; + */ + public int getLogGroupListCount() { + if (logGroupListBuilder_ == null) { + return logGroupList_.size(); + } else { + return logGroupListBuilder_.getCount(); + } + } + /** + * repeated .com.aliyun.gateway.sls.util.LogGroup logGroupList = 1; + */ + public com.aliyun.gateway.sls.util.Logs.LogGroup getLogGroupList(int index) { + if (logGroupListBuilder_ == null) { + return logGroupList_.get(index); + } else { + return logGroupListBuilder_.getMessage(index); + } + } + /** + * repeated .com.aliyun.gateway.sls.util.LogGroup logGroupList = 1; + */ + public Builder setLogGroupList( + int index, com.aliyun.gateway.sls.util.Logs.LogGroup value) { + if (logGroupListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogGroupListIsMutable(); + logGroupList_.set(index, value); + onChanged(); + } else { + logGroupListBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .com.aliyun.gateway.sls.util.LogGroup logGroupList = 1; + */ + public Builder setLogGroupList( + int index, com.aliyun.gateway.sls.util.Logs.LogGroup.Builder builderForValue) { + if (logGroupListBuilder_ == null) { + ensureLogGroupListIsMutable(); + logGroupList_.set(index, builderForValue.build()); + onChanged(); + } else { + logGroupListBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .com.aliyun.gateway.sls.util.LogGroup logGroupList = 1; + */ + public Builder addLogGroupList(com.aliyun.gateway.sls.util.Logs.LogGroup value) { + if (logGroupListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogGroupListIsMutable(); + logGroupList_.add(value); + onChanged(); + } else { + logGroupListBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .com.aliyun.gateway.sls.util.LogGroup logGroupList = 1; + */ + public Builder addLogGroupList( + int index, com.aliyun.gateway.sls.util.Logs.LogGroup value) { + if (logGroupListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogGroupListIsMutable(); + logGroupList_.add(index, value); + onChanged(); + } else { + logGroupListBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .com.aliyun.gateway.sls.util.LogGroup logGroupList = 1; + */ + public Builder addLogGroupList( + com.aliyun.gateway.sls.util.Logs.LogGroup.Builder builderForValue) { + if (logGroupListBuilder_ == null) { + ensureLogGroupListIsMutable(); + logGroupList_.add(builderForValue.build()); + onChanged(); + } else { + logGroupListBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .com.aliyun.gateway.sls.util.LogGroup logGroupList = 1; + */ + public Builder addLogGroupList( + int index, com.aliyun.gateway.sls.util.Logs.LogGroup.Builder builderForValue) { + if (logGroupListBuilder_ == null) { + ensureLogGroupListIsMutable(); + logGroupList_.add(index, builderForValue.build()); + onChanged(); + } else { + logGroupListBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .com.aliyun.gateway.sls.util.LogGroup logGroupList = 1; + */ + public Builder addAllLogGroupList( + java.lang.Iterable values) { + if (logGroupListBuilder_ == null) { + ensureLogGroupListIsMutable(); + super.addAll(values, logGroupList_); + onChanged(); + } else { + logGroupListBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .com.aliyun.gateway.sls.util.LogGroup logGroupList = 1; + */ + public Builder clearLogGroupList() { + if (logGroupListBuilder_ == null) { + logGroupList_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + logGroupListBuilder_.clear(); + } + return this; + } + /** + * repeated .com.aliyun.gateway.sls.util.LogGroup logGroupList = 1; + */ + public Builder removeLogGroupList(int index) { + if (logGroupListBuilder_ == null) { + ensureLogGroupListIsMutable(); + logGroupList_.remove(index); + onChanged(); + } else { + logGroupListBuilder_.remove(index); + } + return this; + } + /** + * repeated .com.aliyun.gateway.sls.util.LogGroup logGroupList = 1; + */ + public com.aliyun.gateway.sls.util.Logs.LogGroup.Builder getLogGroupListBuilder( + int index) { + return getLogGroupListFieldBuilder().getBuilder(index); + } + /** + * repeated .com.aliyun.gateway.sls.util.LogGroup logGroupList = 1; + */ + public com.aliyun.gateway.sls.util.Logs.LogGroupOrBuilder getLogGroupListOrBuilder( + int index) { + if (logGroupListBuilder_ == null) { + return logGroupList_.get(index); } else { + return logGroupListBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .com.aliyun.gateway.sls.util.LogGroup logGroupList = 1; + */ + public java.util.List + getLogGroupListOrBuilderList() { + if (logGroupListBuilder_ != null) { + return logGroupListBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(logGroupList_); + } + } + /** + * repeated .com.aliyun.gateway.sls.util.LogGroup logGroupList = 1; + */ + public com.aliyun.gateway.sls.util.Logs.LogGroup.Builder addLogGroupListBuilder() { + return getLogGroupListFieldBuilder().addBuilder( + com.aliyun.gateway.sls.util.Logs.LogGroup.getDefaultInstance()); + } + /** + * repeated .com.aliyun.gateway.sls.util.LogGroup logGroupList = 1; + */ + public com.aliyun.gateway.sls.util.Logs.LogGroup.Builder addLogGroupListBuilder( + int index) { + return getLogGroupListFieldBuilder().addBuilder( + index, com.aliyun.gateway.sls.util.Logs.LogGroup.getDefaultInstance()); + } + /** + * repeated .com.aliyun.gateway.sls.util.LogGroup logGroupList = 1; + */ + public java.util.List + getLogGroupListBuilderList() { + return getLogGroupListFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.aliyun.gateway.sls.util.Logs.LogGroup, com.aliyun.gateway.sls.util.Logs.LogGroup.Builder, com.aliyun.gateway.sls.util.Logs.LogGroupOrBuilder> + getLogGroupListFieldBuilder() { + if (logGroupListBuilder_ == null) { + logGroupListBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.aliyun.gateway.sls.util.Logs.LogGroup, com.aliyun.gateway.sls.util.Logs.LogGroup.Builder, com.aliyun.gateway.sls.util.Logs.LogGroupOrBuilder>( + logGroupList_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + logGroupList_ = null; + } + return logGroupListBuilder_; + } + + // @@protoc_insertion_point(builder_scope:com.aliyun.gateway.sls.util.LogGroupList) + } + + static { + defaultInstance = new LogGroupList(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:com.aliyun.gateway.sls.util.LogGroupList) + } + + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_aliyun_openservices_log_common_Log_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_aliyun_openservices_log_common_Log_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_aliyun_openservices_log_common_Log_Content_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_aliyun_openservices_log_common_Log_Content_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_aliyun_openservices_log_common_LogTag_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_aliyun_openservices_log_common_LogTag_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_aliyun_openservices_log_common_LogGroup_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_aliyun_openservices_log_common_LogGroup_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_com_aliyun_openservices_log_common_LogGroupList_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_com_aliyun_openservices_log_common_LogGroupList_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\nLogs.proto\022\"com.aliyun.openservices.lo" + + "g.common\"\216\001\n\003Log\022\014\n\004Time\030\001 \002(\r\022A\n\010Conten" + + "ts\030\002 \003(\0132/.com.aliyun.openservices.log.c" + + "ommon.Log.Content\022\017\n\007Time_ns\030\004 \001(\007\032%\n\007Co" + + "ntent\022\013\n\003Key\030\001 \002(\t\022\r\n\005Value\030\002 \002(\t\"$\n\006Log" + + "Tag\022\013\n\003Key\030\001 \002(\t\022\r\n\005Value\030\002 \002(\t\"\304\001\n\010LogG" + + "roup\0225\n\004Logs\030\001 \003(\0132\'.com.aliyun.openserv" + + "ices.log.common.Log\022\020\n\010Category\030\002 \001(\t\022\r\n" + + "\005Topic\030\003 \001(\t\022\016\n\006Source\030\004 \001(\t\022\023\n\013MachineU" + + "UID\030\005 \001(\t\022;\n\007LogTags\030\006 \003(\0132*.com.aliyun.", + "openservices.log.common.LogTag\"R\n\014LogGro" + + "upList\022B\n\014logGroupList\030\001 \003(\0132,.com.aliyu" + + "n.openservices.log.common.LogGroup" + }; + 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; + internal_static_com_aliyun_openservices_log_common_Log_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_com_aliyun_openservices_log_common_Log_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_aliyun_openservices_log_common_Log_descriptor, + new java.lang.String[] { "Time", "Contents", "TimeNs", }); + internal_static_com_aliyun_openservices_log_common_Log_Content_descriptor = + internal_static_com_aliyun_openservices_log_common_Log_descriptor.getNestedTypes().get(0); + internal_static_com_aliyun_openservices_log_common_Log_Content_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_aliyun_openservices_log_common_Log_Content_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_com_aliyun_openservices_log_common_LogTag_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_com_aliyun_openservices_log_common_LogTag_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_aliyun_openservices_log_common_LogTag_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_com_aliyun_openservices_log_common_LogGroup_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_com_aliyun_openservices_log_common_LogGroup_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_aliyun_openservices_log_common_LogGroup_descriptor, + new java.lang.String[] { "Logs", "Category", "Topic", "Source", "MachineUUID", "LogTags", }); + internal_static_com_aliyun_openservices_log_common_LogGroupList_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_com_aliyun_openservices_log_common_LogGroupList_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_com_aliyun_openservices_log_common_LogGroupList_descriptor, + new java.lang.String[] { "LogGroupList", }); + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + } + + // @@protoc_insertion_point(outer_class_scope) +} \ No newline at end of file diff --git a/alibabacloud-gateway-sls/util/main.tea b/alibabacloud-gateway-sls/util/main.tea index 287942c7..7ecbcb8a 100644 --- a/alibabacloud-gateway-sls/util/main.tea +++ b/alibabacloud-gateway-sls/util/main.tea @@ -18,4 +18,7 @@ static async function compress(src: bytes, compressType: string): bytes static async function isCompressorAvailable(compressType: string): boolean static async function isDecompressorAvailable(compressType: string): boolean -static async function bytesLength(src: bytes): int64 \ No newline at end of file +static async function bytesLength(src: bytes): int64 + + +static async function serializeLogGroupToPB(logGroup: any): bytes \ No newline at end of file