From 670fe474e7f018618352517cc75764fb55be7e55 Mon Sep 17 00:00:00 2001 From: Darin Howard Date: Wed, 21 Aug 2019 13:33:26 -0500 Subject: [PATCH 1/2] adding in support for protobuf transport (+4 squashed commits) Squashed commits: [31c0e30] fixing unit test [0218cec] fixing unit test [2bfaac9] updating readme [0c5dfd7] RT-3623 - adding in unix domain socket transport for logs --- README.md | 43 +- pom.xml | 162 +- .../java/com/stackify/api/AppIdentity.java | 350 +- src/main/java/com/stackify/api/Container.java | 33 + .../com/stackify/api/EnvironmentDetail.java | 227 +- src/main/java/com/stackify/api/ErrorItem.java | 303 +- .../java/com/stackify/api/Kubernetes.java | 28 + src/main/java/com/stackify/api/LogMsg.java | 268 +- .../java/com/stackify/api/LogMsgGroup.java | 497 +- .../java/com/stackify/api/StackifyError.java | 307 +- .../java/com/stackify/api/TraceFrame.java | 149 +- .../com/stackify/api/WebRequestDetail.java | 598 +- .../stackify/api/common/ApiConfiguration.java | 132 +- .../api/common/ApiConfigurations.java | 203 +- .../stackify/api/common/log/LogAppender.java | 328 +- .../api/common/log/LogBackgroundService.java | 120 +- .../stackify/api/common/log/LogCollector.java | 339 +- .../stackify/api/common/log/LogSender.java | 201 - .../stackify/api/common/log/LogTransport.java | 9 + .../common/log/LogTransportAgentSocket.java | 85 + .../api/common/log/LogTransportDirect.java | 94 + .../common/log/LogTransportPreProcessor.java | 89 + .../api/common/log/StackTraceUtil.java | 54 + .../api/common/log/direct/Logger.java | 21 +- .../api/common/proto/LogGroupConverter.java | 159 + .../common/proto/LogMsgGroupConverter.java | 289 + .../api/common/proto/StackifyProto.java | 16955 ++++++++++++++++ .../api/common/socket/ApacheUnixSocket.java | 301 + .../api/common/socket/HttpSocketClient.java | 60 + .../socket/UnixConnectionSocketFactory.java | 50 + .../common/log/LogBackgroundServiceTest.java | 88 +- .../api/common/log/LogCollectorTest.java | 132 +- .../api/common/log/LogSenderTest.java | 6 +- 33 files changed, 19434 insertions(+), 3246 deletions(-) create mode 100644 src/main/java/com/stackify/api/Container.java create mode 100644 src/main/java/com/stackify/api/Kubernetes.java delete mode 100644 src/main/java/com/stackify/api/common/log/LogSender.java create mode 100644 src/main/java/com/stackify/api/common/log/LogTransport.java create mode 100644 src/main/java/com/stackify/api/common/log/LogTransportAgentSocket.java create mode 100644 src/main/java/com/stackify/api/common/log/LogTransportDirect.java create mode 100644 src/main/java/com/stackify/api/common/log/LogTransportPreProcessor.java create mode 100644 src/main/java/com/stackify/api/common/log/StackTraceUtil.java create mode 100644 src/main/java/com/stackify/api/common/proto/LogGroupConverter.java create mode 100644 src/main/java/com/stackify/api/common/proto/LogMsgGroupConverter.java create mode 100644 src/main/java/com/stackify/api/common/proto/StackifyProto.java create mode 100644 src/main/java/com/stackify/api/common/socket/ApacheUnixSocket.java create mode 100644 src/main/java/com/stackify/api/common/socket/HttpSocketClient.java create mode 100644 src/main/java/com/stackify/api/common/socket/UnixConnectionSocketFactory.java diff --git a/README.md b/README.md index ead23ff..7cb532e 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,14 @@ -# stackify-api-java - [![Maven Central](https://img.shields.io/maven-central/v/com.stackify/stackify-api-java.svg)](http://mvnrepository.com/artifact/com.stackify/stackify-api-java) -[![Build Status](https://travis-ci.org/stackify/stackify-api-java.png)](https://travis-ci.org/stackify/stackify-api-java) [![Coverage Status](https://coveralls.io/repos/stackify/stackify-api-java/badge.png?branch=master)](https://coveralls.io/r/stackify/stackify-api-java?branch=master) -Stackify API for Java - -Errors and Logs Overview: - -http://support.stackify.com/errors-and-logs-overview/ - -Sign Up for a Trial: - -http://www.stackify.com/sign-up/ - -Log4j 1.2 Appender: - -https://github.com/stackify/stackify-log-log4j12 +## Stackify API for Java -Logback Appender: - -https://github.com/stackify/stackify-log-logback +* **Errors and Logs Overview:** http://support.stackify.com/errors-and-logs-overview/ +* **Sign Up for a Trial:** http://www.stackify.com/sign-up/ +* **Appenders** + * **Log4j 1.2:** https://github.com/stackify/stackify-log-log4j12 + * **Log4j 2.x:** https://github.com/stackify/stackify-log-log4j2 + * **Logback:** https://github.com/stackify/stackify-log-logback ## Installation @@ -29,7 +17,7 @@ Add it as a maven dependency: com.stackify stackify-api-java - INSERT_LATEST_MAVEN_CENTRAL_VERSION + 4.0.0 ``` @@ -88,9 +76,9 @@ Be sure to shutdown the Direct Logger to flush this appender of any messages and LogManager.shutdown(); ``` -### RUM Manual Instrumentation +### RUM Setup -Real User Monitoring (RUM) manual instrumentation allows you to specify where the RUM JavaScript block is injected. +Real User Monitoring (RUM) setup allows you to specify where the RUM JavaScript block is injected. It is recommended you provide a `stackify-api.properties` file in your application classpath with the following content: @@ -115,11 +103,20 @@ Your application code will need to call out to the Stackify `com.stackify.apm.St ```` +## Legacy Support +For legacy support of **Java 1.6 and 1.7** use the following maven dependency: +``` + + com.stackify + stackify-api-java + 3.1.2 + +``` ## License -Copyright 2013 Stackify, LLC. +Copyright 2019 Stackify, LLC. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pom.xml b/pom.xml index 75c2f03..7c6ddc2 100644 --- a/pom.xml +++ b/pom.xml @@ -1,20 +1,15 @@ - + 4.0.0 com.stackify stackify-api-java - 3.1.3-SNAPSHOT + 4.0.0-SNAPSHOT Stackify API for Java Stackify API for Java https://github.com/stackify/stackify-api-java - - org.sonatype.oss - oss-parent - 9 - - The Apache Software License, Version 2.0 @@ -45,7 +40,18 @@ - 1.6 + 1.8 + 1.7.28 + 2.7.9 + 2.7.9.6 + 4.5.9 + 2.2.0 + 2.3.0 + 3.9.1 + 1.18.8 + 4.11 + 1.9.5 + 1.5.6 @@ -55,25 +61,55 @@ org.slf4j slf4j-api - 1.7.5 + ${slf4j-api.version} com.fasterxml.jackson.core jackson-core - 2.8.11 + ${jackson.version} com.fasterxml.jackson.core jackson-annotations - 2.8.11 + ${jackson.version} com.fasterxml.jackson.core jackson-databind - 2.8.11.3 + ${jackson-databind.version} + + + + org.apache.httpcomponents + httpclient + ${httpclient.version} + + + + com.kohlschutter.junixsocket + junixsocket-common + ${junixsocket.version} + + + + com.kohlschutter.junixsocket + junixsocket-native-common + ${junixsocket.version} + + + + net.jodah + failsafe + ${failsafe.version} + + + + com.google.protobuf + protobuf-java + ${protobuf.version} @@ -81,7 +117,7 @@ org.projectlombok lombok - 1.16.10 + ${lombok.version} provided @@ -92,42 +128,42 @@ org.slf4j slf4j-log4j12 - 1.7.5 + ${slf4j-api.version} test junit junit - 4.11 + ${junit.version} test org.mockito mockito-core - 1.9.5 + ${mockito.version} test org.powermock powermock-core - 1.5.6 + ${powermock.version} test org.powermock powermock-module-junit4 - 1.5.6 + ${powermock.version} test org.powermock powermock-api-mockito - 1.5.6 + ${powermock.version} test @@ -142,14 +178,6 @@ - - - org.apache.maven.wagon - wagon-webdav-jackrabbit - 2.2 - - - @@ -173,24 +201,6 @@ - - org.apache.maven.plugins - maven-javadoc-plugin - 2.9.1 - - - attach-javadocs - - jar - - - false - -Xdoclint:none - - - - - org.apache.maven.plugins maven-source-plugin @@ -207,7 +217,7 @@ org.apache.felix maven-bundle-plugin - 2.3.7 + 4.2.0 bundle-manifest @@ -219,44 +229,38 @@ - - org.codehaus.mojo - cobertura-maven-plugin - 2.6 - - - xml - - - - - - org.eluder.coveralls - coveralls-maven-plugin - 2.2.0 - - - - - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.9.1 - - false - -Xdoclint:none - + maven-enforcer-plugin + 1.0 + + + enforce-bytecode-version + + enforce + + + + + ${java.version} + + + true + + + + + + org.codehaus.mojo + extra-enforcer-rules + 1.2 + + - + diff --git a/src/main/java/com/stackify/api/AppIdentity.java b/src/main/java/com/stackify/api/AppIdentity.java index 9da421a..76ecc88 100644 --- a/src/main/java/com/stackify/api/AppIdentity.java +++ b/src/main/java/com/stackify/api/AppIdentity.java @@ -18,306 +18,70 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; /** * AppIdentity + * * @author Eric Martin */ +@AllArgsConstructor +@NoArgsConstructor +@Builder(builderClassName = "Builder", builderMethodName = "newBuilder", toBuilder = true) +@Data @JsonInclude(JsonInclude.Include.NON_NULL) -@JsonDeserialize(builder = AppIdentity.Builder.class) +@JsonIgnoreProperties(ignoreUnknown = true) public class AppIdentity { - /** - * Device id - */ - @JsonProperty("DeviceID") - private final Integer deviceId; - - /** - * Device application id - */ - @JsonProperty("DeviceAppID") - private final Integer deviceAppId; - - /** - * Application name id - */ - @JsonProperty("AppNameID") - private final String appNameId; - - /** - * Environment id - */ - @JsonProperty("EnvID") - private final Integer envId; - - /** - * Environment - */ - @JsonProperty("Env") - private final String env; - - /** - * Application name - */ - @JsonProperty("AppName") - private final String appName; - - /** - * Application-Environment id - */ - @JsonProperty("AppEnvID") - private final String appEnvId; - - /** - * Device alias - */ - @JsonProperty("DeviceAlias") - private final String deviceAlias; - - /** - * @return the deviceId - */ - public Integer getDeviceId() { - return deviceId; - } - - /** - * @return the deviceAppId - */ - public Integer getDeviceAppId() { - return deviceAppId; - } - - /** - * @return the appNameId - */ - public String getAppNameId() { - return appNameId; - } - - /** - * @return the envId - */ - public Integer getEnvId() { - return envId; - } - - /** - * @return the env - */ - public String getEnv() { - return env; - } - - /** - * @return the appName - */ - public String getAppName() { - return appName; - } - - /** - * @return the appEnvId - */ - public String getAppEnvId() { - return appEnvId; - } - - /** - * @return the deviceAlias - */ - public String getDeviceAlias() { - return deviceAlias; - } - - /** - * @return An instance of Builder, based on current state - */ - public Builder toBuilder() { - return newBuilder() - .deviceId(this.deviceId) - .deviceAppId(this.deviceAppId) - .appNameId(this.appNameId) - .envId(this.envId) - .env(this.env) - .appName(this.appName) - .appEnvId(this.appEnvId) - .deviceAlias(this.deviceAlias); - } - - /** - * @param builder The Builder object that contains all of the values for initialization - */ - private AppIdentity(final Builder builder) { - this.deviceId = builder.deviceId; - this.deviceAppId = builder.deviceAppId; - this.appNameId = builder.appNameId; - this.envId = builder.envId; - this.env = builder.env; - this.appName = builder.appName; - this.appEnvId = builder.appEnvId; - this.deviceAlias = builder.deviceAlias; - } - - /** - * @return A new instance of the Builder - */ - public static Builder newBuilder() { - return new Builder(); - } - - /** - * AppIdentity.Builder separates the construction of a AppIdentity from its representation - */ - @JsonIgnoreProperties(ignoreUnknown = true) - public static class Builder { - - /** - * The builder's deviceId - */ - @JsonProperty("DeviceID") - private Integer deviceId; - - /** - * The builder's deviceAppId - */ - @JsonProperty("DeviceAppID") - private Integer deviceAppId; - - /** - * The builder's appNameId - */ - @JsonProperty("AppNameID") - private String appNameId; - - /** - * The builder's envId - */ - @JsonProperty("EnvID") - private Integer envId; - - /** - * The builder's env - */ - @JsonProperty("Env") - private String env; - - /** - * The builder's appName - */ - @JsonProperty("AppName") - private String appName; - - /** - * The builder's appEnvId - */ - @JsonProperty("AppEnvID") - private String appEnvId; - - /** - * The builder's deviceAlias - */ - @JsonProperty("DeviceAlias") - private String deviceAlias; - - /** - * Sets the builder's deviceId - * @param deviceId The deviceId to be set - * @return Reference to the current object - */ - public Builder deviceId(final Integer deviceId) { - this.deviceId = deviceId; - return this; - } - - /** - * Sets the builder's deviceAppId - * @param deviceAppId The deviceAppId to be set - * @return Reference to the current object - */ - public Builder deviceAppId(final Integer deviceAppId) { - this.deviceAppId = deviceAppId; - return this; - } - - /** - * Sets the builder's appNameId - * @param appNameId The appNameId to be set - * @return Reference to the current object - */ - public Builder appNameId(final String appNameId) { - this.appNameId = appNameId; - return this; - } - - /** - * Sets the builder's envId - * @param envId The envId to be set - * @return Reference to the current object - */ - public Builder envId(final Integer envId) { - this.envId = envId; - return this; - } - - /** - * Sets the builder's env - * @param env The env to be set - * @return Reference to the current object - */ - public Builder env(final String env) { - this.env = env; - return this; - } - - /** - * Sets the builder's appName - * @param appName The appName to be set - * @return Reference to the current object - */ - public Builder appName(final String appName) { - this.appName = appName; - return this; - } - - /** - * Sets the builder's appEnvId - * @param appEnvId The appEnvId to be set - * @return Reference to the current object - */ - public Builder appEnvId(final String appEnvId) { - this.appEnvId = appEnvId; - return this; - } - - /** - * Sets the builder's deviceAlias - * @param deviceAlias The deviceAlias to be set - * @return Reference to the current object - */ - public Builder deviceAlias(final String deviceAlias) { - this.deviceAlias = deviceAlias; - return this; - } - - /** - * @return A new object constructed from this builder - */ - public AppIdentity build() { - return new AppIdentity(this); - } - } + /** + * Device id + */ + @JsonProperty("DeviceID") + private Integer deviceId; + + /** + * Device application id + */ + @JsonProperty("DeviceAppID") + private Integer deviceAppId; + + /** + * Application name id + */ + @JsonProperty("AppNameID") + private String appNameId; + + /** + * Environment id + */ + @JsonProperty("EnvID") + private Integer envId; + + /** + * Environment + */ + @JsonProperty("Env") + private String env; + + /** + * Application name + */ + @JsonProperty("AppName") + private String appName; + + /** + * Application-Environment id + */ + @JsonProperty("AppEnvID") + private String appEnvId; + + /** + * Device alias + */ + @JsonProperty("DeviceAlias") + private String deviceAlias; - /** - * @see java.lang.Object#toString() - */ - @Override - public String toString() { - return "AppIdentity{deviceId=" + deviceId + ", deviceAppId=" - + deviceAppId + ", appNameId=" + appNameId + ", envId=" + envId - + ", env=" + env + ", appName=" + appName + ", appEnvId=" - + appEnvId + ", deviceAlias=" + deviceAlias + "}"; - } } diff --git a/src/main/java/com/stackify/api/Container.java b/src/main/java/com/stackify/api/Container.java new file mode 100644 index 0000000..eaf5f9a --- /dev/null +++ b/src/main/java/com/stackify/api/Container.java @@ -0,0 +1,33 @@ +package com.stackify.api; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@NoArgsConstructor +@Builder(builderClassName = "Builder", builderMethodName = "newBuilder", toBuilder = true) +@Data +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class Container { + + @JsonProperty("ImageId") + private String imageId; + + @JsonProperty("ImageRepository") + private String imageRepository; + + @JsonProperty("ImageTag") + private String imageTag; + + @JsonProperty("ContainerId") + private String containerId; + + @JsonProperty("ContainerName") + private String containerName; +} diff --git a/src/main/java/com/stackify/api/EnvironmentDetail.java b/src/main/java/com/stackify/api/EnvironmentDetail.java index 70ae28c..e89e8fb 100644 --- a/src/main/java/com/stackify/api/EnvironmentDetail.java +++ b/src/main/java/com/stackify/api/EnvironmentDetail.java @@ -18,7 +18,10 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; /** * Contains details of the current application environment such as device name, application name, application @@ -37,196 +40,42 @@ * * @author Eric Martin */ +@AllArgsConstructor +@NoArgsConstructor +@Builder(builderClassName = "Builder", builderMethodName = "newBuilder", toBuilder = true) +@Data @JsonInclude(JsonInclude.Include.NON_NULL) -@JsonDeserialize(builder = EnvironmentDetail.Builder.class) +@JsonIgnoreProperties(ignoreUnknown = true) public class EnvironmentDetail { - /** - * Device name - */ - @JsonProperty("DeviceName") - private final String deviceName; + /** + * Device name + */ + @JsonProperty("DeviceName") + private String deviceName; + + /** + * Application name + */ + @JsonProperty("AppName") + private String appName; + + /** + * Application location + */ + @JsonProperty("AppLocation") + private String appLocation; + + /** + * Custom application name + */ + @JsonProperty("ConfiguredAppName") + private String configuredAppName; + + /** + * Custom application environment + */ + @JsonProperty("ConfiguredEnvironmentName") + private String configuredEnvironmentName; - /** - * Application name - */ - @JsonProperty("AppName") - private final String appName; - - /** - * Application location - */ - @JsonProperty("AppLocation") - private final String appLocation; - - /** - * Custom application name - */ - @JsonProperty("ConfiguredAppName") - private final String configuredAppName; - - /** - * Custom application environment - */ - @JsonProperty("ConfiguredEnvironmentName") - private final String configuredEnvironmentName; - - /** - * @return the deviceName - */ - public String getDeviceName() { - return deviceName; - } - - /** - * @return the appName - */ - public String getAppName() { - return appName; - } - - /** - * @return the appLocation - */ - public String getAppLocation() { - return appLocation; - } - - /** - * @return the configuredAppName - */ - public String getConfiguredAppName() { - return configuredAppName; - } - - /** - * @return the configuredEnvironmentName - */ - public String getConfiguredEnvironmentName() { - return configuredEnvironmentName; - } - - /** - * @return a new instalce of builder based on current state - */ - public Builder toBuilder() { - return newBuilder() - .deviceName(this.deviceName) - .appName(this.appName) - .appLocation(this.appLocation) - .configuredAppName(this.configuredAppName) - .configuredEnvironmentName(this.configuredEnvironmentName); - } - - /** - * @param builder The Builder object that contains all of the values for initialization - */ - private EnvironmentDetail(final Builder builder) { - this.deviceName = builder.deviceName; - this.appName = builder.appName; - this.appLocation = builder.appLocation; - this.configuredAppName = builder.configuredAppName; - this.configuredEnvironmentName = builder.configuredEnvironmentName; - } - - /** - * @return A new instance of the Builder - */ - public static Builder newBuilder() { - return new Builder(); - } - - /** - * EnvironmentDetail.Builder separates the construction of a EnvironmentDetail from its representation - */ - @JsonIgnoreProperties(ignoreUnknown = true) - public static class Builder { - - /** - * The builder's deviceName - */ - @JsonProperty("DeviceName") - private String deviceName; - - /** - * The builder's appName - */ - @JsonProperty("AppName") - private String appName; - - /** - * The builder's appLocation - */ - @JsonProperty("AppLocation") - private String appLocation; - - /** - * The builder's configuredAppName - */ - @JsonProperty("ConfiguredAppName") - private String configuredAppName; - - /** - * The builder's configuredEnvironmentName - */ - @JsonProperty("ConfiguredEnvironmentName") - private String configuredEnvironmentName; - - /** - * Sets the builder's deviceName - * @param deviceName The deviceName to be set - * @return Reference to the current object - */ - public Builder deviceName(final String deviceName) { - this.deviceName = deviceName; - return this; - } - - /** - * Sets the builder's appName - * @param appName The appName to be set - * @return Reference to the current object - */ - public Builder appName(final String appName) { - this.appName = appName; - return this; - } - - /** - * Sets the builder's appLocation - * @param appLocation The appLocation to be set - * @return Reference to the current object - */ - public Builder appLocation(final String appLocation) { - this.appLocation = appLocation; - return this; - } - - /** - * Sets the builder's configuredAppName - * @param configuredAppName The configuredAppName to be set - * @return Reference to the current object - */ - public Builder configuredAppName(final String configuredAppName) { - this.configuredAppName = configuredAppName; - return this; - } - - /** - * Sets the builder's configuredEnvironmentName - * @param configuredEnvironmentName The configuredEnvironmentName to be set - * @return Reference to the current object - */ - public Builder configuredEnvironmentName(final String configuredEnvironmentName) { - this.configuredEnvironmentName = configuredEnvironmentName; - return this; - } - - /** - * @return A new object constructed from this builder - */ - public EnvironmentDetail build() { - return new EnvironmentDetail(this); - } - } } diff --git a/src/main/java/com/stackify/api/ErrorItem.java b/src/main/java/com/stackify/api/ErrorItem.java index 388c210..3e29f4a 100644 --- a/src/main/java/com/stackify/api/ErrorItem.java +++ b/src/main/java/com/stackify/api/ErrorItem.java @@ -18,7 +18,10 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; import lombok.Setter; import java.util.List; @@ -41,259 +44,55 @@ * * @author Eric Martin */ +@AllArgsConstructor +@NoArgsConstructor +@Builder(builderClassName = "Builder", builderMethodName = "newBuilder", toBuilder = true) +@Data @JsonInclude(JsonInclude.Include.NON_NULL) -@JsonDeserialize(builder = ErrorItem.Builder.class) +@JsonIgnoreProperties(ignoreUnknown = true) public class ErrorItem { - /** - * The error message - */ - @Setter - @JsonProperty("Message") - private String message; + /** + * The error message + */ + @Setter + @JsonProperty("Message") + private String message; + + /** + * The error's class name + */ + @JsonProperty("ErrorType") + private String errorType; + + /** + * The error type code + */ + @JsonProperty("ErrorTypeCode") + private String errorTypeCode; + + /** + * Custom data for the error + */ + @JsonProperty("Data") + private Map data; + + /** + * The method name + */ + @JsonProperty("SourceMethod") + private String sourceMethod; + + /** + * The stack trace + */ + @JsonProperty("StackTrace") + private List stackTrace; + + /** + * The cause of this error + */ + @JsonProperty("InnerError") + private ErrorItem innerError; - /** - * The error's class name - */ - @JsonProperty("ErrorType") - private final String errorType; - - /** - * The error type code - */ - @JsonProperty("ErrorTypeCode") - private final String errorTypeCode; - - /** - * Custom data for the error - */ - @JsonProperty("Data") - private final Map data; - - /** - * The method name - */ - @JsonProperty("SourceMethod") - private final String sourceMethod; - - /** - * The stack trace - */ - @JsonProperty("StackTrace") - private final List stackTrace; - - /** - * The cause of this error - */ - @JsonProperty("InnerError") - private final ErrorItem innerError; - - /** - * @return the message - */ - public String getMessage() { - return message; - } - - /** - * @return the errorType - */ - public String getErrorType() { - return errorType; - } - - /** - * @return the errorTypeCode - */ - public String getErrorTypeCode() { - return errorTypeCode; - } - - /** - * @return the data - */ - public Map getData() { - return data; - } - - /** - * @return the sourceMethod - */ - public String getSourceMethod() { - return sourceMethod; - } - - /** - * @return the stackTrace - */ - public List getStackTrace() { - return stackTrace; - } - - /** - * @return the innerError - */ - public ErrorItem getInnerError() { - return innerError; - } - - /** - * @return an instance of Builder, based on current state - */ - public Builder toBuilder() { - return newBuilder() - .message(this.message) - .errorType(this.errorType) - .errorTypeCode(this.errorTypeCode) - .data(this.data) - .sourceMethod(this.sourceMethod) - .stackTrace(this.stackTrace) - .innerError(this.innerError); - } - - /** - * @param builder The Builder object that contains all of the values for initialization - */ - private ErrorItem(final Builder builder) { - this.message = builder.message; - this.errorType = builder.errorType; - this.errorTypeCode = builder.errorTypeCode; - this.data = builder.data; - this.sourceMethod = builder.sourceMethod; - this.stackTrace = builder.stackTrace; - this.innerError = builder.innerError; - } - - /** - * @return A new instance of the Builder - */ - public static Builder newBuilder() { - return new Builder(); - } - - /** - * ErrorItem.Builder separates the construction of a ErrorItem from its representation - */ - @JsonIgnoreProperties(ignoreUnknown = true) - public static class Builder { - - /** - * The builder's message - */ - @JsonProperty("Message") - private String message; - - /** - * The builder's errorType - */ - @JsonProperty("ErrorType") - private String errorType; - - /** - * The builder's errorTypeCode - */ - @JsonProperty("ErrorTypeCode") - private String errorTypeCode; - - /** - * The builder's data - */ - @JsonProperty("Data") - private Map data; - - /** - * The builder's sourceMethod - */ - @JsonProperty("SourceMethod") - private String sourceMethod; - - /** - * The builder's stackTrace - */ - @JsonProperty("StackTrace") - private List stackTrace; - - /** - * The builder's innerError - */ - @JsonProperty("InnerError") - private ErrorItem innerError; - - /** - * Sets the builder's message - * @param message The message to be set - * @return Reference to the current object - */ - public Builder message(final String message) { - this.message = message; - return this; - } - - /** - * Sets the builder's errorType - * @param errorType The errorType to be set - * @return Reference to the current object - */ - public Builder errorType(final String errorType) { - this.errorType = errorType; - return this; - } - - /** - * Sets the builder's errorTypeCode - * @param errorTypeCode The errorTypeCode to be set - * @return Reference to the current object - */ - public Builder errorTypeCode(final String errorTypeCode) { - this.errorTypeCode = errorTypeCode; - return this; - } - - /** - * Sets the builder's data - * @param data The data to be set - * @return Reference to the current object - */ - public Builder data(final Map data) { - this.data = data; - return this; - } - - /** - * Sets the builder's sourceMethod - * @param sourceMethod The sourceMethod to be set - * @return Reference to the current object - */ - public Builder sourceMethod(final String sourceMethod) { - this.sourceMethod = sourceMethod; - return this; - } - - /** - * Sets the builder's stackTrace - * @param stackTrace The stackTrace to be set - * @return Reference to the current object - */ - public Builder stackTrace(final List stackTrace) { - this.stackTrace = stackTrace; - return this; - } - - /** - * Sets the builder's innerError - * @param innerError The innerError to be set - * @return Reference to the current object - */ - public Builder innerError(final ErrorItem innerError) { - this.innerError = innerError; - return this; - } - - /** - * @return A new object constructed from this builder - */ - public ErrorItem build() { - return new ErrorItem(this); - } - } } diff --git a/src/main/java/com/stackify/api/Kubernetes.java b/src/main/java/com/stackify/api/Kubernetes.java new file mode 100644 index 0000000..65de27f --- /dev/null +++ b/src/main/java/com/stackify/api/Kubernetes.java @@ -0,0 +1,28 @@ +package com.stackify.api; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@AllArgsConstructor +@NoArgsConstructor +@Builder(builderClassName = "Builder", builderMethodName = "newBuilder", toBuilder = true) +@Data +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonIgnoreProperties(ignoreUnknown = true) +public class Kubernetes { + + @JsonProperty("PodName") + private String podName; + + @JsonProperty("PodNamespace") + private String podNamespace; + + @JsonProperty("ClusterName") + private String clusterName; + +} diff --git a/src/main/java/com/stackify/api/LogMsg.java b/src/main/java/com/stackify/api/LogMsg.java index 44d1be5..a9dbde3 100644 --- a/src/main/java/com/stackify/api/LogMsg.java +++ b/src/main/java/com/stackify/api/LogMsg.java @@ -18,8 +18,10 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import lombok.Getter; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; import lombok.Setter; import java.util.List; @@ -30,9 +32,12 @@ * * @author Eric Martin */ -@Getter +@AllArgsConstructor +@NoArgsConstructor +@Builder(builderClassName = "Builder", builderMethodName = "newBuilder", toBuilder = true) +@Data @JsonInclude(JsonInclude.Include.NON_NULL) -@JsonDeserialize(builder = LogMsg.Builder.class) +@JsonIgnoreProperties(ignoreUnknown = true) public class LogMsg { /** @@ -53,291 +58,56 @@ public class LogMsg { * The error/exception details */ @JsonProperty("Ex") - private final StackifyError ex; + private StackifyError ex; /** * The thread name */ @JsonProperty("Th") - private final String th; + private String th; /** * Unix timestamp of the log message */ @JsonProperty("EpochMs") - private final Long epochMs; + private Long epochMs; /** * Log level of the message */ @JsonProperty("Level") - private final String level; + private String level; /** * Transaction id */ @JsonProperty("TransID") - private final String transId; + private String transId; /** * Source method name */ @JsonProperty("SrcMethod") - private final String srcMethod; + private String srcMethod; /** * Source line number */ @JsonProperty("SrcLine") - private final Integer srcLine; + private Integer srcLine; /** * The log message id */ + @lombok.Builder.Default @JsonProperty("id") - private final String id; + private String id = UUID.randomUUID().toString(); /** * List of Tags */ @JsonProperty("Tags") - private final List tags; + private List tags; - /** - * @return An instance of Builder, based on current class state - */ - public Builder toBuilder() { - return newBuilder() - .id(this.id) - .msg(this.msg) - .data(this.data) - .ex(this.ex) - .th(this.th) - .epochMs(this.epochMs) - .level(this.level) - .transId(this.transId) - .srcMethod(this.srcMethod) - .srcLine(this.srcLine) - .tags(this.tags); - } - - /** - * @param builder The Builder object that contains all of the values for initialization - */ - private LogMsg(final Builder builder) { - this.id = builder.id != null ? builder.id : UUID.randomUUID().toString(); - this.msg = builder.msg; - this.data = builder.data; - this.ex = builder.ex; - this.th = builder.th; - this.epochMs = builder.epochMs; - this.level = builder.level; - this.transId = builder.transId; - this.srcMethod = builder.srcMethod; - this.srcLine = builder.srcLine; - this.tags = builder.tags; - } - - /** - * @return A new instance of the Builder - */ - public static Builder newBuilder() { - return new Builder(); - } - - /** - * LogMsg.Builder separates the construction of a LogMsg from its representation - */ - @JsonIgnoreProperties(ignoreUnknown = true) - public static class Builder { - - /** - * The log message id - */ - @JsonProperty("id") - private String id; - - /** - * The builder's msg - */ - @JsonProperty("Msg") - private String msg; - - /** - * The builder's data - */ - @JsonProperty("data") - private String data; - - /** - * The builder's ex - */ - @JsonProperty("Ex") - private StackifyError ex; - - /** - * The builder's th - */ - @JsonProperty("Th") - private String th; - - /** - * The builder's epochMs - */ - @JsonProperty("EpochMs") - private Long epochMs; - - /** - * The builder's level - */ - @JsonProperty("Level") - private String level; - - /** - * The builder's transId - */ - @JsonProperty("TransID") - private String transId; - - /** - * The builder's srcMethod - */ - @JsonProperty("SrcMethod") - private String srcMethod; - - /** - * The builder's srcLine - */ - @JsonProperty("SrcLine") - private Integer srcLine; - - /** - * The builder's tags - */ - @JsonProperty("Tags") - private List tags; - - public Builder id(final String id) { - this.id = id; - return this; - } - - /** - * Sets the builder's msg - * - * @param msg The msg to be set - * @return Reference to the current object - */ - public Builder msg(final String msg) { - this.msg = msg; - return this; - } - - /** - * Sets the builder's data - * - * @param data The data to be set - * @return Reference to the current object - */ - public Builder data(final String data) { - this.data = data; - return this; - } - - /** - * Sets the builder's ex - * - * @param ex The ex to be set - * @return Reference to the current object - */ - public Builder ex(final StackifyError ex) { - this.ex = ex; - return this; - } - - /** - * Sets the builder's th - * - * @param th The th to be set - * @return Reference to the current object - */ - public Builder th(final String th) { - this.th = th; - return this; - } - - /** - * Sets the builder's epochMs - * - * @param epochMs The epochMs to be set - * @return Reference to the current object - */ - public Builder epochMs(final Long epochMs) { - this.epochMs = epochMs; - return this; - } - - /** - * Sets the builder's level - * - * @param level The level to be set - * @return Reference to the current object - */ - public Builder level(final String level) { - this.level = level; - return this; - } - - /** - * Sets the builder's transId - * - * @param transId The transId to be set - * @return Reference to the current object - */ - public Builder transId(final String transId) { - this.transId = transId; - return this; - } - - /** - * Sets the builder's srcMethod - * - * @param srcMethod The srcMethod to be set - * @return Reference to the current object - */ - public Builder srcMethod(final String srcMethod) { - this.srcMethod = srcMethod; - return this; - } - - /** - * Sets the builder's srcLine - * - * @param srcLine The srcLine to be set - * @return Reference to the current object - */ - public Builder srcLine(final Integer srcLine) { - this.srcLine = srcLine; - return this; - } - - /** - * Sets the builder's tags - * - * @param tags A list of tags associated to this LogMsg - * @return Reference to the current object - */ - public Builder tags(final List tags) { - this.tags = tags; - return this; - } - - /** - * @return A new object constructed from this builder - */ - public LogMsg build() { - return new LogMsg(this); - } - } } diff --git a/src/main/java/com/stackify/api/LogMsgGroup.java b/src/main/java/com/stackify/api/LogMsgGroup.java index 0e709db..4241048 100644 --- a/src/main/java/com/stackify/api/LogMsgGroup.java +++ b/src/main/java/com/stackify/api/LogMsgGroup.java @@ -15,422 +15,105 @@ */ package com.stackify.api; -import java.util.List; - +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.List; /** * LogMsgGroup + * * @author Eric Martin */ +@AllArgsConstructor +@NoArgsConstructor +@Builder(builderClassName = "Builder", builderMethodName = "newBuilder", toBuilder = true) +@Data @JsonInclude(JsonInclude.Include.NON_NULL) -@JsonDeserialize(builder = LogMsgGroup.Builder.class) +@JsonIgnoreProperties(ignoreUnknown = true) public class LogMsgGroup { - /** - * Client device id - */ - @JsonProperty("CDID") - private final Integer cdId; - - /** - * Client device application id - */ - @JsonProperty("CDAppID") - private final Integer cdAppId; - - /** - * Application name id - */ - @JsonProperty("AppNameID") - private final String appNameId; - - /** - * Application/environment id - */ - @JsonProperty("AppEnvID") - private final String appEnvId; - - /** - * Environment id - */ - @JsonProperty("EnvID") - private final Integer envId; - - /** - * Environment name - */ - @JsonProperty("Env") - private final String env; - - /** - * Device name - */ - @JsonProperty("ServerName") - private final String serverName; - - /** - * Application name - */ - @JsonProperty("AppName") - private final String appName; - - /** - * Application path - */ - @JsonProperty("AppLoc") - private final String appLoc; - - /** - * Logger project - */ - @JsonProperty("Logger") - private final String logger; - - /** - * Logger platform ("java") - */ - @JsonProperty("Platform") - private final String platform; - - /** - * Log messages - */ - @JsonProperty("Msgs") - private final List msgs; - - /** - * @return the cdId - */ - public Integer getCdId() { - return cdId; - } - - /** - * @return the cdAppId - */ - public Integer getCdAppId() { - return cdAppId; - } - - /** - * @return the appNameId - */ - public String getAppNameId() { - return appNameId; - } - - /** - * @return the appEnvId - */ - public String getAppEnvId() { - return appEnvId; - } - - /** - * @return the envId - */ - public Integer getEnvId() { - return envId; - } - - /** - * @return the env - */ - public String getEnv() { - return env; - } - - /** - * @return the serverName - */ - public String getServerName() { - return serverName; - } - - /** - * @return the appName - */ - public String getAppName() { - return appName; - } - - /** - * @return the appLoc - */ - public String getAppLoc() { - return appLoc; - } - - /** - * @return the logger - */ - public String getLogger() { - return logger; - } - - /** - * @return the platform - */ - public String getPlatform() { - return platform; - } - - /** - * @return the msgs - */ - public List getMsgs() { - return msgs; - } - - /** - * @return An instance of Builder, based on current state - */ - public Builder toBuilder() { - return newBuilder() - .cdId(this.cdId) - .cdAppId(this.cdAppId) - .appNameId(this.appNameId) - .appEnvId(this.appEnvId) - .envId(this.envId) - .env(this.env) - .serverName(this.serverName) - .appName(this.appName) - .appLoc(this.appLoc) - .logger(this.logger) - .platform(this.platform) - .msgs(this.msgs); - } - - /** - * @param builder The Builder object that contains all of the values for initialization - */ - private LogMsgGroup(final Builder builder) { - this.cdId = builder.cdId; - this.cdAppId = builder.cdAppId; - this.appNameId = builder.appNameId; - this.appEnvId = builder.appEnvId; - this.envId = builder.envId; - this.env = builder.env; - this.serverName = builder.serverName; - this.appName = builder.appName; - this.appLoc = builder.appLoc; - this.logger = builder.logger; - this.platform = builder.platform; - this.msgs = builder.msgs; - } - - /** - * @return A new instance of the Builder - */ - public static Builder newBuilder() { - return new Builder(); - } - - /** - * LogMsgGroup.Builder separates the construction of a LogMsgGroup from its representation - */ - public static class Builder { - - /** - * The builder's cdId - */ - @JsonProperty("CDID") - private Integer cdId; - - /** - * The builder's cdAppId - */ - @JsonProperty("CDAppID") - private Integer cdAppId; - - /** - * The builder's appNameId - */ - @JsonProperty("AppNameID") - private String appNameId; - - /** - * The builder's appEnvId - */ - @JsonProperty("AppEnvID") - private String appEnvId; - - /** - * The builder's envId - */ - @JsonProperty("EnvID") - private Integer envId; - - /** - * The builder's env - */ - @JsonProperty("Env") - private String env; - - /** - * The builder's serverName - */ - @JsonProperty("ServerName") - private String serverName; - - /** - * The builder's appName - */ - @JsonProperty("AppName") - private String appName; - - /** - * The builder's appLoc - */ - @JsonProperty("AppLoc") - private String appLoc; - - /** - * The builder's logger - */ - @JsonProperty("Logger") - private String logger; - - /** - * The builder's platform - */ - @JsonProperty("Platform") - private String platform; - - /** - * The builder's msgs - */ - @JsonProperty("Msgs") - private List msgs; - - /** - * Sets the builder's cdId - * @param cdId The cdId to be set - * @return Reference to the current object - */ - public Builder cdId(final Integer cdId) { - this.cdId = cdId; - return this; - } - - /** - * Sets the builder's cdAppId - * @param cdAppId The cdAppId to be set - * @return Reference to the current object - */ - public Builder cdAppId(final Integer cdAppId) { - this.cdAppId = cdAppId; - return this; - } - - /** - * Sets the builder's appNameId - * @param appNameId The appNameId to be set - * @return Reference to the current object - */ - public Builder appNameId(final String appNameId) { - this.appNameId = appNameId; - return this; - } - - /** - * Sets the builder's appEnvId - * @param appEnvId The appEnvId to be set - * @return Reference to the current object - */ - public Builder appEnvId(final String appEnvId) { - this.appEnvId = appEnvId; - return this; - } - - /** - * Sets the builder's envId - * @param envId The envId to be set - * @return Reference to the current object - */ - public Builder envId(final Integer envId) { - this.envId = envId; - return this; - } - - /** - * Sets the builder's env - * @param env The env to be set - * @return Reference to the current object - */ - public Builder env(final String env) { - this.env = env; - return this; - } - - /** - * Sets the builder's serverName - * @param serverName The serverName to be set - * @return Reference to the current object - */ - public Builder serverName(final String serverName) { - this.serverName = serverName; - return this; - } - - /** - * Sets the builder's appName - * @param appName The appName to be set - * @return Reference to the current object - */ - public Builder appName(final String appName) { - this.appName = appName; - return this; - } - - /** - * Sets the builder's appLoc - * @param appLoc The appLoc to be set - * @return Reference to the current object - */ - public Builder appLoc(final String appLoc) { - this.appLoc = appLoc; - return this; - } - - /** - * Sets the builder's logger - * @param logger The logger to be set - * @return Reference to the current object - */ - public Builder logger(final String logger) { - this.logger = logger; - return this; - } - - /** - * Sets the builder's platform - * @param platform The platform to be set - * @return Reference to the current object - */ - public Builder platform(final String platform) { - this.platform = platform; - return this; - } - - /** - * Sets the builder's msgs - * @param msgs The msgs to be set - * @return Reference to the current object - */ - public Builder msgs(final List msgs) { - this.msgs = msgs; - return this; - } + /** + * Client device id + */ + @JsonProperty("CDID") + private Integer cdId; + + /** + * Client device application id + */ + @JsonProperty("CDAppID") + private Integer cdAppId; + + /** + * Application name id + */ + @JsonProperty("AppNameID") + private String appNameId; + + /** + * Application/environment id + */ + @JsonProperty("AppEnvID") + private String appEnvId; + + /** + * Environment id + */ + @JsonProperty("EnvID") + private Integer envId; + + /** + * Environment name + */ + @JsonProperty("Env") + private String env; + + /** + * Device name + */ + @JsonProperty("ServerName") + private String serverName; + + /** + * Application name + */ + @JsonProperty("AppName") + private String appName; + + /** + * Application path + */ + @JsonProperty("AppLoc") + private String appLoc; + + /** + * Logger project + */ + @JsonProperty("Logger") + private String logger; + + /** + * Logger platform ("java") + */ + @JsonProperty("Platform") + private String platform; + + /** + * Log messages + */ + @JsonProperty("Msgs") + private List msgs; + + @JsonProperty("Container") + private Container container; + + @JsonProperty("Kubernetes") + private Kubernetes kubernetes; - /** - * @return A new object constructed from this builder - */ - public LogMsgGroup build() { - return new LogMsgGroup(this); - } - } } diff --git a/src/main/java/com/stackify/api/StackifyError.java b/src/main/java/com/stackify/api/StackifyError.java index 3335844..033c2ab 100644 --- a/src/main/java/com/stackify/api/StackifyError.java +++ b/src/main/java/com/stackify/api/StackifyError.java @@ -15,13 +15,16 @@ */ package com.stackify.api; -import java.util.Date; -import java.util.Map; - import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Date; +import java.util.Map; /** * Encapsulates all details about an error that will be sent to Stackify @@ -39,258 +42,54 @@ * * @author Eric Martin */ +@AllArgsConstructor +@NoArgsConstructor +@Builder(builderClassName = "Builder", builderMethodName = "newBuilder", toBuilder = true) +@Data @JsonInclude(JsonInclude.Include.NON_NULL) -@JsonDeserialize(builder = StackifyError.Builder.class) +@JsonIgnoreProperties(ignoreUnknown = true) public class StackifyError { - /** - * Environment - */ - @JsonProperty("EnvironmentDetail") - private final EnvironmentDetail environmentDetail; - - /** - * Date/time of the error - */ - @JsonProperty("OccurredEpochMillis") - private final Date occurredEpochMillis; - - /** - * Error details - */ - @JsonProperty("Error") - private final ErrorItem error; - - /** - * Details of the web request - */ - @JsonProperty("WebRequestDetail") - private final WebRequestDetail webRequestDetail; - - /** - * Server variables - */ - @JsonProperty("ServerVariables") - private final Map serverVariables; - - /** - * Customer name - */ - @JsonProperty("CustomerName") - private final String customerName; - - /** - * User name - */ - @JsonProperty("UserName") - private final String userName; - - /** - * @return the environmentDetail - */ - public EnvironmentDetail getEnvironmentDetail() { - return environmentDetail; - } - - /** - * @return the occurredEpochMillis - */ - public Date getOccurredEpochMillis() { - return occurredEpochMillis; - } - - /** - * @return the error - */ - public ErrorItem getError() { - return error; - } - - /** - * @return the webRequestDetail - */ - public WebRequestDetail getWebRequestDetail() { - return webRequestDetail; - } - - /** - * @return the serverVariables - */ - public Map getServerVariables() { - return serverVariables; - } - - /** - * @return the customerName - */ - public String getCustomerName() { - return customerName; - } - - /** - * @return the userName - */ - public String getUserName() { - return userName; - } - - /** - * @return an instance of builder based on current state - */ - public Builder toBuilder() { - return newBuilder() - .environmentDetail(this.environmentDetail) - .occurredEpochMillis(this.occurredEpochMillis) - .error(this.error) - .webRequestDetail(this.webRequestDetail) - .serverVariables(this.serverVariables) - .customerName(this.customerName) - .userName(this.userName); - } - - /** - * @param builder The Builder object that contains all of the values for initialization - */ - private StackifyError(final Builder builder) { - this.environmentDetail = builder.environmentDetail; - this.occurredEpochMillis = builder.occurredEpochMillis; - this.error = builder.error; - this.webRequestDetail = builder.webRequestDetail; - this.serverVariables = builder.serverVariables; - this.customerName = builder.customerName; - this.userName = builder.userName; - } - - /** - * @return A new instance of the Builder - */ - public static Builder newBuilder() { - return new Builder(); - } - - /** - * StackifyError.Builder separates the construction of a StackifyError from its representation - */ - @JsonIgnoreProperties(ignoreUnknown = true) - public static class Builder { - - /** - * The builder's environmentDetail - */ - @JsonProperty("EnvironmentDetail") - private EnvironmentDetail environmentDetail; - - /** - * The builder's occurredEpochMillis - */ - @JsonProperty("OccurredEpochMillis") - private Date occurredEpochMillis; - - /** - * The builder's error - */ - @JsonProperty("Error") - private ErrorItem error; - - /** - * The builder's webRequestDetail - */ - @JsonProperty("WebRequestDetail") - private WebRequestDetail webRequestDetail; - - /** - * The builder's serverVariables - */ - @JsonProperty("ServerVariables") - private Map serverVariables; - - /** - * The builder's customerName - */ - @JsonProperty("CustomerName") - private String customerName; - - /** - * The builder's userName - */ - @JsonProperty("UserName") - private String userName; - - /** - * Sets the builder's environmentDetail - * @param environmentDetail The environmentDetail to be set - * @return Reference to the current object - */ - public Builder environmentDetail(final EnvironmentDetail environmentDetail) { - this.environmentDetail = environmentDetail; - return this; - } - - /** - * Sets the builder's occurredEpochMillis - * @param occurredEpochMillis The occurredEpochMillis to be set - * @return Reference to the current object - */ - public Builder occurredEpochMillis(final Date occurredEpochMillis) { - this.occurredEpochMillis = occurredEpochMillis; - return this; - } - - /** - * Sets the builder's error - * @param error The error to be set - * @return Reference to the current object - */ - public Builder error(final ErrorItem error) { - this.error = error; - return this; - } - - /** - * Sets the builder's webRequestDetail - * @param webRequestDetail The webRequestDetail to be set - * @return Reference to the current object - */ - public Builder webRequestDetail(final WebRequestDetail webRequestDetail) { - this.webRequestDetail = webRequestDetail; - return this; - } - - /** - * Sets the builder's serverVariables - * @param serverVariables The serverVariables to be set - * @return Reference to the current object - */ - public Builder serverVariables(final Map serverVariables) { - this.serverVariables = serverVariables; - return this; - } - - /** - * Sets the builder's customerName - * @param customerName The customerName to be set - * @return Reference to the current object - */ - public Builder customerName(final String customerName) { - this.customerName = customerName; - return this; - } - - /** - * Sets the builder's userName - * @param userName The userName to be set - * @return Reference to the current object - */ - public Builder userName(final String userName) { - this.userName = userName; - return this; - } + /** + * Environment + */ + @JsonProperty("EnvironmentDetail") + private EnvironmentDetail environmentDetail; + + /** + * Date/time of the error + */ + @JsonProperty("OccurredEpochMillis") + private Date occurredEpochMillis; + + /** + * Error details + */ + @JsonProperty("Error") + private ErrorItem error; + + /** + * Details of the web request + */ + @JsonProperty("WebRequestDetail") + private WebRequestDetail webRequestDetail; + + /** + * Server variables + */ + @JsonProperty("ServerVariables") + private Map serverVariables; + + /** + * Customer name + */ + @JsonProperty("CustomerName") + private String customerName; + + /** + * User name + */ + @JsonProperty("UserName") + private String userName; - /** - * @return A new object constructed from this builder - */ - public StackifyError build() { - return new StackifyError(this); - } - } } diff --git a/src/main/java/com/stackify/api/TraceFrame.java b/src/main/java/com/stackify/api/TraceFrame.java index 39dfd57..f1a4d3b 100644 --- a/src/main/java/com/stackify/api/TraceFrame.java +++ b/src/main/java/com/stackify/api/TraceFrame.java @@ -18,7 +18,10 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; /** * Each TraceFrame object represents a single stack frame in a stack trace @@ -36,134 +39,30 @@ * * @author Eric Martin */ +@AllArgsConstructor +@NoArgsConstructor +@Builder(builderClassName = "Builder", builderMethodName = "newBuilder", toBuilder = true) +@Data @JsonInclude(JsonInclude.Include.NON_NULL) -@JsonDeserialize(builder = TraceFrame.Builder.class) +@JsonIgnoreProperties(ignoreUnknown = true) public class TraceFrame { - /** - * The file name - */ - @JsonProperty("CodeFileName") - private final String codeFileName; + /** + * The file name + */ + @JsonProperty("CodeFileName") + private String codeFileName; - /** - * The line number - */ - @JsonProperty("LineNum") - private final Integer lineNum; + /** + * The line number + */ + @JsonProperty("LineNum") + private Integer lineNum; - /** - * The method name - */ - @JsonProperty("Method") - private final String method; + /** + * The method name + */ + @JsonProperty("Method") + private String method; - /** - * @return the codeFileName - */ - public String getCodeFileName() { - return codeFileName; - } - - /** - * @return the lineNum - */ - public Integer getLineNum() { - return lineNum; - } - - /** - * @return the method - */ - public String getMethod() { - return method; - } - - /** - * @return an instance of Builder based on current state - */ - public Builder toBuilder() { - return newBuilder() - .codeFileName(this.codeFileName) - .lineNum(this.lineNum) - .method(this.method); - } - - /** - * @param builder The Builder object that contains all of the values for initialization - */ - private TraceFrame(final Builder builder) { - this.codeFileName = builder.codeFileName; - this.lineNum = builder.lineNum; - this.method = builder.method; - } - - /** - * @return A new instance of the Builder - */ - public static Builder newBuilder() { - return new Builder(); - } - - /** - * TraceFrame.Builder separates the construction of a TraceFrame from its representation - */ - @JsonIgnoreProperties(ignoreUnknown = true) - public static class Builder { - - /** - * The builder's codeFileName - */ - @JsonProperty("CodeFileName") - private String codeFileName; - - /** - * The builder's lineNum - */ - @JsonProperty("LineNum") - private Integer lineNum; - - /** - * The builder's method - */ - @JsonProperty("Method") - private String method; - - /** - * Sets the builder's codeFileName - * @param codeFileName The codeFileName to be set - * @return Reference to the current object - */ - public Builder codeFileName(final String codeFileName) { - this.codeFileName = codeFileName; - return this; - } - - /** - * Sets the builder's lineNum - * @param lineNum The lineNum to be set - * @return Reference to the current object - */ - public Builder lineNum(final Integer lineNum) { - this.lineNum = lineNum; - return this; - } - - /** - * Sets the builder's method - * @param method The method to be set - * @return Reference to the current object - */ - public Builder method(final String method) { - this.method = method; - return this; - } - - /** - * @return A new object constructed from this builder - */ - public TraceFrame build() { - return new TraceFrame(this); - } - } } diff --git a/src/main/java/com/stackify/api/WebRequestDetail.java b/src/main/java/com/stackify/api/WebRequestDetail.java index e3dd61e..e75bc55 100644 --- a/src/main/java/com/stackify/api/WebRequestDetail.java +++ b/src/main/java/com/stackify/api/WebRequestDetail.java @@ -15,12 +15,15 @@ */ package com.stackify.api; -import java.util.Map; - import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Map; /** * Contains details about the web request associated to the error @@ -40,503 +43,102 @@ * * @author Eric Martin */ +@AllArgsConstructor +@NoArgsConstructor +@Builder(builderClassName = "Builder", builderMethodName = "newBuilder", toBuilder = true) +@Data @JsonInclude(JsonInclude.Include.NON_NULL) -@JsonDeserialize(builder = WebRequestDetail.Builder.class) +@JsonIgnoreProperties(ignoreUnknown = true) public class WebRequestDetail { - /** - * User IP address - */ - @JsonProperty("UserIPAddress") - private final String userIpAddress; - - /** - * HTTP method - */ - @JsonProperty("HttpMethod") - private final String httpMethod; - - /** - * Request protocol - */ - @JsonProperty("RequestProtocol") - private final String requestProtocol; - - /** - * Request URL - */ - @JsonProperty("RequestUrl") - private final String requestUrl; - - /** - * Request URL root - */ - @JsonProperty("RequestUrlRoot") - private final String requestUrlRoot; - - /** - * Referral URL - */ - @JsonProperty("ReferralUrl") - private final String referralUrl; - - /** - * Headers - */ - @JsonProperty("Headers") - private final Map headers; - - /** - * Cookies - */ - @JsonProperty("Cookies") - private final Map cookies; - - /** - * Query string parameters - */ - @JsonProperty("QueryString") - private final Map queryString; - - /** - * Form post data - */ - @JsonProperty("PostData") - private final Map postData; - - /** - * Session data - */ - @JsonProperty("SessionData") - private final Map sessionData; - - /** - * Raw post data - */ - @JsonProperty("PostDataRaw") - private final String postDataRaw; - - /** - * MVC action - */ - @JsonProperty("MVCAction") - private final String mvcAction; - - /** - * MVC controller - */ - @JsonProperty("MVCController") - private final String mvcController; - - /** - * MVC area - */ - @JsonProperty("MVCArea") - private final String mvcArea; - - /** - * @return the userIpAddress - */ - public String getUserIpAddress() { - return userIpAddress; - } - - /** - * @return the httpMethod - */ - public String getHttpMethod() { - return httpMethod; - } - - /** - * @return the requestProtocol - */ - public String getRequestProtocol() { - return requestProtocol; - } - - /** - * @return the requestUrl - */ - public String getRequestUrl() { - return requestUrl; - } - - /** - * @return the requestUrlRoot - */ - public String getRequestUrlRoot() { - return requestUrlRoot; - } - - /** - * @return the referralUrl - */ - public String getReferralUrl() { - return referralUrl; - } - - /** - * @return the headers - */ - public Map getHeaders() { - return headers; - } - - /** - * @return the cookies - */ - public Map getCookies() { - return cookies; - } - - /** - * @return the queryString - */ - public Map getQueryString() { - return queryString; - } - - /** - * @return the postData - */ - public Map getPostData() { - return postData; - } - - /** - * @return the sessionData - */ - public Map getSessionData() { - return sessionData; - } - - /** - * @return the postDataRaw - */ - public String getPostDataRaw() { - return postDataRaw; - } - - /** - * @return the mvcAction - */ - public String getMvcAction() { - return mvcAction; - } - - /** - * @return the mvcController - */ - public String getMvcController() { - return mvcController; - } - - /** - * @return the mvcArea - */ - public String getMvcArea() { - return mvcArea; - } - - public Builder toBuilder() { - return newBuilder() - .userIpAddress(this.userIpAddress) - .httpMethod(this.httpMethod) - .requestProtocol(this.requestProtocol) - .requestUrl(this.requestUrl) - .requestUrlRoot(this.requestUrlRoot) - .referralUrl(this.referralUrl) - .headers(this.headers) - .cookies(this.cookies) - .queryString(this.queryString) - .postData(this.postData) - .sessionData(this.sessionData) - .postDataRaw(this.postDataRaw) - .mvcAction(this.mvcAction) - .mvcController(this.mvcController) - .mvcArea(this.mvcArea); - } - - /** - * @param builder The Builder object that contains all of the values for initialization - */ - private WebRequestDetail(final Builder builder) { - this.userIpAddress = builder.userIpAddress; - this.httpMethod = builder.httpMethod; - this.requestProtocol = builder.requestProtocol; - this.requestUrl = builder.requestUrl; - this.requestUrlRoot = builder.requestUrlRoot; - this.referralUrl = builder.referralUrl; - this.headers = builder.headers; - this.cookies = builder.cookies; - this.queryString = builder.queryString; - this.postData = builder.postData; - this.sessionData = builder.sessionData; - this.postDataRaw = builder.postDataRaw; - this.mvcAction = builder.mvcAction; - this.mvcController = builder.mvcController; - this.mvcArea = builder.mvcArea; - } - - /** - * @return A new instance of the Builder - */ - public static Builder newBuilder() { - return new Builder(); - } - - /** - * WebRequestDetail.Builder separates the construction of a WebRequestDetail from its representation - */ - @JsonIgnoreProperties(ignoreUnknown = true) - public static class Builder { - - /** - * The builder's userIpAddress - */ - @JsonProperty("UserIPAddress") - private String userIpAddress; - - /** - * The builder's httpMethod - */ - @JsonProperty("HttpMethod") - private String httpMethod; - - /** - * The builder's requestProtocol - */ - @JsonProperty("RequestProtocol") - private String requestProtocol; - - /** - * The builder's requestUrl - */ - @JsonProperty("RequestUrl") - private String requestUrl; - - /** - * The builder's requestUrlRoot - */ - @JsonProperty("RequestUrlRoot") - private String requestUrlRoot; - - /** - * The builder's referralUrl - */ - @JsonProperty("ReferralUrl") - private String referralUrl; - - /** - * The builder's headers - */ - @JsonProperty("Headers") - private Map headers; - - /** - * The builder's cookies - */ - @JsonProperty("Cookies") - private Map cookies; - - /** - * The builder's queryString - */ - @JsonProperty("QueryString") - private Map queryString; - - /** - * The builder's postData - */ - @JsonProperty("PostData") - private Map postData; - - /** - * The builder's sessionData - */ - @JsonProperty("SessionData") - private Map sessionData; - - /** - * The builder's postDataRaw - */ - @JsonProperty("PostDataRaw") - private String postDataRaw; - - /** - * The builder's mvcAction - */ - @JsonProperty("MVCAction") - private String mvcAction; - - /** - * The builder's mvcController - */ - @JsonProperty("MVCController") - private String mvcController; - - /** - * The builder's mvcArea - */ - @JsonProperty("MVCArea") - private String mvcArea; - - /** - * Sets the builder's userIpAddress - * @param userIpAddress The userIpAddress to be set - * @return Reference to the current object - */ - public Builder userIpAddress(final String userIpAddress) { - this.userIpAddress = userIpAddress; - return this; - } - - /** - * Sets the builder's httpMethod - * @param httpMethod The httpMethod to be set - * @return Reference to the current object - */ - public Builder httpMethod(final String httpMethod) { - this.httpMethod = httpMethod; - return this; - } - - /** - * Sets the builder's requestProtocol - * @param requestProtocol The requestProtocol to be set - * @return Reference to the current object - */ - public Builder requestProtocol(final String requestProtocol) { - this.requestProtocol = requestProtocol; - return this; - } - - /** - * Sets the builder's requestUrl - * @param requestUrl The requestUrl to be set - * @return Reference to the current object - */ - public Builder requestUrl(final String requestUrl) { - this.requestUrl = requestUrl; - return this; - } - - /** - * Sets the builder's requestUrlRoot - * @param requestUrlRoot The requestUrlRoot to be set - * @return Reference to the current object - */ - public Builder requestUrlRoot(final String requestUrlRoot) { - this.requestUrlRoot = requestUrlRoot; - return this; - } - - /** - * Sets the builder's referralUrl - * @param referralUrl The referralUrl to be set - * @return Reference to the current object - */ - public Builder referralUrl(final String referralUrl) { - this.referralUrl = referralUrl; - return this; - } - - /** - * Sets the builder's headers - * @param headers The headers to be set - * @return Reference to the current object - */ - public Builder headers(final Map headers) { - this.headers = headers; - return this; - } - - /** - * Sets the builder's cookies - * @param cookies The cookies to be set - * @return Reference to the current object - */ - public Builder cookies(final Map cookies) { - this.cookies = cookies; - return this; - } - - /** - * Sets the builder's queryString - * @param queryString The queryString to be set - * @return Reference to the current object - */ - public Builder queryString(final Map queryString) { - this.queryString = queryString; - return this; - } - - /** - * Sets the builder's postData - * @param postData The postData to be set - * @return Reference to the current object - */ - public Builder postData(final Map postData) { - this.postData = postData; - return this; - } - - /** - * Sets the builder's sessionData - * @param sessionData The sessionData to be set - * @return Reference to the current object - */ - public Builder sessionData(final Map sessionData) { - this.sessionData = sessionData; - return this; - } - - /** - * Sets the builder's postDataRaw - * @param postDataRaw The postDataRaw to be set - * @return Reference to the current object - */ - public Builder postDataRaw(final String postDataRaw) { - this.postDataRaw = postDataRaw; - return this; - } - - /** - * Sets the builder's mvcAction - * @param mvcAction The mvcAction to be set - * @return Reference to the current object - */ - public Builder mvcAction(final String mvcAction) { - this.mvcAction = mvcAction; - return this; - } - - /** - * Sets the builder's mvcController - * @param mvcController The mvcController to be set - * @return Reference to the current object - */ - public Builder mvcController(final String mvcController) { - this.mvcController = mvcController; - return this; - } - - /** - * Sets the builder's mvcArea - * @param mvcArea The mvcArea to be set - * @return Reference to the current object - */ - public Builder mvcArea(final String mvcArea) { - this.mvcArea = mvcArea; - return this; - } + /** + * User IP address + */ + @JsonProperty("UserIPAddress") + private String userIpAddress; + + /** + * HTTP method + */ + @JsonProperty("HttpMethod") + private String httpMethod; + + /** + * Request protocol + */ + @JsonProperty("RequestProtocol") + private String requestProtocol; + + /** + * Request URL + */ + @JsonProperty("RequestUrl") + private String requestUrl; + + /** + * Request URL root + */ + @JsonProperty("RequestUrlRoot") + private String requestUrlRoot; + + /** + * Referral URL + */ + @JsonProperty("ReferralUrl") + private String referralUrl; + + /** + * Headers + */ + @JsonProperty("Headers") + private Map headers; + + /** + * Cookies + */ + @JsonProperty("Cookies") + private Map cookies; + + /** + * Query string parameters + */ + @JsonProperty("QueryString") + private Map queryString; + + /** + * Form post data + */ + @JsonProperty("PostData") + private Map postData; + + /** + * Session data + */ + @JsonProperty("SessionData") + private Map sessionData; + + /** + * Raw post data + */ + @JsonProperty("PostDataRaw") + private String postDataRaw; + + /** + * MVC action + */ + @JsonProperty("MVCAction") + private String mvcAction; + + /** + * MVC controller + */ + @JsonProperty("MVCController") + private String mvcController; + + /** + * MVC area + */ + @JsonProperty("MVCArea") + private String mvcArea; - /** - * @return A new object constructed from this builder - */ - public WebRequestDetail build() { - return new WebRequestDetail(this); - } - } } diff --git a/src/main/java/com/stackify/api/common/ApiConfiguration.java b/src/main/java/com/stackify/api/common/ApiConfiguration.java index 68c72b4..63c3be3 100644 --- a/src/main/java/com/stackify/api/common/ApiConfiguration.java +++ b/src/main/java/com/stackify/api/common/ApiConfiguration.java @@ -22,6 +22,7 @@ /** * ApiConfiguration + * * @author Eric Martin */ @ToString @@ -29,61 +30,76 @@ @Builder(builderClassName = "Builder", toBuilder = true, builderMethodName = "newBuilder") public class ApiConfiguration { - /** - * Default API URL - */ - private static final String DEFAULT_API_URL = "https://api.stackify.com"; - - /** - * API URL - */ - private final String apiUrl; - - /** - * API Key - */ - private final String apiKey; - - /** - * Application name - */ - private final String application; - - /** - * Environment - */ - private final String environment; - - /** - * Environment details - */ - private final EnvironmentDetail envDetail; - - /** - * Add #SKIPJSON tag to messages containing Json - */ - private final Boolean skipJson; - - /** - * Allow logging from com.stackify.* - */ - private final Boolean allowComDotStackify; - - /** - * Http Proxy Host ie) 10.20.30.40 - */ - private final String httpProxyHost; - - /** - * Http Proxy Port ie) 8080 - */ - private final String httpProxyPort; - - /** - * @return the apiUrl - */ - public String getApiUrl() { - return apiUrl != null ? apiUrl : DEFAULT_API_URL; - } - -} \ No newline at end of file + public static final String TRANSPORT_DIRECT = "direct"; + public static final String TRANSPORT_AGENT_SOCKET = "agent_socket"; + + private static final String DEFAULT_TRANSPORT = TRANSPORT_DIRECT; + private static final String DEFAULT_AGENT_SOCKET_PATH_UNIX = "/usr/local/stackify/stackify.sock"; + + /** + * Default API URL + */ + private static final String DEFAULT_API_URL = "https://api.stackify.com"; + + /** + * API URL + */ + private final String apiUrl; + + /** + * API Key + */ + private final String apiKey; + + /** + * Application name + */ + private final String application; + + /** + * Environment + */ + private final String environment; + + /** + * Environment details + */ + private final EnvironmentDetail envDetail; + + /** + * Add #SKIPJSON tag to messages containing Json + */ + private final Boolean skipJson; + + /** + * Allow logging from com.stackify.* + */ + private final Boolean allowComDotStackify; + + /** + * Http Proxy Host ie) 10.20.30.40 + */ + private final String httpProxyHost; + + /** + * Http Proxy Port ie) 8080 + */ + private final String httpProxyPort; + + private final String transport; + + /** + * @return the apiUrl + */ + public String getApiUrl() { + return apiUrl != null ? apiUrl : DEFAULT_API_URL; + } + + public String getTransport() { + return transport != null ? transport : DEFAULT_TRANSPORT; + } + + public String getAgentSocketPath() { + return DEFAULT_AGENT_SOCKET_PATH_UNIX; + } +} diff --git a/src/main/java/com/stackify/api/common/ApiConfigurations.java b/src/main/java/com/stackify/api/common/ApiConfigurations.java index deac29e..23ab2f9 100644 --- a/src/main/java/com/stackify/api/common/ApiConfigurations.java +++ b/src/main/java/com/stackify/api/common/ApiConfigurations.java @@ -16,109 +16,120 @@ package com.stackify.api.common; import com.stackify.api.common.util.PropertyUtil; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import lombok.experimental.UtilityClass; +import lombok.extern.slf4j.Slf4j; import java.util.Map; /** * ApiConfigurations + * * @author Eric Martin */ +@UtilityClass +@Slf4j public class ApiConfigurations { - /** - * Logger - */ - private static final Logger LOGGER = LoggerFactory.getLogger(ApiConfigurations.class); - - /** - * Explicitly configure the API - * @param apiUrl API URL - * @param apiKey API Key - * @param application Configured application name - * @param environment Configured environment name - * @return ApiConfiguration - */ - public static ApiConfiguration fromPropertiesWithOverrides(final String apiUrl, final String apiKey, final String application, final String environment) { - return fromPropertiesWithOverrides(apiUrl, apiKey, application, environment, null); - } - - /** - * Explicitly configure the API - * @param apiUrl API URL - * @param apiKey API Key - * @param application Configured application name - * @param environment Configured environment name - * @param allowComDotStackify Configured allow com.stackify.* logging - * @return ApiConfiguration - */ - public static ApiConfiguration fromPropertiesWithOverrides(final String apiUrl, final String apiKey, final String application, final String environment, final String allowComDotStackify) { - ApiConfiguration props = ApiConfigurations.fromProperties(); - - String mergedApiUrl = ((apiUrl != null) && (0 < apiUrl.length())) ? apiUrl : props.getApiUrl(); - String mergedApiKey = ((apiKey != null) && (0 < apiKey.length())) ? apiKey : props.getApiKey(); - String mergedApplication = ((application != null) && (0 < application.length())) ? application : props.getApplication(); - String mergedEnvironment = ((environment != null) && (0 < environment.length())) ? environment : props.getEnvironment(); - - ApiConfiguration.Builder builder = ApiConfiguration.newBuilder(); - builder.apiUrl(mergedApiUrl); - builder.apiKey(mergedApiKey); - builder.application(mergedApplication); - builder.environment(mergedEnvironment); - builder.envDetail(EnvironmentDetails.getEnvironmentDetail(mergedApplication, mergedEnvironment)); - builder.allowComDotStackify(Boolean.valueOf(allowComDotStackify)); - - return builder.build(); - } - - /** - * @return ApiConfiguration read from the stackify-api.properties file - */ - public static ApiConfiguration fromProperties() { - - ApiConfiguration.Builder builder = ApiConfiguration.newBuilder(); - - try { - - Map properties = PropertyUtil.read("/stackify-api.properties"); - - String apiUrl = null; - - if (properties.containsKey("stackify.apiUrl")) { - apiUrl = properties.get("stackify.apiUrl"); - } - - String httpProxyHost = properties.get("stackify.httpProxyHost"); - String httpProxyPort = properties.get("stackify.httpProxyPort"); - String apiKey = properties.get("stackify.apiKey"); - String application = properties.get("stackify.application"); - String environment = properties.get("stackify.environment"); - - boolean skipJson = false; - if (properties.containsKey("stackify.skipJson")) { - skipJson = Boolean.parseBoolean(properties.get("stackify.skipJson")); - } - - builder.httpProxyHost(httpProxyHost); - builder.httpProxyPort(httpProxyPort); - builder.apiUrl(apiUrl); - builder.apiKey(apiKey); - builder.application(application); - builder.environment(environment); - builder.envDetail(EnvironmentDetails.getEnvironmentDetail(application, environment)); - builder.skipJson(skipJson); - - } catch (Throwable t) { - LOGGER.error("Exception reading stackify-api.properties configuration file", t); - } - - return builder.build(); - } - - /** - * Hidden to prevent construction - */ - private ApiConfigurations() { - } + /** + * Explicitly configure the API + * + * @param apiUrl API URL + * @param apiKey API Key + * @param application Configured application name + * @param environment Configured environment name + * @return ApiConfiguration + */ + public static ApiConfiguration fromPropertiesWithOverrides(final String apiUrl, + final String apiKey, + final String application, + final String environment) { + return fromPropertiesWithOverrides(apiUrl, apiKey, application, environment, null, null); + } + + /** + * Explicitly configure the API + * + * @param apiUrl API URL + * @param apiKey API Key + * @param application Configured application name + * @param environment Configured environment name + * @param transport api | agent_socket + * @param allowComDotStackify Configured allow com.stackify.* logging + * @return ApiConfiguration + */ + public static ApiConfiguration fromPropertiesWithOverrides(final String apiUrl, + final String apiKey, + final String application, + final String environment, + final String transport, + final String allowComDotStackify) { + ApiConfiguration props = ApiConfigurations.fromProperties(); + + String mergedApiUrl = ((apiUrl != null) && (0 < apiUrl.length())) ? apiUrl : props.getApiUrl(); + String mergedApiKey = ((apiKey != null) && (0 < apiKey.length())) ? apiKey : props.getApiKey(); + String mergedApplication = ((application != null) && (0 < application.length())) ? application : props.getApplication(); + String mergedEnvironment = ((environment != null) && (0 < environment.length())) ? environment : props.getEnvironment(); + + ApiConfiguration.Builder builder = ApiConfiguration.newBuilder(); + builder.transport(transport); + builder.apiUrl(mergedApiUrl); + builder.apiKey(mergedApiKey); + builder.application(mergedApplication); + builder.environment(mergedEnvironment); + builder.envDetail(EnvironmentDetails.getEnvironmentDetail(mergedApplication, mergedEnvironment)); + builder.allowComDotStackify(Boolean.valueOf(allowComDotStackify)); + + return builder.build(); + } + + /** + * @return ApiConfiguration read from the stackify-api.properties file + */ + public static ApiConfiguration fromProperties() { + + ApiConfiguration.Builder builder = ApiConfiguration.newBuilder(); + + try { + + Map properties = PropertyUtil.read("/stackify-api.properties"); + + String apiUrl = null; + + if (properties.containsKey("stackify.apiUrl")) { + apiUrl = properties.get("stackify.apiUrl"); + } + + String httpProxyHost = properties.get("stackify.httpProxyHost"); + String httpProxyPort = properties.get("stackify.httpProxyPort"); + String apiKey = properties.get("stackify.apiKey"); + String application = properties.get("stackify.application"); + String environment = properties.get("stackify.environment"); + + String transport = null; + if (properties.containsKey("stackify.transport")) { + transport = properties.get("stackify.transport"); + } + + boolean skipJson = false; + if (properties.containsKey("stackify.skipJson")) { + skipJson = Boolean.parseBoolean(properties.get("stackify.skipJson")); + } + + builder.transport(transport); + builder.httpProxyHost(httpProxyHost); + builder.httpProxyPort(httpProxyPort); + builder.apiUrl(apiUrl); + builder.apiKey(apiKey); + builder.application(application); + builder.environment(environment); + builder.envDetail(EnvironmentDetails.getEnvironmentDetail(application, environment)); + builder.skipJson(skipJson); + + } catch (Throwable t) { + log.error("Exception reading stackify-api.properties configuration file", t); + } + + return builder.build(); + } + } diff --git a/src/main/java/com/stackify/api/common/log/LogAppender.java b/src/main/java/com/stackify/api/common/log/LogAppender.java index d0a5542..fd9fdeb 100644 --- a/src/main/java/com/stackify/api/common/log/LogAppender.java +++ b/src/main/java/com/stackify/api/common/log/LogAppender.java @@ -30,165 +30,179 @@ /** * LogAppender + * * @author Eric Martin */ public class LogAppender implements Closeable { - /** - * Internal package prefix - */ - private static final String COM_DOT_STACKIFY = "com.stackify."; - - /** - * Logger project name - */ - private final String logger; - - /** - * Maps from specific log implementation events to our API - */ - private final EventAdapter eventAdapter; - - /** - * Collector for LogMsg objects that need to be sent to Stackify - */ - private LogCollector collector = null; - - /** - * Background thread for sending log events to Stackify - */ - private LogBackgroundService backgroundService = null; - - /** - * Client side error governor to suppress duplicate errors - */ - private final ErrorGovernor errorGovernor = new ErrorGovernor(); - - private final Masker masker; - - private final boolean skipJson; - - /** - * Allow logging from com.stackify.* - */ - private boolean allowComDotStackify = false; - - /** - * Constructor - * @param logger Logger project name - */ - public LogAppender(@NonNull final String logger, - @NonNull final EventAdapter eventAdapter, - final Masker masker, - final boolean skipJson) { - this.logger = logger; - this.eventAdapter = eventAdapter; - this.masker = masker; - this.skipJson = skipJson; - } - - /** - * Constructor - * @param logger Logger project name - */ - public LogAppender(@NonNull final String logger, - @NonNull final EventAdapter eventAdapter, - final Masker masker) { - this(logger, eventAdapter, masker, false); - } - - /** - * Activates the appender - * @param apiConfig API configuration - */ - public void activate(final ApiConfiguration apiConfig) { - Preconditions.checkNotNull(apiConfig); - Preconditions.checkNotNull(apiConfig.getApiUrl()); - Preconditions.checkArgument(!apiConfig.getApiUrl().isEmpty()); - Preconditions.checkNotNull(apiConfig.getApiKey()); - Preconditions.checkArgument(!apiConfig.getApiKey().isEmpty()); - - // Single JSON object mapper for all services - - ObjectMapper objectMapper = new ObjectMapper(); - - // build the app identity service - - AppIdentityService appIdentityService = new AppIdentityService(apiConfig, objectMapper); - - // build the services for collecting and sending log messages - - this.collector = new LogCollector(logger, apiConfig.getEnvDetail(), appIdentityService); - - LogSender sender = new LogSender(apiConfig, objectMapper, this.masker, this.skipJson); - - // set allowComDotStackify - - if (Boolean.TRUE.equals(apiConfig.getAllowComDotStackify())) { - this.allowComDotStackify = true; - } - - // build the background service to asynchronously post errors to Stackify - // startup the background service - - this.backgroundService = new LogBackgroundService(collector, sender); - this.backgroundService.start(); - } - - /** - * @see java.io.Closeable#close() - */ - @Override - public void close() throws IOException { - if (backgroundService != null) { - backgroundService.stop(); - } - } - - /** - * Adds the log message to the collector - * @param event - */ - public void append(final T event) { - - // make sure we can append the log message - - if (backgroundService == null) { - return; - } - - if (!backgroundService.isRunning()) { - return; - } - - // skip internal logging - - if (!allowComDotStackify) { - String className = eventAdapter.getClassName(event); - - if (className != null) { - if (className.startsWith(COM_DOT_STACKIFY)) { - return; - } - } - } - - // build the log message and queue it to be sent to Stackify - - Throwable exception = eventAdapter.getThrowable(event); - - StackifyError error = null; - - if ((exception != null) || (eventAdapter.isErrorLevel(event))) { - StackifyError e = eventAdapter.getStackifyError(event, exception); - - if (errorGovernor.errorShouldBeSent(e)) { - error = e; - } - } - - LogMsg logMsg = eventAdapter.getLogMsg(event, error); - - collector.addLogMsg(logMsg); - } + /** + * Internal package prefix + */ + private static final String COM_DOT_STACKIFY = "com.stackify."; + + /** + * Logger project name + */ + private final String logger; + + /** + * Maps from specific log implementation events to our API + */ + private final EventAdapter eventAdapter; + + /** + * Collector for LogMsg objects that need to be sent to Stackify + */ + private LogCollector collector = null; + + /** + * Background thread for sending log events to Stackify + */ + private LogBackgroundService backgroundService = null; + + /** + * Client side error governor to suppress duplicate errors + */ + private final ErrorGovernor errorGovernor = new ErrorGovernor(); + + private final Masker masker; + + private final boolean skipJson; + + /** + * Allow logging from com.stackify.* + */ + private boolean allowComDotStackify = false; + + /** + * Constructor + * + * @param logger Logger project name + */ + public LogAppender(@NonNull final String logger, + @NonNull final EventAdapter eventAdapter, + final Masker masker, + final boolean skipJson) { + this.logger = logger; + this.eventAdapter = eventAdapter; + this.masker = masker; + this.skipJson = skipJson; + } + + /** + * Constructor + * + * @param logger Logger project name + */ + public LogAppender(@NonNull final String logger, + @NonNull final EventAdapter eventAdapter, + final Masker masker) { + this(logger, eventAdapter, masker, false); + } + + /** + * Activates the appender + * + * @param apiConfig API configuration + */ + public void activate(final ApiConfiguration apiConfig) { + + Preconditions.checkNotNull(apiConfig); + Preconditions.checkNotNull(apiConfig.getApiUrl()); + Preconditions.checkArgument(!apiConfig.getApiUrl().isEmpty()); + Preconditions.checkNotNull(apiConfig.getApiKey()); + Preconditions.checkArgument(!apiConfig.getApiKey().isEmpty()); + + // build the app identity service + + AppIdentityService appIdentityService = new AppIdentityService(apiConfig, new ObjectMapper()); + + // build the services for collecting and sending log messages + + this.collector = new LogCollector(logger, apiConfig.getEnvDetail(), appIdentityService); + + // set allowComDotStackify + + if (Boolean.TRUE.equals(apiConfig.getAllowComDotStackify())) { + this.allowComDotStackify = true; + } + + // build the background service to asynchronously post errors to Stackify + // startup the background service + + LogTransport logTransport = getLogTransport(apiConfig); + + this.backgroundService = new LogBackgroundService(collector, logTransport); + this.backgroundService.start(); + } + + protected LogTransport getLogTransport(@NonNull final ApiConfiguration apiConfig) { + + ObjectMapper objectMapper = new ObjectMapper(); + + if (apiConfig.getTransport().equalsIgnoreCase(ApiConfiguration.TRANSPORT_DIRECT)) { + return new LogTransportDirect(apiConfig, objectMapper, masker, skipJson); + } else if (apiConfig.getTransport().equalsIgnoreCase(ApiConfiguration.TRANSPORT_AGENT_SOCKET)) { + return new LogTransportAgentSocket(apiConfig, masker, skipJson); + } + + throw new IllegalArgumentException("Invalid Stackify Transport: " + apiConfig.getTransport()); + } + + /** + * @see java.io.Closeable#close() + */ + @Override + public void close() throws IOException { + if (backgroundService != null) { + backgroundService.stop(); + } + } + + /** + * Adds the log message to the collector + * + * @param event + */ + public void append(final T event) { + + // make sure we can append the log message + + if (backgroundService == null) { + return; + } + + if (!backgroundService.isRunning()) { + return; + } + + // skip internal logging + + if (!allowComDotStackify) { + String className = eventAdapter.getClassName(event); + if (className != null) { + if (className.startsWith(COM_DOT_STACKIFY)) { + return; + } + } + } + + // build the log message and queue it to be sent to Stackify + + Throwable exception = eventAdapter.getThrowable(event); + + StackifyError error = null; + + if ((exception != null) || (eventAdapter.isErrorLevel(event))) { + StackifyError e = eventAdapter.getStackifyError(event, exception); + + if (errorGovernor.errorShouldBeSent(e)) { + error = e; + } + } + + LogMsg logMsg = eventAdapter.getLogMsg(event, error); + + collector.addLogMsg(logMsg); + } } diff --git a/src/main/java/com/stackify/api/common/log/LogBackgroundService.java b/src/main/java/com/stackify/api/common/log/LogBackgroundService.java index cf3ccb1..b297024 100644 --- a/src/main/java/com/stackify/api/common/log/LogBackgroundService.java +++ b/src/main/java/com/stackify/api/common/log/LogBackgroundService.java @@ -15,89 +15,71 @@ */ package com.stackify.api.common.log; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import com.stackify.api.common.concurrent.BackgroundService; -import com.stackify.api.common.util.Preconditions; +import lombok.NonNull; +import lombok.extern.slf4j.Slf4j; /** * LogSenderService * * @author Eric Martin */ +@Slf4j public class LogBackgroundService extends BackgroundService { - /** - * The service logger - */ - private static final Logger LOGGER = LoggerFactory.getLogger(LogBackgroundService.class); - - /** - * The scheduler that determines delay timing after errors - */ - private final LogBackgroundServiceScheduler scheduler = new LogBackgroundServiceScheduler(); + /** + * The scheduler that determines delay timing after errors + */ + private final LogBackgroundServiceScheduler scheduler = new LogBackgroundServiceScheduler(); - /** - * The LogMsg collector - */ - private final LogCollector collector; + /** + * The LogMsg collector + */ + private final LogCollector collector; - /** - * The LogMsgGroup HTTP sender - */ - private final LogSender sender; + /** + * Handles sending logs to destination + */ + private final LogTransport logTransport; - /** - * Constructor - * @param collector The LogMsg collector - * @param sender The LogMsgGroup HTTP sender - */ - public LogBackgroundService(final LogCollector collector, final LogSender sender) { - Preconditions.checkNotNull(collector); - Preconditions.checkNotNull(sender); - this.collector = collector; - this.sender = sender; - } + /** + * Constructor + * + * @param collector The LogMsg collector + * @param logTransport Handles sending logs to destination + */ + public LogBackgroundService(@NonNull final LogCollector collector, + @NonNull final LogTransport logTransport) { + this.collector = collector; + this.logTransport = logTransport; + } - /** - * @see com.stackify.api.common.concurrent.BackgroundService#startUp() - */ - @Override - protected void startUp() { - } + @Override + protected void startUp() { + } - /** - * @see com.stackify.api.common.concurrent.BackgroundService#getNextScheduleDelayMilliseconds() - */ - @Override - protected long getNextScheduleDelayMilliseconds() { - return scheduler.getScheduleDelay(); - } + @Override + protected long getNextScheduleDelayMilliseconds() { + return scheduler.getScheduleDelay(); + } - /** - * @see com.stackify.api.common.concurrent.BackgroundService#runOneIteration() - */ - @Override - protected void runOneIteration() { - try { - int numSent = collector.flush(sender); - scheduler.update(numSent); - } catch (Throwable t) { - LOGGER.info("Exception running Stackify_LogBackgroundService", t); - scheduler.update(t); - } - } + @Override + protected void runOneIteration() { + try { + int numSent = collector.flush(logTransport); + scheduler.update(numSent); + } catch (Throwable t) { + log.info("Exception running Stackify_LogBackgroundService", t); + scheduler.update(t); + } + } - /** - * @see com.stackify.api.common.concurrent.BackgroundService#shutDown() - */ - @Override - protected void shutDown() { - try { - collector.flush(sender); - } catch (Throwable t) { - LOGGER.info("Exception flushing log collector during shut down", t); - } - } + @Override + protected void shutDown() { + try { + collector.flush(logTransport); + } catch (Throwable t) { + log.info("Exception flushing log collector during shut down", t); + } + } } diff --git a/src/main/java/com/stackify/api/common/log/LogCollector.java b/src/main/java/com/stackify/api/common/log/LogCollector.java index ed7c223..434b132 100644 --- a/src/main/java/com/stackify/api/common/log/LogCollector.java +++ b/src/main/java/com/stackify/api/common/log/LogCollector.java @@ -15,183 +15,194 @@ */ package com.stackify.api.common.log; -import java.io.IOException; -import java.net.HttpURLConnection; -import java.util.ArrayList; -import java.util.List; -import java.util.Queue; - import com.stackify.api.AppIdentity; import com.stackify.api.EnvironmentDetail; import com.stackify.api.LogMsg; import com.stackify.api.LogMsgGroup; import com.stackify.api.common.AppIdentityService; import com.stackify.api.common.collect.SynchronizedEvictingQueue; -import com.stackify.api.common.http.HttpException; import com.stackify.api.common.util.Preconditions; import lombok.NonNull; +import lombok.extern.slf4j.Slf4j; +import net.jodah.failsafe.Failsafe; +import net.jodah.failsafe.RetryPolicy; + +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.Queue; /** * LogCollector + * * @author Eric Martin */ +@Slf4j public class LogCollector { - /** - * Max batch size of log messages to be sent in a single request - */ - private static final int MAX_BATCH = 100; - - private static final String DEFAULT_PLATFORM = "java"; - - /** - * The logger (project) name - */ - private final String logger; - - /** - * The logger platform (log type) - */ - private final String platform; - - /** - * Environment details - */ - private final EnvironmentDetail envDetail; - - /** - * Application identity service - */ - private final AppIdentityService appIdentityService; - - /** - * The queue of objects to be transmitted - */ - private final Queue queue = new SynchronizedEvictingQueue(10000); - - /** - * Constructor - * - * @param platform Logger platform (log type) - * @param logger The logger (project) name - * @param envDetail Environment details - */ - public LogCollector(@NonNull final String platform, - @NonNull final String logger, - @NonNull final EnvironmentDetail envDetail, - @NonNull final AppIdentityService appIdentityService) { - this.platform = platform; - this.logger = logger; - this.envDetail = envDetail; - this.appIdentityService = appIdentityService; - } - - /** - * Constructor - * - * @param logger The logger (project) name - * @param envDetail Environment details - */ - public LogCollector(final String logger, - final EnvironmentDetail envDetail, - final AppIdentityService appIdentityService) { - this(DEFAULT_PLATFORM, logger, envDetail, appIdentityService); - } - - /** - * Queues logMsg to be sent - * @param logMsg The log message - */ - public void addLogMsg(final LogMsg logMsg) { - Preconditions.checkNotNull(logMsg); - queue.offer(logMsg); - } - - /** - * Flushes the queue by sending all messages to Stackify - * @param sender The LogMsgGroup sender - * @return The number of messages sent to Stackify - * @throws IOException - * @throws HttpException - */ - public int flush(final LogSender sender) throws IOException, HttpException { - - int numSent = 0; - int maxToSend = queue.size(); - - if (0 < maxToSend) { - AppIdentity appIdentity = appIdentityService.getAppIdentity(); - - while (numSent < maxToSend) { - - // get the next batch of messages - int batchSize = Math.min(maxToSend - numSent, MAX_BATCH); - - List batch = new ArrayList(batchSize); - - for (int i = 0; i < batchSize; ++i) { - batch.add(queue.remove()); - } - - // build the log message group - LogMsgGroup group = createLogMessageGroup(batch, platform, logger, envDetail, appIdentity); - - // send the batch to Stackify - int httpStatus = sender.send(group); - - // if the batch failed to transmit, return the appropriate transmission status - if (httpStatus != HttpURLConnection.HTTP_OK) { - throw new HttpException(httpStatus); - } - - // next iteration - numSent += batchSize; - } - } - - return numSent; - } - - /** - * - * @param batch - a bunch of messages that should be sent over the wire - * @param platform - platform (log type) - * @param logger - logger (project) name - * @param envDetail - environment details - * @param appIdentity - application identity - * @return LogMessage group object with - */ - private LogMsgGroup createLogMessageGroup(final List batch, - final String platform, - final String logger, - final EnvironmentDetail envDetail, - final AppIdentity appIdentity) { - final LogMsgGroup.Builder groupBuilder = LogMsgGroup.newBuilder(); - - groupBuilder - .platform(platform) - .logger(logger) - .serverName(envDetail.getDeviceName()) - .env(envDetail.getConfiguredEnvironmentName()) - .appName(envDetail.getConfiguredAppName()) - .appLoc(envDetail.getAppLocation()); - - if (appIdentity != null) { - groupBuilder - .cdId(appIdentity.getDeviceId()) - .cdAppId(appIdentity.getDeviceAppId()) - .appNameId(appIdentity.getAppNameId()) - .appEnvId(appIdentity.getAppEnvId()) - .envId(appIdentity.getEnvId()) - .env(appIdentity.getEnv()); - - if ((appIdentity.getAppName() != null) && (0 < appIdentity.getAppName().length())) { - groupBuilder.appName(appIdentity.getAppName()); - } - } - - groupBuilder.msgs(batch); - - return groupBuilder.build(); - } + /** + * Max batch size of log messages to be sent in a single request + */ + private static final int MAX_BATCH = 100; + + private static final String DEFAULT_PLATFORM = "java"; + + /** + * The logger (project) name + */ + private final String logger; + + /** + * The logger platform (log type) + */ + private final String platform; + + /** + * Environment details + */ + private final EnvironmentDetail envDetail; + + /** + * Application identity service + */ + private final AppIdentityService appIdentityService; + + /** + * The queue of objects to be transmitted + */ + private final Queue queue = new SynchronizedEvictingQueue(10000); + + private final RetryPolicy retryPolicy = new RetryPolicy() + .withDelay(Duration.ofSeconds(10)) + .withMaxRetries(3); + + /** + * Constructor + * + * @param platform Logger platform (log type) + * @param logger The logger (project) name + * @param envDetail Environment details + */ + public LogCollector(@NonNull final String platform, + @NonNull final String logger, + @NonNull final EnvironmentDetail envDetail, + @NonNull final AppIdentityService appIdentityService) { + this.platform = platform; + this.logger = logger; + this.envDetail = envDetail; + this.appIdentityService = appIdentityService; + } + + /** + * Constructor + * + * @param logger The logger (project) name + * @param envDetail Environment details + */ + public LogCollector(final String logger, + final EnvironmentDetail envDetail, + final AppIdentityService appIdentityService) { + this(DEFAULT_PLATFORM, logger, envDetail, appIdentityService); + } + + /** + * Queues logMsg to be sent + * + * @param logMsg The log message + */ + public void addLogMsg(final LogMsg logMsg) { + Preconditions.checkNotNull(logMsg); + queue.offer(logMsg); + } + + /** + * Flushes the queue by sending all messages to Stackify + * + * @param logTransport The LogMsgGroup sender + * @return The number of messages sent to Stackify + * @throws Exception + */ + public int flush(final LogTransport logTransport) throws Exception { + + int numSent = 0; + int maxToSend = queue.size(); + + if (0 < maxToSend) { + AppIdentity appIdentity = appIdentityService.getAppIdentity(); + + while (numSent < maxToSend && queue.size() > 0) { + + // get the next batch of messages + int batchSize = Math.min(maxToSend - numSent, MAX_BATCH); + + List batch = new ArrayList(batchSize); + + for (int i = 0; i < batchSize; ++i) { + batch.add(queue.remove()); + } + + if (batch.size() > 0) { + // build the log message group + LogMsgGroup group = createLogMessageGroup(batch, platform, logger, envDetail, appIdentity); + + send(logTransport, group); + + // next iteration + numSent += batchSize; + } + } + } + + return numSent; + } + + /** + * Send group to transport - with retry policy configured + */ + private void send(final LogTransport logTransport, + final LogMsgGroup group) { + Failsafe.with(retryPolicy).runAsync(() -> logTransport.send(group)); + } + + /** + * @param batch - a bunch of messages that should be sent over the wire + * @param platform - platform (log type) + * @param logger - logger (project) name + * @param envDetail - environment details + * @param appIdentity - application identity + * @return LogMessage group object with + */ + private LogMsgGroup createLogMessageGroup(final List batch, + final String platform, + final String logger, + final EnvironmentDetail envDetail, + final AppIdentity appIdentity) { + final LogMsgGroup.Builder groupBuilder = LogMsgGroup.newBuilder(); + + groupBuilder + .platform(platform) + .logger(logger) + .serverName(envDetail.getDeviceName()) + .env(envDetail.getConfiguredEnvironmentName()) + .appName(envDetail.getConfiguredAppName()) + .appLoc(envDetail.getAppLocation()); + + if (appIdentity != null) { + groupBuilder + .cdId(appIdentity.getDeviceId()) + .cdAppId(appIdentity.getDeviceAppId()) + .appNameId(appIdentity.getAppNameId()) + .appEnvId(appIdentity.getAppEnvId()) + .envId(appIdentity.getEnvId()) + .env(appIdentity.getEnv()); + + if ((appIdentity.getAppName() != null) && (0 < appIdentity.getAppName().length())) { + groupBuilder.appName(appIdentity.getAppName()); + } + } + + groupBuilder.msgs(batch); + + return groupBuilder.build(); + } } diff --git a/src/main/java/com/stackify/api/common/log/LogSender.java b/src/main/java/com/stackify/api/common/log/LogSender.java deleted file mode 100644 index 7d048e1..0000000 --- a/src/main/java/com/stackify/api/common/log/LogSender.java +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Copyright 2014 Stackify - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.stackify.api.common.log; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.stackify.api.ErrorItem; -import com.stackify.api.LogMsg; -import com.stackify.api.LogMsgGroup; -import com.stackify.api.common.ApiConfiguration; -import com.stackify.api.common.http.HttpClient; -import com.stackify.api.common.http.HttpException; -import com.stackify.api.common.http.HttpResendQueue; -import com.stackify.api.common.mask.Masker; -import com.stackify.api.common.util.Preconditions; -import com.stackify.api.common.util.SkipJsonUtil; -import lombok.NonNull; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.IOException; -import java.net.HttpURLConnection; -import java.util.Map; - -/** - * LogSender - * @author Eric Martin - */ -public class LogSender { - - /** - * The service logger - */ - private static final Logger LOGGER = LoggerFactory.getLogger(LogSender.class); - - /** - * REST path for log save - */ - private static final String LOG_SAVE_PATH = "/Log/Save"; - - /** - * The API configuration - */ - private final ApiConfiguration apiConfig; - - /** - * JSON object mapper - */ - private final ObjectMapper objectMapper; - - /** - * The queue of requests to be retransmitted (max of 20 batches of 100 messages) - */ - private final HttpResendQueue resendQueue = new HttpResendQueue(20); - - - private final Masker masker; - - private final boolean skipJson; - - /** - * Default constructor - * @param apiConfig API configuration - * @param objectMapper JSON object mapper - * @param masker Message Masker - * @param skipJson Messages detected w/ json will have the #SKIPJSON tag added - */ - public LogSender(@NonNull final ApiConfiguration apiConfig, - @NonNull final ObjectMapper objectMapper, - final Masker masker, - final boolean skipJson) { - this.apiConfig = apiConfig; - this.objectMapper = objectMapper; - this.masker = masker; - this.skipJson = skipJson; - } - - /** - * Default constructor - * @param apiConfig API configuration - * @param objectMapper JSON object mapper - * @param masker Message Masker - */ - public LogSender(@NonNull final ApiConfiguration apiConfig, - @NonNull final ObjectMapper objectMapper, - final Masker masker) { - this(apiConfig, objectMapper, masker, false); - } - - private void executeSkipJsonTag(final LogMsgGroup group) { - if (skipJson) { - if (group.getMsgs().size() > 0) { - for (LogMsg logMsg : group.getMsgs()) { - if (logMsg.getEx() != null) { - executeSkipJsonTag(logMsg.getEx().getError()); - } - logMsg.setData(SkipJsonUtil.execute(logMsg.getData())); - logMsg.setMsg(SkipJsonUtil.execute(logMsg.getMsg())); - } - } - - } - } - - private void executeSkipJsonTag(final ErrorItem errorItem) { - if (skipJson) { - if (errorItem != null) { - errorItem.setMessage(SkipJsonUtil.execute(errorItem.getMessage())); - if (errorItem.getData() != null) { - for (Map.Entry entry : errorItem.getData().entrySet()) { - entry.setValue(SkipJsonUtil.execute(entry.getValue())); - } - } - executeSkipJsonTag(errorItem.getInnerError()); - } - } - } - - /** - * Applies masking to passed in LogMsgGroup. - */ - private void executeMask(final LogMsgGroup group) { - if (masker != null) { - if (group.getMsgs().size() > 0) { - for (LogMsg logMsg : group.getMsgs()) { - if (logMsg.getEx() != null) { - executeMask(logMsg.getEx().getError()); - } - logMsg.setData(masker.mask(logMsg.getData())); - logMsg.setMsg(masker.mask(logMsg.getMsg())); - } - } - } - } - - private void executeMask(final ErrorItem errorItem) { - if (errorItem != null) { - errorItem.setMessage(masker.mask(errorItem.getMessage())); - if (errorItem.getData() != null) { - for (Map.Entry entry : errorItem.getData().entrySet()) { - entry.setValue(masker.mask(entry.getValue())); - } - } - executeMask(errorItem.getInnerError()); - } - } - - /** - * Sends a group of log messages to Stackify - * @param group The log message group - * @return The HTTP status code returned from the HTTP POST - * @throws IOException - */ - public int send(final LogMsgGroup group) throws IOException { - Preconditions.checkNotNull(group); - - executeMask(group); - executeSkipJsonTag(group); - - HttpClient httpClient = new HttpClient(apiConfig); - - // retransmit any logs on the resend queue - - resendQueue.drain(httpClient, LOG_SAVE_PATH, true); - - // convert to json bytes - - byte[] jsonBytes = objectMapper.writer().writeValueAsBytes(group); - - // post to stackify - - int statusCode = HttpURLConnection.HTTP_INTERNAL_ERROR; - - try { - httpClient.post(LOG_SAVE_PATH, jsonBytes, true); - statusCode = HttpURLConnection.HTTP_OK; - } catch (IOException t) { - LOGGER.info("Queueing logs for retransmission due to IOException"); - resendQueue.offer(jsonBytes, t); - throw t; - } catch (HttpException e) { - statusCode = e.getStatusCode(); - LOGGER.info("Queueing logs for retransmission due to HttpException", e); - resendQueue.offer(jsonBytes, e); - } - - return statusCode; - } -} diff --git a/src/main/java/com/stackify/api/common/log/LogTransport.java b/src/main/java/com/stackify/api/common/log/LogTransport.java new file mode 100644 index 0000000..4cc76d5 --- /dev/null +++ b/src/main/java/com/stackify/api/common/log/LogTransport.java @@ -0,0 +1,9 @@ +package com.stackify.api.common.log; + +import com.stackify.api.LogMsgGroup; + +public interface LogTransport { + + void send(final LogMsgGroup group) throws Exception; + +} diff --git a/src/main/java/com/stackify/api/common/log/LogTransportAgentSocket.java b/src/main/java/com/stackify/api/common/log/LogTransportAgentSocket.java new file mode 100644 index 0000000..884df64 --- /dev/null +++ b/src/main/java/com/stackify/api/common/log/LogTransportAgentSocket.java @@ -0,0 +1,85 @@ +/* + * Copyright 2019 Stackify + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stackify.api.common.log; + +import com.stackify.api.LogMsgGroup; +import com.stackify.api.common.ApiConfiguration; +import com.stackify.api.common.mask.Masker; +import com.stackify.api.common.proto.LogMsgGroupConverter; +import com.stackify.api.common.proto.StackifyProto; +import com.stackify.api.common.socket.HttpSocketClient; +import lombok.NonNull; +import lombok.extern.slf4j.Slf4j; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.entity.ByteArrayEntity; + +/** + * Log Transport - Agent Socket + * Send log messages to Stackify Agent via Domain Socket + * + * @author Darin Howard + */ +@Slf4j +public class LogTransportAgentSocket implements LogTransport { + + private static final String URI_PREFIX = "unix://localhost:80"; + + /** + * The API configuration + */ + private final ApiConfiguration apiConfig; + + private final LogTransportPreProcessor logTransportPreProcessor; + + private final HttpSocketClient httpSocketClient; + + public LogTransportAgentSocket(@NonNull final ApiConfiguration apiConfig, + Masker masker, + boolean skipJson) { + this.apiConfig = apiConfig; + this.logTransportPreProcessor = new LogTransportPreProcessor(masker, skipJson); + this.httpSocketClient = new HttpSocketClient(apiConfig.getAgentSocketPath()); + } + + /** + * Sends a group of log messages to Stackify + * + * @param group The log message group + */ + public void send(@NonNull final LogMsgGroup group) throws Exception { + + try { + + // run pre-processor + logTransportPreProcessor.execute(group); + + // convert to protobuf model + StackifyProto.LogGroup logGroup = LogMsgGroupConverter.convert(group); + + // post to stackify + HttpPost httpPost = new HttpPost(URI_PREFIX + "/log"); + httpPost.setHeader("Content-Type", "application/x-protobuf"); + httpPost.setEntity(new ByteArrayEntity(logGroup.toByteArray())); + httpSocketClient.send(httpPost); + } catch (Throwable e) { + log.info("Queueing logs for retransmission due to Exception"); + log.debug(e.getMessage(), e); + throw e; + } + + } + +} diff --git a/src/main/java/com/stackify/api/common/log/LogTransportDirect.java b/src/main/java/com/stackify/api/common/log/LogTransportDirect.java new file mode 100644 index 0000000..2b4ea6f --- /dev/null +++ b/src/main/java/com/stackify/api/common/log/LogTransportDirect.java @@ -0,0 +1,94 @@ +/* + * Copyright 2014 Stackify + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.stackify.api.common.log; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.stackify.api.LogMsgGroup; +import com.stackify.api.common.ApiConfiguration; +import com.stackify.api.common.http.HttpClient; +import com.stackify.api.common.mask.Masker; +import lombok.NonNull; +import lombok.extern.slf4j.Slf4j; + +/** + * Log Transport - Direct + * Send log messages directly to Stackify + * + * @author Eric Martin + */ +@Slf4j +public class LogTransportDirect implements LogTransport { + + /** + * REST path for log save + */ + private static final String LOG_SAVE_PATH = "/Log/Save"; + + /** + * The API configuration + */ + private final ApiConfiguration apiConfig; + + /** + * JSON object mapper + */ + private final ObjectMapper objectMapper; + + private final LogTransportPreProcessor logTransportPreProcessor; + + /** + * Default constructor + * + * @param apiConfig API configuration + * @param objectMapper JSON object mapper + */ + public LogTransportDirect(@NonNull final ApiConfiguration apiConfig, + @NonNull final ObjectMapper objectMapper, + Masker masker, + boolean skipJson) { + this.apiConfig = apiConfig; + this.objectMapper = objectMapper; + this.logTransportPreProcessor = new LogTransportPreProcessor(masker, skipJson); + } + + /** + * Sends a group of log messages to Stackify + * + * @param group The log message group + */ + public void send(@NonNull final LogMsgGroup group) throws Exception { + + HttpClient httpClient = new HttpClient(apiConfig); + + // run pre-processor + + logTransportPreProcessor.execute(group); + + // convert to json bytes + + byte[] jsonBytes = objectMapper.writer().writeValueAsBytes(group); + + // post to stackify + + try { + httpClient.post(LOG_SAVE_PATH, jsonBytes, true); + } catch (Exception e) { + log.info("Queueing logs for retransmission due to Exception"); + log.debug(e.getMessage(), e); + throw e; + } + } +} diff --git a/src/main/java/com/stackify/api/common/log/LogTransportPreProcessor.java b/src/main/java/com/stackify/api/common/log/LogTransportPreProcessor.java new file mode 100644 index 0000000..69cbafa --- /dev/null +++ b/src/main/java/com/stackify/api/common/log/LogTransportPreProcessor.java @@ -0,0 +1,89 @@ +package com.stackify.api.common.log; + +import com.stackify.api.ErrorItem; +import com.stackify.api.LogMsg; +import com.stackify.api.LogMsgGroup; +import com.stackify.api.common.mask.Masker; +import com.stackify.api.common.util.SkipJsonUtil; + +import java.util.Map; + +public class LogTransportPreProcessor { + + private final Masker masker; + private final boolean skipJson; + + /** + * @param masker Message Masker + * @param skipJson Messages detected w/ json will have the #SKIPJSON tag added + */ + public LogTransportPreProcessor(final Masker masker, + final boolean skipJson) { + this.masker = masker; + this.skipJson = skipJson; + } + + public void execute(final LogMsgGroup group) { + executeMask(group); + executeSkipJsonTag(group); + } + + private void executeSkipJsonTag(final LogMsgGroup group) { + if (skipJson) { + if (group.getMsgs().size() > 0) { + for (LogMsg logMsg : group.getMsgs()) { + if (logMsg.getEx() != null) { + executeSkipJsonTag(logMsg.getEx().getError()); + } + logMsg.setData(SkipJsonUtil.execute(logMsg.getData())); + logMsg.setMsg(SkipJsonUtil.execute(logMsg.getMsg())); + } + } + } + } + + private void executeSkipJsonTag(final ErrorItem errorItem) { + if (skipJson) { + if (errorItem != null) { + errorItem.setMessage(SkipJsonUtil.execute(errorItem.getMessage())); + if (errorItem.getData() != null) { + for (Map.Entry entry : errorItem.getData().entrySet()) { + entry.setValue(SkipJsonUtil.execute(entry.getValue())); + } + } + executeSkipJsonTag(errorItem.getInnerError()); + } + } + } + + private void executeMask(final ErrorItem errorItem) { + if (errorItem != null) { + errorItem.setMessage(masker.mask(errorItem.getMessage())); + if (errorItem.getData() != null) { + for (Map.Entry entry : errorItem.getData().entrySet()) { + entry.setValue(masker.mask(entry.getValue())); + } + } + executeMask(errorItem.getInnerError()); + } + } + + /** + * Applies masking to passed in LogMsgGroup. + */ + private void executeMask(final LogMsgGroup group) { + if (masker != null) { + if (group.getMsgs() != null && group.getMsgs().size() > 0) { + for (LogMsg logMsg : group.getMsgs()) { + if (logMsg.getEx() != null) { + executeMask(logMsg.getEx().getError()); + } + logMsg.setData(masker.mask(logMsg.getData())); + logMsg.setMsg(masker.mask(logMsg.getMsg())); + } + } + } + } + + +} diff --git a/src/main/java/com/stackify/api/common/log/StackTraceUtil.java b/src/main/java/com/stackify/api/common/log/StackTraceUtil.java new file mode 100644 index 0000000..21b4caa --- /dev/null +++ b/src/main/java/com/stackify/api/common/log/StackTraceUtil.java @@ -0,0 +1,54 @@ +package com.stackify.api.common.log; + +import lombok.NonNull; +import lombok.experimental.UtilityClass; +import org.slf4j.helpers.SubstituteLogger; + +@UtilityClass +public class StackTraceUtil { + + private final Class[] skipClasses = new Class[]{SubstituteLogger.class, Throwable.class}; + + /** + * Helper function get top level stack trace element from array (skips some wrapper classes) + */ + public static StackTraceElement getStackTraceElement(final StackTraceElement[] stackTraceElements) { + if (stackTraceElements != null) { + for (StackTraceElement stackTraceElement : stackTraceElements) { + if (stackTraceElement != null) { + String classname = stackTraceElement.getClassName(); + if (!skipClass(classname)) { + return stackTraceElement; + } + } + } + } + return null; + } + + /** + * Helper function get top level class name from array (skips some wrapper classes) + */ + public static String getClassName(final StackTraceElement[] stackTraceElements) { + StackTraceElement stackTraceElement = getStackTraceElement(stackTraceElements); + + if (stackTraceElement != null) { + return stackTraceElement.getClassName(); + } + + return null; + } + + /** + * indicates if a class should be skipped (avoid using a wrapping class for log identification) + */ + private static boolean skipClass(@NonNull final String classname) { + for (Class skipClass : skipClasses) { + if (skipClass.getName().equalsIgnoreCase(classname)) { + return true; + } + } + return false; + } + +} diff --git a/src/main/java/com/stackify/api/common/log/direct/Logger.java b/src/main/java/com/stackify/api/common/log/direct/Logger.java index 2f1d106..33f0e75 100644 --- a/src/main/java/com/stackify/api/common/log/direct/Logger.java +++ b/src/main/java/com/stackify/api/common/log/direct/Logger.java @@ -15,6 +15,7 @@ */ package com.stackify.api.common.log.direct; +import com.stackify.api.common.log.StackTraceUtil; import org.slf4j.LoggerFactory; import com.stackify.api.common.log.LogAppender; @@ -43,25 +44,25 @@ public static void queueMessage(final String level, final String message) { LogEvent.Builder builder = LogEvent.newBuilder(); builder.level(level); builder.message(message); - + if ((level != null) && ("ERROR".equals(level.toUpperCase()))) { - StackTraceElement[] stackTrace = new Throwable().getStackTrace(); - if ((stackTrace != null) && (1 < stackTrace.length)) { - StackTraceElement caller = stackTrace[1]; + StackTraceElement caller = StackTraceUtil.getStackTraceElement(new Throwable().getStackTrace()); + + if (caller != null) { builder.className(caller.getClassName()); builder.methodName(caller.getMethodName()); - builder.lineNumber(caller.getLineNumber()); + builder.lineNumber(caller.getLineNumber()); } } - + appender.append(builder.build()); } } catch (Throwable t) { LOGGER.info("Unable to queue message to Stackify Log API service: {} {}", level, message, t); } } - + /** * Queues an exception to be sent to Stackify * @param e The exception @@ -70,7 +71,7 @@ public static void queueException(final Throwable e) { if (e != null) { try { LogAppender appender = LogManager.getAppender(); - + if (appender != null) { appender.append(LogEvent.newBuilder().level("ERROR").message(e.getMessage()).exception(e).build()); } @@ -79,7 +80,7 @@ public static void queueException(final Throwable e) { } } } - + /** * Queues an exception to be sent to Stackify * @param level The log level @@ -97,7 +98,7 @@ public static void queueException(final String level, final String message, fina LOGGER.info("Unable to queue exception to Stackify Log API service: {} {} {}", level, message, e, t); } } - + /** * Hidden to prevent construction */ diff --git a/src/main/java/com/stackify/api/common/proto/LogGroupConverter.java b/src/main/java/com/stackify/api/common/proto/LogGroupConverter.java new file mode 100644 index 0000000..94a5f02 --- /dev/null +++ b/src/main/java/com/stackify/api/common/proto/LogGroupConverter.java @@ -0,0 +1,159 @@ +package com.stackify.api.common.proto; + +import com.stackify.api.Container; +import com.stackify.api.EnvironmentDetail; +import com.stackify.api.ErrorItem; +import com.stackify.api.Kubernetes; +import com.stackify.api.LogMsg; +import com.stackify.api.LogMsgGroup; +import com.stackify.api.StackifyError; +import com.stackify.api.TraceFrame; +import com.stackify.api.WebRequestDetail; +import lombok.NonNull; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * Handles mapping/converting StackifyProto.LogGroup (protobuf) to com.stackify.api.LogMsgGroup (api). + */ +public class LogGroupConverter { + + private static TraceFrame convert(@NonNull final StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame traceFrame) { + return TraceFrame.newBuilder() + .codeFileName(traceFrame.getCodeFilename()) + .lineNum(traceFrame.getLineNumber()) + .method(traceFrame.getMethod()) + .build(); + } + + private static ErrorItem convert(@NonNull final StackifyProto.LogGroup.Log.Error.ErrorItem errorItem) { + ErrorItem.Builder builder = ErrorItem.newBuilder() + .message(errorItem.getMessage()) + .errorType(errorItem.getErrorType()) + .errorTypeCode(errorItem.getErrorTypeCode()) + .sourceMethod(errorItem.getSourceMethod()) + .innerError(errorItem.hasInnerError() ? convert(errorItem.getInnerError()) : null); + + if (errorItem.getDataMap().size() > 0) { + builder.data(errorItem.getDataMap()); + } + + if (errorItem.getStacktraceList().size() > 0) { + List stackTrace = new ArrayList<>(); + for (com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame traceFrame : errorItem.getStacktraceList()) { + stackTrace.add(convert(traceFrame)); + } + builder.stackTrace(stackTrace); + } + + return builder.build(); + } + + private static WebRequestDetail convert(@NonNull final StackifyProto.LogGroup.Log.Error.WebRequestDetail webRequestDetail) { + return WebRequestDetail.newBuilder() + .userIpAddress(webRequestDetail.getUserIpAddress()) + .httpMethod(webRequestDetail.getHttpMethod()) + .requestProtocol(webRequestDetail.getRequestProtocol()) + .requestUrl(webRequestDetail.getRequestUrl()) + .requestUrlRoot(webRequestDetail.getRequestUrlRoot()) + .referralUrl(webRequestDetail.getReferralUrl()) + .headers(webRequestDetail.getHeadersMap()) + .cookies(webRequestDetail.getCookiesMap()) + .queryString(webRequestDetail.getQuerystringMap()) + .postData(webRequestDetail.getPostDataMap()) + .sessionData(webRequestDetail.getSessionDataMap()) + .postDataRaw(webRequestDetail.getPostDataRaw()) + .mvcAction(webRequestDetail.getMvcAction()) + .mvcController(webRequestDetail.getMvcController()) + .mvcArea(webRequestDetail.getMvcArea()) + .build(); + } + + private static EnvironmentDetail convert(@NonNull final StackifyProto.LogGroup.Log.Error.EnvironmentDetail environmentDetail) { + return EnvironmentDetail.newBuilder() + .deviceName(environmentDetail.getDeviceName()) + .appName(environmentDetail.getApplicationName()) + .appLocation(environmentDetail.getApplicationLocation()) + .configuredAppName(environmentDetail.getConfiguredApplicationName()) + .configuredEnvironmentName(environmentDetail.getConfiguredEnvironmentName()) + .build(); + } + + private static StackifyError convert(@NonNull final StackifyProto.LogGroup.Log.Error error) { + return StackifyError.newBuilder() + .environmentDetail(error.hasEnvironmentDetail() ? convert(error.getEnvironmentDetail()) : null) + .occurredEpochMillis(new Date(error.getDateMillis())) + .error(error.hasErrorItem() ? convert(error.getErrorItem()) : null) + .webRequestDetail(error.hasWebRequestDetail() ? convert(error.getWebRequestDetail()) : null) + .serverVariables(error.getServerVariablesMap()) + .customerName(error.getCustomerName()) + .userName(error.getUsername()) + .build(); + } + + private static LogMsg convert(@NonNull final StackifyProto.LogGroup.Log log) { + return LogMsg.newBuilder() + .msg(log.getMessage()) + .data(log.getData()) + .ex(log.hasError() ? convert(log.getError()) : null) + .th(log.getThreadName()) + .epochMs(log.getDateMillis()) + .level(log.getLevel()) + .transId(log.getTransactionId()) + .srcMethod(log.getSourceMethod()) + .srcLine(log.getSourceLine()) + .id(log.getId()) + .tags(log.getTagsList()) + .build(); + } + + private static Kubernetes convert(@NonNull final StackifyProto.LogGroup.Kubernetes kubernetes) { + return Kubernetes.newBuilder() + .podName(kubernetes.getPodName()) + .podNamespace(kubernetes.getPodNamespace()) + .clusterName(kubernetes.getClusterName()) + .build(); + } + + private static Container convert(@NonNull final StackifyProto.LogGroup.Container container) { + return Container.newBuilder() + .imageId(container.getImageId()) + .imageRepository(container.getImageRepository()) + .imageTag(container.getImageTag()) + .containerId(container.getContainerId()) + .containerName(container.getContainerName()) + .build(); + } + + public static LogMsgGroup convert(@NonNull final StackifyProto.LogGroup logGroup) { + LogMsgGroup.Builder builder = LogMsgGroup.newBuilder() + .env(logGroup.getEnvironment()) + .serverName(logGroup.getServerName()) + .appName(logGroup.getApplicationName()) + .appLoc(logGroup.getApplicationLocation()) + .logger(logGroup.getLogger()) + .platform(logGroup.getPlatform()); + + if (logGroup.getContainer() != null) { + builder.container(convert(logGroup.getContainer())); + } + + if (logGroup.getKubernetes() != null) { + builder.kubernetes(convert(logGroup.getKubernetes())); + } + + List logMsgs = new ArrayList<>(); + if (logGroup.getLogsCount() > 0) { + for (StackifyProto.LogGroup.Log log : logGroup.getLogsList()) { + logMsgs.add(convert(log)); + } + builder.msgs(logMsgs); + } + + return builder.build(); + } + + +} diff --git a/src/main/java/com/stackify/api/common/proto/LogMsgGroupConverter.java b/src/main/java/com/stackify/api/common/proto/LogMsgGroupConverter.java new file mode 100644 index 0000000..ec7a7d4 --- /dev/null +++ b/src/main/java/com/stackify/api/common/proto/LogMsgGroupConverter.java @@ -0,0 +1,289 @@ +package com.stackify.api.common.proto; + +import com.stackify.api.Container; +import com.stackify.api.EnvironmentDetail; +import com.stackify.api.ErrorItem; +import com.stackify.api.Kubernetes; +import com.stackify.api.LogMsg; +import com.stackify.api.LogMsgGroup; +import com.stackify.api.StackifyError; +import com.stackify.api.TraceFrame; +import com.stackify.api.WebRequestDetail; +import lombok.NonNull; + +import java.util.ArrayList; +import java.util.List; + +/** + * Handles mapping/converting com.stackify.api.LogMsgGroup (api) to StackifyProto.LogGroup (protobuf). + */ +public class LogMsgGroupConverter { + + private static StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame convert(@NonNull final TraceFrame traceFrame) { + StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame.Builder builder = StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame.newBuilder(); + + if (traceFrame.getCodeFileName() != null) { + builder.setCodeFilename(traceFrame.getCodeFileName()); + } + if (traceFrame.getLineNum() != null) { + builder.setLineNumber(traceFrame.getLineNum()); + } + if (traceFrame.getMethod() != null) { + builder.setMethod(traceFrame.getMethod()); + } + + return builder.build(); + } + + private static StackifyProto.LogGroup.Log.Error.ErrorItem convert(@NonNull final ErrorItem errorItem) { + StackifyProto.LogGroup.Log.Error.ErrorItem.Builder builder = StackifyProto.LogGroup.Log.Error.ErrorItem.newBuilder(); + + if (errorItem.getMessage() != null) { + builder.setMessage(errorItem.getMessage()); + } + if (errorItem.getErrorType() != null) { + builder.setErrorType(errorItem.getErrorType()); + } + if (errorItem.getErrorTypeCode() != null) { + builder.setErrorTypeCode(errorItem.getErrorTypeCode()); + } + if (errorItem.getSourceMethod() != null) { + builder.setSourceMethod(errorItem.getSourceMethod()); + } + if (errorItem.getInnerError() != null) { + builder.setInnerError(convert(errorItem.getInnerError())); + } + if (errorItem.getData() != null && errorItem.getData().size() > 0) { + builder.putAllData(errorItem.getData()); + } + if (errorItem.getStackTrace() != null && errorItem.getStackTrace().size() > 0) { + List stackTrace = new ArrayList<>(); + for (TraceFrame traceFrame : errorItem.getStackTrace()) { + stackTrace.add(convert(traceFrame)); + } + builder.addAllStacktrace(stackTrace); + } + + return builder.build(); + } + + private static StackifyProto.LogGroup.Log.Error.WebRequestDetail convert(@NonNull final WebRequestDetail webRequestDetail) { + StackifyProto.LogGroup.Log.Error.WebRequestDetail.Builder builder = StackifyProto.LogGroup.Log.Error.WebRequestDetail.newBuilder(); + + if (webRequestDetail.getUserIpAddress() != null) { + builder.setUserIpAddress(webRequestDetail.getUserIpAddress()); + } + if (webRequestDetail.getHttpMethod() != null) { + builder.setHttpMethod(webRequestDetail.getHttpMethod()); + } + if (webRequestDetail.getRequestProtocol() != null) { + builder.setRequestProtocol(webRequestDetail.getRequestProtocol()); + } + if (webRequestDetail.getRequestUrl() != null) { + builder.setRequestUrl(webRequestDetail.getRequestUrl()); + } + if (webRequestDetail.getRequestUrlRoot() != null) { + builder.setRequestUrlRoot(webRequestDetail.getRequestUrlRoot()); + } + if (webRequestDetail.getReferralUrl() != null) { + builder.setReferralUrl(webRequestDetail.getReferralUrl()); + } + if (webRequestDetail.getHeaders() != null) { + builder.putAllHeaders(webRequestDetail.getHeaders()); + } + if (webRequestDetail.getCookies() != null) { + builder.putAllCookies(webRequestDetail.getCookies()); + } + if (webRequestDetail.getQueryString() != null) { + builder.putAllQuerystring(webRequestDetail.getQueryString()); + } + if (webRequestDetail.getPostData() != null) { + builder.putAllPostData(webRequestDetail.getPostData()); + } + if (webRequestDetail.getSessionData() != null) { + builder.putAllSessionData(webRequestDetail.getSessionData()); + } + if (webRequestDetail.getPostDataRaw() != null) { + builder.setPostDataRaw(webRequestDetail.getPostDataRaw()); + } + if (webRequestDetail.getMvcAction() != null) { + builder.setMvcAction(webRequestDetail.getMvcAction()); + } + if (webRequestDetail.getMvcController() != null) { + builder.setMvcController(webRequestDetail.getMvcController()); + } + if (webRequestDetail.getMvcArea() != null) { + builder.setMvcArea(webRequestDetail.getMvcArea()); + } + + return builder.build(); + } + + private static StackifyProto.LogGroup.Log.Error.EnvironmentDetail convert(@NonNull final EnvironmentDetail environmentDetail) { + StackifyProto.LogGroup.Log.Error.EnvironmentDetail.Builder builder = StackifyProto.LogGroup.Log.Error.EnvironmentDetail.newBuilder(); + + if (environmentDetail.getDeviceName() != null) { + builder.setDeviceName(environmentDetail.getDeviceName()); + } + if (environmentDetail.getAppName() != null) { + builder.setApplicationName(environmentDetail.getAppName()); + } + if (environmentDetail.getAppLocation() != null) { + builder.setApplicationLocation(environmentDetail.getAppLocation()); + } + if (environmentDetail.getConfiguredAppName() != null) { + builder.setConfiguredApplicationName(environmentDetail.getConfiguredAppName()); + } + if (environmentDetail.getConfiguredEnvironmentName() != null) { + builder.setConfiguredEnvironmentName(environmentDetail.getConfiguredEnvironmentName()); + } + + return builder.build(); + } + + private static StackifyProto.LogGroup.Log.Error convert(@NonNull final StackifyError stackifyError) { + StackifyProto.LogGroup.Log.Error.Builder builder = StackifyProto.LogGroup.Log.Error.newBuilder(); + + if (stackifyError.getEnvironmentDetail() != null) { + builder.setEnvironmentDetail(convert(stackifyError.getEnvironmentDetail())); + } + if (stackifyError.getOccurredEpochMillis() != null) { + builder.setDateMillis(stackifyError.getOccurredEpochMillis().getTime()); + } + if (stackifyError.getError() != null) { + builder.setErrorItem(convert(stackifyError.getError())); + } + if (stackifyError.getWebRequestDetail() != null) { + builder.setWebRequestDetail(convert(stackifyError.getWebRequestDetail())); + } + if (stackifyError.getServerVariables() != null) { + builder.putAllServerVariables(stackifyError.getServerVariables()); + } + if (stackifyError.getCustomerName() != null) { + builder.setCustomerName(stackifyError.getCustomerName()); + } + if (stackifyError.getUserName() != null) { + builder.setUsername(stackifyError.getUserName()); + } + + return builder.build(); + } + + private static StackifyProto.LogGroup.Log convert(@NonNull final LogMsg logMsg) { + StackifyProto.LogGroup.Log.Builder builder = StackifyProto.LogGroup.Log.newBuilder(); + + if (logMsg.getMsg() != null) { + builder.setMessage(logMsg.getMsg()); + } + if (logMsg.getData() != null) { + builder.setData(logMsg.getData()); + } + if (logMsg.getEx() != null) { + builder.setError(convert(logMsg.getEx())); + } + if (logMsg.getTh() != null) { + builder.setThreadName(logMsg.getTh()); + } + if (logMsg.getEpochMs() != null) { + builder.setDateMillis(logMsg.getEpochMs()); + } + if (logMsg.getLevel() != null) { + builder.setLevel(logMsg.getLevel()); + } + if (logMsg.getTransId() != null) { + builder.setTransactionId(logMsg.getTransId()); + } + if (logMsg.getSrcMethod() != null) { + builder.setSourceMethod(logMsg.getSrcMethod()); + } + if (logMsg.getSrcLine() != null) { + builder.setSourceLine(logMsg.getSrcLine()); + } + if (logMsg.getId() != null) { + builder.setId(logMsg.getId()); + } + if (logMsg.getTags() != null) { + builder.addAllTags(logMsg.getTags()); + } + + return builder.build(); + } + + private static StackifyProto.LogGroup.Container convert(@NonNull final Container container) { + StackifyProto.LogGroup.Container.Builder builder = StackifyProto.LogGroup.Container.newBuilder(); + + if (container.getImageId() != null) { + builder.setImageId(container.getImageId()); + } + if (container.getImageRepository() != null) { + builder.setImageRepository(container.getImageRepository()); + } + if (container.getImageTag() != null) { + builder.setImageTag(container.getImageTag()); + } + if (container.getContainerId() != null) { + builder.setContainerId(container.getContainerId()); + } + if (container.getContainerName() != null) { + builder.setContainerName(container.getContainerName()); + } + + return builder.build(); + } + + private static StackifyProto.LogGroup.Kubernetes convert(@NonNull final Kubernetes kubernetes) { + StackifyProto.LogGroup.Kubernetes.Builder builder = StackifyProto.LogGroup.Kubernetes.newBuilder(); + + if (kubernetes.getPodName() != null) { + builder.setPodName(kubernetes.getPodName()); + } + if (kubernetes.getPodNamespace() != null) { + builder.setPodNamespace(kubernetes.getPodNamespace()); + } + if (kubernetes.getClusterName() != null) { + builder.setClusterName(kubernetes.getClusterName()); + } + + return builder.build(); + } + + public static StackifyProto.LogGroup convert(@NonNull final LogMsgGroup logMsgGroup) { + StackifyProto.LogGroup.Builder builder = StackifyProto.LogGroup.newBuilder(); + + if (logMsgGroup.getEnv() != null) { + builder.setEnvironment(logMsgGroup.getEnv()); + } + if (logMsgGroup.getServerName() != null) { + builder.setServerName(logMsgGroup.getServerName()); + } + if (logMsgGroup.getAppName() != null) { + builder.setApplicationName(logMsgGroup.getAppName()); + } + if (logMsgGroup.getAppLoc() != null) { + builder.setApplicationLocation(logMsgGroup.getAppLoc()); + } + if (logMsgGroup.getLogger() != null) { + builder.setLogger(logMsgGroup.getLogger()); + } + if (logMsgGroup.getPlatform() != null) { + builder.setPlatform(logMsgGroup.getPlatform()); + } + if (logMsgGroup.getContainer() != null) { + builder.setContainer(convert(logMsgGroup.getContainer())); + } + if (logMsgGroup.getKubernetes() != null) { + builder.setKubernetes(convert(logMsgGroup.getKubernetes())); + } + List logMsgs = new ArrayList(); + if (logMsgGroup.getMsgs() != null && logMsgGroup.getMsgs().size() > 0) { + for (LogMsg logMsg : logMsgGroup.getMsgs()) { + logMsgs.add(convert(logMsg)); + } + builder.addAllLogs(logMsgs); + } + + return builder.build(); + } + + +} diff --git a/src/main/java/com/stackify/api/common/proto/StackifyProto.java b/src/main/java/com/stackify/api/common/proto/StackifyProto.java new file mode 100644 index 0000000..cfd60ff --- /dev/null +++ b/src/main/java/com/stackify/api/common/proto/StackifyProto.java @@ -0,0 +1,16955 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: stackify-agent.proto + +package com.stackify.api.common.proto; + +public final class StackifyProto { + private StackifyProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface LogGroupOrBuilder extends + // @@protoc_insertion_point(interface_extends:stackify.LogGroup) + com.google.protobuf.MessageOrBuilder { + + /** + *
+         * REQUIRED The environment name. Example: "Prod"
+         * 
+ * + * string environment = 1; + */ + java.lang.String getEnvironment(); + /** + *
+         * REQUIRED The environment name. Example: "Prod"
+         * 
+ * + * string environment = 1; + */ + com.google.protobuf.ByteString + getEnvironmentBytes(); + + /** + *
+         * REQUIRED The name of the device. Example: "PROD-RS-Debian-7"
+         * 
+ * + * string server_name = 2; + */ + java.lang.String getServerName(); + /** + *
+         * REQUIRED The name of the device. Example: "PROD-RS-Debian-7"
+         * 
+ * + * string server_name = 2; + */ + com.google.protobuf.ByteString + getServerNameBytes(); + + /** + *
+         * REQUIRED The name of the application.  Example: "stackify-agent"
+         * 
+ * + * string application_name = 3; + */ + java.lang.String getApplicationName(); + /** + *
+         * REQUIRED The name of the application.  Example: "stackify-agent"
+         * 
+ * + * string application_name = 3; + */ + com.google.protobuf.ByteString + getApplicationNameBytes(); + + /** + *
+         * Optional. The full directory path for the application. Example: "/usr/local/stackify/stackify-agent"
+         * 
+ * + * string application_location = 4; + */ + java.lang.String getApplicationLocation(); + /** + *
+         * Optional. The full directory path for the application. Example: "/usr/local/stackify/stackify-agent"
+         * 
+ * + * string application_location = 4; + */ + com.google.protobuf.ByteString + getApplicationLocationBytes(); + + /** + *
+         * REQUIRED The name and version of the logging project generating this request. Example: "stackify-log-log4j12-1.0.12"
+         * 
+ * + * string logger = 5; + */ + java.lang.String getLogger(); + /** + *
+         * REQUIRED The name and version of the logging project generating this request. Example: "stackify-log-log4j12-1.0.12"
+         * 
+ * + * string logger = 5; + */ + com.google.protobuf.ByteString + getLoggerBytes(); + + /** + *
+         * The logging language.  Example: "java"
+         * 
+ * + * string platform = 6; + */ + java.lang.String getPlatform(); + /** + *
+         * The logging language.  Example: "java"
+         * 
+ * + * string platform = 6; + */ + com.google.protobuf.ByteString + getPlatformBytes(); + + /** + * repeated .stackify.LogGroup.Log logs = 7; + */ + java.util.List + getLogsList(); + /** + * repeated .stackify.LogGroup.Log logs = 7; + */ + com.stackify.api.common.proto.StackifyProto.LogGroup.Log getLogs(int index); + /** + * repeated .stackify.LogGroup.Log logs = 7; + */ + int getLogsCount(); + /** + * repeated .stackify.LogGroup.Log logs = 7; + */ + java.util.List + getLogsOrBuilderList(); + /** + * repeated .stackify.LogGroup.Log logs = 7; + */ + com.stackify.api.common.proto.StackifyProto.LogGroup.LogOrBuilder getLogsOrBuilder( + int index); + + /** + * .stackify.LogGroup.Container container = 8; + */ + boolean hasContainer(); + /** + * .stackify.LogGroup.Container container = 8; + */ + com.stackify.api.common.proto.StackifyProto.LogGroup.Container getContainer(); + /** + * .stackify.LogGroup.Container container = 8; + */ + com.stackify.api.common.proto.StackifyProto.LogGroup.ContainerOrBuilder getContainerOrBuilder(); + + /** + * .stackify.LogGroup.Kubernetes kubernetes = 9; + */ + boolean hasKubernetes(); + /** + * .stackify.LogGroup.Kubernetes kubernetes = 9; + */ + com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes getKubernetes(); + /** + * .stackify.LogGroup.Kubernetes kubernetes = 9; + */ + com.stackify.api.common.proto.StackifyProto.LogGroup.KubernetesOrBuilder getKubernetesOrBuilder(); + } + /** + * Protobuf type {@code stackify.LogGroup} + */ + public static final class LogGroup extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:stackify.LogGroup) + LogGroupOrBuilder { + private static final long serialVersionUID = 0L; + // Use LogGroup.newBuilder() to construct. + private LogGroup(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LogGroup() { + environment_ = ""; + serverName_ = ""; + applicationName_ = ""; + applicationLocation_ = ""; + logger_ = ""; + platform_ = ""; + logs_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new LogGroup(); + } + + @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 { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + environment_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + serverName_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + applicationName_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + applicationLocation_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + logger_ = s; + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + platform_ = s; + break; + } + case 58: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + logs_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + logs_.add( + input.readMessage(com.stackify.api.common.proto.StackifyProto.LogGroup.Log.parser(), extensionRegistry)); + break; + } + case 66: { + com.stackify.api.common.proto.StackifyProto.LogGroup.Container.Builder subBuilder = null; + if (container_ != null) { + subBuilder = container_.toBuilder(); + } + container_ = input.readMessage(com.stackify.api.common.proto.StackifyProto.LogGroup.Container.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(container_); + container_ = subBuilder.buildPartial(); + } + + break; + } + case 74: { + com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes.Builder subBuilder = null; + if (kubernetes_ != null) { + subBuilder = kubernetes_.toBuilder(); + } + kubernetes_ = input.readMessage(com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(kubernetes_); + kubernetes_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + logs_ = java.util.Collections.unmodifiableList(logs_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.stackify.api.common.proto.StackifyProto.LogGroup.class, com.stackify.api.common.proto.StackifyProto.LogGroup.Builder.class); + } + + public interface ContainerOrBuilder extends + // @@protoc_insertion_point(interface_extends:stackify.LogGroup.Container) + com.google.protobuf.MessageOrBuilder { + + /** + * string image_id = 1; + */ + java.lang.String getImageId(); + /** + * string image_id = 1; + */ + com.google.protobuf.ByteString + getImageIdBytes(); + + /** + * string image_repository = 2; + */ + java.lang.String getImageRepository(); + /** + * string image_repository = 2; + */ + com.google.protobuf.ByteString + getImageRepositoryBytes(); + + /** + * string image_tag = 3; + */ + java.lang.String getImageTag(); + /** + * string image_tag = 3; + */ + com.google.protobuf.ByteString + getImageTagBytes(); + + /** + * string container_id = 4; + */ + java.lang.String getContainerId(); + /** + * string container_id = 4; + */ + com.google.protobuf.ByteString + getContainerIdBytes(); + + /** + * string container_name = 5; + */ + java.lang.String getContainerName(); + /** + * string container_name = 5; + */ + com.google.protobuf.ByteString + getContainerNameBytes(); + } + /** + * Protobuf type {@code stackify.LogGroup.Container} + */ + public static final class Container extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:stackify.LogGroup.Container) + ContainerOrBuilder { + private static final long serialVersionUID = 0L; + // Use Container.newBuilder() to construct. + private Container(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Container() { + imageId_ = ""; + imageRepository_ = ""; + imageTag_ = ""; + containerId_ = ""; + containerName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Container(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Container( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + imageId_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + imageRepository_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + imageTag_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + containerId_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + containerName_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Container_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Container_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.stackify.api.common.proto.StackifyProto.LogGroup.Container.class, com.stackify.api.common.proto.StackifyProto.LogGroup.Container.Builder.class); + } + + public static final int IMAGE_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object imageId_; + /** + * string image_id = 1; + */ + public java.lang.String getImageId() { + java.lang.Object ref = imageId_; + 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(); + imageId_ = s; + return s; + } + } + /** + * string image_id = 1; + */ + public com.google.protobuf.ByteString + getImageIdBytes() { + java.lang.Object ref = imageId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + imageId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMAGE_REPOSITORY_FIELD_NUMBER = 2; + private volatile java.lang.Object imageRepository_; + /** + * string image_repository = 2; + */ + public java.lang.String getImageRepository() { + java.lang.Object ref = imageRepository_; + 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(); + imageRepository_ = s; + return s; + } + } + /** + * string image_repository = 2; + */ + public com.google.protobuf.ByteString + getImageRepositoryBytes() { + java.lang.Object ref = imageRepository_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + imageRepository_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMAGE_TAG_FIELD_NUMBER = 3; + private volatile java.lang.Object imageTag_; + /** + * string image_tag = 3; + */ + public java.lang.String getImageTag() { + java.lang.Object ref = imageTag_; + 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(); + imageTag_ = s; + return s; + } + } + /** + * string image_tag = 3; + */ + public com.google.protobuf.ByteString + getImageTagBytes() { + java.lang.Object ref = imageTag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + imageTag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTAINER_ID_FIELD_NUMBER = 4; + private volatile java.lang.Object containerId_; + /** + * string container_id = 4; + */ + public java.lang.String getContainerId() { + java.lang.Object ref = containerId_; + 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(); + containerId_ = s; + return s; + } + } + /** + * string container_id = 4; + */ + public com.google.protobuf.ByteString + getContainerIdBytes() { + java.lang.Object ref = containerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTAINER_NAME_FIELD_NUMBER = 5; + private volatile java.lang.Object containerName_; + /** + * string container_name = 5; + */ + public java.lang.String getContainerName() { + java.lang.Object ref = containerName_; + 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(); + containerName_ = s; + return s; + } + } + /** + * string container_name = 5; + */ + public com.google.protobuf.ByteString + getContainerNameBytes() { + java.lang.Object ref = containerName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getImageIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, imageId_); + } + if (!getImageRepositoryBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, imageRepository_); + } + if (!getImageTagBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, imageTag_); + } + if (!getContainerIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, containerId_); + } + if (!getContainerNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, containerName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getImageIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, imageId_); + } + if (!getImageRepositoryBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, imageRepository_); + } + if (!getImageTagBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, imageTag_); + } + if (!getContainerIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, containerId_); + } + if (!getContainerNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, containerName_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.stackify.api.common.proto.StackifyProto.LogGroup.Container)) { + return super.equals(obj); + } + com.stackify.api.common.proto.StackifyProto.LogGroup.Container other = (com.stackify.api.common.proto.StackifyProto.LogGroup.Container) obj; + + if (!getImageId() + .equals(other.getImageId())) return false; + if (!getImageRepository() + .equals(other.getImageRepository())) return false; + if (!getImageTag() + .equals(other.getImageTag())) return false; + if (!getContainerId() + .equals(other.getContainerId())) return false; + if (!getContainerName() + .equals(other.getContainerName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + IMAGE_ID_FIELD_NUMBER; + hash = (53 * hash) + getImageId().hashCode(); + hash = (37 * hash) + IMAGE_REPOSITORY_FIELD_NUMBER; + hash = (53 * hash) + getImageRepository().hashCode(); + hash = (37 * hash) + IMAGE_TAG_FIELD_NUMBER; + hash = (53 * hash) + getImageTag().hashCode(); + hash = (37 * hash) + CONTAINER_ID_FIELD_NUMBER; + hash = (53 * hash) + getContainerId().hashCode(); + hash = (37 * hash) + CONTAINER_NAME_FIELD_NUMBER; + hash = (53 * hash) + getContainerName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Container parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Container parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Container parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Container parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Container parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Container parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Container parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Container parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Container parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Container parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Container parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Container parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.stackify.api.common.proto.StackifyProto.LogGroup.Container prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code stackify.LogGroup.Container} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:stackify.LogGroup.Container) + com.stackify.api.common.proto.StackifyProto.LogGroup.ContainerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Container_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Container_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.stackify.api.common.proto.StackifyProto.LogGroup.Container.class, com.stackify.api.common.proto.StackifyProto.LogGroup.Container.Builder.class); + } + + // Construct using com.stackify.api.common.proto.StackifyProto.LogGroup.Container.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + imageId_ = ""; + + imageRepository_ = ""; + + imageTag_ = ""; + + containerId_ = ""; + + containerName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Container_descriptor; + } + + @java.lang.Override + public com.stackify.api.common.proto.StackifyProto.LogGroup.Container getDefaultInstanceForType() { + return com.stackify.api.common.proto.StackifyProto.LogGroup.Container.getDefaultInstance(); + } + + @java.lang.Override + public com.stackify.api.common.proto.StackifyProto.LogGroup.Container build() { + com.stackify.api.common.proto.StackifyProto.LogGroup.Container result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.stackify.api.common.proto.StackifyProto.LogGroup.Container buildPartial() { + com.stackify.api.common.proto.StackifyProto.LogGroup.Container result = new com.stackify.api.common.proto.StackifyProto.LogGroup.Container(this); + result.imageId_ = imageId_; + result.imageRepository_ = imageRepository_; + result.imageTag_ = imageTag_; + result.containerId_ = containerId_; + result.containerName_ = containerName_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.stackify.api.common.proto.StackifyProto.LogGroup.Container) { + return mergeFrom((com.stackify.api.common.proto.StackifyProto.LogGroup.Container)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.stackify.api.common.proto.StackifyProto.LogGroup.Container other) { + if (other == com.stackify.api.common.proto.StackifyProto.LogGroup.Container.getDefaultInstance()) return this; + if (!other.getImageId().isEmpty()) { + imageId_ = other.imageId_; + onChanged(); + } + if (!other.getImageRepository().isEmpty()) { + imageRepository_ = other.imageRepository_; + onChanged(); + } + if (!other.getImageTag().isEmpty()) { + imageTag_ = other.imageTag_; + onChanged(); + } + if (!other.getContainerId().isEmpty()) { + containerId_ = other.containerId_; + onChanged(); + } + if (!other.getContainerName().isEmpty()) { + containerName_ = other.containerName_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.stackify.api.common.proto.StackifyProto.LogGroup.Container parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.stackify.api.common.proto.StackifyProto.LogGroup.Container) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object imageId_ = ""; + /** + * string image_id = 1; + */ + public java.lang.String getImageId() { + java.lang.Object ref = imageId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string image_id = 1; + */ + public com.google.protobuf.ByteString + getImageIdBytes() { + java.lang.Object ref = imageId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + imageId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string image_id = 1; + */ + public Builder setImageId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + imageId_ = value; + onChanged(); + return this; + } + /** + * string image_id = 1; + */ + public Builder clearImageId() { + + imageId_ = getDefaultInstance().getImageId(); + onChanged(); + return this; + } + /** + * string image_id = 1; + */ + public Builder setImageIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + imageId_ = value; + onChanged(); + return this; + } + + private java.lang.Object imageRepository_ = ""; + /** + * string image_repository = 2; + */ + public java.lang.String getImageRepository() { + java.lang.Object ref = imageRepository_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageRepository_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string image_repository = 2; + */ + public com.google.protobuf.ByteString + getImageRepositoryBytes() { + java.lang.Object ref = imageRepository_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + imageRepository_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string image_repository = 2; + */ + public Builder setImageRepository( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + imageRepository_ = value; + onChanged(); + return this; + } + /** + * string image_repository = 2; + */ + public Builder clearImageRepository() { + + imageRepository_ = getDefaultInstance().getImageRepository(); + onChanged(); + return this; + } + /** + * string image_repository = 2; + */ + public Builder setImageRepositoryBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + imageRepository_ = value; + onChanged(); + return this; + } + + private java.lang.Object imageTag_ = ""; + /** + * string image_tag = 3; + */ + public java.lang.String getImageTag() { + java.lang.Object ref = imageTag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + imageTag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string image_tag = 3; + */ + public com.google.protobuf.ByteString + getImageTagBytes() { + java.lang.Object ref = imageTag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + imageTag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string image_tag = 3; + */ + public Builder setImageTag( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + imageTag_ = value; + onChanged(); + return this; + } + /** + * string image_tag = 3; + */ + public Builder clearImageTag() { + + imageTag_ = getDefaultInstance().getImageTag(); + onChanged(); + return this; + } + /** + * string image_tag = 3; + */ + public Builder setImageTagBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + imageTag_ = value; + onChanged(); + return this; + } + + private java.lang.Object containerId_ = ""; + /** + * string container_id = 4; + */ + public java.lang.String getContainerId() { + java.lang.Object ref = containerId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + containerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string container_id = 4; + */ + public com.google.protobuf.ByteString + getContainerIdBytes() { + java.lang.Object ref = containerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string container_id = 4; + */ + public Builder setContainerId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + containerId_ = value; + onChanged(); + return this; + } + /** + * string container_id = 4; + */ + public Builder clearContainerId() { + + containerId_ = getDefaultInstance().getContainerId(); + onChanged(); + return this; + } + /** + * string container_id = 4; + */ + public Builder setContainerIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + containerId_ = value; + onChanged(); + return this; + } + + private java.lang.Object containerName_ = ""; + /** + * string container_name = 5; + */ + public java.lang.String getContainerName() { + java.lang.Object ref = containerName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + containerName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string container_name = 5; + */ + public com.google.protobuf.ByteString + getContainerNameBytes() { + java.lang.Object ref = containerName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + containerName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string container_name = 5; + */ + public Builder setContainerName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + containerName_ = value; + onChanged(); + return this; + } + /** + * string container_name = 5; + */ + public Builder clearContainerName() { + + containerName_ = getDefaultInstance().getContainerName(); + onChanged(); + return this; + } + /** + * string container_name = 5; + */ + public Builder setContainerNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + containerName_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:stackify.LogGroup.Container) + } + + // @@protoc_insertion_point(class_scope:stackify.LogGroup.Container) + private static final com.stackify.api.common.proto.StackifyProto.LogGroup.Container DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.stackify.api.common.proto.StackifyProto.LogGroup.Container(); + } + + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Container getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Container parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Container(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.stackify.api.common.proto.StackifyProto.LogGroup.Container getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface KubernetesOrBuilder extends + // @@protoc_insertion_point(interface_extends:stackify.LogGroup.Kubernetes) + com.google.protobuf.MessageOrBuilder { + + /** + * string pod_name = 1; + */ + java.lang.String getPodName(); + /** + * string pod_name = 1; + */ + com.google.protobuf.ByteString + getPodNameBytes(); + + /** + * string pod_namespace = 2; + */ + java.lang.String getPodNamespace(); + /** + * string pod_namespace = 2; + */ + com.google.protobuf.ByteString + getPodNamespaceBytes(); + + /** + * string cluster_name = 3; + */ + java.lang.String getClusterName(); + /** + * string cluster_name = 3; + */ + com.google.protobuf.ByteString + getClusterNameBytes(); + } + /** + * Protobuf type {@code stackify.LogGroup.Kubernetes} + */ + public static final class Kubernetes extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:stackify.LogGroup.Kubernetes) + KubernetesOrBuilder { + private static final long serialVersionUID = 0L; + // Use Kubernetes.newBuilder() to construct. + private Kubernetes(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Kubernetes() { + podName_ = ""; + podNamespace_ = ""; + clusterName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Kubernetes(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Kubernetes( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + podName_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + podNamespace_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + clusterName_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Kubernetes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Kubernetes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes.class, com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes.Builder.class); + } + + public static final int POD_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object podName_; + /** + * string pod_name = 1; + */ + public java.lang.String getPodName() { + java.lang.Object ref = podName_; + 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(); + podName_ = s; + return s; + } + } + /** + * string pod_name = 1; + */ + public com.google.protobuf.ByteString + getPodNameBytes() { + java.lang.Object ref = podName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + podName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POD_NAMESPACE_FIELD_NUMBER = 2; + private volatile java.lang.Object podNamespace_; + /** + * string pod_namespace = 2; + */ + public java.lang.String getPodNamespace() { + java.lang.Object ref = podNamespace_; + 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(); + podNamespace_ = s; + return s; + } + } + /** + * string pod_namespace = 2; + */ + public com.google.protobuf.ByteString + getPodNamespaceBytes() { + java.lang.Object ref = podNamespace_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + podNamespace_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLUSTER_NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object clusterName_; + /** + * string cluster_name = 3; + */ + public java.lang.String getClusterName() { + java.lang.Object ref = clusterName_; + 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(); + clusterName_ = s; + return s; + } + } + /** + * string cluster_name = 3; + */ + public com.google.protobuf.ByteString + getClusterNameBytes() { + java.lang.Object ref = clusterName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + clusterName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getPodNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, podName_); + } + if (!getPodNamespaceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, podNamespace_); + } + if (!getClusterNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, clusterName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getPodNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, podName_); + } + if (!getPodNamespaceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, podNamespace_); + } + if (!getClusterNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, clusterName_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes)) { + return super.equals(obj); + } + com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes other = (com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes) obj; + + if (!getPodName() + .equals(other.getPodName())) return false; + if (!getPodNamespace() + .equals(other.getPodNamespace())) return false; + if (!getClusterName() + .equals(other.getClusterName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + POD_NAME_FIELD_NUMBER; + hash = (53 * hash) + getPodName().hashCode(); + hash = (37 * hash) + POD_NAMESPACE_FIELD_NUMBER; + hash = (53 * hash) + getPodNamespace().hashCode(); + hash = (37 * hash) + CLUSTER_NAME_FIELD_NUMBER; + hash = (53 * hash) + getClusterName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code stackify.LogGroup.Kubernetes} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:stackify.LogGroup.Kubernetes) + com.stackify.api.common.proto.StackifyProto.LogGroup.KubernetesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Kubernetes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Kubernetes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes.class, com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes.Builder.class); + } + + // Construct using com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + podName_ = ""; + + podNamespace_ = ""; + + clusterName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Kubernetes_descriptor; + } + + @java.lang.Override + public com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes getDefaultInstanceForType() { + return com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes.getDefaultInstance(); + } + + @java.lang.Override + public com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes build() { + com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes buildPartial() { + com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes result = new com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes(this); + result.podName_ = podName_; + result.podNamespace_ = podNamespace_; + result.clusterName_ = clusterName_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes) { + return mergeFrom((com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes other) { + if (other == com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes.getDefaultInstance()) return this; + if (!other.getPodName().isEmpty()) { + podName_ = other.podName_; + onChanged(); + } + if (!other.getPodNamespace().isEmpty()) { + podNamespace_ = other.podNamespace_; + onChanged(); + } + if (!other.getClusterName().isEmpty()) { + clusterName_ = other.clusterName_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object podName_ = ""; + /** + * string pod_name = 1; + */ + public java.lang.String getPodName() { + java.lang.Object ref = podName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + podName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string pod_name = 1; + */ + public com.google.protobuf.ByteString + getPodNameBytes() { + java.lang.Object ref = podName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + podName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string pod_name = 1; + */ + public Builder setPodName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + podName_ = value; + onChanged(); + return this; + } + /** + * string pod_name = 1; + */ + public Builder clearPodName() { + + podName_ = getDefaultInstance().getPodName(); + onChanged(); + return this; + } + /** + * string pod_name = 1; + */ + public Builder setPodNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + podName_ = value; + onChanged(); + return this; + } + + private java.lang.Object podNamespace_ = ""; + /** + * string pod_namespace = 2; + */ + public java.lang.String getPodNamespace() { + java.lang.Object ref = podNamespace_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + podNamespace_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string pod_namespace = 2; + */ + public com.google.protobuf.ByteString + getPodNamespaceBytes() { + java.lang.Object ref = podNamespace_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + podNamespace_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string pod_namespace = 2; + */ + public Builder setPodNamespace( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + podNamespace_ = value; + onChanged(); + return this; + } + /** + * string pod_namespace = 2; + */ + public Builder clearPodNamespace() { + + podNamespace_ = getDefaultInstance().getPodNamespace(); + onChanged(); + return this; + } + /** + * string pod_namespace = 2; + */ + public Builder setPodNamespaceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + podNamespace_ = value; + onChanged(); + return this; + } + + private java.lang.Object clusterName_ = ""; + /** + * string cluster_name = 3; + */ + public java.lang.String getClusterName() { + java.lang.Object ref = clusterName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + clusterName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string cluster_name = 3; + */ + public com.google.protobuf.ByteString + getClusterNameBytes() { + java.lang.Object ref = clusterName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + clusterName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string cluster_name = 3; + */ + public Builder setClusterName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + clusterName_ = value; + onChanged(); + return this; + } + /** + * string cluster_name = 3; + */ + public Builder clearClusterName() { + + clusterName_ = getDefaultInstance().getClusterName(); + onChanged(); + return this; + } + /** + * string cluster_name = 3; + */ + public Builder setClusterNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + clusterName_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:stackify.LogGroup.Kubernetes) + } + + // @@protoc_insertion_point(class_scope:stackify.LogGroup.Kubernetes) + private static final com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes(); + } + + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Kubernetes parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Kubernetes(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface LogOrBuilder extends + // @@protoc_insertion_point(interface_extends:stackify.LogGroup.Log) + com.google.protobuf.MessageOrBuilder { + + /** + *
+             * REQUIRED The log message. Example: "Example debug message"
+             * 
+ * + * string message = 1; + */ + java.lang.String getMessage(); + /** + *
+             * REQUIRED The log message. Example: "Example debug message"
+             * 
+ * + * string message = 1; + */ + com.google.protobuf.ByteString + getMessageBytes(); + + /** + *
+             * Optional. Additional JSON metadata about the log event. Special characters need to be escaped. Example: "{"Key1":"Value1","Key2":"Value2"}"
+             * 
+ * + * string data = 2; + */ + java.lang.String getData(); + /** + *
+             * Optional. Additional JSON metadata about the log event. Special characters need to be escaped. Example: "{"Key1":"Value1","Key2":"Value2"}"
+             * 
+ * + * string data = 2; + */ + com.google.protobuf.ByteString + getDataBytes(); + + /** + *
+             * Optional. The thread name. Example: "main"
+             * 
+ * + * string thread_name = 3; + */ + java.lang.String getThreadName(); + /** + *
+             * Optional. The thread name. Example: "main"
+             * 
+ * + * string thread_name = 3; + */ + com.google.protobuf.ByteString + getThreadNameBytes(); + + /** + *
+             * REQUIRED Unix/POSIX/Epoch time with millisecond precision. Example: 1417535434194
+             * 
+ * + * int64 date_millis = 4; + */ + long getDateMillis(); + + /** + *
+             * REQUIRED The log level. Example: "debug"
+             * 
+ * + * string level = 5; + */ + java.lang.String getLevel(); + /** + *
+             * REQUIRED The log level. Example: "debug"
+             * 
+ * + * string level = 5; + */ + com.google.protobuf.ByteString + getLevelBytes(); + + /** + *
+             * Optional. Transaction identifier. Example: "c06570b2-ba9d-40be-8078-1394cf331159"
+             * 
+ * + * string transaction_id = 6; + */ + java.lang.String getTransactionId(); + /** + *
+             * Optional. Transaction identifier. Example: "c06570b2-ba9d-40be-8078-1394cf331159"
+             * 
+ * + * string transaction_id = 6; + */ + com.google.protobuf.ByteString + getTransactionIdBytes(); + + /** + *
+             * Optional. Fully qualified method name. Example: "com.stackify.error.test.StackifyErrorAppenderTest.main"
+             * 
+ * + * string source_method = 7; + */ + java.lang.String getSourceMethod(); + /** + *
+             * Optional. Fully qualified method name. Example: "com.stackify.error.test.StackifyErrorAppenderTest.main"
+             * 
+ * + * string source_method = 7; + */ + com.google.protobuf.ByteString + getSourceMethodBytes(); + + /** + *
+             * Optional. Line number. Example: 57
+             * 
+ * + * int32 source_line = 8; + */ + int getSourceLine(); + + /** + *
+             * Optional. Used for linking traces w/ log messages.
+             * 
+ * + * string id = 9; + */ + java.lang.String getId(); + /** + *
+             * Optional. Used for linking traces w/ log messages.
+             * 
+ * + * string id = 9; + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + *
+             * Optional.
+             * 
+ * + * repeated string tags = 10; + */ + java.util.List + getTagsList(); + /** + *
+             * Optional.
+             * 
+ * + * repeated string tags = 10; + */ + int getTagsCount(); + /** + *
+             * Optional.
+             * 
+ * + * repeated string tags = 10; + */ + java.lang.String getTags(int index); + /** + *
+             * Optional.
+             * 
+ * + * repeated string tags = 10; + */ + com.google.protobuf.ByteString + getTagsBytes(int index); + + /** + *
+             * Optional. Exception details.
+             * 
+ * + * .stackify.LogGroup.Log.Error error = 11; + */ + boolean hasError(); + /** + *
+             * Optional. Exception details.
+             * 
+ * + * .stackify.LogGroup.Log.Error error = 11; + */ + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error getError(); + /** + *
+             * Optional. Exception details.
+             * 
+ * + * .stackify.LogGroup.Log.Error error = 11; + */ + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.ErrorOrBuilder getErrorOrBuilder(); + } + /** + * Protobuf type {@code stackify.LogGroup.Log} + */ + public static final class Log extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:stackify.LogGroup.Log) + LogOrBuilder { + private static final long serialVersionUID = 0L; + // Use Log.newBuilder() to construct. + private Log(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Log() { + message_ = ""; + data_ = ""; + threadName_ = ""; + level_ = ""; + transactionId_ = ""; + sourceMethod_ = ""; + id_ = ""; + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Log(); + } + + @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 { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + message_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + data_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + threadName_ = s; + break; + } + case 32: { + + dateMillis_ = input.readInt64(); + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + level_ = s; + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + transactionId_ = s; + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + + sourceMethod_ = s; + break; + } + case 64: { + + sourceLine_ = input.readInt32(); + break; + } + case 74: { + java.lang.String s = input.readStringRequireUtf8(); + + id_ = s; + break; + } + case 82: { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + tags_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + tags_.add(s); + break; + } + case 90: { + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.Builder subBuilder = null; + if (error_ != null) { + subBuilder = error_.toBuilder(); + } + error_ = input.readMessage(com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(error_); + error_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + tags_ = tags_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Log_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Log_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.class, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Builder.class); + } + + public interface ErrorOrBuilder extends + // @@protoc_insertion_point(interface_extends:stackify.LogGroup.Log.Error) + com.google.protobuf.MessageOrBuilder { + + /** + *
+                 * Device, application and environment details.
+                 * 
+ * + * .stackify.LogGroup.Log.Error.EnvironmentDetail environment_detail = 1; + */ + boolean hasEnvironmentDetail(); + /** + *
+                 * Device, application and environment details.
+                 * 
+ * + * .stackify.LogGroup.Log.Error.EnvironmentDetail environment_detail = 1; + */ + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail getEnvironmentDetail(); + /** + *
+                 * Device, application and environment details.
+                 * 
+ * + * .stackify.LogGroup.Log.Error.EnvironmentDetail environment_detail = 1; + */ + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetailOrBuilder getEnvironmentDetailOrBuilder(); + + /** + *
+                 * Unix/POSIX/Epoch time with millisecond precision. Example: 1417535434194
+                 * 
+ * + * int64 date_millis = 2; + */ + long getDateMillis(); + + /** + *
+                 * Exception details.
+                 * 
+ * + * .stackify.LogGroup.Log.Error.ErrorItem error_item = 3; + */ + boolean hasErrorItem(); + /** + *
+                 * Exception details.
+                 * 
+ * + * .stackify.LogGroup.Log.Error.ErrorItem error_item = 3; + */ + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem getErrorItem(); + /** + *
+                 * Exception details.
+                 * 
+ * + * .stackify.LogGroup.Log.Error.ErrorItem error_item = 3; + */ + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItemOrBuilder getErrorItemOrBuilder(); + + /** + *
+                 * Optional. Web request details.
+                 * 
+ * + * .stackify.LogGroup.Log.Error.WebRequestDetail web_request_detail = 4; + */ + boolean hasWebRequestDetail(); + /** + *
+                 * Optional. Web request details.
+                 * 
+ * + * .stackify.LogGroup.Log.Error.WebRequestDetail web_request_detail = 4; + */ + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail getWebRequestDetail(); + /** + *
+                 * Optional. Web request details.
+                 * 
+ * + * .stackify.LogGroup.Log.Error.WebRequestDetail web_request_detail = 4; + */ + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetailOrBuilder getWebRequestDetailOrBuilder(); + + /** + *
+                 * Optional. Server data name/value pairs.  Example: {"java.runtime.name": "OpenJDK Runtime Environment", "os.name": "Linux", "user.timezone": "UTC", "java.vendor": "Oracle Corporation"}
+                 * 
+ * + * map<string, string> server_variables = 5; + */ + int getServerVariablesCount(); + /** + *
+                 * Optional. Server data name/value pairs.  Example: {"java.runtime.name": "OpenJDK Runtime Environment", "os.name": "Linux", "user.timezone": "UTC", "java.vendor": "Oracle Corporation"}
+                 * 
+ * + * map<string, string> server_variables = 5; + */ + boolean containsServerVariables( + java.lang.String key); + /** + * Use {@link #getServerVariablesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getServerVariables(); + /** + *
+                 * Optional. Server data name/value pairs.  Example: {"java.runtime.name": "OpenJDK Runtime Environment", "os.name": "Linux", "user.timezone": "UTC", "java.vendor": "Oracle Corporation"}
+                 * 
+ * + * map<string, string> server_variables = 5; + */ + java.util.Map + getServerVariablesMap(); + /** + *
+                 * Optional. Server data name/value pairs.  Example: {"java.runtime.name": "OpenJDK Runtime Environment", "os.name": "Linux", "user.timezone": "UTC", "java.vendor": "Oracle Corporation"}
+                 * 
+ * + * map<string, string> server_variables = 5; + */ + + java.lang.String getServerVariablesOrDefault( + java.lang.String key, + java.lang.String defaultValue); + /** + *
+                 * Optional. Server data name/value pairs.  Example: {"java.runtime.name": "OpenJDK Runtime Environment", "os.name": "Linux", "user.timezone": "UTC", "java.vendor": "Oracle Corporation"}
+                 * 
+ * + * map<string, string> server_variables = 5; + */ + + java.lang.String getServerVariablesOrThrow( + java.lang.String key); + + /** + *
+                 * Optional. Customer/client name. Example: "Stackify"
+                 * 
+ * + * string customer_name = 6; + */ + java.lang.String getCustomerName(); + /** + *
+                 * Optional. Customer/client name. Example: "Stackify"
+                 * 
+ * + * string customer_name = 6; + */ + com.google.protobuf.ByteString + getCustomerNameBytes(); + + /** + *
+                 * Optional. User name. Example: "test-user@stackify.com
+                 * 
+ * + * string username = 7; + */ + java.lang.String getUsername(); + /** + *
+                 * Optional. User name. Example: "test-user@stackify.com
+                 * 
+ * + * string username = 7; + */ + com.google.protobuf.ByteString + getUsernameBytes(); + } + /** + * Protobuf type {@code stackify.LogGroup.Log.Error} + */ + public static final class Error extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:stackify.LogGroup.Log.Error) + ErrorOrBuilder { + private static final long serialVersionUID = 0L; + // Use Error.newBuilder() to construct. + private Error(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Error() { + customerName_ = ""; + username_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Error(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Error( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail.Builder subBuilder = null; + if (environmentDetail_ != null) { + subBuilder = environmentDetail_.toBuilder(); + } + environmentDetail_ = input.readMessage(com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(environmentDetail_); + environmentDetail_ = subBuilder.buildPartial(); + } + + break; + } + case 16: { + + dateMillis_ = input.readInt64(); + break; + } + case 26: { + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.Builder subBuilder = null; + if (errorItem_ != null) { + subBuilder = errorItem_.toBuilder(); + } + errorItem_ = input.readMessage(com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(errorItem_); + errorItem_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail.Builder subBuilder = null; + if (webRequestDetail_ != null) { + subBuilder = webRequestDetail_.toBuilder(); + } + webRequestDetail_ = input.readMessage(com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(webRequestDetail_); + webRequestDetail_ = subBuilder.buildPartial(); + } + + break; + } + case 42: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + serverVariables_ = com.google.protobuf.MapField.newMapField( + ServerVariablesDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + serverVariables__ = input.readMessage( + ServerVariablesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + serverVariables_.getMutableMap().put( + serverVariables__.getKey(), serverVariables__.getValue()); + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + customerName_ = s; + break; + } + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + + username_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Log_Error_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 5: + return internalGetServerVariables(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Log_Error_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.class, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.Builder.class); + } + + public interface EnvironmentDetailOrBuilder extends + // @@protoc_insertion_point(interface_extends:stackify.LogGroup.Log.Error.EnvironmentDetail) + com.google.protobuf.MessageOrBuilder { + + /** + *
+                     * REQUIRED. The name of the device.  Example: "PROD-RS-Debian-7"
+                     * 
+ * + * string device_name = 1; + */ + java.lang.String getDeviceName(); + /** + *
+                     * REQUIRED. The name of the device.  Example: "PROD-RS-Debian-7"
+                     * 
+ * + * string device_name = 1; + */ + com.google.protobuf.ByteString + getDeviceNameBytes(); + + /** + *
+                     * REQUIRED. The name of the application. Example: "stackify-agent"
+                     * 
+ * + * string application_name = 2; + */ + java.lang.String getApplicationName(); + /** + *
+                     * REQUIRED. The name of the application. Example: "stackify-agent"
+                     * 
+ * + * string application_name = 2; + */ + com.google.protobuf.ByteString + getApplicationNameBytes(); + + /** + *
+                     * Optional. The full directory path for the application. Example: "/usr/local/stackify/stackify-agent"
+                     * 
+ * + * string application_location = 3; + */ + java.lang.String getApplicationLocation(); + /** + *
+                     * Optional. The full directory path for the application. Example: "/usr/local/stackify/stackify-agent"
+                     * 
+ * + * string application_location = 3; + */ + com.google.protobuf.ByteString + getApplicationLocationBytes(); + + /** + *
+                     * Optional. The name of the application. This overrides the AppName field. Example: "my-stackify-agent"
+                     * 
+ * + * string configured_application_name = 4; + */ + java.lang.String getConfiguredApplicationName(); + /** + *
+                     * Optional. The name of the application. This overrides the AppName field. Example: "my-stackify-agent"
+                     * 
+ * + * string configured_application_name = 4; + */ + com.google.protobuf.ByteString + getConfiguredApplicationNameBytes(); + + /** + *
+                     * Optional. The environment name. If the device is monitored by Stackify, we will use the environment associated to the device. If the device is not monitored by Stackify, this should be specified. Example: "Prod"
+                     * 
+ * + * string configured_environment_name = 5; + */ + java.lang.String getConfiguredEnvironmentName(); + /** + *
+                     * Optional. The environment name. If the device is monitored by Stackify, we will use the environment associated to the device. If the device is not monitored by Stackify, this should be specified. Example: "Prod"
+                     * 
+ * + * string configured_environment_name = 5; + */ + com.google.protobuf.ByteString + getConfiguredEnvironmentNameBytes(); + } + /** + * Protobuf type {@code stackify.LogGroup.Log.Error.EnvironmentDetail} + */ + public static final class EnvironmentDetail extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:stackify.LogGroup.Log.Error.EnvironmentDetail) + EnvironmentDetailOrBuilder { + private static final long serialVersionUID = 0L; + // Use EnvironmentDetail.newBuilder() to construct. + private EnvironmentDetail(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private EnvironmentDetail() { + deviceName_ = ""; + applicationName_ = ""; + applicationLocation_ = ""; + configuredApplicationName_ = ""; + configuredEnvironmentName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new EnvironmentDetail(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private EnvironmentDetail( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + deviceName_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + applicationName_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + applicationLocation_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + configuredApplicationName_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + configuredEnvironmentName_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Log_Error_EnvironmentDetail_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Log_Error_EnvironmentDetail_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail.class, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail.Builder.class); + } + + public static final int DEVICE_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object deviceName_; + /** + *
+                     * REQUIRED. The name of the device.  Example: "PROD-RS-Debian-7"
+                     * 
+ * + * string device_name = 1; + */ + public java.lang.String getDeviceName() { + java.lang.Object ref = deviceName_; + 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(); + deviceName_ = s; + return s; + } + } + /** + *
+                     * REQUIRED. The name of the device.  Example: "PROD-RS-Debian-7"
+                     * 
+ * + * string device_name = 1; + */ + public com.google.protobuf.ByteString + getDeviceNameBytes() { + java.lang.Object ref = deviceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + deviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int APPLICATION_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object applicationName_; + /** + *
+                     * REQUIRED. The name of the application. Example: "stackify-agent"
+                     * 
+ * + * string application_name = 2; + */ + public java.lang.String getApplicationName() { + java.lang.Object ref = applicationName_; + 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(); + applicationName_ = s; + return s; + } + } + /** + *
+                     * REQUIRED. The name of the application. Example: "stackify-agent"
+                     * 
+ * + * string application_name = 2; + */ + public com.google.protobuf.ByteString + getApplicationNameBytes() { + java.lang.Object ref = applicationName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + applicationName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int APPLICATION_LOCATION_FIELD_NUMBER = 3; + private volatile java.lang.Object applicationLocation_; + /** + *
+                     * Optional. The full directory path for the application. Example: "/usr/local/stackify/stackify-agent"
+                     * 
+ * + * string application_location = 3; + */ + public java.lang.String getApplicationLocation() { + java.lang.Object ref = applicationLocation_; + 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(); + applicationLocation_ = s; + return s; + } + } + /** + *
+                     * Optional. The full directory path for the application. Example: "/usr/local/stackify/stackify-agent"
+                     * 
+ * + * string application_location = 3; + */ + public com.google.protobuf.ByteString + getApplicationLocationBytes() { + java.lang.Object ref = applicationLocation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + applicationLocation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONFIGURED_APPLICATION_NAME_FIELD_NUMBER = 4; + private volatile java.lang.Object configuredApplicationName_; + /** + *
+                     * Optional. The name of the application. This overrides the AppName field. Example: "my-stackify-agent"
+                     * 
+ * + * string configured_application_name = 4; + */ + public java.lang.String getConfiguredApplicationName() { + java.lang.Object ref = configuredApplicationName_; + 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(); + configuredApplicationName_ = s; + return s; + } + } + /** + *
+                     * Optional. The name of the application. This overrides the AppName field. Example: "my-stackify-agent"
+                     * 
+ * + * string configured_application_name = 4; + */ + public com.google.protobuf.ByteString + getConfiguredApplicationNameBytes() { + java.lang.Object ref = configuredApplicationName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + configuredApplicationName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONFIGURED_ENVIRONMENT_NAME_FIELD_NUMBER = 5; + private volatile java.lang.Object configuredEnvironmentName_; + /** + *
+                     * Optional. The environment name. If the device is monitored by Stackify, we will use the environment associated to the device. If the device is not monitored by Stackify, this should be specified. Example: "Prod"
+                     * 
+ * + * string configured_environment_name = 5; + */ + public java.lang.String getConfiguredEnvironmentName() { + java.lang.Object ref = configuredEnvironmentName_; + 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(); + configuredEnvironmentName_ = s; + return s; + } + } + /** + *
+                     * Optional. The environment name. If the device is monitored by Stackify, we will use the environment associated to the device. If the device is not monitored by Stackify, this should be specified. Example: "Prod"
+                     * 
+ * + * string configured_environment_name = 5; + */ + public com.google.protobuf.ByteString + getConfiguredEnvironmentNameBytes() { + java.lang.Object ref = configuredEnvironmentName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + configuredEnvironmentName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getDeviceNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, deviceName_); + } + if (!getApplicationNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, applicationName_); + } + if (!getApplicationLocationBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, applicationLocation_); + } + if (!getConfiguredApplicationNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, configuredApplicationName_); + } + if (!getConfiguredEnvironmentNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, configuredEnvironmentName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDeviceNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, deviceName_); + } + if (!getApplicationNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, applicationName_); + } + if (!getApplicationLocationBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, applicationLocation_); + } + if (!getConfiguredApplicationNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, configuredApplicationName_); + } + if (!getConfiguredEnvironmentNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, configuredEnvironmentName_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail)) { + return super.equals(obj); + } + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail other = (com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail) obj; + + if (!getDeviceName() + .equals(other.getDeviceName())) return false; + if (!getApplicationName() + .equals(other.getApplicationName())) return false; + if (!getApplicationLocation() + .equals(other.getApplicationLocation())) return false; + if (!getConfiguredApplicationName() + .equals(other.getConfiguredApplicationName())) return false; + if (!getConfiguredEnvironmentName() + .equals(other.getConfiguredEnvironmentName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DEVICE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDeviceName().hashCode(); + hash = (37 * hash) + APPLICATION_NAME_FIELD_NUMBER; + hash = (53 * hash) + getApplicationName().hashCode(); + hash = (37 * hash) + APPLICATION_LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getApplicationLocation().hashCode(); + hash = (37 * hash) + CONFIGURED_APPLICATION_NAME_FIELD_NUMBER; + hash = (53 * hash) + getConfiguredApplicationName().hashCode(); + hash = (37 * hash) + CONFIGURED_ENVIRONMENT_NAME_FIELD_NUMBER; + hash = (53 * hash) + getConfiguredEnvironmentName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code stackify.LogGroup.Log.Error.EnvironmentDetail} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:stackify.LogGroup.Log.Error.EnvironmentDetail) + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetailOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Log_Error_EnvironmentDetail_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Log_Error_EnvironmentDetail_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail.class, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail.Builder.class); + } + + // Construct using com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + deviceName_ = ""; + + applicationName_ = ""; + + applicationLocation_ = ""; + + configuredApplicationName_ = ""; + + configuredEnvironmentName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Log_Error_EnvironmentDetail_descriptor; + } + + @java.lang.Override + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail getDefaultInstanceForType() { + return com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail.getDefaultInstance(); + } + + @java.lang.Override + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail build() { + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail buildPartial() { + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail result = new com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail(this); + result.deviceName_ = deviceName_; + result.applicationName_ = applicationName_; + result.applicationLocation_ = applicationLocation_; + result.configuredApplicationName_ = configuredApplicationName_; + result.configuredEnvironmentName_ = configuredEnvironmentName_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail) { + return mergeFrom((com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail other) { + if (other == com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail.getDefaultInstance()) return this; + if (!other.getDeviceName().isEmpty()) { + deviceName_ = other.deviceName_; + onChanged(); + } + if (!other.getApplicationName().isEmpty()) { + applicationName_ = other.applicationName_; + onChanged(); + } + if (!other.getApplicationLocation().isEmpty()) { + applicationLocation_ = other.applicationLocation_; + onChanged(); + } + if (!other.getConfiguredApplicationName().isEmpty()) { + configuredApplicationName_ = other.configuredApplicationName_; + onChanged(); + } + if (!other.getConfiguredEnvironmentName().isEmpty()) { + configuredEnvironmentName_ = other.configuredEnvironmentName_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object deviceName_ = ""; + /** + *
+                         * REQUIRED. The name of the device.  Example: "PROD-RS-Debian-7"
+                         * 
+ * + * string device_name = 1; + */ + public java.lang.String getDeviceName() { + java.lang.Object ref = deviceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + deviceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+                         * REQUIRED. The name of the device.  Example: "PROD-RS-Debian-7"
+                         * 
+ * + * string device_name = 1; + */ + public com.google.protobuf.ByteString + getDeviceNameBytes() { + java.lang.Object ref = deviceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + deviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+                         * REQUIRED. The name of the device.  Example: "PROD-RS-Debian-7"
+                         * 
+ * + * string device_name = 1; + */ + public Builder setDeviceName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + deviceName_ = value; + onChanged(); + return this; + } + /** + *
+                         * REQUIRED. The name of the device.  Example: "PROD-RS-Debian-7"
+                         * 
+ * + * string device_name = 1; + */ + public Builder clearDeviceName() { + + deviceName_ = getDefaultInstance().getDeviceName(); + onChanged(); + return this; + } + /** + *
+                         * REQUIRED. The name of the device.  Example: "PROD-RS-Debian-7"
+                         * 
+ * + * string device_name = 1; + */ + public Builder setDeviceNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + deviceName_ = value; + onChanged(); + return this; + } + + private java.lang.Object applicationName_ = ""; + /** + *
+                         * REQUIRED. The name of the application. Example: "stackify-agent"
+                         * 
+ * + * string application_name = 2; + */ + public java.lang.String getApplicationName() { + java.lang.Object ref = applicationName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + applicationName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+                         * REQUIRED. The name of the application. Example: "stackify-agent"
+                         * 
+ * + * string application_name = 2; + */ + public com.google.protobuf.ByteString + getApplicationNameBytes() { + java.lang.Object ref = applicationName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + applicationName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+                         * REQUIRED. The name of the application. Example: "stackify-agent"
+                         * 
+ * + * string application_name = 2; + */ + public Builder setApplicationName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + applicationName_ = value; + onChanged(); + return this; + } + /** + *
+                         * REQUIRED. The name of the application. Example: "stackify-agent"
+                         * 
+ * + * string application_name = 2; + */ + public Builder clearApplicationName() { + + applicationName_ = getDefaultInstance().getApplicationName(); + onChanged(); + return this; + } + /** + *
+                         * REQUIRED. The name of the application. Example: "stackify-agent"
+                         * 
+ * + * string application_name = 2; + */ + public Builder setApplicationNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + applicationName_ = value; + onChanged(); + return this; + } + + private java.lang.Object applicationLocation_ = ""; + /** + *
+                         * Optional. The full directory path for the application. Example: "/usr/local/stackify/stackify-agent"
+                         * 
+ * + * string application_location = 3; + */ + public java.lang.String getApplicationLocation() { + java.lang.Object ref = applicationLocation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + applicationLocation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+                         * Optional. The full directory path for the application. Example: "/usr/local/stackify/stackify-agent"
+                         * 
+ * + * string application_location = 3; + */ + public com.google.protobuf.ByteString + getApplicationLocationBytes() { + java.lang.Object ref = applicationLocation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + applicationLocation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+                         * Optional. The full directory path for the application. Example: "/usr/local/stackify/stackify-agent"
+                         * 
+ * + * string application_location = 3; + */ + public Builder setApplicationLocation( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + applicationLocation_ = value; + onChanged(); + return this; + } + /** + *
+                         * Optional. The full directory path for the application. Example: "/usr/local/stackify/stackify-agent"
+                         * 
+ * + * string application_location = 3; + */ + public Builder clearApplicationLocation() { + + applicationLocation_ = getDefaultInstance().getApplicationLocation(); + onChanged(); + return this; + } + /** + *
+                         * Optional. The full directory path for the application. Example: "/usr/local/stackify/stackify-agent"
+                         * 
+ * + * string application_location = 3; + */ + public Builder setApplicationLocationBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + applicationLocation_ = value; + onChanged(); + return this; + } + + private java.lang.Object configuredApplicationName_ = ""; + /** + *
+                         * Optional. The name of the application. This overrides the AppName field. Example: "my-stackify-agent"
+                         * 
+ * + * string configured_application_name = 4; + */ + public java.lang.String getConfiguredApplicationName() { + java.lang.Object ref = configuredApplicationName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + configuredApplicationName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+                         * Optional. The name of the application. This overrides the AppName field. Example: "my-stackify-agent"
+                         * 
+ * + * string configured_application_name = 4; + */ + public com.google.protobuf.ByteString + getConfiguredApplicationNameBytes() { + java.lang.Object ref = configuredApplicationName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + configuredApplicationName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+                         * Optional. The name of the application. This overrides the AppName field. Example: "my-stackify-agent"
+                         * 
+ * + * string configured_application_name = 4; + */ + public Builder setConfiguredApplicationName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + configuredApplicationName_ = value; + onChanged(); + return this; + } + /** + *
+                         * Optional. The name of the application. This overrides the AppName field. Example: "my-stackify-agent"
+                         * 
+ * + * string configured_application_name = 4; + */ + public Builder clearConfiguredApplicationName() { + + configuredApplicationName_ = getDefaultInstance().getConfiguredApplicationName(); + onChanged(); + return this; + } + /** + *
+                         * Optional. The name of the application. This overrides the AppName field. Example: "my-stackify-agent"
+                         * 
+ * + * string configured_application_name = 4; + */ + public Builder setConfiguredApplicationNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + configuredApplicationName_ = value; + onChanged(); + return this; + } + + private java.lang.Object configuredEnvironmentName_ = ""; + /** + *
+                         * Optional. The environment name. If the device is monitored by Stackify, we will use the environment associated to the device. If the device is not monitored by Stackify, this should be specified. Example: "Prod"
+                         * 
+ * + * string configured_environment_name = 5; + */ + public java.lang.String getConfiguredEnvironmentName() { + java.lang.Object ref = configuredEnvironmentName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + configuredEnvironmentName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+                         * Optional. The environment name. If the device is monitored by Stackify, we will use the environment associated to the device. If the device is not monitored by Stackify, this should be specified. Example: "Prod"
+                         * 
+ * + * string configured_environment_name = 5; + */ + public com.google.protobuf.ByteString + getConfiguredEnvironmentNameBytes() { + java.lang.Object ref = configuredEnvironmentName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + configuredEnvironmentName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+                         * Optional. The environment name. If the device is monitored by Stackify, we will use the environment associated to the device. If the device is not monitored by Stackify, this should be specified. Example: "Prod"
+                         * 
+ * + * string configured_environment_name = 5; + */ + public Builder setConfiguredEnvironmentName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + configuredEnvironmentName_ = value; + onChanged(); + return this; + } + /** + *
+                         * Optional. The environment name. If the device is monitored by Stackify, we will use the environment associated to the device. If the device is not monitored by Stackify, this should be specified. Example: "Prod"
+                         * 
+ * + * string configured_environment_name = 5; + */ + public Builder clearConfiguredEnvironmentName() { + + configuredEnvironmentName_ = getDefaultInstance().getConfiguredEnvironmentName(); + onChanged(); + return this; + } + /** + *
+                         * Optional. The environment name. If the device is monitored by Stackify, we will use the environment associated to the device. If the device is not monitored by Stackify, this should be specified. Example: "Prod"
+                         * 
+ * + * string configured_environment_name = 5; + */ + public Builder setConfiguredEnvironmentNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + configuredEnvironmentName_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:stackify.LogGroup.Log.Error.EnvironmentDetail) + } + + // @@protoc_insertion_point(class_scope:stackify.LogGroup.Log.Error.EnvironmentDetail) + private static final com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail(); + } + + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EnvironmentDetail parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new EnvironmentDetail(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ErrorItemOrBuilder extends + // @@protoc_insertion_point(interface_extends:stackify.LogGroup.Log.Error.ErrorItem) + com.google.protobuf.MessageOrBuilder { + + /** + *
+                     * Optional. The exception message.  Example: "java.lang.NullPointerException: Something important was null that can't be null"
+                     * 
+ * + * string message = 1; + */ + java.lang.String getMessage(); + /** + *
+                     * Optional. The exception message.  Example: "java.lang.NullPointerException: Something important was null that can't be null"
+                     * 
+ * + * string message = 1; + */ + com.google.protobuf.ByteString + getMessageBytes(); + + /** + *
+                     * The exception type. Example: "java.lang.RuntimeException"
+                     * 
+ * + * string error_type = 2; + */ + java.lang.String getErrorType(); + /** + *
+                     * The exception type. Example: "java.lang.RuntimeException"
+                     * 
+ * + * string error_type = 2; + */ + com.google.protobuf.ByteString + getErrorTypeBytes(); + + /** + *
+                     * Optional. The exception type code. Example: 40143
+                     * 
+ * + * string error_type_code = 3; + */ + java.lang.String getErrorTypeCode(); + /** + *
+                     * Optional. The exception type code. Example: 40143
+                     * 
+ * + * string error_type_code = 3; + */ + com.google.protobuf.ByteString + getErrorTypeCodeBytes(); + + /** + *
+                     * Optional. Additional data from the loggers diagnostic context. Example: {"Key1": "Value1", "Key2":"Value2"}
+                     * 
+ * + * map<string, string> data = 4; + */ + int getDataCount(); + /** + *
+                     * Optional. Additional data from the loggers diagnostic context. Example: {"Key1": "Value1", "Key2":"Value2"}
+                     * 
+ * + * map<string, string> data = 4; + */ + boolean containsData( + java.lang.String key); + /** + * Use {@link #getDataMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getData(); + /** + *
+                     * Optional. Additional data from the loggers diagnostic context. Example: {"Key1": "Value1", "Key2":"Value2"}
+                     * 
+ * + * map<string, string> data = 4; + */ + java.util.Map + getDataMap(); + /** + *
+                     * Optional. Additional data from the loggers diagnostic context. Example: {"Key1": "Value1", "Key2":"Value2"}
+                     * 
+ * + * map<string, string> data = 4; + */ + + java.lang.String getDataOrDefault( + java.lang.String key, + java.lang.String defaultValue); + /** + *
+                     * Optional. Additional data from the loggers diagnostic context. Example: {"Key1": "Value1", "Key2":"Value2"}
+                     * 
+ * + * map<string, string> data = 4; + */ + + java.lang.String getDataOrThrow( + java.lang.String key); + + /** + *
+                     * Optional. Fully qualified method from the first stack trace frame. Example: "com.stackify.error.test.SomeSweetClass.doSomething"
+                     * 
+ * + * string source_method = 5; + */ + java.lang.String getSourceMethod(); + /** + *
+                     * Optional. Fully qualified method from the first stack trace frame. Example: "com.stackify.error.test.SomeSweetClass.doSomething"
+                     * 
+ * + * string source_method = 5; + */ + com.google.protobuf.ByteString + getSourceMethodBytes(); + + /** + *
+                     * Lists of stack trace frames.
+                     * 
+ * + * repeated .stackify.LogGroup.Log.Error.ErrorItem.TraceFrame stacktrace = 6; + */ + java.util.List + getStacktraceList(); + /** + *
+                     * Lists of stack trace frames.
+                     * 
+ * + * repeated .stackify.LogGroup.Log.Error.ErrorItem.TraceFrame stacktrace = 6; + */ + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame getStacktrace(int index); + /** + *
+                     * Lists of stack trace frames.
+                     * 
+ * + * repeated .stackify.LogGroup.Log.Error.ErrorItem.TraceFrame stacktrace = 6; + */ + int getStacktraceCount(); + /** + *
+                     * Lists of stack trace frames.
+                     * 
+ * + * repeated .stackify.LogGroup.Log.Error.ErrorItem.TraceFrame stacktrace = 6; + */ + java.util.List + getStacktraceOrBuilderList(); + /** + *
+                     * Lists of stack trace frames.
+                     * 
+ * + * repeated .stackify.LogGroup.Log.Error.ErrorItem.TraceFrame stacktrace = 6; + */ + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrameOrBuilder getStacktraceOrBuilder( + int index); + + /** + *
+                     * Optional. Same as Msgs[*]/Ex/Error object.
+                     * 
+ * + * .stackify.LogGroup.Log.Error.ErrorItem inner_error = 7; + */ + boolean hasInnerError(); + /** + *
+                     * Optional. Same as Msgs[*]/Ex/Error object.
+                     * 
+ * + * .stackify.LogGroup.Log.Error.ErrorItem inner_error = 7; + */ + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem getInnerError(); + /** + *
+                     * Optional. Same as Msgs[*]/Ex/Error object.
+                     * 
+ * + * .stackify.LogGroup.Log.Error.ErrorItem inner_error = 7; + */ + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItemOrBuilder getInnerErrorOrBuilder(); + } + /** + * Protobuf type {@code stackify.LogGroup.Log.Error.ErrorItem} + */ + public static final class ErrorItem extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:stackify.LogGroup.Log.Error.ErrorItem) + ErrorItemOrBuilder { + private static final long serialVersionUID = 0L; + // Use ErrorItem.newBuilder() to construct. + private ErrorItem(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ErrorItem() { + message_ = ""; + errorType_ = ""; + errorTypeCode_ = ""; + sourceMethod_ = ""; + stacktrace_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ErrorItem(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ErrorItem( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + message_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + errorType_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + errorTypeCode_ = s; + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + data_ = com.google.protobuf.MapField.newMapField( + DataDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + data__ = input.readMessage( + DataDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + data_.getMutableMap().put( + data__.getKey(), data__.getValue()); + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + sourceMethod_ = s; + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + stacktrace_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + stacktrace_.add( + input.readMessage(com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame.parser(), extensionRegistry)); + break; + } + case 58: { + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.Builder subBuilder = null; + if (innerError_ != null) { + subBuilder = innerError_.toBuilder(); + } + innerError_ = input.readMessage(com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(innerError_); + innerError_ = subBuilder.buildPartial(); + } + + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000002) != 0)) { + stacktrace_ = java.util.Collections.unmodifiableList(stacktrace_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Log_Error_ErrorItem_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 4: + return internalGetData(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Log_Error_ErrorItem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.class, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.Builder.class); + } + + public interface TraceFrameOrBuilder extends + // @@protoc_insertion_point(interface_extends:stackify.LogGroup.Log.Error.ErrorItem.TraceFrame) + com.google.protobuf.MessageOrBuilder { + + /** + *
+                         * Optional. File name. Example: "SomeSweetClass.java"
+                         * 
+ * + * string code_filename = 1; + */ + java.lang.String getCodeFilename(); + /** + *
+                         * Optional. File name. Example: "SomeSweetClass.java"
+                         * 
+ * + * string code_filename = 1; + */ + com.google.protobuf.ByteString + getCodeFilenameBytes(); + + /** + *
+                         * Optional. Line number. Example: 16
+                         * 
+ * + * int32 line_number = 2; + */ + int getLineNumber(); + + /** + *
+                         * Fully qualified method name. Example: "com.stackify.error.test.SomeSweetClass.doSomething"
+                         * 
+ * + * string method = 3; + */ + java.lang.String getMethod(); + /** + *
+                         * Fully qualified method name. Example: "com.stackify.error.test.SomeSweetClass.doSomething"
+                         * 
+ * + * string method = 3; + */ + com.google.protobuf.ByteString + getMethodBytes(); + } + /** + * Protobuf type {@code stackify.LogGroup.Log.Error.ErrorItem.TraceFrame} + */ + public static final class TraceFrame extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:stackify.LogGroup.Log.Error.ErrorItem.TraceFrame) + TraceFrameOrBuilder { + private static final long serialVersionUID = 0L; + // Use TraceFrame.newBuilder() to construct. + private TraceFrame(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TraceFrame() { + codeFilename_ = ""; + method_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TraceFrame(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TraceFrame( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + codeFilename_ = s; + break; + } + case 16: { + + lineNumber_ = input.readInt32(); + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + method_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Log_Error_ErrorItem_TraceFrame_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Log_Error_ErrorItem_TraceFrame_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame.class, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame.Builder.class); + } + + public static final int CODE_FILENAME_FIELD_NUMBER = 1; + private volatile java.lang.Object codeFilename_; + /** + *
+                         * Optional. File name. Example: "SomeSweetClass.java"
+                         * 
+ * + * string code_filename = 1; + */ + public java.lang.String getCodeFilename() { + java.lang.Object ref = codeFilename_; + 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(); + codeFilename_ = s; + return s; + } + } + /** + *
+                         * Optional. File name. Example: "SomeSweetClass.java"
+                         * 
+ * + * string code_filename = 1; + */ + public com.google.protobuf.ByteString + getCodeFilenameBytes() { + java.lang.Object ref = codeFilename_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + codeFilename_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LINE_NUMBER_FIELD_NUMBER = 2; + private int lineNumber_; + /** + *
+                         * Optional. Line number. Example: 16
+                         * 
+ * + * int32 line_number = 2; + */ + public int getLineNumber() { + return lineNumber_; + } + + public static final int METHOD_FIELD_NUMBER = 3; + private volatile java.lang.Object method_; + /** + *
+                         * Fully qualified method name. Example: "com.stackify.error.test.SomeSweetClass.doSomething"
+                         * 
+ * + * string method = 3; + */ + public java.lang.String getMethod() { + java.lang.Object ref = method_; + 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(); + method_ = s; + return s; + } + } + /** + *
+                         * Fully qualified method name. Example: "com.stackify.error.test.SomeSweetClass.doSomething"
+                         * 
+ * + * string method = 3; + */ + public com.google.protobuf.ByteString + getMethodBytes() { + java.lang.Object ref = method_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + method_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getCodeFilenameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, codeFilename_); + } + if (lineNumber_ != 0) { + output.writeInt32(2, lineNumber_); + } + if (!getMethodBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, method_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getCodeFilenameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, codeFilename_); + } + if (lineNumber_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, lineNumber_); + } + if (!getMethodBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, method_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame)) { + return super.equals(obj); + } + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame other = (com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame) obj; + + if (!getCodeFilename() + .equals(other.getCodeFilename())) return false; + if (getLineNumber() + != other.getLineNumber()) return false; + if (!getMethod() + .equals(other.getMethod())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CODE_FILENAME_FIELD_NUMBER; + hash = (53 * hash) + getCodeFilename().hashCode(); + hash = (37 * hash) + LINE_NUMBER_FIELD_NUMBER; + hash = (53 * hash) + getLineNumber(); + hash = (37 * hash) + METHOD_FIELD_NUMBER; + hash = (53 * hash) + getMethod().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code stackify.LogGroup.Log.Error.ErrorItem.TraceFrame} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:stackify.LogGroup.Log.Error.ErrorItem.TraceFrame) + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrameOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Log_Error_ErrorItem_TraceFrame_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Log_Error_ErrorItem_TraceFrame_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame.class, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame.Builder.class); + } + + // Construct using com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + codeFilename_ = ""; + + lineNumber_ = 0; + + method_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Log_Error_ErrorItem_TraceFrame_descriptor; + } + + @java.lang.Override + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame getDefaultInstanceForType() { + return com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame.getDefaultInstance(); + } + + @java.lang.Override + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame build() { + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame buildPartial() { + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame result = new com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame(this); + result.codeFilename_ = codeFilename_; + result.lineNumber_ = lineNumber_; + result.method_ = method_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame) { + return mergeFrom((com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame other) { + if (other == com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame.getDefaultInstance()) return this; + if (!other.getCodeFilename().isEmpty()) { + codeFilename_ = other.codeFilename_; + onChanged(); + } + if (other.getLineNumber() != 0) { + setLineNumber(other.getLineNumber()); + } + if (!other.getMethod().isEmpty()) { + method_ = other.method_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object codeFilename_ = ""; + /** + *
+                             * Optional. File name. Example: "SomeSweetClass.java"
+                             * 
+ * + * string code_filename = 1; + */ + public java.lang.String getCodeFilename() { + java.lang.Object ref = codeFilename_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + codeFilename_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+                             * Optional. File name. Example: "SomeSweetClass.java"
+                             * 
+ * + * string code_filename = 1; + */ + public com.google.protobuf.ByteString + getCodeFilenameBytes() { + java.lang.Object ref = codeFilename_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + codeFilename_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+                             * Optional. File name. Example: "SomeSweetClass.java"
+                             * 
+ * + * string code_filename = 1; + */ + public Builder setCodeFilename( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + codeFilename_ = value; + onChanged(); + return this; + } + /** + *
+                             * Optional. File name. Example: "SomeSweetClass.java"
+                             * 
+ * + * string code_filename = 1; + */ + public Builder clearCodeFilename() { + + codeFilename_ = getDefaultInstance().getCodeFilename(); + onChanged(); + return this; + } + /** + *
+                             * Optional. File name. Example: "SomeSweetClass.java"
+                             * 
+ * + * string code_filename = 1; + */ + public Builder setCodeFilenameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + codeFilename_ = value; + onChanged(); + return this; + } + + private int lineNumber_ ; + /** + *
+                             * Optional. Line number. Example: 16
+                             * 
+ * + * int32 line_number = 2; + */ + public int getLineNumber() { + return lineNumber_; + } + /** + *
+                             * Optional. Line number. Example: 16
+                             * 
+ * + * int32 line_number = 2; + */ + public Builder setLineNumber(int value) { + + lineNumber_ = value; + onChanged(); + return this; + } + /** + *
+                             * Optional. Line number. Example: 16
+                             * 
+ * + * int32 line_number = 2; + */ + public Builder clearLineNumber() { + + lineNumber_ = 0; + onChanged(); + return this; + } + + private java.lang.Object method_ = ""; + /** + *
+                             * Fully qualified method name. Example: "com.stackify.error.test.SomeSweetClass.doSomething"
+                             * 
+ * + * string method = 3; + */ + public java.lang.String getMethod() { + java.lang.Object ref = method_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + method_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+                             * Fully qualified method name. Example: "com.stackify.error.test.SomeSweetClass.doSomething"
+                             * 
+ * + * string method = 3; + */ + public com.google.protobuf.ByteString + getMethodBytes() { + java.lang.Object ref = method_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + method_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+                             * Fully qualified method name. Example: "com.stackify.error.test.SomeSweetClass.doSomething"
+                             * 
+ * + * string method = 3; + */ + public Builder setMethod( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + method_ = value; + onChanged(); + return this; + } + /** + *
+                             * Fully qualified method name. Example: "com.stackify.error.test.SomeSweetClass.doSomething"
+                             * 
+ * + * string method = 3; + */ + public Builder clearMethod() { + + method_ = getDefaultInstance().getMethod(); + onChanged(); + return this; + } + /** + *
+                             * Fully qualified method name. Example: "com.stackify.error.test.SomeSweetClass.doSomething"
+                             * 
+ * + * string method = 3; + */ + public Builder setMethodBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + method_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:stackify.LogGroup.Log.Error.ErrorItem.TraceFrame) + } + + // @@protoc_insertion_point(class_scope:stackify.LogGroup.Log.Error.ErrorItem.TraceFrame) + private static final com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame(); + } + + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TraceFrame parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TraceFrame(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int MESSAGE_FIELD_NUMBER = 1; + private volatile java.lang.Object message_; + /** + *
+                     * Optional. The exception message.  Example: "java.lang.NullPointerException: Something important was null that can't be null"
+                     * 
+ * + * string message = 1; + */ + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + message_ = s; + return s; + } + } + /** + *
+                     * Optional. The exception message.  Example: "java.lang.NullPointerException: Something important was null that can't be null"
+                     * 
+ * + * string message = 1; + */ + public com.google.protobuf.ByteString + getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ERROR_TYPE_FIELD_NUMBER = 2; + private volatile java.lang.Object errorType_; + /** + *
+                     * The exception type. Example: "java.lang.RuntimeException"
+                     * 
+ * + * string error_type = 2; + */ + public java.lang.String getErrorType() { + java.lang.Object ref = errorType_; + 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(); + errorType_ = s; + return s; + } + } + /** + *
+                     * The exception type. Example: "java.lang.RuntimeException"
+                     * 
+ * + * string error_type = 2; + */ + public com.google.protobuf.ByteString + getErrorTypeBytes() { + java.lang.Object ref = errorType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + errorType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ERROR_TYPE_CODE_FIELD_NUMBER = 3; + private volatile java.lang.Object errorTypeCode_; + /** + *
+                     * Optional. The exception type code. Example: 40143
+                     * 
+ * + * string error_type_code = 3; + */ + public java.lang.String getErrorTypeCode() { + java.lang.Object ref = errorTypeCode_; + 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(); + errorTypeCode_ = s; + return s; + } + } + /** + *
+                     * Optional. The exception type code. Example: 40143
+                     * 
+ * + * string error_type_code = 3; + */ + public com.google.protobuf.ByteString + getErrorTypeCodeBytes() { + java.lang.Object ref = errorTypeCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + errorTypeCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_FIELD_NUMBER = 4; + private static final class DataDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Log_Error_ErrorItem_DataEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> data_; + private com.google.protobuf.MapField + internalGetData() { + if (data_ == null) { + return com.google.protobuf.MapField.emptyMapField( + DataDefaultEntryHolder.defaultEntry); + } + return data_; + } + + public int getDataCount() { + return internalGetData().getMap().size(); + } + /** + *
+                     * Optional. Additional data from the loggers diagnostic context. Example: {"Key1": "Value1", "Key2":"Value2"}
+                     * 
+ * + * map<string, string> data = 4; + */ + + public boolean containsData( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetData().getMap().containsKey(key); + } + /** + * Use {@link #getDataMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getData() { + return getDataMap(); + } + /** + *
+                     * Optional. Additional data from the loggers diagnostic context. Example: {"Key1": "Value1", "Key2":"Value2"}
+                     * 
+ * + * map<string, string> data = 4; + */ + + public java.util.Map getDataMap() { + return internalGetData().getMap(); + } + /** + *
+                     * Optional. Additional data from the loggers diagnostic context. Example: {"Key1": "Value1", "Key2":"Value2"}
+                     * 
+ * + * map<string, string> data = 4; + */ + + public java.lang.String getDataOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetData().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+                     * Optional. Additional data from the loggers diagnostic context. Example: {"Key1": "Value1", "Key2":"Value2"}
+                     * 
+ * + * map<string, string> data = 4; + */ + + public java.lang.String getDataOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetData().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int SOURCE_METHOD_FIELD_NUMBER = 5; + private volatile java.lang.Object sourceMethod_; + /** + *
+                     * Optional. Fully qualified method from the first stack trace frame. Example: "com.stackify.error.test.SomeSweetClass.doSomething"
+                     * 
+ * + * string source_method = 5; + */ + public java.lang.String getSourceMethod() { + java.lang.Object ref = sourceMethod_; + 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(); + sourceMethod_ = s; + return s; + } + } + /** + *
+                     * Optional. Fully qualified method from the first stack trace frame. Example: "com.stackify.error.test.SomeSweetClass.doSomething"
+                     * 
+ * + * string source_method = 5; + */ + public com.google.protobuf.ByteString + getSourceMethodBytes() { + java.lang.Object ref = sourceMethod_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sourceMethod_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STACKTRACE_FIELD_NUMBER = 6; + private java.util.List stacktrace_; + /** + *
+                     * Lists of stack trace frames.
+                     * 
+ * + * repeated .stackify.LogGroup.Log.Error.ErrorItem.TraceFrame stacktrace = 6; + */ + public java.util.List getStacktraceList() { + return stacktrace_; + } + /** + *
+                     * Lists of stack trace frames.
+                     * 
+ * + * repeated .stackify.LogGroup.Log.Error.ErrorItem.TraceFrame stacktrace = 6; + */ + public java.util.List + getStacktraceOrBuilderList() { + return stacktrace_; + } + /** + *
+                     * Lists of stack trace frames.
+                     * 
+ * + * repeated .stackify.LogGroup.Log.Error.ErrorItem.TraceFrame stacktrace = 6; + */ + public int getStacktraceCount() { + return stacktrace_.size(); + } + /** + *
+                     * Lists of stack trace frames.
+                     * 
+ * + * repeated .stackify.LogGroup.Log.Error.ErrorItem.TraceFrame stacktrace = 6; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame getStacktrace(int index) { + return stacktrace_.get(index); + } + /** + *
+                     * Lists of stack trace frames.
+                     * 
+ * + * repeated .stackify.LogGroup.Log.Error.ErrorItem.TraceFrame stacktrace = 6; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrameOrBuilder getStacktraceOrBuilder( + int index) { + return stacktrace_.get(index); + } + + public static final int INNER_ERROR_FIELD_NUMBER = 7; + private com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem innerError_; + /** + *
+                     * Optional. Same as Msgs[*]/Ex/Error object.
+                     * 
+ * + * .stackify.LogGroup.Log.Error.ErrorItem inner_error = 7; + */ + public boolean hasInnerError() { + return innerError_ != null; + } + /** + *
+                     * Optional. Same as Msgs[*]/Ex/Error object.
+                     * 
+ * + * .stackify.LogGroup.Log.Error.ErrorItem inner_error = 7; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem getInnerError() { + return innerError_ == null ? com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.getDefaultInstance() : innerError_; + } + /** + *
+                     * Optional. Same as Msgs[*]/Ex/Error object.
+                     * 
+ * + * .stackify.LogGroup.Log.Error.ErrorItem inner_error = 7; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItemOrBuilder getInnerErrorOrBuilder() { + return getInnerError(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getMessageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, message_); + } + if (!getErrorTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, errorType_); + } + if (!getErrorTypeCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, errorTypeCode_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetData(), + DataDefaultEntryHolder.defaultEntry, + 4); + if (!getSourceMethodBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, sourceMethod_); + } + for (int i = 0; i < stacktrace_.size(); i++) { + output.writeMessage(6, stacktrace_.get(i)); + } + if (innerError_ != null) { + output.writeMessage(7, getInnerError()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMessageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, message_); + } + if (!getErrorTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, errorType_); + } + if (!getErrorTypeCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, errorTypeCode_); + } + for (java.util.Map.Entry entry + : internalGetData().getMap().entrySet()) { + com.google.protobuf.MapEntry + data__ = DataDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, data__); + } + if (!getSourceMethodBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, sourceMethod_); + } + for (int i = 0; i < stacktrace_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, stacktrace_.get(i)); + } + if (innerError_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getInnerError()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem)) { + return super.equals(obj); + } + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem other = (com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem) obj; + + if (!getMessage() + .equals(other.getMessage())) return false; + if (!getErrorType() + .equals(other.getErrorType())) return false; + if (!getErrorTypeCode() + .equals(other.getErrorTypeCode())) return false; + if (!internalGetData().equals( + other.internalGetData())) return false; + if (!getSourceMethod() + .equals(other.getSourceMethod())) return false; + if (!getStacktraceList() + .equals(other.getStacktraceList())) return false; + if (hasInnerError() != other.hasInnerError()) return false; + if (hasInnerError()) { + if (!getInnerError() + .equals(other.getInnerError())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getMessage().hashCode(); + hash = (37 * hash) + ERROR_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getErrorType().hashCode(); + hash = (37 * hash) + ERROR_TYPE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getErrorTypeCode().hashCode(); + if (!internalGetData().getMap().isEmpty()) { + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + internalGetData().hashCode(); + } + hash = (37 * hash) + SOURCE_METHOD_FIELD_NUMBER; + hash = (53 * hash) + getSourceMethod().hashCode(); + if (getStacktraceCount() > 0) { + hash = (37 * hash) + STACKTRACE_FIELD_NUMBER; + hash = (53 * hash) + getStacktraceList().hashCode(); + } + if (hasInnerError()) { + hash = (37 * hash) + INNER_ERROR_FIELD_NUMBER; + hash = (53 * hash) + getInnerError().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code stackify.LogGroup.Log.Error.ErrorItem} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:stackify.LogGroup.Log.Error.ErrorItem) + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItemOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Log_Error_ErrorItem_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 4: + return internalGetData(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 4: + return internalGetMutableData(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Log_Error_ErrorItem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.class, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.Builder.class); + } + + // Construct using com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getStacktraceFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + message_ = ""; + + errorType_ = ""; + + errorTypeCode_ = ""; + + internalGetMutableData().clear(); + sourceMethod_ = ""; + + if (stacktraceBuilder_ == null) { + stacktrace_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + stacktraceBuilder_.clear(); + } + if (innerErrorBuilder_ == null) { + innerError_ = null; + } else { + innerError_ = null; + innerErrorBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Log_Error_ErrorItem_descriptor; + } + + @java.lang.Override + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem getDefaultInstanceForType() { + return com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.getDefaultInstance(); + } + + @java.lang.Override + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem build() { + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem buildPartial() { + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem result = new com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem(this); + int from_bitField0_ = bitField0_; + result.message_ = message_; + result.errorType_ = errorType_; + result.errorTypeCode_ = errorTypeCode_; + result.data_ = internalGetData(); + result.data_.makeImmutable(); + result.sourceMethod_ = sourceMethod_; + if (stacktraceBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + stacktrace_ = java.util.Collections.unmodifiableList(stacktrace_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.stacktrace_ = stacktrace_; + } else { + result.stacktrace_ = stacktraceBuilder_.build(); + } + if (innerErrorBuilder_ == null) { + result.innerError_ = innerError_; + } else { + result.innerError_ = innerErrorBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem) { + return mergeFrom((com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem other) { + if (other == com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.getDefaultInstance()) return this; + if (!other.getMessage().isEmpty()) { + message_ = other.message_; + onChanged(); + } + if (!other.getErrorType().isEmpty()) { + errorType_ = other.errorType_; + onChanged(); + } + if (!other.getErrorTypeCode().isEmpty()) { + errorTypeCode_ = other.errorTypeCode_; + onChanged(); + } + internalGetMutableData().mergeFrom( + other.internalGetData()); + if (!other.getSourceMethod().isEmpty()) { + sourceMethod_ = other.sourceMethod_; + onChanged(); + } + if (stacktraceBuilder_ == null) { + if (!other.stacktrace_.isEmpty()) { + if (stacktrace_.isEmpty()) { + stacktrace_ = other.stacktrace_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureStacktraceIsMutable(); + stacktrace_.addAll(other.stacktrace_); + } + onChanged(); + } + } else { + if (!other.stacktrace_.isEmpty()) { + if (stacktraceBuilder_.isEmpty()) { + stacktraceBuilder_.dispose(); + stacktraceBuilder_ = null; + stacktrace_ = other.stacktrace_; + bitField0_ = (bitField0_ & ~0x00000002); + stacktraceBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getStacktraceFieldBuilder() : null; + } else { + stacktraceBuilder_.addAllMessages(other.stacktrace_); + } + } + } + if (other.hasInnerError()) { + mergeInnerError(other.getInnerError()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object message_ = ""; + /** + *
+                         * Optional. The exception message.  Example: "java.lang.NullPointerException: Something important was null that can't be null"
+                         * 
+ * + * string message = 1; + */ + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + message_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+                         * Optional. The exception message.  Example: "java.lang.NullPointerException: Something important was null that can't be null"
+                         * 
+ * + * string message = 1; + */ + public com.google.protobuf.ByteString + getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+                         * Optional. The exception message.  Example: "java.lang.NullPointerException: Something important was null that can't be null"
+                         * 
+ * + * string message = 1; + */ + public Builder setMessage( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + message_ = value; + onChanged(); + return this; + } + /** + *
+                         * Optional. The exception message.  Example: "java.lang.NullPointerException: Something important was null that can't be null"
+                         * 
+ * + * string message = 1; + */ + public Builder clearMessage() { + + message_ = getDefaultInstance().getMessage(); + onChanged(); + return this; + } + /** + *
+                         * Optional. The exception message.  Example: "java.lang.NullPointerException: Something important was null that can't be null"
+                         * 
+ * + * string message = 1; + */ + public Builder setMessageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + message_ = value; + onChanged(); + return this; + } + + private java.lang.Object errorType_ = ""; + /** + *
+                         * The exception type. Example: "java.lang.RuntimeException"
+                         * 
+ * + * string error_type = 2; + */ + public java.lang.String getErrorType() { + java.lang.Object ref = errorType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + errorType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+                         * The exception type. Example: "java.lang.RuntimeException"
+                         * 
+ * + * string error_type = 2; + */ + public com.google.protobuf.ByteString + getErrorTypeBytes() { + java.lang.Object ref = errorType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + errorType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+                         * The exception type. Example: "java.lang.RuntimeException"
+                         * 
+ * + * string error_type = 2; + */ + public Builder setErrorType( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + errorType_ = value; + onChanged(); + return this; + } + /** + *
+                         * The exception type. Example: "java.lang.RuntimeException"
+                         * 
+ * + * string error_type = 2; + */ + public Builder clearErrorType() { + + errorType_ = getDefaultInstance().getErrorType(); + onChanged(); + return this; + } + /** + *
+                         * The exception type. Example: "java.lang.RuntimeException"
+                         * 
+ * + * string error_type = 2; + */ + public Builder setErrorTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + errorType_ = value; + onChanged(); + return this; + } + + private java.lang.Object errorTypeCode_ = ""; + /** + *
+                         * Optional. The exception type code. Example: 40143
+                         * 
+ * + * string error_type_code = 3; + */ + public java.lang.String getErrorTypeCode() { + java.lang.Object ref = errorTypeCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + errorTypeCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+                         * Optional. The exception type code. Example: 40143
+                         * 
+ * + * string error_type_code = 3; + */ + public com.google.protobuf.ByteString + getErrorTypeCodeBytes() { + java.lang.Object ref = errorTypeCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + errorTypeCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+                         * Optional. The exception type code. Example: 40143
+                         * 
+ * + * string error_type_code = 3; + */ + public Builder setErrorTypeCode( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + errorTypeCode_ = value; + onChanged(); + return this; + } + /** + *
+                         * Optional. The exception type code. Example: 40143
+                         * 
+ * + * string error_type_code = 3; + */ + public Builder clearErrorTypeCode() { + + errorTypeCode_ = getDefaultInstance().getErrorTypeCode(); + onChanged(); + return this; + } + /** + *
+                         * Optional. The exception type code. Example: 40143
+                         * 
+ * + * string error_type_code = 3; + */ + public Builder setErrorTypeCodeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + errorTypeCode_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> data_; + private com.google.protobuf.MapField + internalGetData() { + if (data_ == null) { + return com.google.protobuf.MapField.emptyMapField( + DataDefaultEntryHolder.defaultEntry); + } + return data_; + } + private com.google.protobuf.MapField + internalGetMutableData() { + onChanged();; + if (data_ == null) { + data_ = com.google.protobuf.MapField.newMapField( + DataDefaultEntryHolder.defaultEntry); + } + if (!data_.isMutable()) { + data_ = data_.copy(); + } + return data_; + } + + public int getDataCount() { + return internalGetData().getMap().size(); + } + /** + *
+                         * Optional. Additional data from the loggers diagnostic context. Example: {"Key1": "Value1", "Key2":"Value2"}
+                         * 
+ * + * map<string, string> data = 4; + */ + + public boolean containsData( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetData().getMap().containsKey(key); + } + /** + * Use {@link #getDataMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getData() { + return getDataMap(); + } + /** + *
+                         * Optional. Additional data from the loggers diagnostic context. Example: {"Key1": "Value1", "Key2":"Value2"}
+                         * 
+ * + * map<string, string> data = 4; + */ + + public java.util.Map getDataMap() { + return internalGetData().getMap(); + } + /** + *
+                         * Optional. Additional data from the loggers diagnostic context. Example: {"Key1": "Value1", "Key2":"Value2"}
+                         * 
+ * + * map<string, string> data = 4; + */ + + public java.lang.String getDataOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetData().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+                         * Optional. Additional data from the loggers diagnostic context. Example: {"Key1": "Value1", "Key2":"Value2"}
+                         * 
+ * + * map<string, string> data = 4; + */ + + public java.lang.String getDataOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetData().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearData() { + internalGetMutableData().getMutableMap() + .clear(); + return this; + } + /** + *
+                         * Optional. Additional data from the loggers diagnostic context. Example: {"Key1": "Value1", "Key2":"Value2"}
+                         * 
+ * + * map<string, string> data = 4; + */ + + public Builder removeData( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableData().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableData() { + return internalGetMutableData().getMutableMap(); + } + /** + *
+                         * Optional. Additional data from the loggers diagnostic context. Example: {"Key1": "Value1", "Key2":"Value2"}
+                         * 
+ * + * map<string, string> data = 4; + */ + public Builder putData( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableData().getMutableMap() + .put(key, value); + return this; + } + /** + *
+                         * Optional. Additional data from the loggers diagnostic context. Example: {"Key1": "Value1", "Key2":"Value2"}
+                         * 
+ * + * map<string, string> data = 4; + */ + + public Builder putAllData( + java.util.Map values) { + internalGetMutableData().getMutableMap() + .putAll(values); + return this; + } + + private java.lang.Object sourceMethod_ = ""; + /** + *
+                         * Optional. Fully qualified method from the first stack trace frame. Example: "com.stackify.error.test.SomeSweetClass.doSomething"
+                         * 
+ * + * string source_method = 5; + */ + public java.lang.String getSourceMethod() { + java.lang.Object ref = sourceMethod_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceMethod_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+                         * Optional. Fully qualified method from the first stack trace frame. Example: "com.stackify.error.test.SomeSweetClass.doSomething"
+                         * 
+ * + * string source_method = 5; + */ + public com.google.protobuf.ByteString + getSourceMethodBytes() { + java.lang.Object ref = sourceMethod_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sourceMethod_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+                         * Optional. Fully qualified method from the first stack trace frame. Example: "com.stackify.error.test.SomeSweetClass.doSomething"
+                         * 
+ * + * string source_method = 5; + */ + public Builder setSourceMethod( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sourceMethod_ = value; + onChanged(); + return this; + } + /** + *
+                         * Optional. Fully qualified method from the first stack trace frame. Example: "com.stackify.error.test.SomeSweetClass.doSomething"
+                         * 
+ * + * string source_method = 5; + */ + public Builder clearSourceMethod() { + + sourceMethod_ = getDefaultInstance().getSourceMethod(); + onChanged(); + return this; + } + /** + *
+                         * Optional. Fully qualified method from the first stack trace frame. Example: "com.stackify.error.test.SomeSweetClass.doSomething"
+                         * 
+ * + * string source_method = 5; + */ + public Builder setSourceMethodBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sourceMethod_ = value; + onChanged(); + return this; + } + + private java.util.List stacktrace_ = + java.util.Collections.emptyList(); + private void ensureStacktraceIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + stacktrace_ = new java.util.ArrayList(stacktrace_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame.Builder, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrameOrBuilder> stacktraceBuilder_; + + /** + *
+                         * Lists of stack trace frames.
+                         * 
+ * + * repeated .stackify.LogGroup.Log.Error.ErrorItem.TraceFrame stacktrace = 6; + */ + public java.util.List getStacktraceList() { + if (stacktraceBuilder_ == null) { + return java.util.Collections.unmodifiableList(stacktrace_); + } else { + return stacktraceBuilder_.getMessageList(); + } + } + /** + *
+                         * Lists of stack trace frames.
+                         * 
+ * + * repeated .stackify.LogGroup.Log.Error.ErrorItem.TraceFrame stacktrace = 6; + */ + public int getStacktraceCount() { + if (stacktraceBuilder_ == null) { + return stacktrace_.size(); + } else { + return stacktraceBuilder_.getCount(); + } + } + /** + *
+                         * Lists of stack trace frames.
+                         * 
+ * + * repeated .stackify.LogGroup.Log.Error.ErrorItem.TraceFrame stacktrace = 6; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame getStacktrace(int index) { + if (stacktraceBuilder_ == null) { + return stacktrace_.get(index); + } else { + return stacktraceBuilder_.getMessage(index); + } + } + /** + *
+                         * Lists of stack trace frames.
+                         * 
+ * + * repeated .stackify.LogGroup.Log.Error.ErrorItem.TraceFrame stacktrace = 6; + */ + public Builder setStacktrace( + int index, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame value) { + if (stacktraceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStacktraceIsMutable(); + stacktrace_.set(index, value); + onChanged(); + } else { + stacktraceBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+                         * Lists of stack trace frames.
+                         * 
+ * + * repeated .stackify.LogGroup.Log.Error.ErrorItem.TraceFrame stacktrace = 6; + */ + public Builder setStacktrace( + int index, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame.Builder builderForValue) { + if (stacktraceBuilder_ == null) { + ensureStacktraceIsMutable(); + stacktrace_.set(index, builderForValue.build()); + onChanged(); + } else { + stacktraceBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+                         * Lists of stack trace frames.
+                         * 
+ * + * repeated .stackify.LogGroup.Log.Error.ErrorItem.TraceFrame stacktrace = 6; + */ + public Builder addStacktrace(com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame value) { + if (stacktraceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStacktraceIsMutable(); + stacktrace_.add(value); + onChanged(); + } else { + stacktraceBuilder_.addMessage(value); + } + return this; + } + /** + *
+                         * Lists of stack trace frames.
+                         * 
+ * + * repeated .stackify.LogGroup.Log.Error.ErrorItem.TraceFrame stacktrace = 6; + */ + public Builder addStacktrace( + int index, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame value) { + if (stacktraceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStacktraceIsMutable(); + stacktrace_.add(index, value); + onChanged(); + } else { + stacktraceBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+                         * Lists of stack trace frames.
+                         * 
+ * + * repeated .stackify.LogGroup.Log.Error.ErrorItem.TraceFrame stacktrace = 6; + */ + public Builder addStacktrace( + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame.Builder builderForValue) { + if (stacktraceBuilder_ == null) { + ensureStacktraceIsMutable(); + stacktrace_.add(builderForValue.build()); + onChanged(); + } else { + stacktraceBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+                         * Lists of stack trace frames.
+                         * 
+ * + * repeated .stackify.LogGroup.Log.Error.ErrorItem.TraceFrame stacktrace = 6; + */ + public Builder addStacktrace( + int index, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame.Builder builderForValue) { + if (stacktraceBuilder_ == null) { + ensureStacktraceIsMutable(); + stacktrace_.add(index, builderForValue.build()); + onChanged(); + } else { + stacktraceBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+                         * Lists of stack trace frames.
+                         * 
+ * + * repeated .stackify.LogGroup.Log.Error.ErrorItem.TraceFrame stacktrace = 6; + */ + public Builder addAllStacktrace( + java.lang.Iterable values) { + if (stacktraceBuilder_ == null) { + ensureStacktraceIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, stacktrace_); + onChanged(); + } else { + stacktraceBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+                         * Lists of stack trace frames.
+                         * 
+ * + * repeated .stackify.LogGroup.Log.Error.ErrorItem.TraceFrame stacktrace = 6; + */ + public Builder clearStacktrace() { + if (stacktraceBuilder_ == null) { + stacktrace_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + stacktraceBuilder_.clear(); + } + return this; + } + /** + *
+                         * Lists of stack trace frames.
+                         * 
+ * + * repeated .stackify.LogGroup.Log.Error.ErrorItem.TraceFrame stacktrace = 6; + */ + public Builder removeStacktrace(int index) { + if (stacktraceBuilder_ == null) { + ensureStacktraceIsMutable(); + stacktrace_.remove(index); + onChanged(); + } else { + stacktraceBuilder_.remove(index); + } + return this; + } + /** + *
+                         * Lists of stack trace frames.
+                         * 
+ * + * repeated .stackify.LogGroup.Log.Error.ErrorItem.TraceFrame stacktrace = 6; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame.Builder getStacktraceBuilder( + int index) { + return getStacktraceFieldBuilder().getBuilder(index); + } + /** + *
+                         * Lists of stack trace frames.
+                         * 
+ * + * repeated .stackify.LogGroup.Log.Error.ErrorItem.TraceFrame stacktrace = 6; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrameOrBuilder getStacktraceOrBuilder( + int index) { + if (stacktraceBuilder_ == null) { + return stacktrace_.get(index); } else { + return stacktraceBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+                         * Lists of stack trace frames.
+                         * 
+ * + * repeated .stackify.LogGroup.Log.Error.ErrorItem.TraceFrame stacktrace = 6; + */ + public java.util.List + getStacktraceOrBuilderList() { + if (stacktraceBuilder_ != null) { + return stacktraceBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(stacktrace_); + } + } + /** + *
+                         * Lists of stack trace frames.
+                         * 
+ * + * repeated .stackify.LogGroup.Log.Error.ErrorItem.TraceFrame stacktrace = 6; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame.Builder addStacktraceBuilder() { + return getStacktraceFieldBuilder().addBuilder( + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame.getDefaultInstance()); + } + /** + *
+                         * Lists of stack trace frames.
+                         * 
+ * + * repeated .stackify.LogGroup.Log.Error.ErrorItem.TraceFrame stacktrace = 6; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame.Builder addStacktraceBuilder( + int index) { + return getStacktraceFieldBuilder().addBuilder( + index, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame.getDefaultInstance()); + } + /** + *
+                         * Lists of stack trace frames.
+                         * 
+ * + * repeated .stackify.LogGroup.Log.Error.ErrorItem.TraceFrame stacktrace = 6; + */ + public java.util.List + getStacktraceBuilderList() { + return getStacktraceFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame.Builder, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrameOrBuilder> + getStacktraceFieldBuilder() { + if (stacktraceBuilder_ == null) { + stacktraceBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrame.Builder, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.TraceFrameOrBuilder>( + stacktrace_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + stacktrace_ = null; + } + return stacktraceBuilder_; + } + + private com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem innerError_; + private com.google.protobuf.SingleFieldBuilderV3< + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.Builder, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItemOrBuilder> innerErrorBuilder_; + /** + *
+                         * Optional. Same as Msgs[*]/Ex/Error object.
+                         * 
+ * + * .stackify.LogGroup.Log.Error.ErrorItem inner_error = 7; + */ + public boolean hasInnerError() { + return innerErrorBuilder_ != null || innerError_ != null; + } + /** + *
+                         * Optional. Same as Msgs[*]/Ex/Error object.
+                         * 
+ * + * .stackify.LogGroup.Log.Error.ErrorItem inner_error = 7; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem getInnerError() { + if (innerErrorBuilder_ == null) { + return innerError_ == null ? com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.getDefaultInstance() : innerError_; + } else { + return innerErrorBuilder_.getMessage(); + } + } + /** + *
+                         * Optional. Same as Msgs[*]/Ex/Error object.
+                         * 
+ * + * .stackify.LogGroup.Log.Error.ErrorItem inner_error = 7; + */ + public Builder setInnerError(com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem value) { + if (innerErrorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + innerError_ = value; + onChanged(); + } else { + innerErrorBuilder_.setMessage(value); + } + + return this; + } + /** + *
+                         * Optional. Same as Msgs[*]/Ex/Error object.
+                         * 
+ * + * .stackify.LogGroup.Log.Error.ErrorItem inner_error = 7; + */ + public Builder setInnerError( + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.Builder builderForValue) { + if (innerErrorBuilder_ == null) { + innerError_ = builderForValue.build(); + onChanged(); + } else { + innerErrorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+                         * Optional. Same as Msgs[*]/Ex/Error object.
+                         * 
+ * + * .stackify.LogGroup.Log.Error.ErrorItem inner_error = 7; + */ + public Builder mergeInnerError(com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem value) { + if (innerErrorBuilder_ == null) { + if (innerError_ != null) { + innerError_ = + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.newBuilder(innerError_).mergeFrom(value).buildPartial(); + } else { + innerError_ = value; + } + onChanged(); + } else { + innerErrorBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+                         * Optional. Same as Msgs[*]/Ex/Error object.
+                         * 
+ * + * .stackify.LogGroup.Log.Error.ErrorItem inner_error = 7; + */ + public Builder clearInnerError() { + if (innerErrorBuilder_ == null) { + innerError_ = null; + onChanged(); + } else { + innerError_ = null; + innerErrorBuilder_ = null; + } + + return this; + } + /** + *
+                         * Optional. Same as Msgs[*]/Ex/Error object.
+                         * 
+ * + * .stackify.LogGroup.Log.Error.ErrorItem inner_error = 7; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.Builder getInnerErrorBuilder() { + + onChanged(); + return getInnerErrorFieldBuilder().getBuilder(); + } + /** + *
+                         * Optional. Same as Msgs[*]/Ex/Error object.
+                         * 
+ * + * .stackify.LogGroup.Log.Error.ErrorItem inner_error = 7; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItemOrBuilder getInnerErrorOrBuilder() { + if (innerErrorBuilder_ != null) { + return innerErrorBuilder_.getMessageOrBuilder(); + } else { + return innerError_ == null ? + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.getDefaultInstance() : innerError_; + } + } + /** + *
+                         * Optional. Same as Msgs[*]/Ex/Error object.
+                         * 
+ * + * .stackify.LogGroup.Log.Error.ErrorItem inner_error = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.Builder, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItemOrBuilder> + getInnerErrorFieldBuilder() { + if (innerErrorBuilder_ == null) { + innerErrorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.Builder, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItemOrBuilder>( + getInnerError(), + getParentForChildren(), + isClean()); + innerError_ = null; + } + return innerErrorBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:stackify.LogGroup.Log.Error.ErrorItem) + } + + // @@protoc_insertion_point(class_scope:stackify.LogGroup.Log.Error.ErrorItem) + private static final com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem(); + } + + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ErrorItem parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ErrorItem(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface WebRequestDetailOrBuilder extends + // @@protoc_insertion_point(interface_extends:stackify.LogGroup.Log.Error.WebRequestDetail) + com.google.protobuf.MessageOrBuilder { + + /** + *
+                     * Optional. IP address of the user. Example: "127.0.0.1"
+                     * 
+ * + * string user_ip_address = 1; + */ + java.lang.String getUserIpAddress(); + /** + *
+                     * Optional. IP address of the user. Example: "127.0.0.1"
+                     * 
+ * + * string user_ip_address = 1; + */ + com.google.protobuf.ByteString + getUserIpAddressBytes(); + + /** + *
+                     * Optional. HTTP method (GET, POST, PUT, DELETE, etc.). Example: "GET"
+                     * 
+ * + * string http_method = 2; + */ + java.lang.String getHttpMethod(); + /** + *
+                     * Optional. HTTP method (GET, POST, PUT, DELETE, etc.). Example: "GET"
+                     * 
+ * + * string http_method = 2; + */ + com.google.protobuf.ByteString + getHttpMethodBytes(); + + /** + *
+                     * Optional. HTTP request protocol. Example: "HTTP/1.1"
+                     * 
+ * + * string request_protocol = 3; + */ + java.lang.String getRequestProtocol(); + /** + *
+                     * Optional. HTTP request protocol. Example: "HTTP/1.1"
+                     * 
+ * + * string request_protocol = 3; + */ + com.google.protobuf.ByteString + getRequestProtocolBytes(); + + /** + *
+                     * Optional. HTTP request URL. Example: "https://api.stackify.com/Metrics/IdentifyApp"
+                     * 
+ * + * string request_url = 4; + */ + java.lang.String getRequestUrl(); + /** + *
+                     * Optional. HTTP request URL. Example: "https://api.stackify.com/Metrics/IdentifyApp"
+                     * 
+ * + * string request_url = 4; + */ + com.google.protobuf.ByteString + getRequestUrlBytes(); + + /** + *
+                     * Optional. Request URI. Example: "/Metrics/IdentifyApp"
+                     * 
+ * + * string request_url_root = 5; + */ + java.lang.String getRequestUrlRoot(); + /** + *
+                     * Optional. Request URI. Example: "/Metrics/IdentifyApp"
+                     * 
+ * + * string request_url_root = 5; + */ + com.google.protobuf.ByteString + getRequestUrlRootBytes(); + + /** + *
+                     * Optional. Value of the "referer" header. Example: "https://api.stackify.com/Metrics/IdentifyApp"
+                     * 
+ * + * string referral_url = 6; + */ + java.lang.String getReferralUrl(); + /** + *
+                     * Optional. Value of the "referer" header. Example: "https://api.stackify.com/Metrics/IdentifyApp"
+                     * 
+ * + * string referral_url = 6; + */ + com.google.protobuf.ByteString + getReferralUrlBytes(); + + /** + *
+                     * Optional. HTTP header name/value pairs. Example: {"Content-Type": "application/json", "Content-Encoding":"gzip"}
+                     * 
+ * + * map<string, string> headers = 7; + */ + int getHeadersCount(); + /** + *
+                     * Optional. HTTP header name/value pairs. Example: {"Content-Type": "application/json", "Content-Encoding":"gzip"}
+                     * 
+ * + * map<string, string> headers = 7; + */ + boolean containsHeaders( + java.lang.String key); + /** + * Use {@link #getHeadersMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getHeaders(); + /** + *
+                     * Optional. HTTP header name/value pairs. Example: {"Content-Type": "application/json", "Content-Encoding":"gzip"}
+                     * 
+ * + * map<string, string> headers = 7; + */ + java.util.Map + getHeadersMap(); + /** + *
+                     * Optional. HTTP header name/value pairs. Example: {"Content-Type": "application/json", "Content-Encoding":"gzip"}
+                     * 
+ * + * map<string, string> headers = 7; + */ + + java.lang.String getHeadersOrDefault( + java.lang.String key, + java.lang.String defaultValue); + /** + *
+                     * Optional. HTTP header name/value pairs. Example: {"Content-Type": "application/json", "Content-Encoding":"gzip"}
+                     * 
+ * + * map<string, string> headers = 7; + */ + + java.lang.String getHeadersOrThrow( + java.lang.String key); + + /** + *
+                     * Optional. HTTP cookie name/value pairs. We mask all cookie values with "X-MASKED-X". Example: {"name": "X-MASKED-X"}
+                     * 
+ * + * map<string, string> cookies = 8; + */ + int getCookiesCount(); + /** + *
+                     * Optional. HTTP cookie name/value pairs. We mask all cookie values with "X-MASKED-X". Example: {"name": "X-MASKED-X"}
+                     * 
+ * + * map<string, string> cookies = 8; + */ + boolean containsCookies( + java.lang.String key); + /** + * Use {@link #getCookiesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getCookies(); + /** + *
+                     * Optional. HTTP cookie name/value pairs. We mask all cookie values with "X-MASKED-X". Example: {"name": "X-MASKED-X"}
+                     * 
+ * + * map<string, string> cookies = 8; + */ + java.util.Map + getCookiesMap(); + /** + *
+                     * Optional. HTTP cookie name/value pairs. We mask all cookie values with "X-MASKED-X". Example: {"name": "X-MASKED-X"}
+                     * 
+ * + * map<string, string> cookies = 8; + */ + + java.lang.String getCookiesOrDefault( + java.lang.String key, + java.lang.String defaultValue); + /** + *
+                     * Optional. HTTP cookie name/value pairs. We mask all cookie values with "X-MASKED-X". Example: {"name": "X-MASKED-X"}
+                     * 
+ * + * map<string, string> cookies = 8; + */ + + java.lang.String getCookiesOrThrow( + java.lang.String key); + + /** + *
+                     * Optional. HTTP query string name/value pairs. Example: {"name": "value"}
+                     * 
+ * + * map<string, string> querystring = 9; + */ + int getQuerystringCount(); + /** + *
+                     * Optional. HTTP query string name/value pairs. Example: {"name": "value"}
+                     * 
+ * + * map<string, string> querystring = 9; + */ + boolean containsQuerystring( + java.lang.String key); + /** + * Use {@link #getQuerystringMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getQuerystring(); + /** + *
+                     * Optional. HTTP query string name/value pairs. Example: {"name": "value"}
+                     * 
+ * + * map<string, string> querystring = 9; + */ + java.util.Map + getQuerystringMap(); + /** + *
+                     * Optional. HTTP query string name/value pairs. Example: {"name": "value"}
+                     * 
+ * + * map<string, string> querystring = 9; + */ + + java.lang.String getQuerystringOrDefault( + java.lang.String key, + java.lang.String defaultValue); + /** + *
+                     * Optional. HTTP query string name/value pairs. Example: {"name": "value"}
+                     * 
+ * + * map<string, string> querystring = 9; + */ + + java.lang.String getQuerystringOrThrow( + java.lang.String key); + + /** + *
+                     * Optional. HTTP post data name/value pairs. Example: {"name": "value"}
+                     * 
+ * + * map<string, string> post_data = 10; + */ + int getPostDataCount(); + /** + *
+                     * Optional. HTTP post data name/value pairs. Example: {"name": "value"}
+                     * 
+ * + * map<string, string> post_data = 10; + */ + boolean containsPostData( + java.lang.String key); + /** + * Use {@link #getPostDataMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getPostData(); + /** + *
+                     * Optional. HTTP post data name/value pairs. Example: {"name": "value"}
+                     * 
+ * + * map<string, string> post_data = 10; + */ + java.util.Map + getPostDataMap(); + /** + *
+                     * Optional. HTTP post data name/value pairs. Example: {"name": "value"}
+                     * 
+ * + * map<string, string> post_data = 10; + */ + + java.lang.String getPostDataOrDefault( + java.lang.String key, + java.lang.String defaultValue); + /** + *
+                     * Optional. HTTP post data name/value pairs. Example: {"name": "value"}
+                     * 
+ * + * map<string, string> post_data = 10; + */ + + java.lang.String getPostDataOrThrow( + java.lang.String key); + + /** + *
+                     * Optional. HTTP session name/value pairs. We mask all session values with "X-MASKED-X". Example: {"name": "X-MASKED-X"}
+                     * 
+ * + * map<string, string> session_data = 11; + */ + int getSessionDataCount(); + /** + *
+                     * Optional. HTTP session name/value pairs. We mask all session values with "X-MASKED-X". Example: {"name": "X-MASKED-X"}
+                     * 
+ * + * map<string, string> session_data = 11; + */ + boolean containsSessionData( + java.lang.String key); + /** + * Use {@link #getSessionDataMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getSessionData(); + /** + *
+                     * Optional. HTTP session name/value pairs. We mask all session values with "X-MASKED-X". Example: {"name": "X-MASKED-X"}
+                     * 
+ * + * map<string, string> session_data = 11; + */ + java.util.Map + getSessionDataMap(); + /** + *
+                     * Optional. HTTP session name/value pairs. We mask all session values with "X-MASKED-X". Example: {"name": "X-MASKED-X"}
+                     * 
+ * + * map<string, string> session_data = 11; + */ + + java.lang.String getSessionDataOrDefault( + java.lang.String key, + java.lang.String defaultValue); + /** + *
+                     * Optional. HTTP session name/value pairs. We mask all session values with "X-MASKED-X". Example: {"name": "X-MASKED-X"}
+                     * 
+ * + * map<string, string> session_data = 11; + */ + + java.lang.String getSessionDataOrThrow( + java.lang.String key); + + /** + *
+                     * Optional. HTTP raw post data. Example: "name=value"
+                     * 
+ * + * string post_data_raw = 12; + */ + java.lang.String getPostDataRaw(); + /** + *
+                     * Optional. HTTP raw post data. Example: "name=value"
+                     * 
+ * + * string post_data_raw = 12; + */ + com.google.protobuf.ByteString + getPostDataRawBytes(); + + /** + *
+                     * Optional. MVC area. Example: "API"
+                     * 
+ * + * string mvc_action = 13; + */ + java.lang.String getMvcAction(); + /** + *
+                     * Optional. MVC area. Example: "API"
+                     * 
+ * + * string mvc_action = 13; + */ + com.google.protobuf.ByteString + getMvcActionBytes(); + + /** + *
+                     * Optional. MVC controller.  Example: "Metrics"
+                     * 
+ * + * string mvc_controller = 14; + */ + java.lang.String getMvcController(); + /** + *
+                     * Optional. MVC controller.  Example: "Metrics"
+                     * 
+ * + * string mvc_controller = 14; + */ + com.google.protobuf.ByteString + getMvcControllerBytes(); + + /** + *
+                     * Optional. MVC action. Example: "IdentifyApp"
+                     * 
+ * + * string mvc_area = 15; + */ + java.lang.String getMvcArea(); + /** + *
+                     * Optional. MVC action. Example: "IdentifyApp"
+                     * 
+ * + * string mvc_area = 15; + */ + com.google.protobuf.ByteString + getMvcAreaBytes(); + } + /** + * Protobuf type {@code stackify.LogGroup.Log.Error.WebRequestDetail} + */ + public static final class WebRequestDetail extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:stackify.LogGroup.Log.Error.WebRequestDetail) + WebRequestDetailOrBuilder { + private static final long serialVersionUID = 0L; + // Use WebRequestDetail.newBuilder() to construct. + private WebRequestDetail(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private WebRequestDetail() { + userIpAddress_ = ""; + httpMethod_ = ""; + requestProtocol_ = ""; + requestUrl_ = ""; + requestUrlRoot_ = ""; + referralUrl_ = ""; + postDataRaw_ = ""; + mvcAction_ = ""; + mvcController_ = ""; + mvcArea_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new WebRequestDetail(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private WebRequestDetail( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + userIpAddress_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + httpMethod_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + requestProtocol_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + requestUrl_ = s; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + requestUrlRoot_ = s; + break; + } + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + + referralUrl_ = s; + break; + } + case 58: { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + headers_ = com.google.protobuf.MapField.newMapField( + HeadersDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry + headers__ = input.readMessage( + HeadersDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + headers_.getMutableMap().put( + headers__.getKey(), headers__.getValue()); + break; + } + case 66: { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + cookies_ = com.google.protobuf.MapField.newMapField( + CookiesDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry + cookies__ = input.readMessage( + CookiesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + cookies_.getMutableMap().put( + cookies__.getKey(), cookies__.getValue()); + break; + } + case 74: { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + querystring_ = com.google.protobuf.MapField.newMapField( + QuerystringDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000004; + } + com.google.protobuf.MapEntry + querystring__ = input.readMessage( + QuerystringDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + querystring_.getMutableMap().put( + querystring__.getKey(), querystring__.getValue()); + break; + } + case 82: { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + postData_ = com.google.protobuf.MapField.newMapField( + PostDataDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000008; + } + com.google.protobuf.MapEntry + postData__ = input.readMessage( + PostDataDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + postData_.getMutableMap().put( + postData__.getKey(), postData__.getValue()); + break; + } + case 90: { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + sessionData_ = com.google.protobuf.MapField.newMapField( + SessionDataDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000010; + } + com.google.protobuf.MapEntry + sessionData__ = input.readMessage( + SessionDataDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + sessionData_.getMutableMap().put( + sessionData__.getKey(), sessionData__.getValue()); + break; + } + case 98: { + java.lang.String s = input.readStringRequireUtf8(); + + postDataRaw_ = s; + break; + } + case 106: { + java.lang.String s = input.readStringRequireUtf8(); + + mvcAction_ = s; + break; + } + case 114: { + java.lang.String s = input.readStringRequireUtf8(); + + mvcController_ = s; + break; + } + case 122: { + java.lang.String s = input.readStringRequireUtf8(); + + mvcArea_ = s; + break; + } + default: { + if (!parseUnknownField( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 7: + return internalGetHeaders(); + case 8: + return internalGetCookies(); + case 9: + return internalGetQuerystring(); + case 10: + return internalGetPostData(); + case 11: + return internalGetSessionData(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail.class, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail.Builder.class); + } + + public static final int USER_IP_ADDRESS_FIELD_NUMBER = 1; + private volatile java.lang.Object userIpAddress_; + /** + *
+                     * Optional. IP address of the user. Example: "127.0.0.1"
+                     * 
+ * + * string user_ip_address = 1; + */ + public java.lang.String getUserIpAddress() { + java.lang.Object ref = userIpAddress_; + 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(); + userIpAddress_ = s; + return s; + } + } + /** + *
+                     * Optional. IP address of the user. Example: "127.0.0.1"
+                     * 
+ * + * string user_ip_address = 1; + */ + public com.google.protobuf.ByteString + getUserIpAddressBytes() { + java.lang.Object ref = userIpAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userIpAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HTTP_METHOD_FIELD_NUMBER = 2; + private volatile java.lang.Object httpMethod_; + /** + *
+                     * Optional. HTTP method (GET, POST, PUT, DELETE, etc.). Example: "GET"
+                     * 
+ * + * string http_method = 2; + */ + public java.lang.String getHttpMethod() { + java.lang.Object ref = httpMethod_; + 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(); + httpMethod_ = s; + return s; + } + } + /** + *
+                     * Optional. HTTP method (GET, POST, PUT, DELETE, etc.). Example: "GET"
+                     * 
+ * + * string http_method = 2; + */ + public com.google.protobuf.ByteString + getHttpMethodBytes() { + java.lang.Object ref = httpMethod_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + httpMethod_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_PROTOCOL_FIELD_NUMBER = 3; + private volatile java.lang.Object requestProtocol_; + /** + *
+                     * Optional. HTTP request protocol. Example: "HTTP/1.1"
+                     * 
+ * + * string request_protocol = 3; + */ + public java.lang.String getRequestProtocol() { + java.lang.Object ref = requestProtocol_; + 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(); + requestProtocol_ = s; + return s; + } + } + /** + *
+                     * Optional. HTTP request protocol. Example: "HTTP/1.1"
+                     * 
+ * + * string request_protocol = 3; + */ + public com.google.protobuf.ByteString + getRequestProtocolBytes() { + java.lang.Object ref = requestProtocol_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestProtocol_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_URL_FIELD_NUMBER = 4; + private volatile java.lang.Object requestUrl_; + /** + *
+                     * Optional. HTTP request URL. Example: "https://api.stackify.com/Metrics/IdentifyApp"
+                     * 
+ * + * string request_url = 4; + */ + public java.lang.String getRequestUrl() { + java.lang.Object ref = requestUrl_; + 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(); + requestUrl_ = s; + return s; + } + } + /** + *
+                     * Optional. HTTP request URL. Example: "https://api.stackify.com/Metrics/IdentifyApp"
+                     * 
+ * + * string request_url = 4; + */ + public com.google.protobuf.ByteString + getRequestUrlBytes() { + java.lang.Object ref = requestUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_URL_ROOT_FIELD_NUMBER = 5; + private volatile java.lang.Object requestUrlRoot_; + /** + *
+                     * Optional. Request URI. Example: "/Metrics/IdentifyApp"
+                     * 
+ * + * string request_url_root = 5; + */ + public java.lang.String getRequestUrlRoot() { + java.lang.Object ref = requestUrlRoot_; + 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(); + requestUrlRoot_ = s; + return s; + } + } + /** + *
+                     * Optional. Request URI. Example: "/Metrics/IdentifyApp"
+                     * 
+ * + * string request_url_root = 5; + */ + public com.google.protobuf.ByteString + getRequestUrlRootBytes() { + java.lang.Object ref = requestUrlRoot_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestUrlRoot_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REFERRAL_URL_FIELD_NUMBER = 6; + private volatile java.lang.Object referralUrl_; + /** + *
+                     * Optional. Value of the "referer" header. Example: "https://api.stackify.com/Metrics/IdentifyApp"
+                     * 
+ * + * string referral_url = 6; + */ + public java.lang.String getReferralUrl() { + java.lang.Object ref = referralUrl_; + 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(); + referralUrl_ = s; + return s; + } + } + /** + *
+                     * Optional. Value of the "referer" header. Example: "https://api.stackify.com/Metrics/IdentifyApp"
+                     * 
+ * + * string referral_url = 6; + */ + public com.google.protobuf.ByteString + getReferralUrlBytes() { + java.lang.Object ref = referralUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + referralUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HEADERS_FIELD_NUMBER = 7; + private static final class HeadersDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_HeadersEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> headers_; + private com.google.protobuf.MapField + internalGetHeaders() { + if (headers_ == null) { + return com.google.protobuf.MapField.emptyMapField( + HeadersDefaultEntryHolder.defaultEntry); + } + return headers_; + } + + public int getHeadersCount() { + return internalGetHeaders().getMap().size(); + } + /** + *
+                     * Optional. HTTP header name/value pairs. Example: {"Content-Type": "application/json", "Content-Encoding":"gzip"}
+                     * 
+ * + * map<string, string> headers = 7; + */ + + public boolean containsHeaders( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetHeaders().getMap().containsKey(key); + } + /** + * Use {@link #getHeadersMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getHeaders() { + return getHeadersMap(); + } + /** + *
+                     * Optional. HTTP header name/value pairs. Example: {"Content-Type": "application/json", "Content-Encoding":"gzip"}
+                     * 
+ * + * map<string, string> headers = 7; + */ + + public java.util.Map getHeadersMap() { + return internalGetHeaders().getMap(); + } + /** + *
+                     * Optional. HTTP header name/value pairs. Example: {"Content-Type": "application/json", "Content-Encoding":"gzip"}
+                     * 
+ * + * map<string, string> headers = 7; + */ + + public java.lang.String getHeadersOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetHeaders().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+                     * Optional. HTTP header name/value pairs. Example: {"Content-Type": "application/json", "Content-Encoding":"gzip"}
+                     * 
+ * + * map<string, string> headers = 7; + */ + + public java.lang.String getHeadersOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetHeaders().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int COOKIES_FIELD_NUMBER = 8; + private static final class CookiesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_CookiesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> cookies_; + private com.google.protobuf.MapField + internalGetCookies() { + if (cookies_ == null) { + return com.google.protobuf.MapField.emptyMapField( + CookiesDefaultEntryHolder.defaultEntry); + } + return cookies_; + } + + public int getCookiesCount() { + return internalGetCookies().getMap().size(); + } + /** + *
+                     * Optional. HTTP cookie name/value pairs. We mask all cookie values with "X-MASKED-X". Example: {"name": "X-MASKED-X"}
+                     * 
+ * + * map<string, string> cookies = 8; + */ + + public boolean containsCookies( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetCookies().getMap().containsKey(key); + } + /** + * Use {@link #getCookiesMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getCookies() { + return getCookiesMap(); + } + /** + *
+                     * Optional. HTTP cookie name/value pairs. We mask all cookie values with "X-MASKED-X". Example: {"name": "X-MASKED-X"}
+                     * 
+ * + * map<string, string> cookies = 8; + */ + + public java.util.Map getCookiesMap() { + return internalGetCookies().getMap(); + } + /** + *
+                     * Optional. HTTP cookie name/value pairs. We mask all cookie values with "X-MASKED-X". Example: {"name": "X-MASKED-X"}
+                     * 
+ * + * map<string, string> cookies = 8; + */ + + public java.lang.String getCookiesOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetCookies().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+                     * Optional. HTTP cookie name/value pairs. We mask all cookie values with "X-MASKED-X". Example: {"name": "X-MASKED-X"}
+                     * 
+ * + * map<string, string> cookies = 8; + */ + + public java.lang.String getCookiesOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetCookies().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int QUERYSTRING_FIELD_NUMBER = 9; + private static final class QuerystringDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_QuerystringEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> querystring_; + private com.google.protobuf.MapField + internalGetQuerystring() { + if (querystring_ == null) { + return com.google.protobuf.MapField.emptyMapField( + QuerystringDefaultEntryHolder.defaultEntry); + } + return querystring_; + } + + public int getQuerystringCount() { + return internalGetQuerystring().getMap().size(); + } + /** + *
+                     * Optional. HTTP query string name/value pairs. Example: {"name": "value"}
+                     * 
+ * + * map<string, string> querystring = 9; + */ + + public boolean containsQuerystring( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetQuerystring().getMap().containsKey(key); + } + /** + * Use {@link #getQuerystringMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getQuerystring() { + return getQuerystringMap(); + } + /** + *
+                     * Optional. HTTP query string name/value pairs. Example: {"name": "value"}
+                     * 
+ * + * map<string, string> querystring = 9; + */ + + public java.util.Map getQuerystringMap() { + return internalGetQuerystring().getMap(); + } + /** + *
+                     * Optional. HTTP query string name/value pairs. Example: {"name": "value"}
+                     * 
+ * + * map<string, string> querystring = 9; + */ + + public java.lang.String getQuerystringOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetQuerystring().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+                     * Optional. HTTP query string name/value pairs. Example: {"name": "value"}
+                     * 
+ * + * map<string, string> querystring = 9; + */ + + public java.lang.String getQuerystringOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetQuerystring().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int POST_DATA_FIELD_NUMBER = 10; + private static final class PostDataDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_PostDataEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> postData_; + private com.google.protobuf.MapField + internalGetPostData() { + if (postData_ == null) { + return com.google.protobuf.MapField.emptyMapField( + PostDataDefaultEntryHolder.defaultEntry); + } + return postData_; + } + + public int getPostDataCount() { + return internalGetPostData().getMap().size(); + } + /** + *
+                     * Optional. HTTP post data name/value pairs. Example: {"name": "value"}
+                     * 
+ * + * map<string, string> post_data = 10; + */ + + public boolean containsPostData( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetPostData().getMap().containsKey(key); + } + /** + * Use {@link #getPostDataMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getPostData() { + return getPostDataMap(); + } + /** + *
+                     * Optional. HTTP post data name/value pairs. Example: {"name": "value"}
+                     * 
+ * + * map<string, string> post_data = 10; + */ + + public java.util.Map getPostDataMap() { + return internalGetPostData().getMap(); + } + /** + *
+                     * Optional. HTTP post data name/value pairs. Example: {"name": "value"}
+                     * 
+ * + * map<string, string> post_data = 10; + */ + + public java.lang.String getPostDataOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetPostData().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+                     * Optional. HTTP post data name/value pairs. Example: {"name": "value"}
+                     * 
+ * + * map<string, string> post_data = 10; + */ + + public java.lang.String getPostDataOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetPostData().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int SESSION_DATA_FIELD_NUMBER = 11; + private static final class SessionDataDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_SessionDataEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> sessionData_; + private com.google.protobuf.MapField + internalGetSessionData() { + if (sessionData_ == null) { + return com.google.protobuf.MapField.emptyMapField( + SessionDataDefaultEntryHolder.defaultEntry); + } + return sessionData_; + } + + public int getSessionDataCount() { + return internalGetSessionData().getMap().size(); + } + /** + *
+                     * Optional. HTTP session name/value pairs. We mask all session values with "X-MASKED-X". Example: {"name": "X-MASKED-X"}
+                     * 
+ * + * map<string, string> session_data = 11; + */ + + public boolean containsSessionData( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetSessionData().getMap().containsKey(key); + } + /** + * Use {@link #getSessionDataMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getSessionData() { + return getSessionDataMap(); + } + /** + *
+                     * Optional. HTTP session name/value pairs. We mask all session values with "X-MASKED-X". Example: {"name": "X-MASKED-X"}
+                     * 
+ * + * map<string, string> session_data = 11; + */ + + public java.util.Map getSessionDataMap() { + return internalGetSessionData().getMap(); + } + /** + *
+                     * Optional. HTTP session name/value pairs. We mask all session values with "X-MASKED-X". Example: {"name": "X-MASKED-X"}
+                     * 
+ * + * map<string, string> session_data = 11; + */ + + public java.lang.String getSessionDataOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetSessionData().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+                     * Optional. HTTP session name/value pairs. We mask all session values with "X-MASKED-X". Example: {"name": "X-MASKED-X"}
+                     * 
+ * + * map<string, string> session_data = 11; + */ + + public java.lang.String getSessionDataOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetSessionData().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int POST_DATA_RAW_FIELD_NUMBER = 12; + private volatile java.lang.Object postDataRaw_; + /** + *
+                     * Optional. HTTP raw post data. Example: "name=value"
+                     * 
+ * + * string post_data_raw = 12; + */ + public java.lang.String getPostDataRaw() { + java.lang.Object ref = postDataRaw_; + 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(); + postDataRaw_ = s; + return s; + } + } + /** + *
+                     * Optional. HTTP raw post data. Example: "name=value"
+                     * 
+ * + * string post_data_raw = 12; + */ + public com.google.protobuf.ByteString + getPostDataRawBytes() { + java.lang.Object ref = postDataRaw_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + postDataRaw_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MVC_ACTION_FIELD_NUMBER = 13; + private volatile java.lang.Object mvcAction_; + /** + *
+                     * Optional. MVC area. Example: "API"
+                     * 
+ * + * string mvc_action = 13; + */ + public java.lang.String getMvcAction() { + java.lang.Object ref = mvcAction_; + 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(); + mvcAction_ = s; + return s; + } + } + /** + *
+                     * Optional. MVC area. Example: "API"
+                     * 
+ * + * string mvc_action = 13; + */ + public com.google.protobuf.ByteString + getMvcActionBytes() { + java.lang.Object ref = mvcAction_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mvcAction_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MVC_CONTROLLER_FIELD_NUMBER = 14; + private volatile java.lang.Object mvcController_; + /** + *
+                     * Optional. MVC controller.  Example: "Metrics"
+                     * 
+ * + * string mvc_controller = 14; + */ + public java.lang.String getMvcController() { + java.lang.Object ref = mvcController_; + 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(); + mvcController_ = s; + return s; + } + } + /** + *
+                     * Optional. MVC controller.  Example: "Metrics"
+                     * 
+ * + * string mvc_controller = 14; + */ + public com.google.protobuf.ByteString + getMvcControllerBytes() { + java.lang.Object ref = mvcController_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mvcController_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MVC_AREA_FIELD_NUMBER = 15; + private volatile java.lang.Object mvcArea_; + /** + *
+                     * Optional. MVC action. Example: "IdentifyApp"
+                     * 
+ * + * string mvc_area = 15; + */ + public java.lang.String getMvcArea() { + java.lang.Object ref = mvcArea_; + 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(); + mvcArea_ = s; + return s; + } + } + /** + *
+                     * Optional. MVC action. Example: "IdentifyApp"
+                     * 
+ * + * string mvc_area = 15; + */ + public com.google.protobuf.ByteString + getMvcAreaBytes() { + java.lang.Object ref = mvcArea_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mvcArea_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getUserIpAddressBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, userIpAddress_); + } + if (!getHttpMethodBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, httpMethod_); + } + if (!getRequestProtocolBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestProtocol_); + } + if (!getRequestUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestUrl_); + } + if (!getRequestUrlRootBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, requestUrlRoot_); + } + if (!getReferralUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, referralUrl_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetHeaders(), + HeadersDefaultEntryHolder.defaultEntry, + 7); + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetCookies(), + CookiesDefaultEntryHolder.defaultEntry, + 8); + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetQuerystring(), + QuerystringDefaultEntryHolder.defaultEntry, + 9); + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetPostData(), + PostDataDefaultEntryHolder.defaultEntry, + 10); + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetSessionData(), + SessionDataDefaultEntryHolder.defaultEntry, + 11); + if (!getPostDataRawBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, postDataRaw_); + } + if (!getMvcActionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, mvcAction_); + } + if (!getMvcControllerBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 14, mvcController_); + } + if (!getMvcAreaBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 15, mvcArea_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getUserIpAddressBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, userIpAddress_); + } + if (!getHttpMethodBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, httpMethod_); + } + if (!getRequestProtocolBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestProtocol_); + } + if (!getRequestUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestUrl_); + } + if (!getRequestUrlRootBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, requestUrlRoot_); + } + if (!getReferralUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, referralUrl_); + } + for (java.util.Map.Entry entry + : internalGetHeaders().getMap().entrySet()) { + com.google.protobuf.MapEntry + headers__ = HeadersDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, headers__); + } + for (java.util.Map.Entry entry + : internalGetCookies().getMap().entrySet()) { + com.google.protobuf.MapEntry + cookies__ = CookiesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, cookies__); + } + for (java.util.Map.Entry entry + : internalGetQuerystring().getMap().entrySet()) { + com.google.protobuf.MapEntry + querystring__ = QuerystringDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, querystring__); + } + for (java.util.Map.Entry entry + : internalGetPostData().getMap().entrySet()) { + com.google.protobuf.MapEntry + postData__ = PostDataDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, postData__); + } + for (java.util.Map.Entry entry + : internalGetSessionData().getMap().entrySet()) { + com.google.protobuf.MapEntry + sessionData__ = SessionDataDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, sessionData__); + } + if (!getPostDataRawBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, postDataRaw_); + } + if (!getMvcActionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, mvcAction_); + } + if (!getMvcControllerBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, mvcController_); + } + if (!getMvcAreaBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, mvcArea_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail)) { + return super.equals(obj); + } + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail other = (com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail) obj; + + if (!getUserIpAddress() + .equals(other.getUserIpAddress())) return false; + if (!getHttpMethod() + .equals(other.getHttpMethod())) return false; + if (!getRequestProtocol() + .equals(other.getRequestProtocol())) return false; + if (!getRequestUrl() + .equals(other.getRequestUrl())) return false; + if (!getRequestUrlRoot() + .equals(other.getRequestUrlRoot())) return false; + if (!getReferralUrl() + .equals(other.getReferralUrl())) return false; + if (!internalGetHeaders().equals( + other.internalGetHeaders())) return false; + if (!internalGetCookies().equals( + other.internalGetCookies())) return false; + if (!internalGetQuerystring().equals( + other.internalGetQuerystring())) return false; + if (!internalGetPostData().equals( + other.internalGetPostData())) return false; + if (!internalGetSessionData().equals( + other.internalGetSessionData())) return false; + if (!getPostDataRaw() + .equals(other.getPostDataRaw())) return false; + if (!getMvcAction() + .equals(other.getMvcAction())) return false; + if (!getMvcController() + .equals(other.getMvcController())) return false; + if (!getMvcArea() + .equals(other.getMvcArea())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + USER_IP_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getUserIpAddress().hashCode(); + hash = (37 * hash) + HTTP_METHOD_FIELD_NUMBER; + hash = (53 * hash) + getHttpMethod().hashCode(); + hash = (37 * hash) + REQUEST_PROTOCOL_FIELD_NUMBER; + hash = (53 * hash) + getRequestProtocol().hashCode(); + hash = (37 * hash) + REQUEST_URL_FIELD_NUMBER; + hash = (53 * hash) + getRequestUrl().hashCode(); + hash = (37 * hash) + REQUEST_URL_ROOT_FIELD_NUMBER; + hash = (53 * hash) + getRequestUrlRoot().hashCode(); + hash = (37 * hash) + REFERRAL_URL_FIELD_NUMBER; + hash = (53 * hash) + getReferralUrl().hashCode(); + if (!internalGetHeaders().getMap().isEmpty()) { + hash = (37 * hash) + HEADERS_FIELD_NUMBER; + hash = (53 * hash) + internalGetHeaders().hashCode(); + } + if (!internalGetCookies().getMap().isEmpty()) { + hash = (37 * hash) + COOKIES_FIELD_NUMBER; + hash = (53 * hash) + internalGetCookies().hashCode(); + } + if (!internalGetQuerystring().getMap().isEmpty()) { + hash = (37 * hash) + QUERYSTRING_FIELD_NUMBER; + hash = (53 * hash) + internalGetQuerystring().hashCode(); + } + if (!internalGetPostData().getMap().isEmpty()) { + hash = (37 * hash) + POST_DATA_FIELD_NUMBER; + hash = (53 * hash) + internalGetPostData().hashCode(); + } + if (!internalGetSessionData().getMap().isEmpty()) { + hash = (37 * hash) + SESSION_DATA_FIELD_NUMBER; + hash = (53 * hash) + internalGetSessionData().hashCode(); + } + hash = (37 * hash) + POST_DATA_RAW_FIELD_NUMBER; + hash = (53 * hash) + getPostDataRaw().hashCode(); + hash = (37 * hash) + MVC_ACTION_FIELD_NUMBER; + hash = (53 * hash) + getMvcAction().hashCode(); + hash = (37 * hash) + MVC_CONTROLLER_FIELD_NUMBER; + hash = (53 * hash) + getMvcController().hashCode(); + hash = (37 * hash) + MVC_AREA_FIELD_NUMBER; + hash = (53 * hash) + getMvcArea().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code stackify.LogGroup.Log.Error.WebRequestDetail} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:stackify.LogGroup.Log.Error.WebRequestDetail) + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetailOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 7: + return internalGetHeaders(); + case 8: + return internalGetCookies(); + case 9: + return internalGetQuerystring(); + case 10: + return internalGetPostData(); + case 11: + return internalGetSessionData(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 7: + return internalGetMutableHeaders(); + case 8: + return internalGetMutableCookies(); + case 9: + return internalGetMutableQuerystring(); + case 10: + return internalGetMutablePostData(); + case 11: + return internalGetMutableSessionData(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail.class, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail.Builder.class); + } + + // Construct using com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + userIpAddress_ = ""; + + httpMethod_ = ""; + + requestProtocol_ = ""; + + requestUrl_ = ""; + + requestUrlRoot_ = ""; + + referralUrl_ = ""; + + internalGetMutableHeaders().clear(); + internalGetMutableCookies().clear(); + internalGetMutableQuerystring().clear(); + internalGetMutablePostData().clear(); + internalGetMutableSessionData().clear(); + postDataRaw_ = ""; + + mvcAction_ = ""; + + mvcController_ = ""; + + mvcArea_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_descriptor; + } + + @java.lang.Override + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail getDefaultInstanceForType() { + return com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail.getDefaultInstance(); + } + + @java.lang.Override + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail build() { + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail buildPartial() { + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail result = new com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail(this); + int from_bitField0_ = bitField0_; + result.userIpAddress_ = userIpAddress_; + result.httpMethod_ = httpMethod_; + result.requestProtocol_ = requestProtocol_; + result.requestUrl_ = requestUrl_; + result.requestUrlRoot_ = requestUrlRoot_; + result.referralUrl_ = referralUrl_; + result.headers_ = internalGetHeaders(); + result.headers_.makeImmutable(); + result.cookies_ = internalGetCookies(); + result.cookies_.makeImmutable(); + result.querystring_ = internalGetQuerystring(); + result.querystring_.makeImmutable(); + result.postData_ = internalGetPostData(); + result.postData_.makeImmutable(); + result.sessionData_ = internalGetSessionData(); + result.sessionData_.makeImmutable(); + result.postDataRaw_ = postDataRaw_; + result.mvcAction_ = mvcAction_; + result.mvcController_ = mvcController_; + result.mvcArea_ = mvcArea_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail) { + return mergeFrom((com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail other) { + if (other == com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail.getDefaultInstance()) return this; + if (!other.getUserIpAddress().isEmpty()) { + userIpAddress_ = other.userIpAddress_; + onChanged(); + } + if (!other.getHttpMethod().isEmpty()) { + httpMethod_ = other.httpMethod_; + onChanged(); + } + if (!other.getRequestProtocol().isEmpty()) { + requestProtocol_ = other.requestProtocol_; + onChanged(); + } + if (!other.getRequestUrl().isEmpty()) { + requestUrl_ = other.requestUrl_; + onChanged(); + } + if (!other.getRequestUrlRoot().isEmpty()) { + requestUrlRoot_ = other.requestUrlRoot_; + onChanged(); + } + if (!other.getReferralUrl().isEmpty()) { + referralUrl_ = other.referralUrl_; + onChanged(); + } + internalGetMutableHeaders().mergeFrom( + other.internalGetHeaders()); + internalGetMutableCookies().mergeFrom( + other.internalGetCookies()); + internalGetMutableQuerystring().mergeFrom( + other.internalGetQuerystring()); + internalGetMutablePostData().mergeFrom( + other.internalGetPostData()); + internalGetMutableSessionData().mergeFrom( + other.internalGetSessionData()); + if (!other.getPostDataRaw().isEmpty()) { + postDataRaw_ = other.postDataRaw_; + onChanged(); + } + if (!other.getMvcAction().isEmpty()) { + mvcAction_ = other.mvcAction_; + onChanged(); + } + if (!other.getMvcController().isEmpty()) { + mvcController_ = other.mvcController_; + onChanged(); + } + if (!other.getMvcArea().isEmpty()) { + mvcArea_ = other.mvcArea_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object userIpAddress_ = ""; + /** + *
+                         * Optional. IP address of the user. Example: "127.0.0.1"
+                         * 
+ * + * string user_ip_address = 1; + */ + public java.lang.String getUserIpAddress() { + java.lang.Object ref = userIpAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userIpAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+                         * Optional. IP address of the user. Example: "127.0.0.1"
+                         * 
+ * + * string user_ip_address = 1; + */ + public com.google.protobuf.ByteString + getUserIpAddressBytes() { + java.lang.Object ref = userIpAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userIpAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+                         * Optional. IP address of the user. Example: "127.0.0.1"
+                         * 
+ * + * string user_ip_address = 1; + */ + public Builder setUserIpAddress( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + userIpAddress_ = value; + onChanged(); + return this; + } + /** + *
+                         * Optional. IP address of the user. Example: "127.0.0.1"
+                         * 
+ * + * string user_ip_address = 1; + */ + public Builder clearUserIpAddress() { + + userIpAddress_ = getDefaultInstance().getUserIpAddress(); + onChanged(); + return this; + } + /** + *
+                         * Optional. IP address of the user. Example: "127.0.0.1"
+                         * 
+ * + * string user_ip_address = 1; + */ + public Builder setUserIpAddressBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + userIpAddress_ = value; + onChanged(); + return this; + } + + private java.lang.Object httpMethod_ = ""; + /** + *
+                         * Optional. HTTP method (GET, POST, PUT, DELETE, etc.). Example: "GET"
+                         * 
+ * + * string http_method = 2; + */ + public java.lang.String getHttpMethod() { + java.lang.Object ref = httpMethod_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + httpMethod_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+                         * Optional. HTTP method (GET, POST, PUT, DELETE, etc.). Example: "GET"
+                         * 
+ * + * string http_method = 2; + */ + public com.google.protobuf.ByteString + getHttpMethodBytes() { + java.lang.Object ref = httpMethod_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + httpMethod_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+                         * Optional. HTTP method (GET, POST, PUT, DELETE, etc.). Example: "GET"
+                         * 
+ * + * string http_method = 2; + */ + public Builder setHttpMethod( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + httpMethod_ = value; + onChanged(); + return this; + } + /** + *
+                         * Optional. HTTP method (GET, POST, PUT, DELETE, etc.). Example: "GET"
+                         * 
+ * + * string http_method = 2; + */ + public Builder clearHttpMethod() { + + httpMethod_ = getDefaultInstance().getHttpMethod(); + onChanged(); + return this; + } + /** + *
+                         * Optional. HTTP method (GET, POST, PUT, DELETE, etc.). Example: "GET"
+                         * 
+ * + * string http_method = 2; + */ + public Builder setHttpMethodBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + httpMethod_ = value; + onChanged(); + return this; + } + + private java.lang.Object requestProtocol_ = ""; + /** + *
+                         * Optional. HTTP request protocol. Example: "HTTP/1.1"
+                         * 
+ * + * string request_protocol = 3; + */ + public java.lang.String getRequestProtocol() { + java.lang.Object ref = requestProtocol_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestProtocol_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+                         * Optional. HTTP request protocol. Example: "HTTP/1.1"
+                         * 
+ * + * string request_protocol = 3; + */ + public com.google.protobuf.ByteString + getRequestProtocolBytes() { + java.lang.Object ref = requestProtocol_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestProtocol_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+                         * Optional. HTTP request protocol. Example: "HTTP/1.1"
+                         * 
+ * + * string request_protocol = 3; + */ + public Builder setRequestProtocol( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestProtocol_ = value; + onChanged(); + return this; + } + /** + *
+                         * Optional. HTTP request protocol. Example: "HTTP/1.1"
+                         * 
+ * + * string request_protocol = 3; + */ + public Builder clearRequestProtocol() { + + requestProtocol_ = getDefaultInstance().getRequestProtocol(); + onChanged(); + return this; + } + /** + *
+                         * Optional. HTTP request protocol. Example: "HTTP/1.1"
+                         * 
+ * + * string request_protocol = 3; + */ + public Builder setRequestProtocolBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestProtocol_ = value; + onChanged(); + return this; + } + + private java.lang.Object requestUrl_ = ""; + /** + *
+                         * Optional. HTTP request URL. Example: "https://api.stackify.com/Metrics/IdentifyApp"
+                         * 
+ * + * string request_url = 4; + */ + public java.lang.String getRequestUrl() { + java.lang.Object ref = requestUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+                         * Optional. HTTP request URL. Example: "https://api.stackify.com/Metrics/IdentifyApp"
+                         * 
+ * + * string request_url = 4; + */ + public com.google.protobuf.ByteString + getRequestUrlBytes() { + java.lang.Object ref = requestUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+                         * Optional. HTTP request URL. Example: "https://api.stackify.com/Metrics/IdentifyApp"
+                         * 
+ * + * string request_url = 4; + */ + public Builder setRequestUrl( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestUrl_ = value; + onChanged(); + return this; + } + /** + *
+                         * Optional. HTTP request URL. Example: "https://api.stackify.com/Metrics/IdentifyApp"
+                         * 
+ * + * string request_url = 4; + */ + public Builder clearRequestUrl() { + + requestUrl_ = getDefaultInstance().getRequestUrl(); + onChanged(); + return this; + } + /** + *
+                         * Optional. HTTP request URL. Example: "https://api.stackify.com/Metrics/IdentifyApp"
+                         * 
+ * + * string request_url = 4; + */ + public Builder setRequestUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestUrl_ = value; + onChanged(); + return this; + } + + private java.lang.Object requestUrlRoot_ = ""; + /** + *
+                         * Optional. Request URI. Example: "/Metrics/IdentifyApp"
+                         * 
+ * + * string request_url_root = 5; + */ + public java.lang.String getRequestUrlRoot() { + java.lang.Object ref = requestUrlRoot_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestUrlRoot_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+                         * Optional. Request URI. Example: "/Metrics/IdentifyApp"
+                         * 
+ * + * string request_url_root = 5; + */ + public com.google.protobuf.ByteString + getRequestUrlRootBytes() { + java.lang.Object ref = requestUrlRoot_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + requestUrlRoot_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+                         * Optional. Request URI. Example: "/Metrics/IdentifyApp"
+                         * 
+ * + * string request_url_root = 5; + */ + public Builder setRequestUrlRoot( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestUrlRoot_ = value; + onChanged(); + return this; + } + /** + *
+                         * Optional. Request URI. Example: "/Metrics/IdentifyApp"
+                         * 
+ * + * string request_url_root = 5; + */ + public Builder clearRequestUrlRoot() { + + requestUrlRoot_ = getDefaultInstance().getRequestUrlRoot(); + onChanged(); + return this; + } + /** + *
+                         * Optional. Request URI. Example: "/Metrics/IdentifyApp"
+                         * 
+ * + * string request_url_root = 5; + */ + public Builder setRequestUrlRootBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestUrlRoot_ = value; + onChanged(); + return this; + } + + private java.lang.Object referralUrl_ = ""; + /** + *
+                         * Optional. Value of the "referer" header. Example: "https://api.stackify.com/Metrics/IdentifyApp"
+                         * 
+ * + * string referral_url = 6; + */ + public java.lang.String getReferralUrl() { + java.lang.Object ref = referralUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + referralUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+                         * Optional. Value of the "referer" header. Example: "https://api.stackify.com/Metrics/IdentifyApp"
+                         * 
+ * + * string referral_url = 6; + */ + public com.google.protobuf.ByteString + getReferralUrlBytes() { + java.lang.Object ref = referralUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + referralUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+                         * Optional. Value of the "referer" header. Example: "https://api.stackify.com/Metrics/IdentifyApp"
+                         * 
+ * + * string referral_url = 6; + */ + public Builder setReferralUrl( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + referralUrl_ = value; + onChanged(); + return this; + } + /** + *
+                         * Optional. Value of the "referer" header. Example: "https://api.stackify.com/Metrics/IdentifyApp"
+                         * 
+ * + * string referral_url = 6; + */ + public Builder clearReferralUrl() { + + referralUrl_ = getDefaultInstance().getReferralUrl(); + onChanged(); + return this; + } + /** + *
+                         * Optional. Value of the "referer" header. Example: "https://api.stackify.com/Metrics/IdentifyApp"
+                         * 
+ * + * string referral_url = 6; + */ + public Builder setReferralUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + referralUrl_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> headers_; + private com.google.protobuf.MapField + internalGetHeaders() { + if (headers_ == null) { + return com.google.protobuf.MapField.emptyMapField( + HeadersDefaultEntryHolder.defaultEntry); + } + return headers_; + } + private com.google.protobuf.MapField + internalGetMutableHeaders() { + onChanged();; + if (headers_ == null) { + headers_ = com.google.protobuf.MapField.newMapField( + HeadersDefaultEntryHolder.defaultEntry); + } + if (!headers_.isMutable()) { + headers_ = headers_.copy(); + } + return headers_; + } + + public int getHeadersCount() { + return internalGetHeaders().getMap().size(); + } + /** + *
+                         * Optional. HTTP header name/value pairs. Example: {"Content-Type": "application/json", "Content-Encoding":"gzip"}
+                         * 
+ * + * map<string, string> headers = 7; + */ + + public boolean containsHeaders( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetHeaders().getMap().containsKey(key); + } + /** + * Use {@link #getHeadersMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getHeaders() { + return getHeadersMap(); + } + /** + *
+                         * Optional. HTTP header name/value pairs. Example: {"Content-Type": "application/json", "Content-Encoding":"gzip"}
+                         * 
+ * + * map<string, string> headers = 7; + */ + + public java.util.Map getHeadersMap() { + return internalGetHeaders().getMap(); + } + /** + *
+                         * Optional. HTTP header name/value pairs. Example: {"Content-Type": "application/json", "Content-Encoding":"gzip"}
+                         * 
+ * + * map<string, string> headers = 7; + */ + + public java.lang.String getHeadersOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetHeaders().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+                         * Optional. HTTP header name/value pairs. Example: {"Content-Type": "application/json", "Content-Encoding":"gzip"}
+                         * 
+ * + * map<string, string> headers = 7; + */ + + public java.lang.String getHeadersOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetHeaders().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearHeaders() { + internalGetMutableHeaders().getMutableMap() + .clear(); + return this; + } + /** + *
+                         * Optional. HTTP header name/value pairs. Example: {"Content-Type": "application/json", "Content-Encoding":"gzip"}
+                         * 
+ * + * map<string, string> headers = 7; + */ + + public Builder removeHeaders( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableHeaders().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableHeaders() { + return internalGetMutableHeaders().getMutableMap(); + } + /** + *
+                         * Optional. HTTP header name/value pairs. Example: {"Content-Type": "application/json", "Content-Encoding":"gzip"}
+                         * 
+ * + * map<string, string> headers = 7; + */ + public Builder putHeaders( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableHeaders().getMutableMap() + .put(key, value); + return this; + } + /** + *
+                         * Optional. HTTP header name/value pairs. Example: {"Content-Type": "application/json", "Content-Encoding":"gzip"}
+                         * 
+ * + * map<string, string> headers = 7; + */ + + public Builder putAllHeaders( + java.util.Map values) { + internalGetMutableHeaders().getMutableMap() + .putAll(values); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> cookies_; + private com.google.protobuf.MapField + internalGetCookies() { + if (cookies_ == null) { + return com.google.protobuf.MapField.emptyMapField( + CookiesDefaultEntryHolder.defaultEntry); + } + return cookies_; + } + private com.google.protobuf.MapField + internalGetMutableCookies() { + onChanged();; + if (cookies_ == null) { + cookies_ = com.google.protobuf.MapField.newMapField( + CookiesDefaultEntryHolder.defaultEntry); + } + if (!cookies_.isMutable()) { + cookies_ = cookies_.copy(); + } + return cookies_; + } + + public int getCookiesCount() { + return internalGetCookies().getMap().size(); + } + /** + *
+                         * Optional. HTTP cookie name/value pairs. We mask all cookie values with "X-MASKED-X". Example: {"name": "X-MASKED-X"}
+                         * 
+ * + * map<string, string> cookies = 8; + */ + + public boolean containsCookies( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetCookies().getMap().containsKey(key); + } + /** + * Use {@link #getCookiesMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getCookies() { + return getCookiesMap(); + } + /** + *
+                         * Optional. HTTP cookie name/value pairs. We mask all cookie values with "X-MASKED-X". Example: {"name": "X-MASKED-X"}
+                         * 
+ * + * map<string, string> cookies = 8; + */ + + public java.util.Map getCookiesMap() { + return internalGetCookies().getMap(); + } + /** + *
+                         * Optional. HTTP cookie name/value pairs. We mask all cookie values with "X-MASKED-X". Example: {"name": "X-MASKED-X"}
+                         * 
+ * + * map<string, string> cookies = 8; + */ + + public java.lang.String getCookiesOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetCookies().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+                         * Optional. HTTP cookie name/value pairs. We mask all cookie values with "X-MASKED-X". Example: {"name": "X-MASKED-X"}
+                         * 
+ * + * map<string, string> cookies = 8; + */ + + public java.lang.String getCookiesOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetCookies().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearCookies() { + internalGetMutableCookies().getMutableMap() + .clear(); + return this; + } + /** + *
+                         * Optional. HTTP cookie name/value pairs. We mask all cookie values with "X-MASKED-X". Example: {"name": "X-MASKED-X"}
+                         * 
+ * + * map<string, string> cookies = 8; + */ + + public Builder removeCookies( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableCookies().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableCookies() { + return internalGetMutableCookies().getMutableMap(); + } + /** + *
+                         * Optional. HTTP cookie name/value pairs. We mask all cookie values with "X-MASKED-X". Example: {"name": "X-MASKED-X"}
+                         * 
+ * + * map<string, string> cookies = 8; + */ + public Builder putCookies( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableCookies().getMutableMap() + .put(key, value); + return this; + } + /** + *
+                         * Optional. HTTP cookie name/value pairs. We mask all cookie values with "X-MASKED-X". Example: {"name": "X-MASKED-X"}
+                         * 
+ * + * map<string, string> cookies = 8; + */ + + public Builder putAllCookies( + java.util.Map values) { + internalGetMutableCookies().getMutableMap() + .putAll(values); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> querystring_; + private com.google.protobuf.MapField + internalGetQuerystring() { + if (querystring_ == null) { + return com.google.protobuf.MapField.emptyMapField( + QuerystringDefaultEntryHolder.defaultEntry); + } + return querystring_; + } + private com.google.protobuf.MapField + internalGetMutableQuerystring() { + onChanged();; + if (querystring_ == null) { + querystring_ = com.google.protobuf.MapField.newMapField( + QuerystringDefaultEntryHolder.defaultEntry); + } + if (!querystring_.isMutable()) { + querystring_ = querystring_.copy(); + } + return querystring_; + } + + public int getQuerystringCount() { + return internalGetQuerystring().getMap().size(); + } + /** + *
+                         * Optional. HTTP query string name/value pairs. Example: {"name": "value"}
+                         * 
+ * + * map<string, string> querystring = 9; + */ + + public boolean containsQuerystring( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetQuerystring().getMap().containsKey(key); + } + /** + * Use {@link #getQuerystringMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getQuerystring() { + return getQuerystringMap(); + } + /** + *
+                         * Optional. HTTP query string name/value pairs. Example: {"name": "value"}
+                         * 
+ * + * map<string, string> querystring = 9; + */ + + public java.util.Map getQuerystringMap() { + return internalGetQuerystring().getMap(); + } + /** + *
+                         * Optional. HTTP query string name/value pairs. Example: {"name": "value"}
+                         * 
+ * + * map<string, string> querystring = 9; + */ + + public java.lang.String getQuerystringOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetQuerystring().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+                         * Optional. HTTP query string name/value pairs. Example: {"name": "value"}
+                         * 
+ * + * map<string, string> querystring = 9; + */ + + public java.lang.String getQuerystringOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetQuerystring().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearQuerystring() { + internalGetMutableQuerystring().getMutableMap() + .clear(); + return this; + } + /** + *
+                         * Optional. HTTP query string name/value pairs. Example: {"name": "value"}
+                         * 
+ * + * map<string, string> querystring = 9; + */ + + public Builder removeQuerystring( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableQuerystring().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableQuerystring() { + return internalGetMutableQuerystring().getMutableMap(); + } + /** + *
+                         * Optional. HTTP query string name/value pairs. Example: {"name": "value"}
+                         * 
+ * + * map<string, string> querystring = 9; + */ + public Builder putQuerystring( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableQuerystring().getMutableMap() + .put(key, value); + return this; + } + /** + *
+                         * Optional. HTTP query string name/value pairs. Example: {"name": "value"}
+                         * 
+ * + * map<string, string> querystring = 9; + */ + + public Builder putAllQuerystring( + java.util.Map values) { + internalGetMutableQuerystring().getMutableMap() + .putAll(values); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> postData_; + private com.google.protobuf.MapField + internalGetPostData() { + if (postData_ == null) { + return com.google.protobuf.MapField.emptyMapField( + PostDataDefaultEntryHolder.defaultEntry); + } + return postData_; + } + private com.google.protobuf.MapField + internalGetMutablePostData() { + onChanged();; + if (postData_ == null) { + postData_ = com.google.protobuf.MapField.newMapField( + PostDataDefaultEntryHolder.defaultEntry); + } + if (!postData_.isMutable()) { + postData_ = postData_.copy(); + } + return postData_; + } + + public int getPostDataCount() { + return internalGetPostData().getMap().size(); + } + /** + *
+                         * Optional. HTTP post data name/value pairs. Example: {"name": "value"}
+                         * 
+ * + * map<string, string> post_data = 10; + */ + + public boolean containsPostData( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetPostData().getMap().containsKey(key); + } + /** + * Use {@link #getPostDataMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getPostData() { + return getPostDataMap(); + } + /** + *
+                         * Optional. HTTP post data name/value pairs. Example: {"name": "value"}
+                         * 
+ * + * map<string, string> post_data = 10; + */ + + public java.util.Map getPostDataMap() { + return internalGetPostData().getMap(); + } + /** + *
+                         * Optional. HTTP post data name/value pairs. Example: {"name": "value"}
+                         * 
+ * + * map<string, string> post_data = 10; + */ + + public java.lang.String getPostDataOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetPostData().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+                         * Optional. HTTP post data name/value pairs. Example: {"name": "value"}
+                         * 
+ * + * map<string, string> post_data = 10; + */ + + public java.lang.String getPostDataOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetPostData().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearPostData() { + internalGetMutablePostData().getMutableMap() + .clear(); + return this; + } + /** + *
+                         * Optional. HTTP post data name/value pairs. Example: {"name": "value"}
+                         * 
+ * + * map<string, string> post_data = 10; + */ + + public Builder removePostData( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutablePostData().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutablePostData() { + return internalGetMutablePostData().getMutableMap(); + } + /** + *
+                         * Optional. HTTP post data name/value pairs. Example: {"name": "value"}
+                         * 
+ * + * map<string, string> post_data = 10; + */ + public Builder putPostData( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutablePostData().getMutableMap() + .put(key, value); + return this; + } + /** + *
+                         * Optional. HTTP post data name/value pairs. Example: {"name": "value"}
+                         * 
+ * + * map<string, string> post_data = 10; + */ + + public Builder putAllPostData( + java.util.Map values) { + internalGetMutablePostData().getMutableMap() + .putAll(values); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> sessionData_; + private com.google.protobuf.MapField + internalGetSessionData() { + if (sessionData_ == null) { + return com.google.protobuf.MapField.emptyMapField( + SessionDataDefaultEntryHolder.defaultEntry); + } + return sessionData_; + } + private com.google.protobuf.MapField + internalGetMutableSessionData() { + onChanged();; + if (sessionData_ == null) { + sessionData_ = com.google.protobuf.MapField.newMapField( + SessionDataDefaultEntryHolder.defaultEntry); + } + if (!sessionData_.isMutable()) { + sessionData_ = sessionData_.copy(); + } + return sessionData_; + } + + public int getSessionDataCount() { + return internalGetSessionData().getMap().size(); + } + /** + *
+                         * Optional. HTTP session name/value pairs. We mask all session values with "X-MASKED-X". Example: {"name": "X-MASKED-X"}
+                         * 
+ * + * map<string, string> session_data = 11; + */ + + public boolean containsSessionData( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetSessionData().getMap().containsKey(key); + } + /** + * Use {@link #getSessionDataMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getSessionData() { + return getSessionDataMap(); + } + /** + *
+                         * Optional. HTTP session name/value pairs. We mask all session values with "X-MASKED-X". Example: {"name": "X-MASKED-X"}
+                         * 
+ * + * map<string, string> session_data = 11; + */ + + public java.util.Map getSessionDataMap() { + return internalGetSessionData().getMap(); + } + /** + *
+                         * Optional. HTTP session name/value pairs. We mask all session values with "X-MASKED-X". Example: {"name": "X-MASKED-X"}
+                         * 
+ * + * map<string, string> session_data = 11; + */ + + public java.lang.String getSessionDataOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetSessionData().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+                         * Optional. HTTP session name/value pairs. We mask all session values with "X-MASKED-X". Example: {"name": "X-MASKED-X"}
+                         * 
+ * + * map<string, string> session_data = 11; + */ + + public java.lang.String getSessionDataOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetSessionData().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearSessionData() { + internalGetMutableSessionData().getMutableMap() + .clear(); + return this; + } + /** + *
+                         * Optional. HTTP session name/value pairs. We mask all session values with "X-MASKED-X". Example: {"name": "X-MASKED-X"}
+                         * 
+ * + * map<string, string> session_data = 11; + */ + + public Builder removeSessionData( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableSessionData().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableSessionData() { + return internalGetMutableSessionData().getMutableMap(); + } + /** + *
+                         * Optional. HTTP session name/value pairs. We mask all session values with "X-MASKED-X". Example: {"name": "X-MASKED-X"}
+                         * 
+ * + * map<string, string> session_data = 11; + */ + public Builder putSessionData( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableSessionData().getMutableMap() + .put(key, value); + return this; + } + /** + *
+                         * Optional. HTTP session name/value pairs. We mask all session values with "X-MASKED-X". Example: {"name": "X-MASKED-X"}
+                         * 
+ * + * map<string, string> session_data = 11; + */ + + public Builder putAllSessionData( + java.util.Map values) { + internalGetMutableSessionData().getMutableMap() + .putAll(values); + return this; + } + + private java.lang.Object postDataRaw_ = ""; + /** + *
+                         * Optional. HTTP raw post data. Example: "name=value"
+                         * 
+ * + * string post_data_raw = 12; + */ + public java.lang.String getPostDataRaw() { + java.lang.Object ref = postDataRaw_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + postDataRaw_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+                         * Optional. HTTP raw post data. Example: "name=value"
+                         * 
+ * + * string post_data_raw = 12; + */ + public com.google.protobuf.ByteString + getPostDataRawBytes() { + java.lang.Object ref = postDataRaw_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + postDataRaw_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+                         * Optional. HTTP raw post data. Example: "name=value"
+                         * 
+ * + * string post_data_raw = 12; + */ + public Builder setPostDataRaw( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + postDataRaw_ = value; + onChanged(); + return this; + } + /** + *
+                         * Optional. HTTP raw post data. Example: "name=value"
+                         * 
+ * + * string post_data_raw = 12; + */ + public Builder clearPostDataRaw() { + + postDataRaw_ = getDefaultInstance().getPostDataRaw(); + onChanged(); + return this; + } + /** + *
+                         * Optional. HTTP raw post data. Example: "name=value"
+                         * 
+ * + * string post_data_raw = 12; + */ + public Builder setPostDataRawBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + postDataRaw_ = value; + onChanged(); + return this; + } + + private java.lang.Object mvcAction_ = ""; + /** + *
+                         * Optional. MVC area. Example: "API"
+                         * 
+ * + * string mvc_action = 13; + */ + public java.lang.String getMvcAction() { + java.lang.Object ref = mvcAction_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mvcAction_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+                         * Optional. MVC area. Example: "API"
+                         * 
+ * + * string mvc_action = 13; + */ + public com.google.protobuf.ByteString + getMvcActionBytes() { + java.lang.Object ref = mvcAction_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mvcAction_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+                         * Optional. MVC area. Example: "API"
+                         * 
+ * + * string mvc_action = 13; + */ + public Builder setMvcAction( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mvcAction_ = value; + onChanged(); + return this; + } + /** + *
+                         * Optional. MVC area. Example: "API"
+                         * 
+ * + * string mvc_action = 13; + */ + public Builder clearMvcAction() { + + mvcAction_ = getDefaultInstance().getMvcAction(); + onChanged(); + return this; + } + /** + *
+                         * Optional. MVC area. Example: "API"
+                         * 
+ * + * string mvc_action = 13; + */ + public Builder setMvcActionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mvcAction_ = value; + onChanged(); + return this; + } + + private java.lang.Object mvcController_ = ""; + /** + *
+                         * Optional. MVC controller.  Example: "Metrics"
+                         * 
+ * + * string mvc_controller = 14; + */ + public java.lang.String getMvcController() { + java.lang.Object ref = mvcController_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mvcController_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+                         * Optional. MVC controller.  Example: "Metrics"
+                         * 
+ * + * string mvc_controller = 14; + */ + public com.google.protobuf.ByteString + getMvcControllerBytes() { + java.lang.Object ref = mvcController_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mvcController_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+                         * Optional. MVC controller.  Example: "Metrics"
+                         * 
+ * + * string mvc_controller = 14; + */ + public Builder setMvcController( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mvcController_ = value; + onChanged(); + return this; + } + /** + *
+                         * Optional. MVC controller.  Example: "Metrics"
+                         * 
+ * + * string mvc_controller = 14; + */ + public Builder clearMvcController() { + + mvcController_ = getDefaultInstance().getMvcController(); + onChanged(); + return this; + } + /** + *
+                         * Optional. MVC controller.  Example: "Metrics"
+                         * 
+ * + * string mvc_controller = 14; + */ + public Builder setMvcControllerBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mvcController_ = value; + onChanged(); + return this; + } + + private java.lang.Object mvcArea_ = ""; + /** + *
+                         * Optional. MVC action. Example: "IdentifyApp"
+                         * 
+ * + * string mvc_area = 15; + */ + public java.lang.String getMvcArea() { + java.lang.Object ref = mvcArea_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mvcArea_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+                         * Optional. MVC action. Example: "IdentifyApp"
+                         * 
+ * + * string mvc_area = 15; + */ + public com.google.protobuf.ByteString + getMvcAreaBytes() { + java.lang.Object ref = mvcArea_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mvcArea_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+                         * Optional. MVC action. Example: "IdentifyApp"
+                         * 
+ * + * string mvc_area = 15; + */ + public Builder setMvcArea( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + mvcArea_ = value; + onChanged(); + return this; + } + /** + *
+                         * Optional. MVC action. Example: "IdentifyApp"
+                         * 
+ * + * string mvc_area = 15; + */ + public Builder clearMvcArea() { + + mvcArea_ = getDefaultInstance().getMvcArea(); + onChanged(); + return this; + } + /** + *
+                         * Optional. MVC action. Example: "IdentifyApp"
+                         * 
+ * + * string mvc_area = 15; + */ + public Builder setMvcAreaBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + mvcArea_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:stackify.LogGroup.Log.Error.WebRequestDetail) + } + + // @@protoc_insertion_point(class_scope:stackify.LogGroup.Log.Error.WebRequestDetail) + private static final com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail(); + } + + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WebRequestDetail parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WebRequestDetail(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int ENVIRONMENT_DETAIL_FIELD_NUMBER = 1; + private com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail environmentDetail_; + /** + *
+                 * Device, application and environment details.
+                 * 
+ * + * .stackify.LogGroup.Log.Error.EnvironmentDetail environment_detail = 1; + */ + public boolean hasEnvironmentDetail() { + return environmentDetail_ != null; + } + /** + *
+                 * Device, application and environment details.
+                 * 
+ * + * .stackify.LogGroup.Log.Error.EnvironmentDetail environment_detail = 1; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail getEnvironmentDetail() { + return environmentDetail_ == null ? com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail.getDefaultInstance() : environmentDetail_; + } + /** + *
+                 * Device, application and environment details.
+                 * 
+ * + * .stackify.LogGroup.Log.Error.EnvironmentDetail environment_detail = 1; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetailOrBuilder getEnvironmentDetailOrBuilder() { + return getEnvironmentDetail(); + } + + public static final int DATE_MILLIS_FIELD_NUMBER = 2; + private long dateMillis_; + /** + *
+                 * Unix/POSIX/Epoch time with millisecond precision. Example: 1417535434194
+                 * 
+ * + * int64 date_millis = 2; + */ + public long getDateMillis() { + return dateMillis_; + } + + public static final int ERROR_ITEM_FIELD_NUMBER = 3; + private com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem errorItem_; + /** + *
+                 * Exception details.
+                 * 
+ * + * .stackify.LogGroup.Log.Error.ErrorItem error_item = 3; + */ + public boolean hasErrorItem() { + return errorItem_ != null; + } + /** + *
+                 * Exception details.
+                 * 
+ * + * .stackify.LogGroup.Log.Error.ErrorItem error_item = 3; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem getErrorItem() { + return errorItem_ == null ? com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.getDefaultInstance() : errorItem_; + } + /** + *
+                 * Exception details.
+                 * 
+ * + * .stackify.LogGroup.Log.Error.ErrorItem error_item = 3; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItemOrBuilder getErrorItemOrBuilder() { + return getErrorItem(); + } + + public static final int WEB_REQUEST_DETAIL_FIELD_NUMBER = 4; + private com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail webRequestDetail_; + /** + *
+                 * Optional. Web request details.
+                 * 
+ * + * .stackify.LogGroup.Log.Error.WebRequestDetail web_request_detail = 4; + */ + public boolean hasWebRequestDetail() { + return webRequestDetail_ != null; + } + /** + *
+                 * Optional. Web request details.
+                 * 
+ * + * .stackify.LogGroup.Log.Error.WebRequestDetail web_request_detail = 4; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail getWebRequestDetail() { + return webRequestDetail_ == null ? com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail.getDefaultInstance() : webRequestDetail_; + } + /** + *
+                 * Optional. Web request details.
+                 * 
+ * + * .stackify.LogGroup.Log.Error.WebRequestDetail web_request_detail = 4; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetailOrBuilder getWebRequestDetailOrBuilder() { + return getWebRequestDetail(); + } + + public static final int SERVER_VARIABLES_FIELD_NUMBER = 5; + private static final class ServerVariablesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Log_Error_ServerVariablesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> serverVariables_; + private com.google.protobuf.MapField + internalGetServerVariables() { + if (serverVariables_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ServerVariablesDefaultEntryHolder.defaultEntry); + } + return serverVariables_; + } + + public int getServerVariablesCount() { + return internalGetServerVariables().getMap().size(); + } + /** + *
+                 * Optional. Server data name/value pairs.  Example: {"java.runtime.name": "OpenJDK Runtime Environment", "os.name": "Linux", "user.timezone": "UTC", "java.vendor": "Oracle Corporation"}
+                 * 
+ * + * map<string, string> server_variables = 5; + */ + + public boolean containsServerVariables( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetServerVariables().getMap().containsKey(key); + } + /** + * Use {@link #getServerVariablesMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getServerVariables() { + return getServerVariablesMap(); + } + /** + *
+                 * Optional. Server data name/value pairs.  Example: {"java.runtime.name": "OpenJDK Runtime Environment", "os.name": "Linux", "user.timezone": "UTC", "java.vendor": "Oracle Corporation"}
+                 * 
+ * + * map<string, string> server_variables = 5; + */ + + public java.util.Map getServerVariablesMap() { + return internalGetServerVariables().getMap(); + } + /** + *
+                 * Optional. Server data name/value pairs.  Example: {"java.runtime.name": "OpenJDK Runtime Environment", "os.name": "Linux", "user.timezone": "UTC", "java.vendor": "Oracle Corporation"}
+                 * 
+ * + * map<string, string> server_variables = 5; + */ + + public java.lang.String getServerVariablesOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetServerVariables().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+                 * Optional. Server data name/value pairs.  Example: {"java.runtime.name": "OpenJDK Runtime Environment", "os.name": "Linux", "user.timezone": "UTC", "java.vendor": "Oracle Corporation"}
+                 * 
+ * + * map<string, string> server_variables = 5; + */ + + public java.lang.String getServerVariablesOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetServerVariables().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int CUSTOMER_NAME_FIELD_NUMBER = 6; + private volatile java.lang.Object customerName_; + /** + *
+                 * Optional. Customer/client name. Example: "Stackify"
+                 * 
+ * + * string customer_name = 6; + */ + public java.lang.String getCustomerName() { + java.lang.Object ref = customerName_; + 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(); + customerName_ = s; + return s; + } + } + /** + *
+                 * Optional. Customer/client name. Example: "Stackify"
+                 * 
+ * + * string customer_name = 6; + */ + public com.google.protobuf.ByteString + getCustomerNameBytes() { + java.lang.Object ref = customerName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + customerName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USERNAME_FIELD_NUMBER = 7; + private volatile java.lang.Object username_; + /** + *
+                 * Optional. User name. Example: "test-user@stackify.com
+                 * 
+ * + * string username = 7; + */ + public java.lang.String getUsername() { + java.lang.Object ref = username_; + 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(); + username_ = s; + return s; + } + } + /** + *
+                 * Optional. User name. Example: "test-user@stackify.com
+                 * 
+ * + * string username = 7; + */ + public com.google.protobuf.ByteString + getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (environmentDetail_ != null) { + output.writeMessage(1, getEnvironmentDetail()); + } + if (dateMillis_ != 0L) { + output.writeInt64(2, dateMillis_); + } + if (errorItem_ != null) { + output.writeMessage(3, getErrorItem()); + } + if (webRequestDetail_ != null) { + output.writeMessage(4, getWebRequestDetail()); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetServerVariables(), + ServerVariablesDefaultEntryHolder.defaultEntry, + 5); + if (!getCustomerNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, customerName_); + } + if (!getUsernameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, username_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (environmentDetail_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getEnvironmentDetail()); + } + if (dateMillis_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, dateMillis_); + } + if (errorItem_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getErrorItem()); + } + if (webRequestDetail_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getWebRequestDetail()); + } + for (java.util.Map.Entry entry + : internalGetServerVariables().getMap().entrySet()) { + com.google.protobuf.MapEntry + serverVariables__ = ServerVariablesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, serverVariables__); + } + if (!getCustomerNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, customerName_); + } + if (!getUsernameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, username_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error)) { + return super.equals(obj); + } + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error other = (com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error) obj; + + if (hasEnvironmentDetail() != other.hasEnvironmentDetail()) return false; + if (hasEnvironmentDetail()) { + if (!getEnvironmentDetail() + .equals(other.getEnvironmentDetail())) return false; + } + if (getDateMillis() + != other.getDateMillis()) return false; + if (hasErrorItem() != other.hasErrorItem()) return false; + if (hasErrorItem()) { + if (!getErrorItem() + .equals(other.getErrorItem())) return false; + } + if (hasWebRequestDetail() != other.hasWebRequestDetail()) return false; + if (hasWebRequestDetail()) { + if (!getWebRequestDetail() + .equals(other.getWebRequestDetail())) return false; + } + if (!internalGetServerVariables().equals( + other.internalGetServerVariables())) return false; + if (!getCustomerName() + .equals(other.getCustomerName())) return false; + if (!getUsername() + .equals(other.getUsername())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasEnvironmentDetail()) { + hash = (37 * hash) + ENVIRONMENT_DETAIL_FIELD_NUMBER; + hash = (53 * hash) + getEnvironmentDetail().hashCode(); + } + hash = (37 * hash) + DATE_MILLIS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getDateMillis()); + if (hasErrorItem()) { + hash = (37 * hash) + ERROR_ITEM_FIELD_NUMBER; + hash = (53 * hash) + getErrorItem().hashCode(); + } + if (hasWebRequestDetail()) { + hash = (37 * hash) + WEB_REQUEST_DETAIL_FIELD_NUMBER; + hash = (53 * hash) + getWebRequestDetail().hashCode(); + } + if (!internalGetServerVariables().getMap().isEmpty()) { + hash = (37 * hash) + SERVER_VARIABLES_FIELD_NUMBER; + hash = (53 * hash) + internalGetServerVariables().hashCode(); + } + hash = (37 * hash) + CUSTOMER_NAME_FIELD_NUMBER; + hash = (53 * hash) + getCustomerName().hashCode(); + hash = (37 * hash) + USERNAME_FIELD_NUMBER; + hash = (53 * hash) + getUsername().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code stackify.LogGroup.Log.Error} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:stackify.LogGroup.Log.Error) + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.ErrorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Log_Error_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 5: + return internalGetServerVariables(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 5: + return internalGetMutableServerVariables(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Log_Error_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.class, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.Builder.class); + } + + // Construct using com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + if (environmentDetailBuilder_ == null) { + environmentDetail_ = null; + } else { + environmentDetail_ = null; + environmentDetailBuilder_ = null; + } + dateMillis_ = 0L; + + if (errorItemBuilder_ == null) { + errorItem_ = null; + } else { + errorItem_ = null; + errorItemBuilder_ = null; + } + if (webRequestDetailBuilder_ == null) { + webRequestDetail_ = null; + } else { + webRequestDetail_ = null; + webRequestDetailBuilder_ = null; + } + internalGetMutableServerVariables().clear(); + customerName_ = ""; + + username_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Log_Error_descriptor; + } + + @java.lang.Override + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error getDefaultInstanceForType() { + return com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.getDefaultInstance(); + } + + @java.lang.Override + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error build() { + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error buildPartial() { + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error result = new com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error(this); + int from_bitField0_ = bitField0_; + if (environmentDetailBuilder_ == null) { + result.environmentDetail_ = environmentDetail_; + } else { + result.environmentDetail_ = environmentDetailBuilder_.build(); + } + result.dateMillis_ = dateMillis_; + if (errorItemBuilder_ == null) { + result.errorItem_ = errorItem_; + } else { + result.errorItem_ = errorItemBuilder_.build(); + } + if (webRequestDetailBuilder_ == null) { + result.webRequestDetail_ = webRequestDetail_; + } else { + result.webRequestDetail_ = webRequestDetailBuilder_.build(); + } + result.serverVariables_ = internalGetServerVariables(); + result.serverVariables_.makeImmutable(); + result.customerName_ = customerName_; + result.username_ = username_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error) { + return mergeFrom((com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error other) { + if (other == com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.getDefaultInstance()) return this; + if (other.hasEnvironmentDetail()) { + mergeEnvironmentDetail(other.getEnvironmentDetail()); + } + if (other.getDateMillis() != 0L) { + setDateMillis(other.getDateMillis()); + } + if (other.hasErrorItem()) { + mergeErrorItem(other.getErrorItem()); + } + if (other.hasWebRequestDetail()) { + mergeWebRequestDetail(other.getWebRequestDetail()); + } + internalGetMutableServerVariables().mergeFrom( + other.internalGetServerVariables()); + if (!other.getCustomerName().isEmpty()) { + customerName_ = other.customerName_; + onChanged(); + } + if (!other.getUsername().isEmpty()) { + username_ = other.username_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail environmentDetail_; + private com.google.protobuf.SingleFieldBuilderV3< + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail.Builder, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetailOrBuilder> environmentDetailBuilder_; + /** + *
+                     * Device, application and environment details.
+                     * 
+ * + * .stackify.LogGroup.Log.Error.EnvironmentDetail environment_detail = 1; + */ + public boolean hasEnvironmentDetail() { + return environmentDetailBuilder_ != null || environmentDetail_ != null; + } + /** + *
+                     * Device, application and environment details.
+                     * 
+ * + * .stackify.LogGroup.Log.Error.EnvironmentDetail environment_detail = 1; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail getEnvironmentDetail() { + if (environmentDetailBuilder_ == null) { + return environmentDetail_ == null ? com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail.getDefaultInstance() : environmentDetail_; + } else { + return environmentDetailBuilder_.getMessage(); + } + } + /** + *
+                     * Device, application and environment details.
+                     * 
+ * + * .stackify.LogGroup.Log.Error.EnvironmentDetail environment_detail = 1; + */ + public Builder setEnvironmentDetail(com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail value) { + if (environmentDetailBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + environmentDetail_ = value; + onChanged(); + } else { + environmentDetailBuilder_.setMessage(value); + } + + return this; + } + /** + *
+                     * Device, application and environment details.
+                     * 
+ * + * .stackify.LogGroup.Log.Error.EnvironmentDetail environment_detail = 1; + */ + public Builder setEnvironmentDetail( + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail.Builder builderForValue) { + if (environmentDetailBuilder_ == null) { + environmentDetail_ = builderForValue.build(); + onChanged(); + } else { + environmentDetailBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+                     * Device, application and environment details.
+                     * 
+ * + * .stackify.LogGroup.Log.Error.EnvironmentDetail environment_detail = 1; + */ + public Builder mergeEnvironmentDetail(com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail value) { + if (environmentDetailBuilder_ == null) { + if (environmentDetail_ != null) { + environmentDetail_ = + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail.newBuilder(environmentDetail_).mergeFrom(value).buildPartial(); + } else { + environmentDetail_ = value; + } + onChanged(); + } else { + environmentDetailBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+                     * Device, application and environment details.
+                     * 
+ * + * .stackify.LogGroup.Log.Error.EnvironmentDetail environment_detail = 1; + */ + public Builder clearEnvironmentDetail() { + if (environmentDetailBuilder_ == null) { + environmentDetail_ = null; + onChanged(); + } else { + environmentDetail_ = null; + environmentDetailBuilder_ = null; + } + + return this; + } + /** + *
+                     * Device, application and environment details.
+                     * 
+ * + * .stackify.LogGroup.Log.Error.EnvironmentDetail environment_detail = 1; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail.Builder getEnvironmentDetailBuilder() { + + onChanged(); + return getEnvironmentDetailFieldBuilder().getBuilder(); + } + /** + *
+                     * Device, application and environment details.
+                     * 
+ * + * .stackify.LogGroup.Log.Error.EnvironmentDetail environment_detail = 1; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetailOrBuilder getEnvironmentDetailOrBuilder() { + if (environmentDetailBuilder_ != null) { + return environmentDetailBuilder_.getMessageOrBuilder(); + } else { + return environmentDetail_ == null ? + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail.getDefaultInstance() : environmentDetail_; + } + } + /** + *
+                     * Device, application and environment details.
+                     * 
+ * + * .stackify.LogGroup.Log.Error.EnvironmentDetail environment_detail = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail.Builder, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetailOrBuilder> + getEnvironmentDetailFieldBuilder() { + if (environmentDetailBuilder_ == null) { + environmentDetailBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetail.Builder, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.EnvironmentDetailOrBuilder>( + getEnvironmentDetail(), + getParentForChildren(), + isClean()); + environmentDetail_ = null; + } + return environmentDetailBuilder_; + } + + private long dateMillis_ ; + /** + *
+                     * Unix/POSIX/Epoch time with millisecond precision. Example: 1417535434194
+                     * 
+ * + * int64 date_millis = 2; + */ + public long getDateMillis() { + return dateMillis_; + } + /** + *
+                     * Unix/POSIX/Epoch time with millisecond precision. Example: 1417535434194
+                     * 
+ * + * int64 date_millis = 2; + */ + public Builder setDateMillis(long value) { + + dateMillis_ = value; + onChanged(); + return this; + } + /** + *
+                     * Unix/POSIX/Epoch time with millisecond precision. Example: 1417535434194
+                     * 
+ * + * int64 date_millis = 2; + */ + public Builder clearDateMillis() { + + dateMillis_ = 0L; + onChanged(); + return this; + } + + private com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem errorItem_; + private com.google.protobuf.SingleFieldBuilderV3< + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.Builder, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItemOrBuilder> errorItemBuilder_; + /** + *
+                     * Exception details.
+                     * 
+ * + * .stackify.LogGroup.Log.Error.ErrorItem error_item = 3; + */ + public boolean hasErrorItem() { + return errorItemBuilder_ != null || errorItem_ != null; + } + /** + *
+                     * Exception details.
+                     * 
+ * + * .stackify.LogGroup.Log.Error.ErrorItem error_item = 3; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem getErrorItem() { + if (errorItemBuilder_ == null) { + return errorItem_ == null ? com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.getDefaultInstance() : errorItem_; + } else { + return errorItemBuilder_.getMessage(); + } + } + /** + *
+                     * Exception details.
+                     * 
+ * + * .stackify.LogGroup.Log.Error.ErrorItem error_item = 3; + */ + public Builder setErrorItem(com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem value) { + if (errorItemBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + errorItem_ = value; + onChanged(); + } else { + errorItemBuilder_.setMessage(value); + } + + return this; + } + /** + *
+                     * Exception details.
+                     * 
+ * + * .stackify.LogGroup.Log.Error.ErrorItem error_item = 3; + */ + public Builder setErrorItem( + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.Builder builderForValue) { + if (errorItemBuilder_ == null) { + errorItem_ = builderForValue.build(); + onChanged(); + } else { + errorItemBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+                     * Exception details.
+                     * 
+ * + * .stackify.LogGroup.Log.Error.ErrorItem error_item = 3; + */ + public Builder mergeErrorItem(com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem value) { + if (errorItemBuilder_ == null) { + if (errorItem_ != null) { + errorItem_ = + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.newBuilder(errorItem_).mergeFrom(value).buildPartial(); + } else { + errorItem_ = value; + } + onChanged(); + } else { + errorItemBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+                     * Exception details.
+                     * 
+ * + * .stackify.LogGroup.Log.Error.ErrorItem error_item = 3; + */ + public Builder clearErrorItem() { + if (errorItemBuilder_ == null) { + errorItem_ = null; + onChanged(); + } else { + errorItem_ = null; + errorItemBuilder_ = null; + } + + return this; + } + /** + *
+                     * Exception details.
+                     * 
+ * + * .stackify.LogGroup.Log.Error.ErrorItem error_item = 3; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.Builder getErrorItemBuilder() { + + onChanged(); + return getErrorItemFieldBuilder().getBuilder(); + } + /** + *
+                     * Exception details.
+                     * 
+ * + * .stackify.LogGroup.Log.Error.ErrorItem error_item = 3; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItemOrBuilder getErrorItemOrBuilder() { + if (errorItemBuilder_ != null) { + return errorItemBuilder_.getMessageOrBuilder(); + } else { + return errorItem_ == null ? + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.getDefaultInstance() : errorItem_; + } + } + /** + *
+                     * Exception details.
+                     * 
+ * + * .stackify.LogGroup.Log.Error.ErrorItem error_item = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.Builder, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItemOrBuilder> + getErrorItemFieldBuilder() { + if (errorItemBuilder_ == null) { + errorItemBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItem.Builder, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.ErrorItemOrBuilder>( + getErrorItem(), + getParentForChildren(), + isClean()); + errorItem_ = null; + } + return errorItemBuilder_; + } + + private com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail webRequestDetail_; + private com.google.protobuf.SingleFieldBuilderV3< + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail.Builder, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetailOrBuilder> webRequestDetailBuilder_; + /** + *
+                     * Optional. Web request details.
+                     * 
+ * + * .stackify.LogGroup.Log.Error.WebRequestDetail web_request_detail = 4; + */ + public boolean hasWebRequestDetail() { + return webRequestDetailBuilder_ != null || webRequestDetail_ != null; + } + /** + *
+                     * Optional. Web request details.
+                     * 
+ * + * .stackify.LogGroup.Log.Error.WebRequestDetail web_request_detail = 4; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail getWebRequestDetail() { + if (webRequestDetailBuilder_ == null) { + return webRequestDetail_ == null ? com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail.getDefaultInstance() : webRequestDetail_; + } else { + return webRequestDetailBuilder_.getMessage(); + } + } + /** + *
+                     * Optional. Web request details.
+                     * 
+ * + * .stackify.LogGroup.Log.Error.WebRequestDetail web_request_detail = 4; + */ + public Builder setWebRequestDetail(com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail value) { + if (webRequestDetailBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + webRequestDetail_ = value; + onChanged(); + } else { + webRequestDetailBuilder_.setMessage(value); + } + + return this; + } + /** + *
+                     * Optional. Web request details.
+                     * 
+ * + * .stackify.LogGroup.Log.Error.WebRequestDetail web_request_detail = 4; + */ + public Builder setWebRequestDetail( + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail.Builder builderForValue) { + if (webRequestDetailBuilder_ == null) { + webRequestDetail_ = builderForValue.build(); + onChanged(); + } else { + webRequestDetailBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+                     * Optional. Web request details.
+                     * 
+ * + * .stackify.LogGroup.Log.Error.WebRequestDetail web_request_detail = 4; + */ + public Builder mergeWebRequestDetail(com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail value) { + if (webRequestDetailBuilder_ == null) { + if (webRequestDetail_ != null) { + webRequestDetail_ = + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail.newBuilder(webRequestDetail_).mergeFrom(value).buildPartial(); + } else { + webRequestDetail_ = value; + } + onChanged(); + } else { + webRequestDetailBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+                     * Optional. Web request details.
+                     * 
+ * + * .stackify.LogGroup.Log.Error.WebRequestDetail web_request_detail = 4; + */ + public Builder clearWebRequestDetail() { + if (webRequestDetailBuilder_ == null) { + webRequestDetail_ = null; + onChanged(); + } else { + webRequestDetail_ = null; + webRequestDetailBuilder_ = null; + } + + return this; + } + /** + *
+                     * Optional. Web request details.
+                     * 
+ * + * .stackify.LogGroup.Log.Error.WebRequestDetail web_request_detail = 4; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail.Builder getWebRequestDetailBuilder() { + + onChanged(); + return getWebRequestDetailFieldBuilder().getBuilder(); + } + /** + *
+                     * Optional. Web request details.
+                     * 
+ * + * .stackify.LogGroup.Log.Error.WebRequestDetail web_request_detail = 4; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetailOrBuilder getWebRequestDetailOrBuilder() { + if (webRequestDetailBuilder_ != null) { + return webRequestDetailBuilder_.getMessageOrBuilder(); + } else { + return webRequestDetail_ == null ? + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail.getDefaultInstance() : webRequestDetail_; + } + } + /** + *
+                     * Optional. Web request details.
+                     * 
+ * + * .stackify.LogGroup.Log.Error.WebRequestDetail web_request_detail = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail.Builder, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetailOrBuilder> + getWebRequestDetailFieldBuilder() { + if (webRequestDetailBuilder_ == null) { + webRequestDetailBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetail.Builder, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.WebRequestDetailOrBuilder>( + getWebRequestDetail(), + getParentForChildren(), + isClean()); + webRequestDetail_ = null; + } + return webRequestDetailBuilder_; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> serverVariables_; + private com.google.protobuf.MapField + internalGetServerVariables() { + if (serverVariables_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ServerVariablesDefaultEntryHolder.defaultEntry); + } + return serverVariables_; + } + private com.google.protobuf.MapField + internalGetMutableServerVariables() { + onChanged();; + if (serverVariables_ == null) { + serverVariables_ = com.google.protobuf.MapField.newMapField( + ServerVariablesDefaultEntryHolder.defaultEntry); + } + if (!serverVariables_.isMutable()) { + serverVariables_ = serverVariables_.copy(); + } + return serverVariables_; + } + + public int getServerVariablesCount() { + return internalGetServerVariables().getMap().size(); + } + /** + *
+                     * Optional. Server data name/value pairs.  Example: {"java.runtime.name": "OpenJDK Runtime Environment", "os.name": "Linux", "user.timezone": "UTC", "java.vendor": "Oracle Corporation"}
+                     * 
+ * + * map<string, string> server_variables = 5; + */ + + public boolean containsServerVariables( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetServerVariables().getMap().containsKey(key); + } + /** + * Use {@link #getServerVariablesMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getServerVariables() { + return getServerVariablesMap(); + } + /** + *
+                     * Optional. Server data name/value pairs.  Example: {"java.runtime.name": "OpenJDK Runtime Environment", "os.name": "Linux", "user.timezone": "UTC", "java.vendor": "Oracle Corporation"}
+                     * 
+ * + * map<string, string> server_variables = 5; + */ + + public java.util.Map getServerVariablesMap() { + return internalGetServerVariables().getMap(); + } + /** + *
+                     * Optional. Server data name/value pairs.  Example: {"java.runtime.name": "OpenJDK Runtime Environment", "os.name": "Linux", "user.timezone": "UTC", "java.vendor": "Oracle Corporation"}
+                     * 
+ * + * map<string, string> server_variables = 5; + */ + + public java.lang.String getServerVariablesOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetServerVariables().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+                     * Optional. Server data name/value pairs.  Example: {"java.runtime.name": "OpenJDK Runtime Environment", "os.name": "Linux", "user.timezone": "UTC", "java.vendor": "Oracle Corporation"}
+                     * 
+ * + * map<string, string> server_variables = 5; + */ + + public java.lang.String getServerVariablesOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetServerVariables().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearServerVariables() { + internalGetMutableServerVariables().getMutableMap() + .clear(); + return this; + } + /** + *
+                     * Optional. Server data name/value pairs.  Example: {"java.runtime.name": "OpenJDK Runtime Environment", "os.name": "Linux", "user.timezone": "UTC", "java.vendor": "Oracle Corporation"}
+                     * 
+ * + * map<string, string> server_variables = 5; + */ + + public Builder removeServerVariables( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableServerVariables().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableServerVariables() { + return internalGetMutableServerVariables().getMutableMap(); + } + /** + *
+                     * Optional. Server data name/value pairs.  Example: {"java.runtime.name": "OpenJDK Runtime Environment", "os.name": "Linux", "user.timezone": "UTC", "java.vendor": "Oracle Corporation"}
+                     * 
+ * + * map<string, string> server_variables = 5; + */ + public Builder putServerVariables( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableServerVariables().getMutableMap() + .put(key, value); + return this; + } + /** + *
+                     * Optional. Server data name/value pairs.  Example: {"java.runtime.name": "OpenJDK Runtime Environment", "os.name": "Linux", "user.timezone": "UTC", "java.vendor": "Oracle Corporation"}
+                     * 
+ * + * map<string, string> server_variables = 5; + */ + + public Builder putAllServerVariables( + java.util.Map values) { + internalGetMutableServerVariables().getMutableMap() + .putAll(values); + return this; + } + + private java.lang.Object customerName_ = ""; + /** + *
+                     * Optional. Customer/client name. Example: "Stackify"
+                     * 
+ * + * string customer_name = 6; + */ + public java.lang.String getCustomerName() { + java.lang.Object ref = customerName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + customerName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+                     * Optional. Customer/client name. Example: "Stackify"
+                     * 
+ * + * string customer_name = 6; + */ + public com.google.protobuf.ByteString + getCustomerNameBytes() { + java.lang.Object ref = customerName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + customerName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+                     * Optional. Customer/client name. Example: "Stackify"
+                     * 
+ * + * string customer_name = 6; + */ + public Builder setCustomerName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + customerName_ = value; + onChanged(); + return this; + } + /** + *
+                     * Optional. Customer/client name. Example: "Stackify"
+                     * 
+ * + * string customer_name = 6; + */ + public Builder clearCustomerName() { + + customerName_ = getDefaultInstance().getCustomerName(); + onChanged(); + return this; + } + /** + *
+                     * Optional. Customer/client name. Example: "Stackify"
+                     * 
+ * + * string customer_name = 6; + */ + public Builder setCustomerNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + customerName_ = value; + onChanged(); + return this; + } + + private java.lang.Object username_ = ""; + /** + *
+                     * Optional. User name. Example: "test-user@stackify.com
+                     * 
+ * + * string username = 7; + */ + public java.lang.String getUsername() { + java.lang.Object ref = username_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + username_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+                     * Optional. User name. Example: "test-user@stackify.com
+                     * 
+ * + * string username = 7; + */ + public com.google.protobuf.ByteString + getUsernameBytes() { + java.lang.Object ref = username_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + username_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+                     * Optional. User name. Example: "test-user@stackify.com
+                     * 
+ * + * string username = 7; + */ + public Builder setUsername( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + username_ = value; + onChanged(); + return this; + } + /** + *
+                     * Optional. User name. Example: "test-user@stackify.com
+                     * 
+ * + * string username = 7; + */ + public Builder clearUsername() { + + username_ = getDefaultInstance().getUsername(); + onChanged(); + return this; + } + /** + *
+                     * Optional. User name. Example: "test-user@stackify.com
+                     * 
+ * + * string username = 7; + */ + public Builder setUsernameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + username_ = value; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:stackify.LogGroup.Log.Error) + } + + // @@protoc_insertion_point(class_scope:stackify.LogGroup.Log.Error) + private static final com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error(); + } + + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Error parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Error(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int MESSAGE_FIELD_NUMBER = 1; + private volatile java.lang.Object message_; + /** + *
+             * REQUIRED The log message. Example: "Example debug message"
+             * 
+ * + * string message = 1; + */ + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + message_ = s; + return s; + } + } + /** + *
+             * REQUIRED The log message. Example: "Example debug message"
+             * 
+ * + * string message = 1; + */ + public com.google.protobuf.ByteString + getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_FIELD_NUMBER = 2; + private volatile java.lang.Object data_; + /** + *
+             * Optional. Additional JSON metadata about the log event. Special characters need to be escaped. Example: "{"Key1":"Value1","Key2":"Value2"}"
+             * 
+ * + * string data = 2; + */ + public java.lang.String getData() { + java.lang.Object ref = data_; + 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(); + data_ = s; + return s; + } + } + /** + *
+             * Optional. Additional JSON metadata about the log event. Special characters need to be escaped. Example: "{"Key1":"Value1","Key2":"Value2"}"
+             * 
+ * + * string data = 2; + */ + public com.google.protobuf.ByteString + getDataBytes() { + java.lang.Object ref = data_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + data_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int THREAD_NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object threadName_; + /** + *
+             * Optional. The thread name. Example: "main"
+             * 
+ * + * string thread_name = 3; + */ + public java.lang.String getThreadName() { + java.lang.Object ref = threadName_; + 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(); + threadName_ = s; + return s; + } + } + /** + *
+             * Optional. The thread name. Example: "main"
+             * 
+ * + * string thread_name = 3; + */ + public com.google.protobuf.ByteString + getThreadNameBytes() { + java.lang.Object ref = threadName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + threadName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATE_MILLIS_FIELD_NUMBER = 4; + private long dateMillis_; + /** + *
+             * REQUIRED Unix/POSIX/Epoch time with millisecond precision. Example: 1417535434194
+             * 
+ * + * int64 date_millis = 4; + */ + public long getDateMillis() { + return dateMillis_; + } + + public static final int LEVEL_FIELD_NUMBER = 5; + private volatile java.lang.Object level_; + /** + *
+             * REQUIRED The log level. Example: "debug"
+             * 
+ * + * string level = 5; + */ + public java.lang.String getLevel() { + java.lang.Object ref = level_; + 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(); + level_ = s; + return s; + } + } + /** + *
+             * REQUIRED The log level. Example: "debug"
+             * 
+ * + * string level = 5; + */ + public com.google.protobuf.ByteString + getLevelBytes() { + java.lang.Object ref = level_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + level_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRANSACTION_ID_FIELD_NUMBER = 6; + private volatile java.lang.Object transactionId_; + /** + *
+             * Optional. Transaction identifier. Example: "c06570b2-ba9d-40be-8078-1394cf331159"
+             * 
+ * + * string transaction_id = 6; + */ + public java.lang.String getTransactionId() { + java.lang.Object ref = transactionId_; + 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(); + transactionId_ = s; + return s; + } + } + /** + *
+             * Optional. Transaction identifier. Example: "c06570b2-ba9d-40be-8078-1394cf331159"
+             * 
+ * + * string transaction_id = 6; + */ + public com.google.protobuf.ByteString + getTransactionIdBytes() { + java.lang.Object ref = transactionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + transactionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_METHOD_FIELD_NUMBER = 7; + private volatile java.lang.Object sourceMethod_; + /** + *
+             * Optional. Fully qualified method name. Example: "com.stackify.error.test.StackifyErrorAppenderTest.main"
+             * 
+ * + * string source_method = 7; + */ + public java.lang.String getSourceMethod() { + java.lang.Object ref = sourceMethod_; + 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(); + sourceMethod_ = s; + return s; + } + } + /** + *
+             * Optional. Fully qualified method name. Example: "com.stackify.error.test.StackifyErrorAppenderTest.main"
+             * 
+ * + * string source_method = 7; + */ + public com.google.protobuf.ByteString + getSourceMethodBytes() { + java.lang.Object ref = sourceMethod_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sourceMethod_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_LINE_FIELD_NUMBER = 8; + private int sourceLine_; + /** + *
+             * Optional. Line number. Example: 57
+             * 
+ * + * int32 source_line = 8; + */ + public int getSourceLine() { + return sourceLine_; + } + + public static final int ID_FIELD_NUMBER = 9; + private volatile java.lang.Object id_; + /** + *
+             * Optional. Used for linking traces w/ log messages.
+             * 
+ * + * string id = 9; + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
+             * Optional. Used for linking traces w/ log messages.
+             * 
+ * + * string id = 9; + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TAGS_FIELD_NUMBER = 10; + private com.google.protobuf.LazyStringList tags_; + /** + *
+             * Optional.
+             * 
+ * + * repeated string tags = 10; + */ + public com.google.protobuf.ProtocolStringList + getTagsList() { + return tags_; + } + /** + *
+             * Optional.
+             * 
+ * + * repeated string tags = 10; + */ + public int getTagsCount() { + return tags_.size(); + } + /** + *
+             * Optional.
+             * 
+ * + * repeated string tags = 10; + */ + public java.lang.String getTags(int index) { + return tags_.get(index); + } + /** + *
+             * Optional.
+             * 
+ * + * repeated string tags = 10; + */ + public com.google.protobuf.ByteString + getTagsBytes(int index) { + return tags_.getByteString(index); + } + + public static final int ERROR_FIELD_NUMBER = 11; + private com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error error_; + /** + *
+             * Optional. Exception details.
+             * 
+ * + * .stackify.LogGroup.Log.Error error = 11; + */ + public boolean hasError() { + return error_ != null; + } + /** + *
+             * Optional. Exception details.
+             * 
+ * + * .stackify.LogGroup.Log.Error error = 11; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error getError() { + return error_ == null ? com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.getDefaultInstance() : error_; + } + /** + *
+             * Optional. Exception details.
+             * 
+ * + * .stackify.LogGroup.Log.Error error = 11; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.ErrorOrBuilder getErrorOrBuilder() { + return getError(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getMessageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, message_); + } + if (!getDataBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, data_); + } + if (!getThreadNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, threadName_); + } + if (dateMillis_ != 0L) { + output.writeInt64(4, dateMillis_); + } + if (!getLevelBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, level_); + } + if (!getTransactionIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, transactionId_); + } + if (!getSourceMethodBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, sourceMethod_); + } + if (sourceLine_ != 0) { + output.writeInt32(8, sourceLine_); + } + if (!getIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, id_); + } + for (int i = 0; i < tags_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, tags_.getRaw(i)); + } + if (error_ != null) { + output.writeMessage(11, getError()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getMessageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, message_); + } + if (!getDataBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, data_); + } + if (!getThreadNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, threadName_); + } + if (dateMillis_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, dateMillis_); + } + if (!getLevelBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, level_); + } + if (!getTransactionIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, transactionId_); + } + if (!getSourceMethodBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, sourceMethod_); + } + if (sourceLine_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(8, sourceLine_); + } + if (!getIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, id_); + } + { + int dataSize = 0; + for (int i = 0; i < tags_.size(); i++) { + dataSize += computeStringSizeNoTag(tags_.getRaw(i)); + } + size += dataSize; + size += 1 * getTagsList().size(); + } + if (error_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, getError()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.stackify.api.common.proto.StackifyProto.LogGroup.Log)) { + return super.equals(obj); + } + com.stackify.api.common.proto.StackifyProto.LogGroup.Log other = (com.stackify.api.common.proto.StackifyProto.LogGroup.Log) obj; + + if (!getMessage() + .equals(other.getMessage())) return false; + if (!getData() + .equals(other.getData())) return false; + if (!getThreadName() + .equals(other.getThreadName())) return false; + if (getDateMillis() + != other.getDateMillis()) return false; + if (!getLevel() + .equals(other.getLevel())) return false; + if (!getTransactionId() + .equals(other.getTransactionId())) return false; + if (!getSourceMethod() + .equals(other.getSourceMethod())) return false; + if (getSourceLine() + != other.getSourceLine()) return false; + if (!getId() + .equals(other.getId())) return false; + if (!getTagsList() + .equals(other.getTagsList())) return false; + if (hasError() != other.hasError()) return false; + if (hasError()) { + if (!getError() + .equals(other.getError())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getMessage().hashCode(); + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getData().hashCode(); + hash = (37 * hash) + THREAD_NAME_FIELD_NUMBER; + hash = (53 * hash) + getThreadName().hashCode(); + hash = (37 * hash) + DATE_MILLIS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getDateMillis()); + hash = (37 * hash) + LEVEL_FIELD_NUMBER; + hash = (53 * hash) + getLevel().hashCode(); + hash = (37 * hash) + TRANSACTION_ID_FIELD_NUMBER; + hash = (53 * hash) + getTransactionId().hashCode(); + hash = (37 * hash) + SOURCE_METHOD_FIELD_NUMBER; + hash = (53 * hash) + getSourceMethod().hashCode(); + hash = (37 * hash) + SOURCE_LINE_FIELD_NUMBER; + hash = (53 * hash) + getSourceLine(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (getTagsCount() > 0) { + hash = (37 * hash) + TAGS_FIELD_NUMBER; + hash = (53 * hash) + getTagsList().hashCode(); + } + if (hasError()) { + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.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.stackify.api.common.proto.StackifyProto.LogGroup.Log parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.stackify.api.common.proto.StackifyProto.LogGroup.Log prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code stackify.LogGroup.Log} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:stackify.LogGroup.Log) + com.stackify.api.common.proto.StackifyProto.LogGroup.LogOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Log_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Log_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.class, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Builder.class); + } + + // Construct using com.stackify.api.common.proto.StackifyProto.LogGroup.Log.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + message_ = ""; + + data_ = ""; + + threadName_ = ""; + + dateMillis_ = 0L; + + level_ = ""; + + transactionId_ = ""; + + sourceMethod_ = ""; + + sourceLine_ = 0; + + id_ = ""; + + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + if (errorBuilder_ == null) { + error_ = null; + } else { + error_ = null; + errorBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_Log_descriptor; + } + + @java.lang.Override + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log getDefaultInstanceForType() { + return com.stackify.api.common.proto.StackifyProto.LogGroup.Log.getDefaultInstance(); + } + + @java.lang.Override + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log build() { + com.stackify.api.common.proto.StackifyProto.LogGroup.Log result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log buildPartial() { + com.stackify.api.common.proto.StackifyProto.LogGroup.Log result = new com.stackify.api.common.proto.StackifyProto.LogGroup.Log(this); + int from_bitField0_ = bitField0_; + result.message_ = message_; + result.data_ = data_; + result.threadName_ = threadName_; + result.dateMillis_ = dateMillis_; + result.level_ = level_; + result.transactionId_ = transactionId_; + result.sourceMethod_ = sourceMethod_; + result.sourceLine_ = sourceLine_; + result.id_ = id_; + if (((bitField0_ & 0x00000001) != 0)) { + tags_ = tags_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.tags_ = tags_; + if (errorBuilder_ == null) { + result.error_ = error_; + } else { + result.error_ = errorBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.stackify.api.common.proto.StackifyProto.LogGroup.Log) { + return mergeFrom((com.stackify.api.common.proto.StackifyProto.LogGroup.Log)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.stackify.api.common.proto.StackifyProto.LogGroup.Log other) { + if (other == com.stackify.api.common.proto.StackifyProto.LogGroup.Log.getDefaultInstance()) return this; + if (!other.getMessage().isEmpty()) { + message_ = other.message_; + onChanged(); + } + if (!other.getData().isEmpty()) { + data_ = other.data_; + onChanged(); + } + if (!other.getThreadName().isEmpty()) { + threadName_ = other.threadName_; + onChanged(); + } + if (other.getDateMillis() != 0L) { + setDateMillis(other.getDateMillis()); + } + if (!other.getLevel().isEmpty()) { + level_ = other.level_; + onChanged(); + } + if (!other.getTransactionId().isEmpty()) { + transactionId_ = other.transactionId_; + onChanged(); + } + if (!other.getSourceMethod().isEmpty()) { + sourceMethod_ = other.sourceMethod_; + onChanged(); + } + if (other.getSourceLine() != 0) { + setSourceLine(other.getSourceLine()); + } + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } + if (!other.tags_.isEmpty()) { + if (tags_.isEmpty()) { + tags_ = other.tags_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTagsIsMutable(); + tags_.addAll(other.tags_); + } + onChanged(); + } + if (other.hasError()) { + mergeError(other.getError()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.stackify.api.common.proto.StackifyProto.LogGroup.Log parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.stackify.api.common.proto.StackifyProto.LogGroup.Log) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object message_ = ""; + /** + *
+                 * REQUIRED The log message. Example: "Example debug message"
+                 * 
+ * + * string message = 1; + */ + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + message_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+                 * REQUIRED The log message. Example: "Example debug message"
+                 * 
+ * + * string message = 1; + */ + public com.google.protobuf.ByteString + getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+                 * REQUIRED The log message. Example: "Example debug message"
+                 * 
+ * + * string message = 1; + */ + public Builder setMessage( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + message_ = value; + onChanged(); + return this; + } + /** + *
+                 * REQUIRED The log message. Example: "Example debug message"
+                 * 
+ * + * string message = 1; + */ + public Builder clearMessage() { + + message_ = getDefaultInstance().getMessage(); + onChanged(); + return this; + } + /** + *
+                 * REQUIRED The log message. Example: "Example debug message"
+                 * 
+ * + * string message = 1; + */ + public Builder setMessageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + message_ = value; + onChanged(); + return this; + } + + private java.lang.Object data_ = ""; + /** + *
+                 * Optional. Additional JSON metadata about the log event. Special characters need to be escaped. Example: "{"Key1":"Value1","Key2":"Value2"}"
+                 * 
+ * + * string data = 2; + */ + public java.lang.String getData() { + java.lang.Object ref = data_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + data_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+                 * Optional. Additional JSON metadata about the log event. Special characters need to be escaped. Example: "{"Key1":"Value1","Key2":"Value2"}"
+                 * 
+ * + * string data = 2; + */ + public com.google.protobuf.ByteString + getDataBytes() { + java.lang.Object ref = data_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + data_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+                 * Optional. Additional JSON metadata about the log event. Special characters need to be escaped. Example: "{"Key1":"Value1","Key2":"Value2"}"
+                 * 
+ * + * string data = 2; + */ + public Builder setData( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + data_ = value; + onChanged(); + return this; + } + /** + *
+                 * Optional. Additional JSON metadata about the log event. Special characters need to be escaped. Example: "{"Key1":"Value1","Key2":"Value2"}"
+                 * 
+ * + * string data = 2; + */ + public Builder clearData() { + + data_ = getDefaultInstance().getData(); + onChanged(); + return this; + } + /** + *
+                 * Optional. Additional JSON metadata about the log event. Special characters need to be escaped. Example: "{"Key1":"Value1","Key2":"Value2"}"
+                 * 
+ * + * string data = 2; + */ + public Builder setDataBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + data_ = value; + onChanged(); + return this; + } + + private java.lang.Object threadName_ = ""; + /** + *
+                 * Optional. The thread name. Example: "main"
+                 * 
+ * + * string thread_name = 3; + */ + public java.lang.String getThreadName() { + java.lang.Object ref = threadName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + threadName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+                 * Optional. The thread name. Example: "main"
+                 * 
+ * + * string thread_name = 3; + */ + public com.google.protobuf.ByteString + getThreadNameBytes() { + java.lang.Object ref = threadName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + threadName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+                 * Optional. The thread name. Example: "main"
+                 * 
+ * + * string thread_name = 3; + */ + public Builder setThreadName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + threadName_ = value; + onChanged(); + return this; + } + /** + *
+                 * Optional. The thread name. Example: "main"
+                 * 
+ * + * string thread_name = 3; + */ + public Builder clearThreadName() { + + threadName_ = getDefaultInstance().getThreadName(); + onChanged(); + return this; + } + /** + *
+                 * Optional. The thread name. Example: "main"
+                 * 
+ * + * string thread_name = 3; + */ + public Builder setThreadNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + threadName_ = value; + onChanged(); + return this; + } + + private long dateMillis_ ; + /** + *
+                 * REQUIRED Unix/POSIX/Epoch time with millisecond precision. Example: 1417535434194
+                 * 
+ * + * int64 date_millis = 4; + */ + public long getDateMillis() { + return dateMillis_; + } + /** + *
+                 * REQUIRED Unix/POSIX/Epoch time with millisecond precision. Example: 1417535434194
+                 * 
+ * + * int64 date_millis = 4; + */ + public Builder setDateMillis(long value) { + + dateMillis_ = value; + onChanged(); + return this; + } + /** + *
+                 * REQUIRED Unix/POSIX/Epoch time with millisecond precision. Example: 1417535434194
+                 * 
+ * + * int64 date_millis = 4; + */ + public Builder clearDateMillis() { + + dateMillis_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object level_ = ""; + /** + *
+                 * REQUIRED The log level. Example: "debug"
+                 * 
+ * + * string level = 5; + */ + public java.lang.String getLevel() { + java.lang.Object ref = level_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + level_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+                 * REQUIRED The log level. Example: "debug"
+                 * 
+ * + * string level = 5; + */ + public com.google.protobuf.ByteString + getLevelBytes() { + java.lang.Object ref = level_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + level_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+                 * REQUIRED The log level. Example: "debug"
+                 * 
+ * + * string level = 5; + */ + public Builder setLevel( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + level_ = value; + onChanged(); + return this; + } + /** + *
+                 * REQUIRED The log level. Example: "debug"
+                 * 
+ * + * string level = 5; + */ + public Builder clearLevel() { + + level_ = getDefaultInstance().getLevel(); + onChanged(); + return this; + } + /** + *
+                 * REQUIRED The log level. Example: "debug"
+                 * 
+ * + * string level = 5; + */ + public Builder setLevelBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + level_ = value; + onChanged(); + return this; + } + + private java.lang.Object transactionId_ = ""; + /** + *
+                 * Optional. Transaction identifier. Example: "c06570b2-ba9d-40be-8078-1394cf331159"
+                 * 
+ * + * string transaction_id = 6; + */ + public java.lang.String getTransactionId() { + java.lang.Object ref = transactionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + transactionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+                 * Optional. Transaction identifier. Example: "c06570b2-ba9d-40be-8078-1394cf331159"
+                 * 
+ * + * string transaction_id = 6; + */ + public com.google.protobuf.ByteString + getTransactionIdBytes() { + java.lang.Object ref = transactionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + transactionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+                 * Optional. Transaction identifier. Example: "c06570b2-ba9d-40be-8078-1394cf331159"
+                 * 
+ * + * string transaction_id = 6; + */ + public Builder setTransactionId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + transactionId_ = value; + onChanged(); + return this; + } + /** + *
+                 * Optional. Transaction identifier. Example: "c06570b2-ba9d-40be-8078-1394cf331159"
+                 * 
+ * + * string transaction_id = 6; + */ + public Builder clearTransactionId() { + + transactionId_ = getDefaultInstance().getTransactionId(); + onChanged(); + return this; + } + /** + *
+                 * Optional. Transaction identifier. Example: "c06570b2-ba9d-40be-8078-1394cf331159"
+                 * 
+ * + * string transaction_id = 6; + */ + public Builder setTransactionIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + transactionId_ = value; + onChanged(); + return this; + } + + private java.lang.Object sourceMethod_ = ""; + /** + *
+                 * Optional. Fully qualified method name. Example: "com.stackify.error.test.StackifyErrorAppenderTest.main"
+                 * 
+ * + * string source_method = 7; + */ + public java.lang.String getSourceMethod() { + java.lang.Object ref = sourceMethod_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceMethod_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+                 * Optional. Fully qualified method name. Example: "com.stackify.error.test.StackifyErrorAppenderTest.main"
+                 * 
+ * + * string source_method = 7; + */ + public com.google.protobuf.ByteString + getSourceMethodBytes() { + java.lang.Object ref = sourceMethod_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + sourceMethod_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+                 * Optional. Fully qualified method name. Example: "com.stackify.error.test.StackifyErrorAppenderTest.main"
+                 * 
+ * + * string source_method = 7; + */ + public Builder setSourceMethod( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sourceMethod_ = value; + onChanged(); + return this; + } + /** + *
+                 * Optional. Fully qualified method name. Example: "com.stackify.error.test.StackifyErrorAppenderTest.main"
+                 * 
+ * + * string source_method = 7; + */ + public Builder clearSourceMethod() { + + sourceMethod_ = getDefaultInstance().getSourceMethod(); + onChanged(); + return this; + } + /** + *
+                 * Optional. Fully qualified method name. Example: "com.stackify.error.test.StackifyErrorAppenderTest.main"
+                 * 
+ * + * string source_method = 7; + */ + public Builder setSourceMethodBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sourceMethod_ = value; + onChanged(); + return this; + } + + private int sourceLine_ ; + /** + *
+                 * Optional. Line number. Example: 57
+                 * 
+ * + * int32 source_line = 8; + */ + public int getSourceLine() { + return sourceLine_; + } + /** + *
+                 * Optional. Line number. Example: 57
+                 * 
+ * + * int32 source_line = 8; + */ + public Builder setSourceLine(int value) { + + sourceLine_ = value; + onChanged(); + return this; + } + /** + *
+                 * Optional. Line number. Example: 57
+                 * 
+ * + * int32 source_line = 8; + */ + public Builder clearSourceLine() { + + sourceLine_ = 0; + onChanged(); + return this; + } + + private java.lang.Object id_ = ""; + /** + *
+                 * Optional. Used for linking traces w/ log messages.
+                 * 
+ * + * string id = 9; + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+                 * Optional. Used for linking traces w/ log messages.
+                 * 
+ * + * string id = 9; + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+                 * Optional. Used for linking traces w/ log messages.
+                 * 
+ * + * string id = 9; + */ + public Builder setId( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + *
+                 * Optional. Used for linking traces w/ log messages.
+                 * 
+ * + * string id = 9; + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + *
+                 * Optional. Used for linking traces w/ log messages.
+                 * 
+ * + * string id = 9; + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureTagsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + tags_ = new com.google.protobuf.LazyStringArrayList(tags_); + bitField0_ |= 0x00000001; + } + } + /** + *
+                 * Optional.
+                 * 
+ * + * repeated string tags = 10; + */ + public com.google.protobuf.ProtocolStringList + getTagsList() { + return tags_.getUnmodifiableView(); + } + /** + *
+                 * Optional.
+                 * 
+ * + * repeated string tags = 10; + */ + public int getTagsCount() { + return tags_.size(); + } + /** + *
+                 * Optional.
+                 * 
+ * + * repeated string tags = 10; + */ + public java.lang.String getTags(int index) { + return tags_.get(index); + } + /** + *
+                 * Optional.
+                 * 
+ * + * repeated string tags = 10; + */ + public com.google.protobuf.ByteString + getTagsBytes(int index) { + return tags_.getByteString(index); + } + /** + *
+                 * Optional.
+                 * 
+ * + * repeated string tags = 10; + */ + public Builder setTags( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.set(index, value); + onChanged(); + return this; + } + /** + *
+                 * Optional.
+                 * 
+ * + * repeated string tags = 10; + */ + public Builder addTags( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.add(value); + onChanged(); + return this; + } + /** + *
+                 * Optional.
+                 * 
+ * + * repeated string tags = 10; + */ + public Builder addAllTags( + java.lang.Iterable values) { + ensureTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, tags_); + onChanged(); + return this; + } + /** + *
+                 * Optional.
+                 * 
+ * + * repeated string tags = 10; + */ + public Builder clearTags() { + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+                 * Optional.
+                 * 
+ * + * repeated string tags = 10; + */ + public Builder addTagsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureTagsIsMutable(); + tags_.add(value); + onChanged(); + return this; + } + + private com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error error_; + private com.google.protobuf.SingleFieldBuilderV3< + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.Builder, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.ErrorOrBuilder> errorBuilder_; + /** + *
+                 * Optional. Exception details.
+                 * 
+ * + * .stackify.LogGroup.Log.Error error = 11; + */ + public boolean hasError() { + return errorBuilder_ != null || error_ != null; + } + /** + *
+                 * Optional. Exception details.
+                 * 
+ * + * .stackify.LogGroup.Log.Error error = 11; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error getError() { + if (errorBuilder_ == null) { + return error_ == null ? com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.getDefaultInstance() : error_; + } else { + return errorBuilder_.getMessage(); + } + } + /** + *
+                 * Optional. Exception details.
+                 * 
+ * + * .stackify.LogGroup.Log.Error error = 11; + */ + public Builder setError(com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + error_ = value; + onChanged(); + } else { + errorBuilder_.setMessage(value); + } + + return this; + } + /** + *
+                 * Optional. Exception details.
+                 * 
+ * + * .stackify.LogGroup.Log.Error error = 11; + */ + public Builder setError( + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.Builder builderForValue) { + if (errorBuilder_ == null) { + error_ = builderForValue.build(); + onChanged(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+                 * Optional. Exception details.
+                 * 
+ * + * .stackify.LogGroup.Log.Error error = 11; + */ + public Builder mergeError(com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error value) { + if (errorBuilder_ == null) { + if (error_ != null) { + error_ = + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.newBuilder(error_).mergeFrom(value).buildPartial(); + } else { + error_ = value; + } + onChanged(); + } else { + errorBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+                 * Optional. Exception details.
+                 * 
+ * + * .stackify.LogGroup.Log.Error error = 11; + */ + public Builder clearError() { + if (errorBuilder_ == null) { + error_ = null; + onChanged(); + } else { + error_ = null; + errorBuilder_ = null; + } + + return this; + } + /** + *
+                 * Optional. Exception details.
+                 * 
+ * + * .stackify.LogGroup.Log.Error error = 11; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.Builder getErrorBuilder() { + + onChanged(); + return getErrorFieldBuilder().getBuilder(); + } + /** + *
+                 * Optional. Exception details.
+                 * 
+ * + * .stackify.LogGroup.Log.Error error = 11; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.ErrorOrBuilder getErrorOrBuilder() { + if (errorBuilder_ != null) { + return errorBuilder_.getMessageOrBuilder(); + } else { + return error_ == null ? + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.getDefaultInstance() : error_; + } + } + /** + *
+                 * Optional. Exception details.
+                 * 
+ * + * .stackify.LogGroup.Log.Error error = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.Builder, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.ErrorOrBuilder> + getErrorFieldBuilder() { + if (errorBuilder_ == null) { + errorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Error.Builder, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.ErrorOrBuilder>( + getError(), + getParentForChildren(), + isClean()); + error_ = null; + } + return errorBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:stackify.LogGroup.Log) + } + + // @@protoc_insertion_point(class_scope:stackify.LogGroup.Log) + private static final com.stackify.api.common.proto.StackifyProto.LogGroup.Log DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.stackify.api.common.proto.StackifyProto.LogGroup.Log(); + } + + public static com.stackify.api.common.proto.StackifyProto.LogGroup.Log getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Log parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Log(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int ENVIRONMENT_FIELD_NUMBER = 1; + private volatile java.lang.Object environment_; + /** + *
+         * REQUIRED The environment name. Example: "Prod"
+         * 
+ * + * string environment = 1; + */ + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + 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(); + environment_ = s; + return s; + } + } + /** + *
+         * REQUIRED The environment name. Example: "Prod"
+         * 
+ * + * string environment = 1; + */ + public com.google.protobuf.ByteString + getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVER_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object serverName_; + /** + *
+         * REQUIRED The name of the device. Example: "PROD-RS-Debian-7"
+         * 
+ * + * string server_name = 2; + */ + public java.lang.String getServerName() { + java.lang.Object ref = serverName_; + 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(); + serverName_ = s; + return s; + } + } + /** + *
+         * REQUIRED The name of the device. Example: "PROD-RS-Debian-7"
+         * 
+ * + * string server_name = 2; + */ + public com.google.protobuf.ByteString + getServerNameBytes() { + java.lang.Object ref = serverName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + serverName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int APPLICATION_NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object applicationName_; + /** + *
+         * REQUIRED The name of the application.  Example: "stackify-agent"
+         * 
+ * + * string application_name = 3; + */ + public java.lang.String getApplicationName() { + java.lang.Object ref = applicationName_; + 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(); + applicationName_ = s; + return s; + } + } + /** + *
+         * REQUIRED The name of the application.  Example: "stackify-agent"
+         * 
+ * + * string application_name = 3; + */ + public com.google.protobuf.ByteString + getApplicationNameBytes() { + java.lang.Object ref = applicationName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + applicationName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int APPLICATION_LOCATION_FIELD_NUMBER = 4; + private volatile java.lang.Object applicationLocation_; + /** + *
+         * Optional. The full directory path for the application. Example: "/usr/local/stackify/stackify-agent"
+         * 
+ * + * string application_location = 4; + */ + public java.lang.String getApplicationLocation() { + java.lang.Object ref = applicationLocation_; + 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(); + applicationLocation_ = s; + return s; + } + } + /** + *
+         * Optional. The full directory path for the application. Example: "/usr/local/stackify/stackify-agent"
+         * 
+ * + * string application_location = 4; + */ + public com.google.protobuf.ByteString + getApplicationLocationBytes() { + java.lang.Object ref = applicationLocation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + applicationLocation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOGGER_FIELD_NUMBER = 5; + private volatile java.lang.Object logger_; + /** + *
+         * REQUIRED The name and version of the logging project generating this request. Example: "stackify-log-log4j12-1.0.12"
+         * 
+ * + * string logger = 5; + */ + public java.lang.String getLogger() { + java.lang.Object ref = logger_; + 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(); + logger_ = s; + return s; + } + } + /** + *
+         * REQUIRED The name and version of the logging project generating this request. Example: "stackify-log-log4j12-1.0.12"
+         * 
+ * + * string logger = 5; + */ + public com.google.protobuf.ByteString + getLoggerBytes() { + java.lang.Object ref = logger_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + logger_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PLATFORM_FIELD_NUMBER = 6; + private volatile java.lang.Object platform_; + /** + *
+         * The logging language.  Example: "java"
+         * 
+ * + * string platform = 6; + */ + public java.lang.String getPlatform() { + java.lang.Object ref = platform_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + platform_ = s; + return s; + } + } + /** + *
+         * The logging language.  Example: "java"
+         * 
+ * + * string platform = 6; + */ + public com.google.protobuf.ByteString + getPlatformBytes() { + java.lang.Object ref = platform_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + platform_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LOGS_FIELD_NUMBER = 7; + private java.util.List logs_; + /** + * repeated .stackify.LogGroup.Log logs = 7; + */ + public java.util.List getLogsList() { + return logs_; + } + /** + * repeated .stackify.LogGroup.Log logs = 7; + */ + public java.util.List + getLogsOrBuilderList() { + return logs_; + } + /** + * repeated .stackify.LogGroup.Log logs = 7; + */ + public int getLogsCount() { + return logs_.size(); + } + /** + * repeated .stackify.LogGroup.Log logs = 7; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log getLogs(int index) { + return logs_.get(index); + } + /** + * repeated .stackify.LogGroup.Log logs = 7; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.LogOrBuilder getLogsOrBuilder( + int index) { + return logs_.get(index); + } + + public static final int CONTAINER_FIELD_NUMBER = 8; + private com.stackify.api.common.proto.StackifyProto.LogGroup.Container container_; + /** + * .stackify.LogGroup.Container container = 8; + */ + public boolean hasContainer() { + return container_ != null; + } + /** + * .stackify.LogGroup.Container container = 8; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Container getContainer() { + return container_ == null ? com.stackify.api.common.proto.StackifyProto.LogGroup.Container.getDefaultInstance() : container_; + } + /** + * .stackify.LogGroup.Container container = 8; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.ContainerOrBuilder getContainerOrBuilder() { + return getContainer(); + } + + public static final int KUBERNETES_FIELD_NUMBER = 9; + private com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes kubernetes_; + /** + * .stackify.LogGroup.Kubernetes kubernetes = 9; + */ + public boolean hasKubernetes() { + return kubernetes_ != null; + } + /** + * .stackify.LogGroup.Kubernetes kubernetes = 9; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes getKubernetes() { + return kubernetes_ == null ? com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes.getDefaultInstance() : kubernetes_; + } + /** + * .stackify.LogGroup.Kubernetes kubernetes = 9; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.KubernetesOrBuilder getKubernetesOrBuilder() { + return getKubernetes(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getEnvironmentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, environment_); + } + if (!getServerNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, serverName_); + } + if (!getApplicationNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, applicationName_); + } + if (!getApplicationLocationBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, applicationLocation_); + } + if (!getLoggerBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, logger_); + } + if (!getPlatformBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, platform_); + } + for (int i = 0; i < logs_.size(); i++) { + output.writeMessage(7, logs_.get(i)); + } + if (container_ != null) { + output.writeMessage(8, getContainer()); + } + if (kubernetes_ != null) { + output.writeMessage(9, getKubernetes()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getEnvironmentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, environment_); + } + if (!getServerNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, serverName_); + } + if (!getApplicationNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, applicationName_); + } + if (!getApplicationLocationBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, applicationLocation_); + } + if (!getLoggerBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, logger_); + } + if (!getPlatformBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, platform_); + } + for (int i = 0; i < logs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, logs_.get(i)); + } + if (container_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getContainer()); + } + if (kubernetes_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, getKubernetes()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.stackify.api.common.proto.StackifyProto.LogGroup)) { + return super.equals(obj); + } + com.stackify.api.common.proto.StackifyProto.LogGroup other = (com.stackify.api.common.proto.StackifyProto.LogGroup) obj; + + if (!getEnvironment() + .equals(other.getEnvironment())) return false; + if (!getServerName() + .equals(other.getServerName())) return false; + if (!getApplicationName() + .equals(other.getApplicationName())) return false; + if (!getApplicationLocation() + .equals(other.getApplicationLocation())) return false; + if (!getLogger() + .equals(other.getLogger())) return false; + if (!getPlatform() + .equals(other.getPlatform())) return false; + if (!getLogsList() + .equals(other.getLogsList())) return false; + if (hasContainer() != other.hasContainer()) return false; + if (hasContainer()) { + if (!getContainer() + .equals(other.getContainer())) return false; + } + if (hasKubernetes() != other.hasKubernetes()) return false; + if (hasKubernetes()) { + if (!getKubernetes() + .equals(other.getKubernetes())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER; + hash = (53 * hash) + getEnvironment().hashCode(); + hash = (37 * hash) + SERVER_NAME_FIELD_NUMBER; + hash = (53 * hash) + getServerName().hashCode(); + hash = (37 * hash) + APPLICATION_NAME_FIELD_NUMBER; + hash = (53 * hash) + getApplicationName().hashCode(); + hash = (37 * hash) + APPLICATION_LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getApplicationLocation().hashCode(); + hash = (37 * hash) + LOGGER_FIELD_NUMBER; + hash = (53 * hash) + getLogger().hashCode(); + hash = (37 * hash) + PLATFORM_FIELD_NUMBER; + hash = (53 * hash) + getPlatform().hashCode(); + if (getLogsCount() > 0) { + hash = (37 * hash) + LOGS_FIELD_NUMBER; + hash = (53 * hash) + getLogsList().hashCode(); + } + if (hasContainer()) { + hash = (37 * hash) + CONTAINER_FIELD_NUMBER; + hash = (53 * hash) + getContainer().hashCode(); + } + if (hasKubernetes()) { + hash = (37 * hash) + KUBERNETES_FIELD_NUMBER; + hash = (53 * hash) + getKubernetes().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.stackify.api.common.proto.StackifyProto.LogGroup parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.stackify.api.common.proto.StackifyProto.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.stackify.api.common.proto.StackifyProto.LogGroup parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.stackify.api.common.proto.StackifyProto.LogGroup parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.stackify.api.common.proto.StackifyProto.LogGroup prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code stackify.LogGroup} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:stackify.LogGroup) + com.stackify.api.common.proto.StackifyProto.LogGroupOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.stackify.api.common.proto.StackifyProto.LogGroup.class, com.stackify.api.common.proto.StackifyProto.LogGroup.Builder.class); + } + + // Construct using com.stackify.api.common.proto.StackifyProto.LogGroup.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getLogsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + environment_ = ""; + + serverName_ = ""; + + applicationName_ = ""; + + applicationLocation_ = ""; + + logger_ = ""; + + platform_ = ""; + + if (logsBuilder_ == null) { + logs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + logsBuilder_.clear(); + } + if (containerBuilder_ == null) { + container_ = null; + } else { + container_ = null; + containerBuilder_ = null; + } + if (kubernetesBuilder_ == null) { + kubernetes_ = null; + } else { + kubernetes_ = null; + kubernetesBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.stackify.api.common.proto.StackifyProto.internal_static_stackify_LogGroup_descriptor; + } + + @java.lang.Override + public com.stackify.api.common.proto.StackifyProto.LogGroup getDefaultInstanceForType() { + return com.stackify.api.common.proto.StackifyProto.LogGroup.getDefaultInstance(); + } + + @java.lang.Override + public com.stackify.api.common.proto.StackifyProto.LogGroup build() { + com.stackify.api.common.proto.StackifyProto.LogGroup result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.stackify.api.common.proto.StackifyProto.LogGroup buildPartial() { + com.stackify.api.common.proto.StackifyProto.LogGroup result = new com.stackify.api.common.proto.StackifyProto.LogGroup(this); + int from_bitField0_ = bitField0_; + result.environment_ = environment_; + result.serverName_ = serverName_; + result.applicationName_ = applicationName_; + result.applicationLocation_ = applicationLocation_; + result.logger_ = logger_; + result.platform_ = platform_; + if (logsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + logs_ = java.util.Collections.unmodifiableList(logs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.logs_ = logs_; + } else { + result.logs_ = logsBuilder_.build(); + } + if (containerBuilder_ == null) { + result.container_ = container_; + } else { + result.container_ = containerBuilder_.build(); + } + if (kubernetesBuilder_ == null) { + result.kubernetes_ = kubernetes_; + } else { + result.kubernetes_ = kubernetesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.stackify.api.common.proto.StackifyProto.LogGroup) { + return mergeFrom((com.stackify.api.common.proto.StackifyProto.LogGroup)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.stackify.api.common.proto.StackifyProto.LogGroup other) { + if (other == com.stackify.api.common.proto.StackifyProto.LogGroup.getDefaultInstance()) return this; + if (!other.getEnvironment().isEmpty()) { + environment_ = other.environment_; + onChanged(); + } + if (!other.getServerName().isEmpty()) { + serverName_ = other.serverName_; + onChanged(); + } + if (!other.getApplicationName().isEmpty()) { + applicationName_ = other.applicationName_; + onChanged(); + } + if (!other.getApplicationLocation().isEmpty()) { + applicationLocation_ = other.applicationLocation_; + onChanged(); + } + if (!other.getLogger().isEmpty()) { + logger_ = other.logger_; + onChanged(); + } + if (!other.getPlatform().isEmpty()) { + platform_ = other.platform_; + onChanged(); + } + 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.GeneratedMessageV3.alwaysUseFieldBuilders ? + getLogsFieldBuilder() : null; + } else { + logsBuilder_.addAllMessages(other.logs_); + } + } + } + if (other.hasContainer()) { + mergeContainer(other.getContainer()); + } + if (other.hasKubernetes()) { + mergeKubernetes(other.getKubernetes()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.stackify.api.common.proto.StackifyProto.LogGroup parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.stackify.api.common.proto.StackifyProto.LogGroup) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object environment_ = ""; + /** + *
+             * REQUIRED The environment name. Example: "Prod"
+             * 
+ * + * string environment = 1; + */ + public java.lang.String getEnvironment() { + java.lang.Object ref = environment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + environment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+             * REQUIRED The environment name. Example: "Prod"
+             * 
+ * + * string environment = 1; + */ + public com.google.protobuf.ByteString + getEnvironmentBytes() { + java.lang.Object ref = environment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + environment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+             * REQUIRED The environment name. Example: "Prod"
+             * 
+ * + * string environment = 1; + */ + public Builder setEnvironment( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + environment_ = value; + onChanged(); + return this; + } + /** + *
+             * REQUIRED The environment name. Example: "Prod"
+             * 
+ * + * string environment = 1; + */ + public Builder clearEnvironment() { + + environment_ = getDefaultInstance().getEnvironment(); + onChanged(); + return this; + } + /** + *
+             * REQUIRED The environment name. Example: "Prod"
+             * 
+ * + * string environment = 1; + */ + public Builder setEnvironmentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + environment_ = value; + onChanged(); + return this; + } + + private java.lang.Object serverName_ = ""; + /** + *
+             * REQUIRED The name of the device. Example: "PROD-RS-Debian-7"
+             * 
+ * + * string server_name = 2; + */ + public java.lang.String getServerName() { + java.lang.Object ref = serverName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serverName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+             * REQUIRED The name of the device. Example: "PROD-RS-Debian-7"
+             * 
+ * + * string server_name = 2; + */ + public com.google.protobuf.ByteString + getServerNameBytes() { + java.lang.Object ref = serverName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + serverName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+             * REQUIRED The name of the device. Example: "PROD-RS-Debian-7"
+             * 
+ * + * string server_name = 2; + */ + public Builder setServerName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + serverName_ = value; + onChanged(); + return this; + } + /** + *
+             * REQUIRED The name of the device. Example: "PROD-RS-Debian-7"
+             * 
+ * + * string server_name = 2; + */ + public Builder clearServerName() { + + serverName_ = getDefaultInstance().getServerName(); + onChanged(); + return this; + } + /** + *
+             * REQUIRED The name of the device. Example: "PROD-RS-Debian-7"
+             * 
+ * + * string server_name = 2; + */ + public Builder setServerNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + serverName_ = value; + onChanged(); + return this; + } + + private java.lang.Object applicationName_ = ""; + /** + *
+             * REQUIRED The name of the application.  Example: "stackify-agent"
+             * 
+ * + * string application_name = 3; + */ + public java.lang.String getApplicationName() { + java.lang.Object ref = applicationName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + applicationName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+             * REQUIRED The name of the application.  Example: "stackify-agent"
+             * 
+ * + * string application_name = 3; + */ + public com.google.protobuf.ByteString + getApplicationNameBytes() { + java.lang.Object ref = applicationName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + applicationName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+             * REQUIRED The name of the application.  Example: "stackify-agent"
+             * 
+ * + * string application_name = 3; + */ + public Builder setApplicationName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + applicationName_ = value; + onChanged(); + return this; + } + /** + *
+             * REQUIRED The name of the application.  Example: "stackify-agent"
+             * 
+ * + * string application_name = 3; + */ + public Builder clearApplicationName() { + + applicationName_ = getDefaultInstance().getApplicationName(); + onChanged(); + return this; + } + /** + *
+             * REQUIRED The name of the application.  Example: "stackify-agent"
+             * 
+ * + * string application_name = 3; + */ + public Builder setApplicationNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + applicationName_ = value; + onChanged(); + return this; + } + + private java.lang.Object applicationLocation_ = ""; + /** + *
+             * Optional. The full directory path for the application. Example: "/usr/local/stackify/stackify-agent"
+             * 
+ * + * string application_location = 4; + */ + public java.lang.String getApplicationLocation() { + java.lang.Object ref = applicationLocation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + applicationLocation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+             * Optional. The full directory path for the application. Example: "/usr/local/stackify/stackify-agent"
+             * 
+ * + * string application_location = 4; + */ + public com.google.protobuf.ByteString + getApplicationLocationBytes() { + java.lang.Object ref = applicationLocation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + applicationLocation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+             * Optional. The full directory path for the application. Example: "/usr/local/stackify/stackify-agent"
+             * 
+ * + * string application_location = 4; + */ + public Builder setApplicationLocation( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + applicationLocation_ = value; + onChanged(); + return this; + } + /** + *
+             * Optional. The full directory path for the application. Example: "/usr/local/stackify/stackify-agent"
+             * 
+ * + * string application_location = 4; + */ + public Builder clearApplicationLocation() { + + applicationLocation_ = getDefaultInstance().getApplicationLocation(); + onChanged(); + return this; + } + /** + *
+             * Optional. The full directory path for the application. Example: "/usr/local/stackify/stackify-agent"
+             * 
+ * + * string application_location = 4; + */ + public Builder setApplicationLocationBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + applicationLocation_ = value; + onChanged(); + return this; + } + + private java.lang.Object logger_ = ""; + /** + *
+             * REQUIRED The name and version of the logging project generating this request. Example: "stackify-log-log4j12-1.0.12"
+             * 
+ * + * string logger = 5; + */ + public java.lang.String getLogger() { + java.lang.Object ref = logger_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + logger_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+             * REQUIRED The name and version of the logging project generating this request. Example: "stackify-log-log4j12-1.0.12"
+             * 
+ * + * string logger = 5; + */ + public com.google.protobuf.ByteString + getLoggerBytes() { + java.lang.Object ref = logger_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + logger_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+             * REQUIRED The name and version of the logging project generating this request. Example: "stackify-log-log4j12-1.0.12"
+             * 
+ * + * string logger = 5; + */ + public Builder setLogger( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + logger_ = value; + onChanged(); + return this; + } + /** + *
+             * REQUIRED The name and version of the logging project generating this request. Example: "stackify-log-log4j12-1.0.12"
+             * 
+ * + * string logger = 5; + */ + public Builder clearLogger() { + + logger_ = getDefaultInstance().getLogger(); + onChanged(); + return this; + } + /** + *
+             * REQUIRED The name and version of the logging project generating this request. Example: "stackify-log-log4j12-1.0.12"
+             * 
+ * + * string logger = 5; + */ + public Builder setLoggerBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + logger_ = value; + onChanged(); + return this; + } + + private java.lang.Object platform_ = ""; + /** + *
+             * The logging language.  Example: "java"
+             * 
+ * + * string platform = 6; + */ + public java.lang.String getPlatform() { + java.lang.Object ref = platform_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + platform_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+             * The logging language.  Example: "java"
+             * 
+ * + * string platform = 6; + */ + public com.google.protobuf.ByteString + getPlatformBytes() { + java.lang.Object ref = platform_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + platform_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+             * The logging language.  Example: "java"
+             * 
+ * + * string platform = 6; + */ + public Builder setPlatform( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + platform_ = value; + onChanged(); + return this; + } + /** + *
+             * The logging language.  Example: "java"
+             * 
+ * + * string platform = 6; + */ + public Builder clearPlatform() { + + platform_ = getDefaultInstance().getPlatform(); + onChanged(); + return this; + } + /** + *
+             * The logging language.  Example: "java"
+             * 
+ * + * string platform = 6; + */ + public Builder setPlatformBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + platform_ = value; + onChanged(); + return this; + } + + private java.util.List logs_ = + java.util.Collections.emptyList(); + private void ensureLogsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + logs_ = new java.util.ArrayList(logs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.stackify.api.common.proto.StackifyProto.LogGroup.Log, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Builder, com.stackify.api.common.proto.StackifyProto.LogGroup.LogOrBuilder> logsBuilder_; + + /** + * repeated .stackify.LogGroup.Log logs = 7; + */ + public java.util.List getLogsList() { + if (logsBuilder_ == null) { + return java.util.Collections.unmodifiableList(logs_); + } else { + return logsBuilder_.getMessageList(); + } + } + /** + * repeated .stackify.LogGroup.Log logs = 7; + */ + public int getLogsCount() { + if (logsBuilder_ == null) { + return logs_.size(); + } else { + return logsBuilder_.getCount(); + } + } + /** + * repeated .stackify.LogGroup.Log logs = 7; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log getLogs(int index) { + if (logsBuilder_ == null) { + return logs_.get(index); + } else { + return logsBuilder_.getMessage(index); + } + } + /** + * repeated .stackify.LogGroup.Log logs = 7; + */ + public Builder setLogs( + int index, com.stackify.api.common.proto.StackifyProto.LogGroup.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 .stackify.LogGroup.Log logs = 7; + */ + public Builder setLogs( + int index, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Builder builderForValue) { + if (logsBuilder_ == null) { + ensureLogsIsMutable(); + logs_.set(index, builderForValue.build()); + onChanged(); + } else { + logsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .stackify.LogGroup.Log logs = 7; + */ + public Builder addLogs(com.stackify.api.common.proto.StackifyProto.LogGroup.Log value) { + if (logsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLogsIsMutable(); + logs_.add(value); + onChanged(); + } else { + logsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .stackify.LogGroup.Log logs = 7; + */ + public Builder addLogs( + int index, com.stackify.api.common.proto.StackifyProto.LogGroup.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 .stackify.LogGroup.Log logs = 7; + */ + public Builder addLogs( + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Builder builderForValue) { + if (logsBuilder_ == null) { + ensureLogsIsMutable(); + logs_.add(builderForValue.build()); + onChanged(); + } else { + logsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .stackify.LogGroup.Log logs = 7; + */ + public Builder addLogs( + int index, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Builder builderForValue) { + if (logsBuilder_ == null) { + ensureLogsIsMutable(); + logs_.add(index, builderForValue.build()); + onChanged(); + } else { + logsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .stackify.LogGroup.Log logs = 7; + */ + public Builder addAllLogs( + java.lang.Iterable values) { + if (logsBuilder_ == null) { + ensureLogsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, logs_); + onChanged(); + } else { + logsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .stackify.LogGroup.Log logs = 7; + */ + public Builder clearLogs() { + if (logsBuilder_ == null) { + logs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + logsBuilder_.clear(); + } + return this; + } + /** + * repeated .stackify.LogGroup.Log logs = 7; + */ + public Builder removeLogs(int index) { + if (logsBuilder_ == null) { + ensureLogsIsMutable(); + logs_.remove(index); + onChanged(); + } else { + logsBuilder_.remove(index); + } + return this; + } + /** + * repeated .stackify.LogGroup.Log logs = 7; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Builder getLogsBuilder( + int index) { + return getLogsFieldBuilder().getBuilder(index); + } + /** + * repeated .stackify.LogGroup.Log logs = 7; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.LogOrBuilder getLogsOrBuilder( + int index) { + if (logsBuilder_ == null) { + return logs_.get(index); } else { + return logsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .stackify.LogGroup.Log logs = 7; + */ + public java.util.List + getLogsOrBuilderList() { + if (logsBuilder_ != null) { + return logsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(logs_); + } + } + /** + * repeated .stackify.LogGroup.Log logs = 7; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Builder addLogsBuilder() { + return getLogsFieldBuilder().addBuilder( + com.stackify.api.common.proto.StackifyProto.LogGroup.Log.getDefaultInstance()); + } + /** + * repeated .stackify.LogGroup.Log logs = 7; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Builder addLogsBuilder( + int index) { + return getLogsFieldBuilder().addBuilder( + index, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.getDefaultInstance()); + } + /** + * repeated .stackify.LogGroup.Log logs = 7; + */ + public java.util.List + getLogsBuilderList() { + return getLogsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.stackify.api.common.proto.StackifyProto.LogGroup.Log, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Builder, com.stackify.api.common.proto.StackifyProto.LogGroup.LogOrBuilder> + getLogsFieldBuilder() { + if (logsBuilder_ == null) { + logsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.stackify.api.common.proto.StackifyProto.LogGroup.Log, com.stackify.api.common.proto.StackifyProto.LogGroup.Log.Builder, com.stackify.api.common.proto.StackifyProto.LogGroup.LogOrBuilder>( + logs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + logs_ = null; + } + return logsBuilder_; + } + + private com.stackify.api.common.proto.StackifyProto.LogGroup.Container container_; + private com.google.protobuf.SingleFieldBuilderV3< + com.stackify.api.common.proto.StackifyProto.LogGroup.Container, com.stackify.api.common.proto.StackifyProto.LogGroup.Container.Builder, com.stackify.api.common.proto.StackifyProto.LogGroup.ContainerOrBuilder> containerBuilder_; + /** + * .stackify.LogGroup.Container container = 8; + */ + public boolean hasContainer() { + return containerBuilder_ != null || container_ != null; + } + /** + * .stackify.LogGroup.Container container = 8; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Container getContainer() { + if (containerBuilder_ == null) { + return container_ == null ? com.stackify.api.common.proto.StackifyProto.LogGroup.Container.getDefaultInstance() : container_; + } else { + return containerBuilder_.getMessage(); + } + } + /** + * .stackify.LogGroup.Container container = 8; + */ + public Builder setContainer(com.stackify.api.common.proto.StackifyProto.LogGroup.Container value) { + if (containerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + container_ = value; + onChanged(); + } else { + containerBuilder_.setMessage(value); + } + + return this; + } + /** + * .stackify.LogGroup.Container container = 8; + */ + public Builder setContainer( + com.stackify.api.common.proto.StackifyProto.LogGroup.Container.Builder builderForValue) { + if (containerBuilder_ == null) { + container_ = builderForValue.build(); + onChanged(); + } else { + containerBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .stackify.LogGroup.Container container = 8; + */ + public Builder mergeContainer(com.stackify.api.common.proto.StackifyProto.LogGroup.Container value) { + if (containerBuilder_ == null) { + if (container_ != null) { + container_ = + com.stackify.api.common.proto.StackifyProto.LogGroup.Container.newBuilder(container_).mergeFrom(value).buildPartial(); + } else { + container_ = value; + } + onChanged(); + } else { + containerBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .stackify.LogGroup.Container container = 8; + */ + public Builder clearContainer() { + if (containerBuilder_ == null) { + container_ = null; + onChanged(); + } else { + container_ = null; + containerBuilder_ = null; + } + + return this; + } + /** + * .stackify.LogGroup.Container container = 8; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Container.Builder getContainerBuilder() { + + onChanged(); + return getContainerFieldBuilder().getBuilder(); + } + /** + * .stackify.LogGroup.Container container = 8; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.ContainerOrBuilder getContainerOrBuilder() { + if (containerBuilder_ != null) { + return containerBuilder_.getMessageOrBuilder(); + } else { + return container_ == null ? + com.stackify.api.common.proto.StackifyProto.LogGroup.Container.getDefaultInstance() : container_; + } + } + /** + * .stackify.LogGroup.Container container = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.stackify.api.common.proto.StackifyProto.LogGroup.Container, com.stackify.api.common.proto.StackifyProto.LogGroup.Container.Builder, com.stackify.api.common.proto.StackifyProto.LogGroup.ContainerOrBuilder> + getContainerFieldBuilder() { + if (containerBuilder_ == null) { + containerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.stackify.api.common.proto.StackifyProto.LogGroup.Container, com.stackify.api.common.proto.StackifyProto.LogGroup.Container.Builder, com.stackify.api.common.proto.StackifyProto.LogGroup.ContainerOrBuilder>( + getContainer(), + getParentForChildren(), + isClean()); + container_ = null; + } + return containerBuilder_; + } + + private com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes kubernetes_; + private com.google.protobuf.SingleFieldBuilderV3< + com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes, com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes.Builder, com.stackify.api.common.proto.StackifyProto.LogGroup.KubernetesOrBuilder> kubernetesBuilder_; + /** + * .stackify.LogGroup.Kubernetes kubernetes = 9; + */ + public boolean hasKubernetes() { + return kubernetesBuilder_ != null || kubernetes_ != null; + } + /** + * .stackify.LogGroup.Kubernetes kubernetes = 9; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes getKubernetes() { + if (kubernetesBuilder_ == null) { + return kubernetes_ == null ? com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes.getDefaultInstance() : kubernetes_; + } else { + return kubernetesBuilder_.getMessage(); + } + } + /** + * .stackify.LogGroup.Kubernetes kubernetes = 9; + */ + public Builder setKubernetes(com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes value) { + if (kubernetesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kubernetes_ = value; + onChanged(); + } else { + kubernetesBuilder_.setMessage(value); + } + + return this; + } + /** + * .stackify.LogGroup.Kubernetes kubernetes = 9; + */ + public Builder setKubernetes( + com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes.Builder builderForValue) { + if (kubernetesBuilder_ == null) { + kubernetes_ = builderForValue.build(); + onChanged(); + } else { + kubernetesBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .stackify.LogGroup.Kubernetes kubernetes = 9; + */ + public Builder mergeKubernetes(com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes value) { + if (kubernetesBuilder_ == null) { + if (kubernetes_ != null) { + kubernetes_ = + com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes.newBuilder(kubernetes_).mergeFrom(value).buildPartial(); + } else { + kubernetes_ = value; + } + onChanged(); + } else { + kubernetesBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .stackify.LogGroup.Kubernetes kubernetes = 9; + */ + public Builder clearKubernetes() { + if (kubernetesBuilder_ == null) { + kubernetes_ = null; + onChanged(); + } else { + kubernetes_ = null; + kubernetesBuilder_ = null; + } + + return this; + } + /** + * .stackify.LogGroup.Kubernetes kubernetes = 9; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes.Builder getKubernetesBuilder() { + + onChanged(); + return getKubernetesFieldBuilder().getBuilder(); + } + /** + * .stackify.LogGroup.Kubernetes kubernetes = 9; + */ + public com.stackify.api.common.proto.StackifyProto.LogGroup.KubernetesOrBuilder getKubernetesOrBuilder() { + if (kubernetesBuilder_ != null) { + return kubernetesBuilder_.getMessageOrBuilder(); + } else { + return kubernetes_ == null ? + com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes.getDefaultInstance() : kubernetes_; + } + } + /** + * .stackify.LogGroup.Kubernetes kubernetes = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes, com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes.Builder, com.stackify.api.common.proto.StackifyProto.LogGroup.KubernetesOrBuilder> + getKubernetesFieldBuilder() { + if (kubernetesBuilder_ == null) { + kubernetesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes, com.stackify.api.common.proto.StackifyProto.LogGroup.Kubernetes.Builder, com.stackify.api.common.proto.StackifyProto.LogGroup.KubernetesOrBuilder>( + getKubernetes(), + getParentForChildren(), + isClean()); + kubernetes_ = null; + } + return kubernetesBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:stackify.LogGroup) + } + + // @@protoc_insertion_point(class_scope:stackify.LogGroup) + private static final com.stackify.api.common.proto.StackifyProto.LogGroup DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.stackify.api.common.proto.StackifyProto.LogGroup(); + } + + public static com.stackify.api.common.proto.StackifyProto.LogGroup getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LogGroup parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LogGroup(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.stackify.api.common.proto.StackifyProto.LogGroup getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_stackify_LogGroup_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_stackify_LogGroup_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_stackify_LogGroup_Container_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_stackify_LogGroup_Container_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_stackify_LogGroup_Kubernetes_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_stackify_LogGroup_Kubernetes_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_stackify_LogGroup_Log_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_stackify_LogGroup_Log_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_stackify_LogGroup_Log_Error_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_stackify_LogGroup_Log_Error_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_stackify_LogGroup_Log_Error_ServerVariablesEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_stackify_LogGroup_Log_Error_ServerVariablesEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_stackify_LogGroup_Log_Error_EnvironmentDetail_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_stackify_LogGroup_Log_Error_EnvironmentDetail_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_stackify_LogGroup_Log_Error_ErrorItem_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_stackify_LogGroup_Log_Error_ErrorItem_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_stackify_LogGroup_Log_Error_ErrorItem_DataEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_stackify_LogGroup_Log_Error_ErrorItem_DataEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_stackify_LogGroup_Log_Error_ErrorItem_TraceFrame_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_stackify_LogGroup_Log_Error_ErrorItem_TraceFrame_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_HeadersEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_HeadersEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_CookiesEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_CookiesEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_QuerystringEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_QuerystringEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_PostDataEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_PostDataEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_SessionDataEntry_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_SessionDataEntry_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\024stackify-agent.proto\022\010stackify\"\272\024\n\010Log" + + "Group\022\023\n\013environment\030\001 \001(\t\022\023\n\013server_nam" + + "e\030\002 \001(\t\022\030\n\020application_name\030\003 \001(\t\022\034\n\024app" + + "lication_location\030\004 \001(\t\022\016\n\006logger\030\005 \001(\t\022" + + "\020\n\010platform\030\006 \001(\t\022$\n\004logs\030\007 \003(\0132\026.stacki" + + "fy.LogGroup.Log\022/\n\tcontainer\030\010 \001(\0132\034.sta" + + "ckify.LogGroup.Container\0221\n\nkubernetes\030\t" + + " \001(\0132\035.stackify.LogGroup.Kubernetes\032x\n\tC" + + "ontainer\022\020\n\010image_id\030\001 \001(\t\022\030\n\020image_repo" + + "sitory\030\002 \001(\t\022\021\n\timage_tag\030\003 \001(\t\022\024\n\014conta" + + "iner_id\030\004 \001(\t\022\026\n\016container_name\030\005 \001(\t\032K\n" + + "\nKubernetes\022\020\n\010pod_name\030\001 \001(\t\022\025\n\rpod_nam" + + "espace\030\002 \001(\t\022\024\n\014cluster_name\030\003 \001(\t\032\330\020\n\003L" + + "og\022\017\n\007message\030\001 \001(\t\022\014\n\004data\030\002 \001(\t\022\023\n\013thr" + + "ead_name\030\003 \001(\t\022\023\n\013date_millis\030\004 \001(\003\022\r\n\005l" + + "evel\030\005 \001(\t\022\026\n\016transaction_id\030\006 \001(\t\022\025\n\rso" + + "urce_method\030\007 \001(\t\022\023\n\013source_line\030\010 \001(\005\022\n" + + "\n\002id\030\t \001(\t\022\014\n\004tags\030\n \003(\t\022+\n\005error\030\013 \001(\0132" + + "\034.stackify.LogGroup.Log.Error\032\355\016\n\005Error\022" + + "J\n\022environment_detail\030\001 \001(\0132..stackify.L" + + "ogGroup.Log.Error.EnvironmentDetail\022\023\n\013d" + + "ate_millis\030\002 \001(\003\022:\n\nerror_item\030\003 \001(\0132&.s" + + "tackify.LogGroup.Log.Error.ErrorItem\022I\n\022" + + "web_request_detail\030\004 \001(\0132-.stackify.LogG" + + "roup.Log.Error.WebRequestDetail\022K\n\020serve" + + "r_variables\030\005 \003(\01321.stackify.LogGroup.Lo" + + "g.Error.ServerVariablesEntry\022\025\n\rcustomer" + + "_name\030\006 \001(\t\022\020\n\010username\030\007 \001(\t\0326\n\024ServerV" + + "ariablesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(" + + "\t:\0028\001\032\252\001\n\021EnvironmentDetail\022\023\n\013device_na" + + "me\030\001 \001(\t\022\030\n\020application_name\030\002 \001(\t\022\034\n\024ap" + + "plication_location\030\003 \001(\t\022#\n\033configured_a" + + "pplication_name\030\004 \001(\t\022#\n\033configured_envi" + + "ronment_name\030\005 \001(\t\032\233\003\n\tErrorItem\022\017\n\007mess" + + "age\030\001 \001(\t\022\022\n\nerror_type\030\002 \001(\t\022\027\n\017error_t" + + "ype_code\030\003 \001(\t\022>\n\004data\030\004 \003(\01320.stackify." + + "LogGroup.Log.Error.ErrorItem.DataEntry\022\025" + + "\n\rsource_method\030\005 \001(\t\022E\n\nstacktrace\030\006 \003(" + + "\01321.stackify.LogGroup.Log.Error.ErrorIte" + + "m.TraceFrame\022;\n\013inner_error\030\007 \001(\0132&.stac" + + "kify.LogGroup.Log.Error.ErrorItem\032+\n\tDat" + + "aEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032H" + + "\n\nTraceFrame\022\025\n\rcode_filename\030\001 \001(\t\022\023\n\013l" + + "ine_number\030\002 \001(\005\022\016\n\006method\030\003 \001(\t\032\202\007\n\020Web" + + "RequestDetail\022\027\n\017user_ip_address\030\001 \001(\t\022\023" + + "\n\013http_method\030\002 \001(\t\022\030\n\020request_protocol\030" + + "\003 \001(\t\022\023\n\013request_url\030\004 \001(\t\022\030\n\020request_ur" + + "l_root\030\005 \001(\t\022\024\n\014referral_url\030\006 \001(\t\022K\n\007he" + + "aders\030\007 \003(\0132:.stackify.LogGroup.Log.Erro" + + "r.WebRequestDetail.HeadersEntry\022K\n\007cooki" + + "es\030\010 \003(\0132:.stackify.LogGroup.Log.Error.W" + + "ebRequestDetail.CookiesEntry\022S\n\013querystr" + + "ing\030\t \003(\0132>.stackify.LogGroup.Log.Error." + + "WebRequestDetail.QuerystringEntry\022N\n\tpos" + + "t_data\030\n \003(\0132;.stackify.LogGroup.Log.Err" + + "or.WebRequestDetail.PostDataEntry\022T\n\014ses" + + "sion_data\030\013 \003(\0132>.stackify.LogGroup.Log." + + "Error.WebRequestDetail.SessionDataEntry\022" + + "\025\n\rpost_data_raw\030\014 \001(\t\022\022\n\nmvc_action\030\r \001" + + "(\t\022\026\n\016mvc_controller\030\016 \001(\t\022\020\n\010mvc_area\030\017" + + " \001(\t\032.\n\014HeadersEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005val" + + "ue\030\002 \001(\t:\0028\001\032.\n\014CookiesEntry\022\013\n\003key\030\001 \001(" + + "\t\022\r\n\005value\030\002 \001(\t:\0028\001\0322\n\020QuerystringEntry" + + "\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032/\n\rPost" + + "DataEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028" + + "\001\0322\n\020SessionDataEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005va" + + "lue\030\002 \001(\t:\0028\001B.\n\035com.stackify.api.common" + + ".protoB\rStackifyProtob\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_stackify_LogGroup_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_stackify_LogGroup_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_stackify_LogGroup_descriptor, + new java.lang.String[] { "Environment", "ServerName", "ApplicationName", "ApplicationLocation", "Logger", "Platform", "Logs", "Container", "Kubernetes", }); + internal_static_stackify_LogGroup_Container_descriptor = + internal_static_stackify_LogGroup_descriptor.getNestedTypes().get(0); + internal_static_stackify_LogGroup_Container_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_stackify_LogGroup_Container_descriptor, + new java.lang.String[] { "ImageId", "ImageRepository", "ImageTag", "ContainerId", "ContainerName", }); + internal_static_stackify_LogGroup_Kubernetes_descriptor = + internal_static_stackify_LogGroup_descriptor.getNestedTypes().get(1); + internal_static_stackify_LogGroup_Kubernetes_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_stackify_LogGroup_Kubernetes_descriptor, + new java.lang.String[] { "PodName", "PodNamespace", "ClusterName", }); + internal_static_stackify_LogGroup_Log_descriptor = + internal_static_stackify_LogGroup_descriptor.getNestedTypes().get(2); + internal_static_stackify_LogGroup_Log_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_stackify_LogGroup_Log_descriptor, + new java.lang.String[] { "Message", "Data", "ThreadName", "DateMillis", "Level", "TransactionId", "SourceMethod", "SourceLine", "Id", "Tags", "Error", }); + internal_static_stackify_LogGroup_Log_Error_descriptor = + internal_static_stackify_LogGroup_Log_descriptor.getNestedTypes().get(0); + internal_static_stackify_LogGroup_Log_Error_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_stackify_LogGroup_Log_Error_descriptor, + new java.lang.String[] { "EnvironmentDetail", "DateMillis", "ErrorItem", "WebRequestDetail", "ServerVariables", "CustomerName", "Username", }); + internal_static_stackify_LogGroup_Log_Error_ServerVariablesEntry_descriptor = + internal_static_stackify_LogGroup_Log_Error_descriptor.getNestedTypes().get(0); + internal_static_stackify_LogGroup_Log_Error_ServerVariablesEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_stackify_LogGroup_Log_Error_ServerVariablesEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_stackify_LogGroup_Log_Error_EnvironmentDetail_descriptor = + internal_static_stackify_LogGroup_Log_Error_descriptor.getNestedTypes().get(1); + internal_static_stackify_LogGroup_Log_Error_EnvironmentDetail_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_stackify_LogGroup_Log_Error_EnvironmentDetail_descriptor, + new java.lang.String[] { "DeviceName", "ApplicationName", "ApplicationLocation", "ConfiguredApplicationName", "ConfiguredEnvironmentName", }); + internal_static_stackify_LogGroup_Log_Error_ErrorItem_descriptor = + internal_static_stackify_LogGroup_Log_Error_descriptor.getNestedTypes().get(2); + internal_static_stackify_LogGroup_Log_Error_ErrorItem_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_stackify_LogGroup_Log_Error_ErrorItem_descriptor, + new java.lang.String[] { "Message", "ErrorType", "ErrorTypeCode", "Data", "SourceMethod", "Stacktrace", "InnerError", }); + internal_static_stackify_LogGroup_Log_Error_ErrorItem_DataEntry_descriptor = + internal_static_stackify_LogGroup_Log_Error_ErrorItem_descriptor.getNestedTypes().get(0); + internal_static_stackify_LogGroup_Log_Error_ErrorItem_DataEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_stackify_LogGroup_Log_Error_ErrorItem_DataEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_stackify_LogGroup_Log_Error_ErrorItem_TraceFrame_descriptor = + internal_static_stackify_LogGroup_Log_Error_ErrorItem_descriptor.getNestedTypes().get(1); + internal_static_stackify_LogGroup_Log_Error_ErrorItem_TraceFrame_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_stackify_LogGroup_Log_Error_ErrorItem_TraceFrame_descriptor, + new java.lang.String[] { "CodeFilename", "LineNumber", "Method", }); + internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_descriptor = + internal_static_stackify_LogGroup_Log_Error_descriptor.getNestedTypes().get(3); + internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_descriptor, + new java.lang.String[] { "UserIpAddress", "HttpMethod", "RequestProtocol", "RequestUrl", "RequestUrlRoot", "ReferralUrl", "Headers", "Cookies", "Querystring", "PostData", "SessionData", "PostDataRaw", "MvcAction", "MvcController", "MvcArea", }); + internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_HeadersEntry_descriptor = + internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_descriptor.getNestedTypes().get(0); + internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_HeadersEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_HeadersEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_CookiesEntry_descriptor = + internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_descriptor.getNestedTypes().get(1); + internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_CookiesEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_CookiesEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_QuerystringEntry_descriptor = + internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_descriptor.getNestedTypes().get(2); + internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_QuerystringEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_QuerystringEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_PostDataEntry_descriptor = + internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_descriptor.getNestedTypes().get(3); + internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_PostDataEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_PostDataEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_SessionDataEntry_descriptor = + internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_descriptor.getNestedTypes().get(4); + internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_SessionDataEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_stackify_LogGroup_Log_Error_WebRequestDetail_SessionDataEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/src/main/java/com/stackify/api/common/socket/ApacheUnixSocket.java b/src/main/java/com/stackify/api/common/socket/ApacheUnixSocket.java new file mode 100644 index 0000000..1bdbfe8 --- /dev/null +++ b/src/main/java/com/stackify/api/common/socket/ApacheUnixSocket.java @@ -0,0 +1,301 @@ +package com.stackify.api.common.socket; + +import org.newsclub.net.unix.AFUNIXSocket; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.InetAddress; +import java.net.Socket; +import java.net.SocketAddress; +import java.net.SocketException; +import java.nio.channels.SocketChannel; +import java.util.ArrayDeque; +import java.util.Queue; + +/** + * @source - https://github.com/docker-java/docker-java + * Provides a socket that wraps an org.newsclub.net.unix.AFUNIXSocket and delays setting options until the socket is connected. This is + * necessary because the Apache HTTP client attempts to set options prior to connecting the socket, which doesn't work for Unix sockets + * since options are being set on the underlying file descriptor. Until the socket is connected, the file descriptor doesn't exist. + *

+ * This class also noop's any calls to setReuseAddress, which is called by the Apache client but isn't supported by AFUnixSocket. + */ +public class ApacheUnixSocket extends Socket { + + private final AFUNIXSocket inner; + + private final Queue optionsToSet = new ArrayDeque(); + + public ApacheUnixSocket() throws IOException { + this.inner = AFUNIXSocket.newInstance(); + } + + @Override + public void connect(final SocketAddress endpoint) throws IOException { + inner.connect(endpoint); + setAllSocketOptions(); + } + + @Override + public void connect(final SocketAddress endpoint, final int timeout) throws IOException { + inner.connect(endpoint, timeout); + setAllSocketOptions(); + } + + @Override + public void bind(final SocketAddress bindpoint) throws IOException { + inner.bind(bindpoint); + setAllSocketOptions(); + } + + @Override + public InetAddress getInetAddress() { + return inner.getInetAddress(); + } + + @Override + public InetAddress getLocalAddress() { + return inner.getLocalAddress(); + } + + @Override + public int getPort() { + return inner.getPort(); + } + + @Override + public int getLocalPort() { + return inner.getLocalPort(); + } + + @Override + public SocketAddress getRemoteSocketAddress() { + return inner.getRemoteSocketAddress(); + } + + @Override + public SocketAddress getLocalSocketAddress() { + return inner.getLocalSocketAddress(); + } + + @Override + public SocketChannel getChannel() { + return inner.getChannel(); + } + + @Override + public InputStream getInputStream() throws IOException { + return inner.getInputStream(); + } + + @Override + public OutputStream getOutputStream() throws IOException { + return inner.getOutputStream(); + } + + private void setSocketOption(final SocketOptionSetter s) throws SocketException { + if (inner.isConnected()) { + s.run(); + } else { + if (!optionsToSet.offer(s)) { + throw new SocketException("Failed to queue option"); + } + } + } + + private void setAllSocketOptions() throws SocketException { + for (SocketOptionSetter s : optionsToSet) { + s.run(); + } + } + + @Override + public void setTcpNoDelay(final boolean on) throws SocketException { + setSocketOption(new SocketOptionSetter() { + @Override + public void run() throws SocketException { + inner.setTcpNoDelay(on); + } + }); + } + + @Override + public boolean getTcpNoDelay() throws SocketException { + return inner.getTcpNoDelay(); + } + + @Override + public void setSoLinger(final boolean on, final int linger) throws SocketException { + setSocketOption(new SocketOptionSetter() { + @Override + public void run() throws SocketException { + inner.setSoLinger(on, linger); + } + }); + } + + @Override + public int getSoLinger() throws SocketException { + return inner.getSoLinger(); + } + + @Override + public void sendUrgentData(final int data) throws IOException { + inner.sendUrgentData(data); + } + + @Override + public void setOOBInline(final boolean on) throws SocketException { + setSocketOption(new SocketOptionSetter() { + @Override + public void run() throws SocketException { + inner.setOOBInline(on); + } + }); + } + + @Override + public boolean getOOBInline() throws SocketException { + return inner.getOOBInline(); + } + + @Override + public synchronized void setSoTimeout(final int timeout) throws SocketException { + setSocketOption(new SocketOptionSetter() { + @Override + public void run() throws SocketException { + inner.setSoTimeout(timeout); + } + }); + } + + @Override + public synchronized int getSoTimeout() throws SocketException { + return inner.getSoTimeout(); + } + + @Override + public synchronized void setSendBufferSize(final int size) throws SocketException { + setSocketOption(new SocketOptionSetter() { + @Override + public void run() throws SocketException { + inner.setSendBufferSize(size); + } + }); + } + + @Override + public synchronized int getSendBufferSize() throws SocketException { + return inner.getSendBufferSize(); + } + + @Override + public synchronized void setReceiveBufferSize(final int size) throws SocketException { + setSocketOption(new SocketOptionSetter() { + @Override + public void run() throws SocketException { + inner.setReceiveBufferSize(size); + } + }); + } + + @Override + public synchronized int getReceiveBufferSize() throws SocketException { + return inner.getReceiveBufferSize(); + } + + @Override + public void setKeepAlive(final boolean on) throws SocketException { + setSocketOption(new SocketOptionSetter() { + @Override + public void run() throws SocketException { + inner.setKeepAlive(on); + } + }); + } + + @Override + public boolean getKeepAlive() throws SocketException { + return inner.getKeepAlive(); + } + + @Override + public void setTrafficClass(final int tc) throws SocketException { + setSocketOption(new SocketOptionSetter() { + @Override + public void run() throws SocketException { + inner.setTrafficClass(tc); + } + }); + } + + @Override + public int getTrafficClass() throws SocketException { + return inner.getTrafficClass(); + } + + @Override + public void setReuseAddress(final boolean on) throws SocketException { + // not supported: Apache client tries to set it, but we want to just ignore it + } + + @Override + public boolean getReuseAddress() throws SocketException { + return inner.getReuseAddress(); + } + + @Override + public synchronized void close() throws IOException { + inner.close(); + } + + @Override + public void shutdownInput() throws IOException { + inner.shutdownInput(); + } + + @Override + public void shutdownOutput() throws IOException { + inner.shutdownOutput(); + } + + @Override + public String toString() { + return inner.toString(); + } + + @Override + public boolean isConnected() { + return inner.isConnected(); + } + + @Override + public boolean isBound() { + return inner.isBound(); + } + + @Override + public boolean isClosed() { + return inner.isClosed(); + } + + @Override + public boolean isInputShutdown() { + return inner.isInputShutdown(); + } + + @Override + public boolean isOutputShutdown() { + return inner.isOutputShutdown(); + } + + @Override + public void setPerformancePreferences(final int connectionTime, final int latency, final int bandwidth) { + inner.setPerformancePreferences(connectionTime, latency, bandwidth); + } + + interface SocketOptionSetter { + void run() throws SocketException; + } +} diff --git a/src/main/java/com/stackify/api/common/socket/HttpSocketClient.java b/src/main/java/com/stackify/api/common/socket/HttpSocketClient.java new file mode 100644 index 0000000..ca65857 --- /dev/null +++ b/src/main/java/com/stackify/api/common/socket/HttpSocketClient.java @@ -0,0 +1,60 @@ +package com.stackify.api.common.socket; + +import lombok.NonNull; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.config.Registry; +import org.apache.http.config.RegistryBuilder; +import org.apache.http.conn.HttpClientConnectionManager; +import org.apache.http.conn.socket.ConnectionSocketFactory; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.DefaultHttpRequestRetryHandler; +import org.apache.http.impl.client.HttpClients; +import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; + +/** + * Client Utility for sending http requests via unix domain socket. + */ +public class HttpSocketClient { + + private final HttpClientConnectionManager httpClientConnectionManager; + + public HttpSocketClient(@NonNull final String socketPath) { + RegistryBuilder registryBuilder = RegistryBuilder.create(); + registryBuilder.register("unix", new UnixConnectionSocketFactory(socketPath)); + Registry registry = registryBuilder.build(); + httpClientConnectionManager = new PoolingHttpClientConnectionManager(registry); + } + + public void send(@NonNull final HttpPost httpPost) throws Exception { + + CloseableHttpClient client = HttpClients + .custom() + .setRetryHandler(new DefaultHttpRequestRetryHandler(0, false)) + .setConnectionManager(httpClientConnectionManager) + .setConnectionManagerShared(true) + .build(); + + try { + CloseableHttpResponse response = client.execute(httpPost); + } finally { + client.close(); + } + } + + public void send(@NonNull final HttpGet httpGet) throws Exception { + + CloseableHttpClient client = HttpClients + .custom() + .setConnectionManager(httpClientConnectionManager) + .build(); + + try { + CloseableHttpResponse response = client.execute(httpGet); + } finally { + client.close(); + } + } + +} diff --git a/src/main/java/com/stackify/api/common/socket/UnixConnectionSocketFactory.java b/src/main/java/com/stackify/api/common/socket/UnixConnectionSocketFactory.java new file mode 100644 index 0000000..a05757b --- /dev/null +++ b/src/main/java/com/stackify/api/common/socket/UnixConnectionSocketFactory.java @@ -0,0 +1,50 @@ +package com.stackify.api.common.socket; + + +import org.apache.http.HttpHost; +import org.apache.http.annotation.Contract; +import org.apache.http.annotation.ThreadingBehavior; +import org.apache.http.conn.ConnectTimeoutException; +import org.apache.http.conn.socket.ConnectionSocketFactory; +import org.apache.http.protocol.HttpContext; +import org.newsclub.net.unix.AFUNIXSocketAddress; + +import java.io.File; +import java.io.IOException; +import java.net.InetSocketAddress; +import java.net.Socket; +import java.net.SocketTimeoutException; + +/** + * https://github.com/docker-java/docker-java + *

+ * Provides a ConnectionSocketFactory for connecting Apache HTTP clients to Unix sockets. + */ +@Contract(threading = ThreadingBehavior.IMMUTABLE_CONDITIONAL) +public class UnixConnectionSocketFactory implements ConnectionSocketFactory { + + private File socketFile; + + public UnixConnectionSocketFactory(final String socketPath) { + super(); + this.socketFile = new File(socketPath); + } + + @Override + public Socket createSocket(final HttpContext context) throws IOException { + return new ApacheUnixSocket(); + } + + @Override + public Socket connectSocket(final int connectTimeout, final Socket socket, final HttpHost host, + final InetSocketAddress remoteAddress, final InetSocketAddress localAddress, final HttpContext context) + throws IOException { + try { + socket.connect(new AFUNIXSocketAddress(socketFile), connectTimeout); + } catch (SocketTimeoutException e) { + throw new ConnectTimeoutException(e, null, remoteAddress.getAddress()); + } + + return socket; + } +} diff --git a/src/test/java/com/stackify/api/common/log/LogBackgroundServiceTest.java b/src/test/java/com/stackify/api/common/log/LogBackgroundServiceTest.java index ae49671..c5f318a 100644 --- a/src/test/java/com/stackify/api/common/log/LogBackgroundServiceTest.java +++ b/src/test/java/com/stackify/api/common/log/LogBackgroundServiceTest.java @@ -15,61 +15,55 @@ */ package com.stackify.api.common.log; -import java.io.IOException; - import org.junit.Assert; import org.junit.Test; import org.mockito.Mockito; -import com.stackify.api.common.http.HttpException; - /** * LogBackgroundService JUnit Test - * + * * @author Eric Martin */ public class LogBackgroundServiceTest { - - /** - * testConstructor - */ - @Test - public void testConstructor() { - LogCollector collector = Mockito.mock(LogCollector.class); - LogSender sender = Mockito.mock(LogSender.class); - LogBackgroundService service = new LogBackgroundService(collector, sender); - Assert.assertFalse(service.isRunning()); - } - - /** - * testShutDown - * @throws Exception - */ - @Test - public void testShutDown() throws Exception { - LogCollector collector = Mockito.mock(LogCollector.class); - LogSender sender = Mockito.mock(LogSender.class); - LogBackgroundService service = new LogBackgroundService(collector, sender); - - service.shutDown(); - - Mockito.verify(collector).flush(Mockito.any(LogSender.class)); - } - - /** - * testRunOneIteration - * @throws HttpException - * @throws IOException - */ - @Test - public void testRunOneIteration() throws IOException, HttpException { - LogCollector collector = Mockito.mock(LogCollector.class); - LogSender sender = Mockito.mock(LogSender.class); - LogBackgroundService service = new LogBackgroundService(collector, sender); - - service.runOneIteration(); - - Mockito.verify(collector).flush(Mockito.any(LogSender.class)); - } + /** + * testConstructor + */ + @Test + public void testConstructor() { + LogCollector collector = Mockito.mock(LogCollector.class); + LogTransportDirect sender = Mockito.mock(LogTransportDirect.class); + + LogBackgroundService service = new LogBackgroundService(collector, sender); + + Assert.assertFalse(service.isRunning()); + } + + /** + * testShutDown + */ + @Test + public void testShutDown() throws Exception { + LogCollector collector = Mockito.mock(LogCollector.class); + LogTransportDirect sender = Mockito.mock(LogTransportDirect.class); + LogBackgroundService service = new LogBackgroundService(collector, sender); + + service.shutDown(); + + Mockito.verify(collector).flush(Mockito.any(LogTransportDirect.class)); + } + + /** + * testRunOneIteration + */ + @Test + public void testRunOneIteration() throws Exception { + LogCollector collector = Mockito.mock(LogCollector.class); + LogTransportDirect sender = Mockito.mock(LogTransportDirect.class); + LogBackgroundService service = new LogBackgroundService(collector, sender); + + service.runOneIteration(); + + Mockito.verify(collector).flush(Mockito.any(LogTransportDirect.class)); + } } diff --git a/src/test/java/com/stackify/api/common/log/LogCollectorTest.java b/src/test/java/com/stackify/api/common/log/LogCollectorTest.java index 51ff499..e540d42 100644 --- a/src/test/java/com/stackify/api/common/log/LogCollectorTest.java +++ b/src/test/java/com/stackify/api/common/log/LogCollectorTest.java @@ -15,88 +15,76 @@ */ package com.stackify.api.common.log; -import java.io.IOException; - -import org.junit.Test; -import org.mockito.Mockito; - import com.stackify.api.AppIdentity; import com.stackify.api.EnvironmentDetail; import com.stackify.api.LogMsg; import com.stackify.api.LogMsgGroup; import com.stackify.api.common.AppIdentityService; -import com.stackify.api.common.http.HttpException; +import org.junit.Test; +import org.mockito.Mockito; /** * LogCollector JUnit Test + * * @author Eric Martin */ public class LogCollectorTest { - /** - * testFlushEmpty - * @throws HttpException - * @throws IOException - */ - @Test - public void testFlushEmpty() throws IOException, HttpException { - LogSender sender = Mockito.mock(LogSender.class); - AppIdentityService appIdentityService = Mockito.mock(AppIdentityService.class); - LogCollector collector = new LogCollector("logger", Mockito.mock(EnvironmentDetail.class), appIdentityService); - - collector.flush(sender); - - Mockito.verifyZeroInteractions(sender); - Mockito.verifyZeroInteractions(appIdentityService); - } - - /** - * testAddAndFlushWithoutAppIdentity - * @throws IOException - * @throws HttpException - */ - @Test - public void testAddAndFlushWithoutAppIdentity() throws IOException, HttpException { - LogSender sender = Mockito.mock(LogSender.class); - Mockito.when(sender.send(Mockito.any(LogMsgGroup.class))).thenReturn(200); - - AppIdentityService appIdentityService = Mockito.mock(AppIdentityService.class); - Mockito.when(appIdentityService.getAppIdentity()).thenReturn(null); - - LogCollector collector = new LogCollector("logger", Mockito.mock(EnvironmentDetail.class), appIdentityService); - - collector.addLogMsg(Mockito.mock(LogMsg.class)); - collector.addLogMsg(Mockito.mock(LogMsg.class)); - collector.addLogMsg(Mockito.mock(LogMsg.class)); - - collector.flush(sender); - - Mockito.verify(appIdentityService).getAppIdentity(); - Mockito.verify(sender).send(Mockito.any(LogMsgGroup.class)); - } - - /** - * testAddAndFlushWithAppIdentity - * @throws IOException - * @throws HttpException - */ - @Test - public void testAddAndFlushWithAppIdentity() throws IOException, HttpException { - LogSender sender = Mockito.mock(LogSender.class); - Mockito.when(sender.send(Mockito.any(LogMsgGroup.class))).thenReturn(200); - - AppIdentityService appIdentityService = Mockito.mock(AppIdentityService.class); - Mockito.when(appIdentityService.getAppIdentity()).thenReturn(Mockito.mock(AppIdentity.class)); - - LogCollector collector = new LogCollector("logger", Mockito.mock(EnvironmentDetail.class), appIdentityService); - - collector.addLogMsg(Mockito.mock(LogMsg.class)); - collector.addLogMsg(Mockito.mock(LogMsg.class)); - collector.addLogMsg(Mockito.mock(LogMsg.class)); - - collector.flush(sender); - - Mockito.verify(appIdentityService).getAppIdentity(); - Mockito.verify(sender).send(Mockito.any(LogMsgGroup.class)); - } + /** + * testFlushEmpty + */ + @Test + public void testFlushEmpty() throws Exception { + LogTransportDirect sender = Mockito.mock(LogTransportDirect.class); + AppIdentityService appIdentityService = Mockito.mock(AppIdentityService.class); + LogCollector collector = new LogCollector("logger", Mockito.mock(EnvironmentDetail.class), appIdentityService); + + collector.flush(sender); + + Mockito.verifyZeroInteractions(sender); + Mockito.verifyZeroInteractions(appIdentityService); + } + + /** + * testAddAndFlushWithoutAppIdentity + */ + @Test + public void testAddAndFlushWithoutAppIdentity() throws Exception { + LogTransportDirect sender = Mockito.mock(LogTransportDirect.class); + + AppIdentityService appIdentityService = Mockito.mock(AppIdentityService.class); + Mockito.when(appIdentityService.getAppIdentity()).thenReturn(null); + + LogCollector collector = new LogCollector("logger", Mockito.mock(EnvironmentDetail.class), appIdentityService); + + collector.addLogMsg(Mockito.mock(LogMsg.class)); + collector.addLogMsg(Mockito.mock(LogMsg.class)); + collector.addLogMsg(Mockito.mock(LogMsg.class)); + + collector.flush(sender); + + Mockito.verify(appIdentityService).getAppIdentity(); + } + + /** + * testAddAndFlushWithAppIdentity + */ + @Test + public void testAddAndFlushWithAppIdentity() throws Exception { + LogTransportDirect sender = Mockito.mock(LogTransportDirect.class); + + AppIdentityService appIdentityService = Mockito.mock(AppIdentityService.class); + Mockito.when(appIdentityService.getAppIdentity()).thenReturn(Mockito.mock(AppIdentity.class)); + + LogCollector collector = new LogCollector("logger", Mockito.mock(EnvironmentDetail.class), appIdentityService); + + collector.addLogMsg(Mockito.mock(LogMsg.class)); + collector.addLogMsg(Mockito.mock(LogMsg.class)); + collector.addLogMsg(Mockito.mock(LogMsg.class)); + + collector.flush(sender); + + Mockito.verify(appIdentityService).getAppIdentity(); + Mockito.verify(sender).send(Mockito.any(LogMsgGroup.class)); + } } diff --git a/src/test/java/com/stackify/api/common/log/LogSenderTest.java b/src/test/java/com/stackify/api/common/log/LogSenderTest.java index 069784f..009f34d 100644 --- a/src/test/java/com/stackify/api/common/log/LogSenderTest.java +++ b/src/test/java/com/stackify/api/common/log/LogSenderTest.java @@ -33,9 +33,9 @@ * @author Eric Martin */ @RunWith(PowerMockRunner.class) -@PrepareForTest({LogSender.class, HttpClient.class}) +@PrepareForTest({LogTransportDirect.class, HttpClient.class}) public class LogSenderTest { - + /** * testSend * @throws Exception @@ -48,7 +48,7 @@ public void testSend() throws Exception { ApiConfiguration apiConfig = ApiConfiguration.newBuilder().apiUrl("url").apiKey("key").build(); - LogSender sender = new LogSender(apiConfig, objectMapper, masker, true); + LogTransportDirect sender = new LogTransportDirect(apiConfig, objectMapper, masker, true); HttpClient httpClient = PowerMockito.mock(HttpClient.class); PowerMockito.whenNew(HttpClient.class).withAnyArguments().thenReturn(httpClient); From c5dc3ff73ac61d641cba0f84beb08d6db526ebbe Mon Sep 17 00:00:00 2001 From: Darin Howard Date: Wed, 11 Sep 2019 10:59:48 -0500 Subject: [PATCH 2/2] cleaning up readme. --- README.md | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/README.md b/README.md index 7cb532e..003461e 100644 --- a/README.md +++ b/README.md @@ -76,33 +76,6 @@ Be sure to shutdown the Direct Logger to flush this appender of any messages and LogManager.shutdown(); ``` -### RUM Setup - -Real User Monitoring (RUM) setup allows you to specify where the RUM JavaScript block is injected. - -It is recommended you provide a `stackify-api.properties` file in your application classpath with the following content: - -```` -stackify.application=My Application Name -stackify.environment=My Environment Name -```` - -Your application code will need to call out to the Stackify `com.stackify.apm.Stackify.getRUMJavaScriptBlock()` method in the `` section as detailed below: - -**JSP Example** - -```` - - - <%= com.stackify.apm.Stackify.getRUMJavaScriptBlock() %> -