Class TimeInterval.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<TimeInterval.Builder>
com.google.monitoring.v3.TimeInterval.Builder
All Implemented Interfaces:
TimeIntervalOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
TimeInterval

public static final class TimeInterval.Builder extends com.google.protobuf.GeneratedMessage.Builder<TimeInterval.Builder> 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
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
     
    Required.
    Optional.
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Timestamp
    Required.
    com.google.protobuf.Timestamp.Builder
    Required.
    com.google.protobuf.TimestampOrBuilder
    Required.
    com.google.protobuf.Timestamp
    Optional.
    com.google.protobuf.Timestamp.Builder
    Optional.
    com.google.protobuf.TimestampOrBuilder
    Optional.
    boolean
    Required.
    boolean
    Optional.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
    mergeEndTime(com.google.protobuf.Timestamp value)
    Required.
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
    mergeStartTime(com.google.protobuf.Timestamp value)
    Optional.
    setEndTime(com.google.protobuf.Timestamp value)
    Required.
    setEndTime(com.google.protobuf.Timestamp.Builder builderForValue)
    Required.
    setStartTime(com.google.protobuf.Timestamp value)
    Optional.
    setStartTime(com.google.protobuf.Timestamp.Builder builderForValue)
    Optional.

    Methods inherited from class com.google.protobuf.GeneratedMessage.Builder

    addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3

    Methods inherited from class com.google.protobuf.AbstractMessage.Builder

    findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<TimeInterval.Builder>
    • clear

      public TimeInterval.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<TimeInterval.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<TimeInterval.Builder>
    • getDefaultInstanceForType

      public TimeInterval getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public TimeInterval build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public TimeInterval buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public TimeInterval.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<TimeInterval.Builder>
    • mergeFrom

      public TimeInterval.Builder mergeFrom(TimeInterval other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<TimeInterval.Builder>
    • mergeFrom

      public TimeInterval.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<TimeInterval.Builder>
      Throws:
      IOException
    • hasEndTime

      public boolean hasEndTime()
       Required. The end of the time interval.
       
      .google.protobuf.Timestamp end_time = 2;
      Specified by:
      hasEndTime in interface TimeIntervalOrBuilder
      Returns:
      Whether the endTime field is set.
    • getEndTime

      public com.google.protobuf.Timestamp getEndTime()
       Required. The end of the time interval.
       
      .google.protobuf.Timestamp end_time = 2;
      Specified by:
      getEndTime in interface TimeIntervalOrBuilder
      Returns:
      The endTime.
    • setEndTime

      public TimeInterval.Builder setEndTime(com.google.protobuf.Timestamp value)
       Required. The end of the time interval.
       
      .google.protobuf.Timestamp end_time = 2;
    • setEndTime

      public TimeInterval.Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue)
       Required. The end of the time interval.
       
      .google.protobuf.Timestamp end_time = 2;
    • mergeEndTime

      public TimeInterval.Builder mergeEndTime(com.google.protobuf.Timestamp value)
       Required. The end of the time interval.
       
      .google.protobuf.Timestamp end_time = 2;
    • clearEndTime

      public TimeInterval.Builder clearEndTime()
       Required. The end of the time interval.
       
      .google.protobuf.Timestamp end_time = 2;
    • getEndTimeBuilder

      public com.google.protobuf.Timestamp.Builder getEndTimeBuilder()
       Required. The end of the time interval.
       
      .google.protobuf.Timestamp end_time = 2;
    • getEndTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder()
       Required. The end of the time interval.
       
      .google.protobuf.Timestamp end_time = 2;
      Specified by:
      getEndTimeOrBuilder in interface TimeIntervalOrBuilder
    • hasStartTime

      public 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;
      Specified by:
      hasStartTime in interface TimeIntervalOrBuilder
      Returns:
      Whether the startTime field is set.
    • getStartTime

      public 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;
      Specified by:
      getStartTime in interface TimeIntervalOrBuilder
      Returns:
      The startTime.
    • setStartTime

      public 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;
    • setStartTime

      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;
    • mergeStartTime

      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;
    • clearStartTime

      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;
    • getStartTimeBuilder

      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;
    • getStartTimeOrBuilder

      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;
      Specified by:
      getStartTimeOrBuilder in interface TimeIntervalOrBuilder