@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); }
metric.getName(), metric.getValueType().getValueDescriptor().getName(), metric.getMetricKind().getValueDescriptor().getName());
metric.getName(), metric.getValueType().getValueDescriptor().getName(), metric.getMetricKind().getValueDescriptor().getName());
.computeMessageSize(2, labels_.get(i)); if (metricKind_ != com.google.api.MetricDescriptor.MetricKind.METRIC_KIND_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(3, metricKind_);
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; }
/** * <pre> * The metric kind of the time series. When listing time series, this metric * kind might be different from the metric kind 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 metric kind of the associated metric. If the associated * metric's descriptor must be auto-created, then this field specifies the * metric kind of the new descriptor and must be either `GAUGE` (the default) * or `CUMULATIVE`. * </pre> * * <code>optional .google.api.MetricDescriptor.MetricKind metric_kind = 3;</code> */ public Builder setMetricKind(com.google.api.MetricDescriptor.MetricKind value) { if (value == null) { throw new NullPointerException(); } metricKind_ = value.getNumber(); onChanged(); return this; } /**
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 metric kind of the time series. When listing time series, this metric * kind might be different from the metric kind 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 metric kind of the associated metric. If the associated * metric's descriptor must be auto-created, then this field specifies the * metric kind of the new descriptor and must be either `GAUGE` (the default) * or `CUMULATIVE`. * </pre> * * <code>optional .google.api.MetricDescriptor.MetricKind metric_kind = 3;</code> */ public com.google.api.MetricDescriptor.MetricKind getMetricKind() { com.google.api.MetricDescriptor.MetricKind result = com.google.api.MetricDescriptor.MetricKind.valueOf(metricKind_); return result == null ? com.google.api.MetricDescriptor.MetricKind.UNRECOGNIZED : result; } /**
/** * <pre> * The metric kind of the time series. When listing time series, this metric * kind might be different from the metric kind 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 metric kind of the associated metric. If the associated * metric's descriptor must be auto-created, then this field specifies the * metric kind of the new descriptor and must be either `GAUGE` (the default) * or `CUMULATIVE`. * </pre> * * <code>optional .google.api.MetricDescriptor.MetricKind metric_kind = 3;</code> */ public com.google.api.MetricDescriptor.MetricKind getMetricKind() { com.google.api.MetricDescriptor.MetricKind result = com.google.api.MetricDescriptor.MetricKind.valueOf(metricKind_); return result == null ? com.google.api.MetricDescriptor.MetricKind.UNRECOGNIZED : result; }
/** * <pre> * Whether the metric records instantaneous values, changes to a value, etc. * Some combinations of `metric_kind` and `value_type` might not be supported. * </pre> * * <code>.google.api.MetricDescriptor.MetricKind metric_kind = 3;</code> */ public Builder setMetricKind(com.google.api.MetricDescriptor.MetricKind value) { if (value == null) { throw new NullPointerException(); } metricKind_ = value.getNumber(); onChanged(); return this; } /**
/** * <pre> * Whether the metric records instantaneous values, changes to a value, etc. * Some combinations of `metric_kind` and `value_type` might not be supported. * </pre> * * <code>.google.api.MetricDescriptor.MetricKind metric_kind = 3;</code> */ public com.google.api.MetricDescriptor.MetricKind getMetricKind() { com.google.api.MetricDescriptor.MetricKind result = com.google.api.MetricDescriptor.MetricKind.valueOf(metricKind_); return result == null ? com.google.api.MetricDescriptor.MetricKind.UNRECOGNIZED : result; } /**
public static MetricKind valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; }
/** * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static MetricKind valueOf(int value) { return forNumber(value); }
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor
/** * <pre> * Whether the metric records instantaneous values, changes to a value, etc. * Some combinations of `metric_kind` and `value_type` might not be supported. * </pre> * * <code>.google.api.MetricDescriptor.MetricKind metric_kind = 3;</code> */ public com.google.api.MetricDescriptor.MetricKind getMetricKind() { com.google.api.MetricDescriptor.MetricKind result = com.google.api.MetricDescriptor.MetricKind.valueOf(metricKind_); return result == null ? com.google.api.MetricDescriptor.MetricKind.UNRECOGNIZED : result; }
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor
@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 metric kind of the time series. When listing time series, this metric * kind might be different from the metric kind 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 metric kind of the associated metric. If the associated * metric's descriptor must be auto-created, then this field specifies the * metric kind of the new descriptor and must be either `GAUGE` (the default) * or `CUMULATIVE`. * </pre> * * <code>.google.api.MetricDescriptor.MetricKind metric_kind = 3;</code> */ public com.google.api.MetricDescriptor.MetricKind getMetricKind() { @SuppressWarnings("deprecation") com.google.api.MetricDescriptor.MetricKind result = com.google.api.MetricDescriptor.MetricKind.valueOf(metricKind_); return result == null ? com.google.api.MetricDescriptor.MetricKind.UNRECOGNIZED : result; } /**
/** * * * <pre> * The metric kind of the time series. When listing time series, this metric * kind might be different from the metric kind 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 metric kind of the associated metric. If the associated * metric's descriptor must be auto-created, then this field specifies the * metric kind of the new descriptor and must be either `GAUGE` (the default) * or `CUMULATIVE`. * </pre> * * <code>.google.api.MetricDescriptor.MetricKind metric_kind = 3;</code> */ public Builder setMetricKind(com.google.api.MetricDescriptor.MetricKind value) { if (value == null) { throw new NullPointerException(); } metricKind_ = value.getNumber(); onChanged(); return this; } /**