public final class TimeInterval extends com.google.protobuf.GeneratedMessageV3 implements TimeIntervalOrBuilder
Describes a time interval:
* Reads: A half-open time interval. It includes the end time but
excludes the start time: `(startTime, endTime]`. The start time
must be specified, must be earlier than the end time, and should be
no older than the data retention period for the metric.
* Writes: A closed time interval. It extends from the start time to the end
time,
and includes both: `[startTime, endTime]`. Valid time intervals
depend on the
[`MetricKind`](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.metricDescriptors#MetricKind)
of the metric value. The end time must not be earlier than the start
time, and the end time must not be more than 25 hours in the past or more
than five minutes in the future.
* For `GAUGE` metrics, the `startTime` value is technically optional; if
no value is specified, the start time defaults to the value of the
end time, and the interval represents a single point in time. If both
start and end times are specified, they must be identical. Such an
interval is valid only for `GAUGE` metrics, which are point-in-time
measurements. The end time of a new interval must be at least a
millisecond after the end time of the previous interval.
* For `DELTA` metrics, the start time and end time must specify a
non-zero interval, with subsequent points specifying contiguous and
non-overlapping intervals. For `DELTA` metrics, the start time of
the next interval must be at least a millisecond after the end time
of the previous interval.
* For `CUMULATIVE` metrics, the start time and end time must specify a
non-zero interval, with subsequent points specifying the same
start time and increasing end times, until an event resets the
cumulative value to zero and sets a new start time for the following
points. The new start time must be at least a millisecond after the
end time of the previous interval.
* The start time of a new interval must be at least a millisecond after
the
end time of the previous interval because intervals are closed. If the
start time of a new interval is the same as the end time of the
previous interval, then data written at the new start time could
overwrite data written at the previous end time.
Protobuf type google.monitoring.v3.TimeInterval| Modifier and Type | Class and Description |
|---|---|
static class |
TimeInterval.Builder
Describes a time interval:
* Reads: A half-open time interval.
|
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
END_TIME_FIELD_NUMBER |
static int |
START_TIME_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
static TimeInterval |
getDefaultInstance() |
TimeInterval |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Timestamp |
getEndTime()
Required.
|
com.google.protobuf.TimestampOrBuilder |
getEndTimeOrBuilder()
Required.
|
com.google.protobuf.Parser<TimeInterval> |
getParserForType() |
int |
getSerializedSize() |
com.google.protobuf.Timestamp |
getStartTime()
Optional.
|
com.google.protobuf.TimestampOrBuilder |
getStartTimeOrBuilder()
Optional.
|
boolean |
hasEndTime()
Required.
|
int |
hashCode() |
boolean |
hasStartTime()
Optional.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static TimeInterval.Builder |
newBuilder() |
static TimeInterval.Builder |
newBuilder(TimeInterval prototype) |
TimeInterval.Builder |
newBuilderForType() |
protected TimeInterval.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static TimeInterval |
parseDelimitedFrom(InputStream input) |
static TimeInterval |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static TimeInterval |
parseFrom(byte[] data) |
static TimeInterval |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static TimeInterval |
parseFrom(ByteBuffer data) |
static TimeInterval |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static TimeInterval |
parseFrom(com.google.protobuf.ByteString data) |
static TimeInterval |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static TimeInterval |
parseFrom(com.google.protobuf.CodedInputStream input) |
static TimeInterval |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static TimeInterval |
parseFrom(InputStream input) |
static TimeInterval |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<TimeInterval> |
parser() |
TimeInterval.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int END_TIME_FIELD_NUMBER
public static final int START_TIME_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance 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 boolean hasEndTime()
Required. The end of the time interval.
.google.protobuf.Timestamp end_time = 2;hasEndTime in interface TimeIntervalOrBuilderpublic com.google.protobuf.Timestamp getEndTime()
Required. The end of the time interval.
.google.protobuf.Timestamp end_time = 2;getEndTime in interface TimeIntervalOrBuilderpublic com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder()
Required. The end of the time interval.
.google.protobuf.Timestamp end_time = 2;getEndTimeOrBuilder in interface TimeIntervalOrBuilderpublic boolean hasStartTime()
Optional. The beginning of the time interval. The default value for the start time is the end time. The start time must not be later than the end time.
.google.protobuf.Timestamp start_time = 1;hasStartTime in interface TimeIntervalOrBuilderpublic com.google.protobuf.Timestamp getStartTime()
Optional. The beginning of the time interval. The default value for the start time is the end time. The start time must not be later than the end time.
.google.protobuf.Timestamp start_time = 1;getStartTime in interface TimeIntervalOrBuilderpublic com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder()
Optional. The beginning of the time interval. The default value for the start time is the end time. The start time must not be later than the end time.
.google.protobuf.Timestamp start_time = 1;getStartTimeOrBuilder in interface TimeIntervalOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(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 TimeInterval parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static TimeInterval parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static TimeInterval parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static TimeInterval parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static TimeInterval parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static TimeInterval parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static TimeInterval parseFrom(InputStream input) throws IOException
IOExceptionpublic static TimeInterval parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static TimeInterval parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static TimeInterval parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static TimeInterval parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static TimeInterval parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic TimeInterval.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static TimeInterval.Builder newBuilder()
public static TimeInterval.Builder newBuilder(TimeInterval prototype)
public TimeInterval.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected TimeInterval.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static TimeInterval getDefaultInstance()
public static com.google.protobuf.Parser<TimeInterval> parser()
public com.google.protobuf.Parser<TimeInterval> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public TimeInterval getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2024 Google LLC. All rights reserved.