@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (metric_ != null) { output.writeMessage(1, getMetric()); } if (resource_ != null) { output.writeMessage(2, getResource()); } if (metricKind_ != com.google.api.MetricDescriptor.MetricKind.METRIC_KIND_UNSPECIFIED.getNumber()) { output.writeEnum(3, metricKind_); } if (valueType_ != com.google.api.MetricDescriptor.ValueType.VALUE_TYPE_UNSPECIFIED.getNumber()) { output.writeEnum(4, valueType_); } for (int i = 0; i < points_.size(); i++) { output.writeMessage(5, points_.get(i)); } if (metadata_ != null) { output.writeMessage(7, getMetadata()); } unknownFields.writeTo(output); }
@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (metric_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getMetric()); } if (resource_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getResource()); } if (metricKind_ != com.google.api.MetricDescriptor.MetricKind.METRIC_KIND_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, metricKind_); } if (valueType_ != com.google.api.MetricDescriptor.ValueType.VALUE_TYPE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, valueType_); } for (int i = 0; i < points_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, points_.get(i)); } if (metadata_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getMetadata()); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
/** * * * <pre> * The value type of the time series. When listing time series, this value * type might be different from the value type of the associated metric if * this time series is an alignment or reduction of other time series. * When creating a time series, this field is optional. If present, it must be * the same as the type of the data in the `points` field. * </pre> * * <code>.google.api.MetricDescriptor.ValueType value_type = 4;</code> */ public Builder setValueType(com.google.api.MetricDescriptor.ValueType value) { if (value == null) { throw new NullPointerException(); } valueType_ = value.getNumber(); onChanged(); return this; } /**
.computeEnumSize(3, metricKind_); if (valueType_ != com.google.api.MetricDescriptor.ValueType.VALUE_TYPE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(4, valueType_);
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } for (int i = 0; i < labels_.size(); i++) { output.writeMessage(2, labels_.get(i)); } if (metricKind_ != com.google.api.MetricDescriptor.MetricKind.METRIC_KIND_UNSPECIFIED.getNumber()) { output.writeEnum(3, metricKind_); } if (valueType_ != com.google.api.MetricDescriptor.ValueType.VALUE_TYPE_UNSPECIFIED.getNumber()) { output.writeEnum(4, valueType_); } if (!getUnitBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, unit_); } if (!getDescriptionBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_); } if (!getDisplayNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, displayName_); } if (!getTypeBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 8, type_); } }
public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (metric_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getMetric()); } if (resource_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getResource()); } if (metricKind_ != com.google.api.MetricDescriptor.MetricKind.METRIC_KIND_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(3, metricKind_); } if (valueType_ != com.google.api.MetricDescriptor.ValueType.VALUE_TYPE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(4, valueType_); } for (int i = 0; i < points_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, points_.get(i)); } memoizedSize = size; return size; }
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (metric_ != null) { output.writeMessage(1, getMetric()); } if (resource_ != null) { output.writeMessage(2, getResource()); } if (metricKind_ != com.google.api.MetricDescriptor.MetricKind.METRIC_KIND_UNSPECIFIED.getNumber()) { output.writeEnum(3, metricKind_); } if (valueType_ != com.google.api.MetricDescriptor.ValueType.VALUE_TYPE_UNSPECIFIED.getNumber()) { output.writeEnum(4, valueType_); } for (int i = 0; i < points_.size(); i++) { output.writeMessage(5, points_.get(i)); } }
/** * <pre> * The value type of the time series. When listing time series, this value * type might be different from the value type of the associated metric if * this time series is an alignment or reduction of other time series. * When creating a time series, this field is optional. If present, it must be * the same as the type of the data in the `points` field. * </pre> * * <code>optional .google.api.MetricDescriptor.ValueType value_type = 4;</code> */ public Builder setValueType(com.google.api.MetricDescriptor.ValueType value) { if (value == null) { throw new NullPointerException(); } valueType_ = value.getNumber(); onChanged(); return this; } /**
/** * <pre> * Whether the measurement is an integer, a floating-point number, etc. * Some combinations of `metric_kind` and `value_type` might not be supported. * </pre> * * <code>.google.api.MetricDescriptor.ValueType value_type = 4;</code> */ public Builder setValueType(com.google.api.MetricDescriptor.ValueType value) { if (value == null) { throw new NullPointerException(); } valueType_ = value.getNumber(); onChanged(); return this; } /**