@SuppressWarnings({"rawtypes"}) @java.lang.Override protected com.google.protobuf.MapField internalGetMapField(int number) { switch (number) { case 1: return internalGetFields(); default: throw new RuntimeException("Invalid map field number: " + number); } }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.firestore.v1beta1.MapValue)) { return super.equals(obj); } com.google.firestore.v1beta1.MapValue other = (com.google.firestore.v1beta1.MapValue) obj; boolean result = true; result = result && internalGetFields().equals(other.internalGetFields()); result = result && unknownFields.equals(other.unknownFields); return result; }
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetFields(), FieldsDefaultEntryHolder.defaultEntry, 1); unknownFields.writeTo(output); }
public int getFieldsCount() { return internalGetFields().getMap().size(); } /**
/** * * * <pre> * The map's fields. * The map keys represent field names. Field names matching the regular * expression `__.*__` are reserved. Reserved field names are forbidden except * in certain documented contexts. The map keys, represented as UTF-8, must * not exceed 1,500 bytes and cannot be empty. * </pre> * * <code>map<string, .google.firestore.v1beta1.Value> fields = 1;</code> */ public java.util.Map<java.lang.String, com.google.firestore.v1beta1.Value> getFieldsMap() { return internalGetFields().getMap(); } /**
/** * * * <pre> * The map's fields. * The map keys represent field names. Field names matching the regular * expression `__.*__` are reserved. Reserved field names are forbidden except * in certain documented contexts. The map keys, represented as UTF-8, must * not exceed 1,500 bytes and cannot be empty. * </pre> * * <code>map<string, .google.firestore.v1beta1.Value> fields = 1;</code> */ public boolean containsFields(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } return internalGetFields().getMap().containsKey(key); } /** Use {@link #getFieldsMap()} instead. */
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (!internalGetFields().getMap().isEmpty()) { hash = (37 * hash) + FIELDS_FIELD_NUMBER; hash = (53 * hash) + internalGetFields().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * * * <pre> * The map's fields. * The map keys represent field names. Field names matching the regular * expression `__.*__` are reserved. Reserved field names are forbidden except * in certain documented contexts. The map keys, represented as UTF-8, must * not exceed 1,500 bytes and cannot be empty. * </pre> * * <code>map<string, .google.firestore.v1beta1.Value> fields = 1;</code> */ public com.google.firestore.v1beta1.Value getFieldsOrDefault( java.lang.String key, com.google.firestore.v1beta1.Value defaultValue) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map<java.lang.String, com.google.firestore.v1beta1.Value> map = internalGetFields().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /**
/** * * * <pre> * The map's fields. * The map keys represent field names. Field names matching the regular * expression `__.*__` are reserved. Reserved field names are forbidden except * in certain documented contexts. The map keys, represented as UTF-8, must * not exceed 1,500 bytes and cannot be empty. * </pre> * * <code>map<string, .google.firestore.v1beta1.Value> fields = 1;</code> */ public com.google.firestore.v1beta1.Value getFieldsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map<java.lang.String, com.google.firestore.v1beta1.Value> map = internalGetFields().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); }
@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; for (java.util.Map.Entry<java.lang.String, com.google.firestore.v1beta1.Value> entry : internalGetFields().getMap().entrySet()) { com.google.protobuf.MapEntry<java.lang.String, com.google.firestore.v1beta1.Value> fields__ = FieldsDefaultEntryHolder.defaultEntry .newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, fields__); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }