@SuppressWarnings({"rawtypes"}) @java.lang.Override protected com.google.protobuf.MapField internalGetMapField(int number) { switch (number) { case 2: return internalGetLabels(); default: throw new RuntimeException("Invalid map field number: " + number); } }
public int getLabelsCount() { return internalGetLabels().getMap().size(); } /**
/** * * * <pre> * See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and * managing labels</a>. * </pre> * * <code>map<string, string> labels = 2;</code> */ public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() { return internalGetLabels().getMap(); } /**
/** * * * <pre> * See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and * managing labels</a>. * </pre> * * <code>map<string, string> labels = 2;</code> */ public boolean containsLabels(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } return internalGetLabels().getMap().containsKey(key); } /** Use {@link #getLabelsMap()} instead. */
/** * * * <pre> * See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and * managing labels</a>. * </pre> * * <code>map<string, string> labels = 2;</code> */ public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /**
/** * * * <pre> * See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and * managing labels</a>. * </pre> * * <code>map<string, string> labels = 2;</code> */ public java.lang.String getLabelsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); }
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 2); if (messageStoragePolicy_ != null) { output.writeMessage(3, getMessageStoragePolicy()); } unknownFields.writeTo(output); }
@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(); if (!internalGetLabels().getMap().isEmpty()) { hash = (37 * hash) + LABELS_FIELD_NUMBER; hash = (53 * hash) + internalGetLabels().hashCode(); } if (hasMessageStoragePolicy()) { hash = (37 * hash) + MESSAGE_STORAGE_POLICY_FIELD_NUMBER; hash = (53 * hash) + getMessageStoragePolicy().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } for (java.util.Map.Entry<java.lang.String, java.lang.String> entry : internalGetLabels().getMap().entrySet()) { com.google.protobuf.MapEntry<java.lang.String, java.lang.String> labels__ = LabelsDefaultEntryHolder.defaultEntry .newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, labels__); } if (messageStoragePolicy_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getMessageStoragePolicy()); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.pubsub.v1.Topic)) { return super.equals(obj); } com.google.pubsub.v1.Topic other = (com.google.pubsub.v1.Topic) obj; boolean result = true; result = result && getName().equals(other.getName()); result = result && internalGetLabels().equals(other.internalGetLabels()); result = result && (hasMessageStoragePolicy() == other.hasMessageStoragePolicy()); if (hasMessageStoragePolicy()) { result = result && getMessageStoragePolicy().equals(other.getMessageStoragePolicy()); } result = result && unknownFields.equals(other.unknownFields); return result; }
@SuppressWarnings({"rawtypes"}) @java.lang.Override protected com.google.protobuf.MapField internalGetMapField(int number) { switch (number) { case 2: return internalGetLabels(); default: throw new RuntimeException("Invalid map field number: " + number); } }
public int getLabelsCount() { return internalGetLabels().getMap().size(); } /**
/** * * * <pre> * See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and * managing labels</a>. * </pre> * * <code>map<string, string> labels = 2;</code> */ public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() { return internalGetLabels().getMap(); } /**
/** * * * <pre> * See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and * managing labels</a>. * </pre> * * <code>map<string, string> labels = 2;</code> */ public boolean containsLabels(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } return internalGetLabels().getMap().containsKey(key); } /** Use {@link #getLabelsMap()} instead. */
/** * * * <pre> * See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and * managing labels</a>. * </pre> * * <code>map<string, string> labels = 2;</code> */ public java.lang.String getLabelsOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); }
/** * * * <pre> * See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and * managing labels</a>. * </pre> * * <code>map<string, string> labels = 2;</code> */ public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /**
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 2); if (messageStoragePolicy_ != null) { output.writeMessage(3, getMessageStoragePolicy()); } unknownFields.writeTo(output); }
@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(); if (!internalGetLabels().getMap().isEmpty()) { hash = (37 * hash) + LABELS_FIELD_NUMBER; hash = (53 * hash) + internalGetLabels().hashCode(); } if (hasMessageStoragePolicy()) { hash = (37 * hash) + MESSAGE_STORAGE_POLICY_FIELD_NUMBER; hash = (53 * hash) + getMessageStoragePolicy().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } for (java.util.Map.Entry<java.lang.String, java.lang.String> entry : internalGetLabels().getMap().entrySet()) { com.google.protobuf.MapEntry<java.lang.String, java.lang.String> labels__ = LabelsDefaultEntryHolder.defaultEntry .newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, labels__); } if (messageStoragePolicy_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getMessageStoragePolicy()); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.pubsub.v1.Topic)) { return super.equals(obj); } com.google.pubsub.v1.Topic other = (com.google.pubsub.v1.Topic) obj; boolean result = true; result = result && getName().equals(other.getName()); result = result && internalGetLabels().equals(other.internalGetLabels()); result = result && (hasMessageStoragePolicy() == other.hasMessageStoragePolicy()); if (hasMessageStoragePolicy()) { result = result && getMessageStoragePolicy().equals(other.getMessageStoragePolicy()); } result = result && unknownFields.equals(other.unknownFields); return result; }