public static MonitoredResource fromPb(com.google.api.MonitoredResource descriptorPb) { return new Builder(descriptorPb.getType()).setLabels(descriptorPb.getLabelsMap()).build(); } }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.api.MonitoredResource)) { return super.equals(obj); } com.google.api.MonitoredResource other = (com.google.api.MonitoredResource) obj; boolean result = true; result = result && getType() .equals(other.getType()); result = result && internalGetLabels().equals( other.internalGetLabels()); return result; }
/** * <pre> * Required. The monitored resource type. This field must match * the `type` field of a [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] object. For * example, the type of a Cloud SQL database is `"cloudsql_database"`. * </pre> * * <code>string type = 1;</code> */ public Builder clearType() { type_ = getDefaultInstance().getType(); onChanged(); return this; } /**
public Builder mergeFrom(com.google.api.MonitoredResource other) { if (other == com.google.api.MonitoredResource.getDefaultInstance()) return this; if (!other.getType().isEmpty()) { type_ = other.type_; onChanged(); } internalGetMutableLabels().mergeFrom( other.internalGetLabels()); onChanged(); return this; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + getType().hashCode(); if (!internalGetLabels().getMap().isEmpty()) { hash = (37 * hash) + LABELS_FIELD_NUMBER; hash = (53 * hash) + internalGetLabels().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
public static MonitoredResource fromPb(com.google.api.MonitoredResource descriptorPb) { return new Builder(descriptorPb.getType()).setLabels(descriptorPb.getLabelsMap()).build(); } }
public static MonitoredResource fromPb(com.google.api.MonitoredResource descriptorPb) { return new Builder(descriptorPb.getType()).labels(descriptorPb.getLabels()).build(); } }