public final class LogMetric extends com.google.protobuf.GeneratedMessageV3 implements LogMetricOrBuilder
Describes a logs-based metric. The value of the metric is the number of log entries that match a logs filter in a given time interval.Protobuf type
google.logging.v2.LogMetric| Modifier and Type | Class and Description |
|---|---|
static class |
LogMetric.ApiVersion
Stackdriver Logging API version.
|
static class |
LogMetric.Builder
Describes a logs-based metric.
|
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable| Modifier and Type | Field and Description |
|---|---|
static int |
DESCRIPTION_FIELD_NUMBER |
static int |
FILTER_FIELD_NUMBER |
static int |
NAME_FIELD_NUMBER |
static int |
VERSION_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
static LogMetric |
getDefaultInstance() |
LogMetric |
getDefaultInstanceForType() |
java.lang.String |
getDescription()
Optional.
|
com.google.protobuf.ByteString |
getDescriptionBytes()
Optional.
|
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
java.lang.String |
getFilter()
Required.
|
com.google.protobuf.ByteString |
getFilterBytes()
Required.
|
java.lang.String |
getName()
Required.
|
com.google.protobuf.ByteString |
getNameBytes()
Required.
|
com.google.protobuf.Parser<LogMetric> |
getParserForType() |
int |
getSerializedSize() |
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
LogMetric.ApiVersion |
getVersion()
Output only.
|
int |
getVersionValue()
Output only.
|
int |
hashCode() |
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static LogMetric.Builder |
newBuilder() |
static LogMetric.Builder |
newBuilder(LogMetric prototype) |
LogMetric.Builder |
newBuilderForType() |
protected LogMetric.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
static LogMetric |
parseDelimitedFrom(java.io.InputStream input) |
static LogMetric |
parseDelimitedFrom(java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static LogMetric |
parseFrom(byte[] data) |
static LogMetric |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static LogMetric |
parseFrom(java.nio.ByteBuffer data) |
static LogMetric |
parseFrom(java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static LogMetric |
parseFrom(com.google.protobuf.ByteString data) |
static LogMetric |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static LogMetric |
parseFrom(com.google.protobuf.CodedInputStream input) |
static LogMetric |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static LogMetric |
parseFrom(java.io.InputStream input) |
static LogMetric |
parseFrom(java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<LogMetric> |
parser() |
LogMetric.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
computeStringSize, computeStringSizeNoTag, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, newBuilderForType, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int NAME_FIELD_NUMBER
public static final int DESCRIPTION_FIELD_NUMBER
public static final int FILTER_FIELD_NUMBER
public static final int VERSION_FIELD_NUMBER
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields in interface com.google.protobuf.MessageOrBuildergetUnknownFields in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public java.lang.String getName()
Required. The client-assigned metric identifier. Examples: `"error_count"`, `"nginx/requests"`. Metric identifiers are limited to 100 characters and can include only the following characters: `A-Z`, `a-z`, `0-9`, and the special characters `_-.,+!*',()%/`. The forward-slash character (`/`) denotes a hierarchy of name pieces, and it cannot be the first character of the name. The metric identifier in this field must not be [URL-encoded](https://en.wikipedia.org/wiki/Percent-encoding). However, when the metric identifier appears as the `[METRIC_ID]` part of a `metric_name` API parameter, then the metric identifier must be URL-encoded. Example: `"projects/my-project/metrics/nginx%2Frequests"`.
string name = 1;getName in interface LogMetricOrBuilderpublic com.google.protobuf.ByteString getNameBytes()
Required. The client-assigned metric identifier. Examples: `"error_count"`, `"nginx/requests"`. Metric identifiers are limited to 100 characters and can include only the following characters: `A-Z`, `a-z`, `0-9`, and the special characters `_-.,+!*',()%/`. The forward-slash character (`/`) denotes a hierarchy of name pieces, and it cannot be the first character of the name. The metric identifier in this field must not be [URL-encoded](https://en.wikipedia.org/wiki/Percent-encoding). However, when the metric identifier appears as the `[METRIC_ID]` part of a `metric_name` API parameter, then the metric identifier must be URL-encoded. Example: `"projects/my-project/metrics/nginx%2Frequests"`.
string name = 1;getNameBytes in interface LogMetricOrBuilderpublic java.lang.String getDescription()
Optional. A description of this metric, which is used in documentation.
string description = 2;getDescription in interface LogMetricOrBuilderpublic com.google.protobuf.ByteString getDescriptionBytes()
Optional. A description of this metric, which is used in documentation.
string description = 2;getDescriptionBytes in interface LogMetricOrBuilderpublic java.lang.String getFilter()
Required. An [advanced logs filter](/logging/docs/view/advanced_filters)
which is used to match log entries.
Example:
"resource.type=gae_app AND severity>=ERROR"
The maximum length of the filter is 20000 characters.
string filter = 3;getFilter in interface LogMetricOrBuilderpublic com.google.protobuf.ByteString getFilterBytes()
Required. An [advanced logs filter](/logging/docs/view/advanced_filters)
which is used to match log entries.
Example:
"resource.type=gae_app AND severity>=ERROR"
The maximum length of the filter is 20000 characters.
string filter = 3;getFilterBytes in interface LogMetricOrBuilderpublic int getVersionValue()
Output only. The API version that created or updated this metric. The version also dictates the syntax of the filter expression. When a value for this field is missing, the default value of V2 should be assumed.
.google.logging.v2.LogMetric.ApiVersion version = 4;getVersionValue in interface LogMetricOrBuilderpublic LogMetric.ApiVersion getVersion()
Output only. The API version that created or updated this metric. The version also dictates the syntax of the filter expression. When a value for this field is missing, the default value of V2 should be assumed.
.google.logging.v2.LogMetric.ApiVersion version = 4;getVersion in interface LogMetricOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3java.io.IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(java.lang.Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static LogMetric parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static LogMetric parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static LogMetric parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static LogMetric parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static LogMetric parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static LogMetric parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static LogMetric parseFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static LogMetric parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static LogMetric parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static LogMetric parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static LogMetric parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException
java.io.IOExceptionpublic static LogMetric parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic LogMetric.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static LogMetric.Builder newBuilder()
public static LogMetric.Builder newBuilder(LogMetric prototype)
public LogMetric.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected LogMetric.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static LogMetric getDefaultInstance()
public static com.google.protobuf.Parser<LogMetric> parser()
public com.google.protobuf.Parser<LogMetric> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public LogMetric getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder