public static final class TimeInterval.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<TimeInterval.Builder> implements TimeIntervalOrBuilder
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. When writing data points, the start time must not be more than 25 hours in the past and the end time must not be 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 | Method and Description |
|---|---|
TimeInterval.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
TimeInterval |
build() |
TimeInterval |
buildPartial() |
TimeInterval.Builder |
clear() |
TimeInterval.Builder |
clearEndTime()
Required.
|
TimeInterval.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
TimeInterval.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
TimeInterval.Builder |
clearStartTime()
Optional.
|
TimeInterval.Builder |
clone() |
TimeInterval |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
com.google.protobuf.Timestamp |
getEndTime()
Required.
|
com.google.protobuf.Timestamp.Builder |
getEndTimeBuilder()
Required.
|
com.google.protobuf.TimestampOrBuilder |
getEndTimeOrBuilder()
Required.
|
com.google.protobuf.Timestamp |
getStartTime()
Optional.
|
com.google.protobuf.Timestamp.Builder |
getStartTimeBuilder()
Optional.
|
com.google.protobuf.TimestampOrBuilder |
getStartTimeOrBuilder()
Optional.
|
boolean |
hasEndTime()
Required.
|
boolean |
hasStartTime()
Optional.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
TimeInterval.Builder |
mergeEndTime(com.google.protobuf.Timestamp value)
Required.
|
TimeInterval.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
TimeInterval.Builder |
mergeFrom(com.google.protobuf.Message other) |
TimeInterval.Builder |
mergeFrom(TimeInterval other) |
TimeInterval.Builder |
mergeStartTime(com.google.protobuf.Timestamp value)
Optional.
|
TimeInterval.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
TimeInterval.Builder |
setEndTime(com.google.protobuf.Timestamp.Builder builderForValue)
Required.
|
TimeInterval.Builder |
setEndTime(com.google.protobuf.Timestamp value)
Required.
|
TimeInterval.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
TimeInterval.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
TimeInterval.Builder |
setStartTime(com.google.protobuf.Timestamp.Builder builderForValue)
Optional.
|
TimeInterval.Builder |
setStartTime(com.google.protobuf.Timestamp value)
Optional.
|
TimeInterval.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<TimeInterval.Builder>public TimeInterval.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<TimeInterval.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<TimeInterval.Builder>public TimeInterval getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic TimeInterval build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic TimeInterval buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic TimeInterval.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<TimeInterval.Builder>public TimeInterval.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<TimeInterval.Builder>public TimeInterval.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<TimeInterval.Builder>public TimeInterval.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<TimeInterval.Builder>public TimeInterval.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<TimeInterval.Builder>public TimeInterval.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<TimeInterval.Builder>public TimeInterval.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<TimeInterval.Builder>public TimeInterval.Builder mergeFrom(TimeInterval other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<TimeInterval.Builder>public TimeInterval.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<TimeInterval.Builder>IOExceptionpublic 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 TimeInterval.Builder setEndTime(com.google.protobuf.Timestamp value)
Required. The end of the time interval.
.google.protobuf.Timestamp end_time = 2;public TimeInterval.Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue)
Required. The end of the time interval.
.google.protobuf.Timestamp end_time = 2;public TimeInterval.Builder mergeEndTime(com.google.protobuf.Timestamp value)
Required. The end of the time interval.
.google.protobuf.Timestamp end_time = 2;public TimeInterval.Builder clearEndTime()
Required. The end of the time interval.
.google.protobuf.Timestamp end_time = 2;public com.google.protobuf.Timestamp.Builder getEndTimeBuilder()
Required. The end of the time interval.
.google.protobuf.Timestamp end_time = 2;public 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 TimeInterval.Builder setStartTime(com.google.protobuf.Timestamp value)
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;public TimeInterval.Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue)
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;public TimeInterval.Builder mergeStartTime(com.google.protobuf.Timestamp value)
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;public TimeInterval.Builder clearStartTime()
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;public com.google.protobuf.Timestamp.Builder getStartTimeBuilder()
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;public 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 TimeInterval.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<TimeInterval.Builder>public final TimeInterval.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<TimeInterval.Builder>Copyright © 2023 Google LLC. All rights reserved.