@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.monitoring.v3.Point)) { return super.equals(obj); } com.google.monitoring.v3.Point other = (com.google.monitoring.v3.Point) obj; boolean result = true; result = result && (hasInterval() == other.hasInterval()); if (hasInterval()) { result = result && getInterval().equals(other.getInterval()); } result = result && (hasValue() == other.hasValue()); if (hasValue()) { result = result && getValue().equals(other.getValue()); } result = result && unknownFields.equals(other.unknownFields); return result; }
@java.lang.Override public com.google.monitoring.v3.Point buildPartial() { com.google.monitoring.v3.Point result = new com.google.monitoring.v3.Point(this); if (intervalBuilder_ == null) { result.interval_ = interval_; } else { result.interval_ = intervalBuilder_.build(); } if (valueBuilder_ == null) { result.value_ = value_; } else { result.value_ = valueBuilder_.build(); } onBuilt(); return result; }
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (interval_ != null) { output.writeMessage(1, getInterval()); } if (value_ != null) { output.writeMessage(2, getValue()); } unknownFields.writeTo(output); }
/** * * * <pre> * The value of the data point. * </pre> * * <code>.google.monitoring.v3.TypedValue value = 2;</code> */ public com.google.monitoring.v3.TypedValueOrBuilder getValueOrBuilder() { return getValue(); }
@java.lang.Override public com.google.monitoring.v3.Point getDefaultInstanceForType() { return com.google.monitoring.v3.Point.getDefaultInstance(); }
if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { done = true; } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable();
@java.lang.Override public com.google.monitoring.v3.Point build() { com.google.monitoring.v3.Point result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
/** * * * <pre> * The time interval to which the data point applies. For `GAUGE` metrics, * only the end time of the interval is used. For `DELTA` metrics, the start * and end time should specify a non-zero interval, with subsequent points * specifying contiguous and non-overlapping intervals. For `CUMULATIVE` * metrics, the start and end time should 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. * </pre> * * <code>.google.monitoring.v3.TimeInterval interval = 1;</code> */ public com.google.monitoring.v3.TimeIntervalOrBuilder getIntervalOrBuilder() { return getInterval(); }
e).setUnfinishedMessage(this); } finally { makeExtensionsImmutable();
@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (interval_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInterval()); } if (value_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getValue()); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
/** * <pre> * The value of the data point. * </pre> * * <code>optional .google.monitoring.v3.TypedValue value = 2;</code> */ public com.google.monitoring.v3.TypedValueOrBuilder getValueOrBuilder() { return getValue(); }
/** * * * <pre> * The data points of this time series. When listing time series, points are * returned in reverse time order. * When creating a time series, this field must contain exactly one point and * the point's type must be the same as the value type of the associated * metric. If the associated metric's descriptor must be auto-created, then * the value type of the descriptor is determined by the point's type, which * must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`. * </pre> * * <code>repeated .google.monitoring.v3.Point points = 5;</code> */ public com.google.monitoring.v3.Point.Builder addPointsBuilder() { return getPointsFieldBuilder() .addBuilder(com.google.monitoring.v3.Point.getDefaultInstance()); } /**
public com.google.monitoring.v3.Point build() { com.google.monitoring.v3.Point result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
/** * <pre> * The time interval to which the data point applies. For GAUGE metrics, only * the end time of the interval is used. For DELTA metrics, the start and end * time should specify a non-zero interval, with subsequent points specifying * contiguous and non-overlapping intervals. For CUMULATIVE metrics, the * start and end time should 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. * </pre> * * <code>optional .google.monitoring.v3.TimeInterval interval = 1;</code> */ public com.google.monitoring.v3.TimeIntervalOrBuilder getIntervalOrBuilder() { return getInterval(); }
public Builder mergeFrom(com.google.monitoring.v3.Point other) { if (other == com.google.monitoring.v3.Point.getDefaultInstance()) return this; if (other.hasInterval()) { mergeInterval(other.getInterval()); } if (other.hasValue()) { mergeValue(other.getValue()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
.setDoubleValue(123.45) .build(); Point point = Point.newBuilder() .setInterval(interval) .setValue(value)
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (interval_ != null) { output.writeMessage(1, getInterval()); } if (value_ != null) { output.writeMessage(2, getValue()); } }
@Override public void run() { try { // [START scale_bigtable] double latestValue = getLatestValue().getValue().getDoubleValue(); if (latestValue < CPU_PERCENT_TO_DOWNSCALE) { int clusterSize = clusterUtility.getClusterNodeCount(clusterId, zoneId); if (clusterSize > MIN_NODE_COUNT) { clusterUtility.setClusterSize(clusterId, zoneId, Math.max(clusterSize - SIZE_CHANGE_STEP, MIN_NODE_COUNT)); } } else if (latestValue > CPU_PERCENT_TO_UPSCALE) { int clusterSize = clusterUtility.getClusterNodeCount(clusterId, zoneId); if (clusterSize <= MAX_NODE_COUNT) { clusterUtility.setClusterSize(clusterId, zoneId, Math.min(clusterSize + SIZE_CHANGE_STEP, MAX_NODE_COUNT)); } } // [END scale_bigtable] } catch (Exception e) { e.printStackTrace(); } } };
/** * * * <pre> * The data points of this time series. When listing time series, points are * returned in reverse time order. * When creating a time series, this field must contain exactly one point and * the point's type must be the same as the value type of the associated * metric. If the associated metric's descriptor must be auto-created, then * the value type of the descriptor is determined by the point's type, which * must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`. * </pre> * * <code>repeated .google.monitoring.v3.Point points = 5;</code> */ public com.google.monitoring.v3.Point.Builder addPointsBuilder(int index) { return getPointsFieldBuilder() .addBuilder(index, com.google.monitoring.v3.Point.getDefaultInstance()); } /**