/** * * * <pre> * The associated monitored resource. Custom metrics can use only certain * monitored resource types in their time series data. * </pre> * * <code>.google.api.MonitoredResource resource = 2;</code> */ public com.google.api.MonitoredResourceOrBuilder getResourceOrBuilder() { return getResource(); }
@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; }
hash = (53 * hash) + getResource().hashCode();
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.monitoring.v3.TimeSeries)) { return super.equals(obj); } com.google.monitoring.v3.TimeSeries other = (com.google.monitoring.v3.TimeSeries) obj; boolean result = true; result = result && (hasMetric() == other.hasMetric()); if (hasMetric()) { result = result && getMetric().equals(other.getMetric()); } result = result && (hasResource() == other.hasResource()); if (hasResource()) { result = result && getResource().equals(other.getResource()); } result = result && (hasMetadata() == other.hasMetadata()); if (hasMetadata()) { result = result && getMetadata().equals(other.getMetadata()); } result = result && metricKind_ == other.metricKind_; result = result && valueType_ == other.valueType_; result = result && getPointsList().equals(other.getPointsList()); result = result && unknownFields.equals(other.unknownFields); return result; }
mergeResource(other.getResource());
/** * <pre> * The associated resource. A fully-specified monitored resource used to * identify the time series. * </pre> * * <code>optional .google.api.MonitoredResource resource = 2;</code> */ public com.google.api.MonitoredResourceOrBuilder getResourceOrBuilder() { return getResource(); }
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)); } }
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; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (hasMetric()) { hash = (37 * hash) + METRIC_FIELD_NUMBER; hash = (53 * hash) + getMetric().hashCode(); } if (hasResource()) { hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); } hash = (37 * hash) + METRIC_KIND_FIELD_NUMBER; hash = (53 * hash) + metricKind_; hash = (37 * hash) + VALUE_TYPE_FIELD_NUMBER; hash = (53 * hash) + valueType_; if (getPointsCount() > 0) { hash = (37 * hash) + POINTS_FIELD_NUMBER; hash = (53 * hash) + getPointsList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
mergeResource(other.getResource());
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.monitoring.v3.TimeSeries)) { return super.equals(obj); } com.google.monitoring.v3.TimeSeries other = (com.google.monitoring.v3.TimeSeries) obj; boolean result = true; result = result && (hasMetric() == other.hasMetric()); if (hasMetric()) { result = result && getMetric() .equals(other.getMetric()); } result = result && (hasResource() == other.hasResource()); if (hasResource()) { result = result && getResource() .equals(other.getResource()); } result = result && metricKind_ == other.metricKind_; result = result && valueType_ == other.valueType_; result = result && getPointsList() .equals(other.getPointsList()); return result; }