@SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMutableMapField(int number) { switch (number) { case 3: return internalGetMutableMetadata(); default: throw new RuntimeException("Invalid map field number: " + number); } }
@java.lang.Override public Builder clear() { super.clear(); name_ = ""; type_ = 0; internalGetMutableMetadata().clear(); salience_ = 0F; if (mentionsBuilder_ == null) { mentions_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000010); } else { mentionsBuilder_.clear(); } if (sentimentBuilder_ == null) { sentiment_ = null; } else { sentiment_ = null; sentimentBuilder_ = null; } return this; }
/** * * * <pre> * Metadata associated with the entity. * Currently, Wikipedia URLs and Knowledge Graph MIDs are provided, if * available. The associated keys are "wikipedia_url" and "mid", respectively. * </pre> * * <code>map<string, string> metadata = 3;</code> */ public Builder putMetadata(java.lang.String key, java.lang.String value) { if (key == null) { throw new java.lang.NullPointerException(); } if (value == null) { throw new java.lang.NullPointerException(); } internalGetMutableMetadata().getMutableMap().put(key, value); return this; } /**
setTypeValue(other.getTypeValue()); internalGetMutableMetadata().mergeFrom(other.internalGetMetadata()); if (other.getSalience() != 0F) { setSalience(other.getSalience());
/** * * * <pre> * Metadata associated with the entity. * Currently, Wikipedia URLs and Knowledge Graph MIDs are provided, if * available. The associated keys are "wikipedia_url" and "mid", respectively. * </pre> * * <code>map<string, string> metadata = 3;</code> */ public Builder removeMetadata(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } internalGetMutableMetadata().getMutableMap().remove(key); return this; } /** Use alternate mutation accessors instead. */
/** * * * <pre> * Metadata associated with the entity. * Currently, Wikipedia URLs and Knowledge Graph MIDs are provided, if * available. The associated keys are "wikipedia_url" and "mid", respectively. * </pre> * * <code>map<string, string> metadata = 3;</code> */ public Builder putAllMetadata(java.util.Map<java.lang.String, java.lang.String> values) { internalGetMutableMetadata().getMutableMap().putAll(values); return this; }
/** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map<java.lang.String, java.lang.String> getMutableMetadata() { return internalGetMutableMetadata().getMutableMap(); } /**
public Builder clearMetadata() { internalGetMutableMetadata().getMutableMap().clear(); return this; } /**