/** * * * <pre> * The time at which the message was published, populated by the server when * it receives the `Publish` call. It must not be populated by the * publisher in a `Publish` call. * </pre> * * <code>.google.protobuf.Timestamp publish_time = 4;</code> */ public Builder setPublishTime(com.google.protobuf.Timestamp value) { if (publishTimeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } publishTime_ = value; onChanged(); } else { publishTimeBuilder_.setMessage(value); } return this; } /**
/** * * * <pre> * The message data field. If this field is empty, the message must contain * at least one attribute. * </pre> * * <code>bytes data = 1;</code> */ public Builder setData(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } data_ = value; onChanged(); return this; } /**
/** * * * <pre> * ID of this message, assigned by the server when the message is published. * Guaranteed to be unique within the topic. This value may be read by a * subscriber that receives a `PubsubMessage` via a `Pull` call or a push * delivery. It must not be populated by the publisher in a `Publish` call. * </pre> * * <code>string message_id = 3;</code> */ public Builder setMessageId(java.lang.String value) { if (value == null) { throw new NullPointerException(); } messageId_ = value; onChanged(); return this; } /**
/** * * * <pre> * The message data field. If this field is empty, the message must contain * at least one attribute. * </pre> * * <code>bytes data = 1;</code> */ public Builder clearData() { data_ = getDefaultInstance().getData(); onChanged(); return this; }
/** * <code>optional .google.protobuf.Timestamp publish_time = 4;</code> * * <pre> * The time at which the message was published, populated by the server when * it receives the `Publish` call. It must not be populated by the * publisher in a `Publish` call. * </pre> */ public com.google.protobuf.Timestamp.Builder getPublishTimeBuilder() { onChanged(); return getPublishTimeFieldBuilder().getBuilder(); } /**
/** * <pre> * The time at which the message was published, populated by the server when * it receives the `Publish` call. It must not be populated by the * publisher in a `Publish` call. * </pre> * * <code>optional .google.protobuf.Timestamp publish_time = 4;</code> */ public com.google.protobuf.Timestamp.Builder getPublishTimeBuilder() { onChanged(); return getPublishTimeFieldBuilder().getBuilder(); } /**
private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetMutableAttributes() { onChanged();; if (attributes_ == null) { attributes_ = com.google.protobuf.MapField.newMapField( AttributesDefaultEntryHolder.defaultEntry); } if (!attributes_.isMutable()) { attributes_ = attributes_.copy(); } return attributes_; } /**
private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetMutableAttributes() { onChanged(); ; if (attributes_ == null) { attributes_ = com.google.protobuf.MapField.newMapField(AttributesDefaultEntryHolder.defaultEntry); } if (!attributes_.isMutable()) { attributes_ = attributes_.copy(); } return attributes_; }
/** * <pre> * The message payload. For JSON requests, the value of this field must be * [base64-encoded](https://tools.ietf.org/html/rfc4648). * </pre> * * <code>optional bytes data = 1;</code> */ public Builder clearData() { data_ = getDefaultInstance().getData(); onChanged(); return this; }
private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetMutableAttributes() { onChanged();; if (attributes_ == null) { attributes_ = com.google.protobuf.MapField.newMapField( AttributesDefaultEntryHolder.defaultEntry); } if (!attributes_.isMutable()) { attributes_ = attributes_.copy(); } return attributes_; }
/** * <code>optional bytes data = 1;</code> * * <pre> * The message payload. For JSON requests, the value of this field must be * base64-encoded. * </pre> */ public Builder clearData() { data_ = getDefaultInstance().getData(); onChanged(); return this; }
/** * * * <pre> * The time at which the message was published, populated by the server when * it receives the `Publish` call. It must not be populated by the * publisher in a `Publish` call. * </pre> * * <code>.google.protobuf.Timestamp publish_time = 4;</code> */ public Builder mergePublishTime(com.google.protobuf.Timestamp value) { if (publishTimeBuilder_ == null) { if (publishTime_ != null) { publishTime_ = com.google.protobuf.Timestamp.newBuilder(publishTime_) .mergeFrom(value) .buildPartial(); } else { publishTime_ = value; } onChanged(); } else { publishTimeBuilder_.mergeFrom(value); } return this; } /**
/** * * * <pre> * The time at which the message was published, populated by the server when * it receives the `Publish` call. It must not be populated by the * publisher in a `Publish` call. * </pre> * * <code>.google.protobuf.Timestamp publish_time = 4;</code> */ public Builder clearPublishTime() { if (publishTimeBuilder_ == null) { publishTime_ = null; onChanged(); } else { publishTime_ = null; publishTimeBuilder_ = null; } return this; } /**
/** * * * <pre> * ID of this message, assigned by the server when the message is published. * Guaranteed to be unique within the topic. This value may be read by a * subscriber that receives a `PubsubMessage` via a `Pull` call or a push * delivery. It must not be populated by the publisher in a `Publish` call. * </pre> * * <code>string message_id = 3;</code> */ public Builder setMessageIdBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); messageId_ = value; onChanged(); return this; }
/** * * * <pre> * The time at which the message was published, populated by the server when * it receives the `Publish` call. It must not be populated by the * publisher in a `Publish` call. * </pre> * * <code>.google.protobuf.Timestamp publish_time = 4;</code> */ public Builder setPublishTime(com.google.protobuf.Timestamp.Builder builderForValue) { if (publishTimeBuilder_ == null) { publishTime_ = builderForValue.build(); onChanged(); } else { publishTimeBuilder_.setMessage(builderForValue.build()); } return this; } /**
/** * * * <pre> * ID of this message, assigned by the server when the message is published. * Guaranteed to be unique within the topic. This value may be read by a * subscriber that receives a `PubsubMessage` via a `Pull` call or a push * delivery. It must not be populated by the publisher in a `Publish` call. * </pre> * * <code>string message_id = 3;</code> */ public Builder clearMessageId() { messageId_ = getDefaultInstance().getMessageId(); onChanged(); return this; } /**
/** * * * <pre> * The time at which the message was published, populated by the server when * it receives the `Publish` call. It must not be populated by the * publisher in a `Publish` call. * </pre> * * <code>.google.protobuf.Timestamp publish_time = 4;</code> */ public com.google.protobuf.Timestamp.Builder getPublishTimeBuilder() { onChanged(); return getPublishTimeFieldBuilder().getBuilder(); } /**
public Builder mergeFrom(com.google.pubsub.v1.PubsubMessage other) { if (other == com.google.pubsub.v1.PubsubMessage.getDefaultInstance()) return this; if (other.getData() != com.google.protobuf.ByteString.EMPTY) { setData(other.getData()); } internalGetMutableAttributes().mergeFrom(other.internalGetAttributes()); if (!other.getMessageId().isEmpty()) { messageId_ = other.messageId_; onChanged(); } if (other.hasPublishTime()) { mergePublishTime(other.getPublishTime()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
/** * * * <pre> * The message data field. If this field is empty, the message must contain * at least one attribute. * </pre> * * <code>bytes data = 1;</code> */ public Builder clearData() { data_ = getDefaultInstance().getData(); onChanged(); return this; }
private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetMutableAttributes() { onChanged(); ; if (attributes_ == null) { attributes_ = com.google.protobuf.MapField.newMapField(AttributesDefaultEntryHolder.defaultEntry); } if (!attributes_.isMutable()) { attributes_ = attributes_.copy(); } return attributes_; }