@SuppressWarnings({"rawtypes"}) @java.lang.Override protected com.google.protobuf.MapField internalGetMapField(int number) { switch (number) { case 2: return internalGetAttributes(); default: throw new RuntimeException("Invalid map field number: " + number); } }
public int getAttributesCount() { return internalGetAttributes().getMap().size(); } /**
/** * * * <pre> * Optional attributes for this message. * </pre> * * <code>map<string, string> attributes = 2;</code> */ public java.util.Map<java.lang.String, java.lang.String> getAttributesMap() { return internalGetAttributes().getMap(); } /**
/** * * * <pre> * Optional attributes for this message. * </pre> * * <code>map<string, string> attributes = 2;</code> */ public boolean containsAttributes(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } return internalGetAttributes().getMap().containsKey(key); } /** Use {@link #getAttributesMap()} instead. */
/** * * * <pre> * Optional attributes for this message. * </pre> * * <code>map<string, string> attributes = 2;</code> */ public java.lang.String getAttributesOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map<java.lang.String, java.lang.String> map = internalGetAttributes().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); }
/** * * * <pre> * Optional attributes for this message. * </pre> * * <code>map<string, string> attributes = 2;</code> */ public java.lang.String getAttributesOrDefault( 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 = internalGetAttributes().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 (!data_.isEmpty()) { output.writeBytes(1, data_); } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetAttributes(), AttributesDefaultEntryHolder.defaultEntry, 2); if (!getMessageIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, messageId_); } if (publishTime_ != null) { output.writeMessage(4, getPublishTime()); } unknownFields.writeTo(output); }
@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!data_.isEmpty()) { size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, data_); } for (java.util.Map.Entry<java.lang.String, java.lang.String> entry : internalGetAttributes().getMap().entrySet()) { com.google.protobuf.MapEntry<java.lang.String, java.lang.String> attributes__ = AttributesDefaultEntryHolder.defaultEntry .newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, attributes__); } if (!getMessageIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, messageId_); } if (publishTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getPublishTime()); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + DATA_FIELD_NUMBER; hash = (53 * hash) + getData().hashCode(); if (!internalGetAttributes().getMap().isEmpty()) { hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; hash = (53 * hash) + internalGetAttributes().hashCode(); } hash = (37 * hash) + MESSAGE_ID_FIELD_NUMBER; hash = (53 * hash) + getMessageId().hashCode(); if (hasPublishTime()) { hash = (37 * hash) + PUBLISH_TIME_FIELD_NUMBER; hash = (53 * hash) + getPublishTime().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.pubsub.v1.PubsubMessage)) { return super.equals(obj); } com.google.pubsub.v1.PubsubMessage other = (com.google.pubsub.v1.PubsubMessage) obj; boolean result = true; result = result && getData().equals(other.getData()); result = result && internalGetAttributes().equals(other.internalGetAttributes()); result = result && getMessageId().equals(other.getMessageId()); result = result && (hasPublishTime() == other.hasPublishTime()); if (hasPublishTime()) { result = result && getPublishTime().equals(other.getPublishTime()); } 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 internalGetAttributes(); default: throw new RuntimeException("Invalid map field number: " + number); } }
@SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMapField( int number) { switch (number) { case 2: return internalGetAttributes(); default: throw new RuntimeException( "Invalid map field number: " + number); } } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
@SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMapField( int number) { switch (number) { case 2: return internalGetAttributes(); default: throw new RuntimeException( "Invalid map field number: " + number); } } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
/** * <pre> * Optional attributes for this message. * </pre> * * <code>map<string, string> attributes = 2;</code> */ public java.util.Map<java.lang.String, java.lang.String> getAttributesMap() { return internalGetAttributes().getMap(); } /**
/** * <code>map<string, string> attributes = 2;</code> * * <pre> * Optional attributes for this message. * </pre> */ public java.util.Map<java.lang.String, java.lang.String> getAttributes() { return internalGetAttributes().getMap(); }
/** * * * <pre> * Optional attributes for this message. * </pre> * * <code>map<string, string> attributes = 2;</code> */ public java.util.Map<java.lang.String, java.lang.String> getAttributesMap() { return internalGetAttributes().getMap(); } /**
public int getAttributesCount() { return internalGetAttributes().getMap().size(); } /**
/** * <pre> * Optional attributes for this message. * </pre> * * <code>map<string, string> attributes = 2;</code> */ public boolean containsAttributes( java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } return internalGetAttributes().getMap().containsKey(key); } /**
public int getAttributesCount() { return internalGetAttributes().getMap().size(); } /**
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!data_.isEmpty()) { output.writeBytes(1, data_); } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetAttributes(), AttributesDefaultEntryHolder.defaultEntry, 2); if (!getMessageIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, messageId_); } if (publishTime_ != null) { output.writeMessage(4, getPublishTime()); } unknownFields.writeTo(output); }