public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.api.MetricDescriptor.getDescriptor().getEnumTypes().get(0); }
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.api.MetricDescriptor.getDescriptor().getEnumTypes().get(1); }
private List<MetricDescriptor> parseMetrics( ServiceManagementExtension extension, VendorExtensionProtoConverter extensionConverter) { if (extension.getMetrics() == null) { return ImmutableList.of(); } try { String extensionJson = new ObjectMapper().writer().writeValueAsString(extension.getMetrics()); return extensionConverter.convertJsonArrayToProto( MetricDescriptor.getDefaultInstance(), new ObjectMapper().readTree(extensionJson), "metrics"); } catch (IOException ex) { diagCollector.addDiag( Diag.error( new SimpleLocation("metrics"), "Extension %s cannot be converted into proto type %s. Details: %s", "quota", MetricDescriptor.getDescriptor().getFullName(), ex.getMessage())); return ImmutableList.of(); } }
private List<MetricDescriptor> parseMetrics( ServiceManagementExtension extension, VendorExtensionProtoConverter extensionConverter) { if (extension.getMetrics() == null) { return ImmutableList.of(); } try { String extensionJson = new ObjectMapper().writer().writeValueAsString(extension.getMetrics()); return extensionConverter.convertJsonArrayToProto( MetricDescriptor.getDefaultInstance(), new ObjectMapper().readTree(extensionJson), "metrics"); } catch (IOException ex) { diagCollector.addDiag( Diag.error( new SimpleLocation("metrics"), "Extension %s cannot be converted into proto type %s. Details: %s", "quota", MetricDescriptor.getDescriptor().getFullName(), ex.getMessage())); return ImmutableList.of(); } }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + getType().hashCode(); if (getLabelsCount() > 0) { hash = (37 * hash) + LABELS_FIELD_NUMBER; hash = (53 * hash) + getLabelsList().hashCode(); } hash = (37 * hash) + METRIC_KIND_FIELD_NUMBER; hash = (53 * hash) + metricKind_; hash = (37 * hash) + VALUE_TYPE_FIELD_NUMBER; hash = (53 * hash) + valueType_; hash = (37 * hash) + UNIT_FIELD_NUMBER; hash = (53 * hash) + getUnit().hashCode(); hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getDescription().hashCode(); hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; hash = (53 * hash) + getDisplayName().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }