// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/pubsub/v1/pubsub.proto

package com.google.pubsub.v1;

public interface PubsubMessageOrBuilder
    extends
    // @@protoc_insertion_point(interface_extends:google.pubsub.v1.PubsubMessage)
    com.google.protobuf.MessageOrBuilder {

  /**
   *
   *
   * <pre>
   * The message data field. If this field is empty, the message must contain
   * at least one attribute.
   * </pre>
   *
   * <code>bytes data = 1;</code>
   */
  com.google.protobuf.ByteString getData();

  /**
   *
   *
   * <pre>
   * Optional attributes for this message.
   * </pre>
   *
   * <code>map&lt;string, string&gt; attributes = 2;</code>
   */
  int getAttributesCount();
  /**
   *
   *
   * <pre>
   * Optional attributes for this message.
   * </pre>
   *
   * <code>map&lt;string, string&gt; attributes = 2;</code>
   */
  boolean containsAttributes(java.lang.String key);
  /** Use {@link #getAttributesMap()} instead. */
  @java.lang.Deprecated
  java.util.Map<java.lang.String, java.lang.String> getAttributes();
  /**
   *
   *
   * <pre>
   * Optional attributes for this message.
   * </pre>
   *
   * <code>map&lt;string, string&gt; attributes = 2;</code>
   */
  java.util.Map<java.lang.String, java.lang.String> getAttributesMap();
  /**
   *
   *
   * <pre>
   * Optional attributes for this message.
   * </pre>
   *
   * <code>map&lt;string, string&gt; attributes = 2;</code>
   */
  java.lang.String getAttributesOrDefault(java.lang.String key, java.lang.String defaultValue);
  /**
   *
   *
   * <pre>
   * Optional attributes for this message.
   * </pre>
   *
   * <code>map&lt;string, string&gt; attributes = 2;</code>
   */
  java.lang.String getAttributesOrThrow(java.lang.String key);

  /**
   *
   *
   * <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>
   */
  java.lang.String getMessageId();
  /**
   *
   *
   * <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>
   */
  com.google.protobuf.ByteString getMessageIdBytes();

  /**
   *
   *
   * <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>
   */
  boolean hasPublishTime();
  /**
   *
   *
   * <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>
   */
  com.google.protobuf.Timestamp getPublishTime();
  /**
   *
   *
   * <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>
   */
  com.google.protobuf.TimestampOrBuilder getPublishTimeOrBuilder();

  /**
   *
   *
   * <pre>
   * Identifies related messages for which publish order should be respected.
   * If a `Subscription` has `enable_message_ordering` set to `true`, messages
   * published with the same `ordering_key` value will be delivered to
   * subscribers in the order in which they are received by the Pub/Sub system.
   * &lt;b&gt;EXPERIMENTAL:&lt;/b&gt; This feature is part of a closed alpha release. This
   * API might be changed in backward-incompatible ways and is not recommended
   * for production use. It is not subject to any SLA or deprecation policy.
   * </pre>
   *
   * <code>string ordering_key = 5;</code>
   */
  java.lang.String getOrderingKey();
  /**
   *
   *
   * <pre>
   * Identifies related messages for which publish order should be respected.
   * If a `Subscription` has `enable_message_ordering` set to `true`, messages
   * published with the same `ordering_key` value will be delivered to
   * subscribers in the order in which they are received by the Pub/Sub system.
   * &lt;b&gt;EXPERIMENTAL:&lt;/b&gt; This feature is part of a closed alpha release. This
   * API might be changed in backward-incompatible ways and is not recommended
   * for production use. It is not subject to any SLA or deprecation policy.
   * </pre>
   *
   * <code>string ordering_key = 5;</code>
   */
  com.google.protobuf.ByteString getOrderingKeyBytes();
}
