final case class Subscription(name: String = "", topic: String = "", pushConfig: Option[PushConfig] = _root_.scala.None, ackDeadlineSeconds: Int = 0, retainAckedMessages: Boolean = false, messageRetentionDuration: Option[Duration] = _root_.scala.None, labels: Map[String, String] = ..., enableMessageOrdering: Boolean = false, expirationPolicy: Option[ExpirationPolicy] = _root_.scala.None, deadLetterPolicy: Option[DeadLetterPolicy] = _root_.scala.None, unknownFields: UnknownFieldSet = ...) extends GeneratedMessage with Updatable[Subscription] with Product with Serializable

A subscription resource.

name

Required. The name of the subscription. It must have the format "projects/{project}/subscriptions/{subscription}". {subscription} must start with a letter, and contain only letters ([A-Za-z]), numbers ([0-9]), dashes (-), underscores (_), periods (.), tildes (~), plus (+) or percent signs (%). It must be between 3 and 255 characters in length, and it must not start with "goog".

topic

Required. The name of the topic from which this subscription is receiving messages. Format is projects/{project}/topics/{topic}. The value of this field will be _deleted-topic_ if the topic has been deleted.

pushConfig

If push delivery is used with this subscription, this field is used to configure it. An empty pushConfig signifies that the subscriber will pull and ack messages using API methods.

ackDeadlineSeconds

The approximate amount of time (on a best-effort basis) Pub/Sub waits for the subscriber to acknowledge receipt before resending the message. In the interval after the message is delivered and before it is acknowledged, it is considered to be <i>outstanding</i>. During that time period, the message will not be redelivered (on a best-effort basis). For pull subscriptions, this value is used as the initial value for the ack deadline. To override this value for a given message, call ModifyAckDeadline with the corresponding ack_id if using non-streaming pull or send the ack_id in a StreamingModifyAckDeadlineRequest if using streaming pull. The minimum custom deadline you can specify is 10 seconds. The maximum custom deadline you can specify is 600 seconds (10 minutes). If this parameter is 0, a default value of 10 seconds is used. For push delivery, this value is also used to set the request timeout for the call to the push endpoint. If the subscriber never acknowledges the message, the Pub/Sub system will eventually redeliver the message.

retainAckedMessages

Indicates whether to retain acknowledged messages. If true, then messages are not expunged from the subscription's backlog, even if they are acknowledged, until they fall out of the message_retention_duration window. This must be true if you would like to <a href="https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time"> Seek to a timestamp</a>.

messageRetentionDuration

How long to retain unacknowledged messages in the subscription's backlog, from the moment a message is published. If retain_acked_messages is true, then this also configures the retention of acknowledged messages, and thus configures how far back in time a Seek can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10 minutes.

labels

See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and managing labels</a>.

enableMessageOrdering

If true, messages published with the same ordering_key in PubsubMessage will be delivered to the subscribers in the order in which they are received by the Pub/Sub system. Otherwise, they may be delivered in any order. <b>EXPERIMENTAL:</b> 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.

expirationPolicy

A policy that specifies the conditions for this subscription's expiration. A subscription is considered active as long as any connected subscriber is successfully consuming messages from the subscription or is issuing operations on the subscription. If expiration_policy is not set, a *default policy* with ttl of 31 days will be used. The minimum allowed value for expiration_policy.ttl is 1 day.

deadLetterPolicy

A policy that specifies the conditions for dead lettering messages in this subscription. If dead_letter_policy is not set, dead lettering is disabled. The Cloud Pub/Sub service account associated with this subscriptions's parent project (i.e., service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have permission to Acknowledge() messages on this subscription. <b>EXPERIMENTAL:</b> 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.

Annotations
@SerialVersionUID()
Source
Subscription.scala
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Subscription
  2. Product
  3. Equals
  4. Updatable
  5. GeneratedMessage
  6. Serializable
  7. Serializable
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Subscription(name: String = "", topic: String = "", pushConfig: Option[PushConfig] = _root_.scala.None, ackDeadlineSeconds: Int = 0, retainAckedMessages: Boolean = false, messageRetentionDuration: Option[Duration] = _root_.scala.None, labels: Map[String, String] = ..., enableMessageOrdering: Boolean = false, expirationPolicy: Option[ExpirationPolicy] = _root_.scala.None, deadLetterPolicy: Option[DeadLetterPolicy] = _root_.scala.None, unknownFields: UnknownFieldSet = ...)

    name

    Required. The name of the subscription. It must have the format "projects/{project}/subscriptions/{subscription}". {subscription} must start with a letter, and contain only letters ([A-Za-z]), numbers ([0-9]), dashes (-), underscores (_), periods (.), tildes (~), plus (+) or percent signs (%). It must be between 3 and 255 characters in length, and it must not start with "goog".

    topic

    Required. The name of the topic from which this subscription is receiving messages. Format is projects/{project}/topics/{topic}. The value of this field will be _deleted-topic_ if the topic has been deleted.

    pushConfig

    If push delivery is used with this subscription, this field is used to configure it. An empty pushConfig signifies that the subscriber will pull and ack messages using API methods.

    ackDeadlineSeconds

    The approximate amount of time (on a best-effort basis) Pub/Sub waits for the subscriber to acknowledge receipt before resending the message. In the interval after the message is delivered and before it is acknowledged, it is considered to be <i>outstanding</i>. During that time period, the message will not be redelivered (on a best-effort basis). For pull subscriptions, this value is used as the initial value for the ack deadline. To override this value for a given message, call ModifyAckDeadline with the corresponding ack_id if using non-streaming pull or send the ack_id in a StreamingModifyAckDeadlineRequest if using streaming pull. The minimum custom deadline you can specify is 10 seconds. The maximum custom deadline you can specify is 600 seconds (10 minutes). If this parameter is 0, a default value of 10 seconds is used. For push delivery, this value is also used to set the request timeout for the call to the push endpoint. If the subscriber never acknowledges the message, the Pub/Sub system will eventually redeliver the message.

    retainAckedMessages

    Indicates whether to retain acknowledged messages. If true, then messages are not expunged from the subscription's backlog, even if they are acknowledged, until they fall out of the message_retention_duration window. This must be true if you would like to <a href="https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time"> Seek to a timestamp</a>.

    messageRetentionDuration

    How long to retain unacknowledged messages in the subscription's backlog, from the moment a message is published. If retain_acked_messages is true, then this also configures the retention of acknowledged messages, and thus configures how far back in time a Seek can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10 minutes.

    labels

    See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and managing labels</a>.

    enableMessageOrdering

    If true, messages published with the same ordering_key in PubsubMessage will be delivered to the subscribers in the order in which they are received by the Pub/Sub system. Otherwise, they may be delivered in any order. <b>EXPERIMENTAL:</b> 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.

    expirationPolicy

    A policy that specifies the conditions for this subscription's expiration. A subscription is considered active as long as any connected subscriber is successfully consuming messages from the subscription or is issuing operations on the subscription. If expiration_policy is not set, a *default policy* with ttl of 31 days will be used. The minimum allowed value for expiration_policy.ttl is 1 day.

    deadLetterPolicy

    A policy that specifies the conditions for dead lettering messages in this subscription. If dead_letter_policy is not set, dead lettering is disabled. The Cloud Pub/Sub service account associated with this subscriptions's parent project (i.e., service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have permission to Acknowledge() messages on this subscription. <b>EXPERIMENTAL:</b> 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.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val ackDeadlineSeconds: Int
  5. def addAllLabels(__vs: Iterable[(String, String)]): Subscription
  6. def addLabels(__vs: (String, String)*): Subscription
  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def clearDeadLetterPolicy: Subscription
  9. def clearExpirationPolicy: Subscription
  10. def clearLabels: Subscription
  11. def clearMessageRetentionDuration: Subscription
  12. def clearPushConfig: Subscription
  13. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  14. def companion: Subscription.type
    Definition Classes
    Subscription → GeneratedMessage
  15. val deadLetterPolicy: Option[DeadLetterPolicy]
  16. def discardUnknownFields: Subscription
  17. val enableMessageOrdering: Boolean
  18. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. val expirationPolicy: Option[ExpirationPolicy]
  20. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  21. def getDeadLetterPolicy: DeadLetterPolicy
  22. def getExpirationPolicy: ExpirationPolicy
  23. def getField(__field: FieldDescriptor): PValue
    Definition Classes
    Subscription → GeneratedMessage
  24. def getFieldByNumber(__fieldNumber: Int): Any
    Definition Classes
    Subscription → GeneratedMessage
  25. def getMessageRetentionDuration: Duration
  26. def getPushConfig: PushConfig
  27. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  28. val labels: Map[String, String]
  29. val messageRetentionDuration: Option[Duration]
  30. val name: String
  31. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  32. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  33. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  34. val pushConfig: Option[PushConfig]
  35. val retainAckedMessages: Boolean
  36. def serializedSize: Int
    Definition Classes
    Subscription → GeneratedMessage
  37. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  38. final def toByteArray: Array[Byte]
    Definition Classes
    GeneratedMessage
  39. final def toByteString: ByteString
    Definition Classes
    GeneratedMessage
  40. final def toPMessage: PMessage
    Definition Classes
    GeneratedMessage
  41. def toProtoString: String
    Definition Classes
    Subscription → GeneratedMessage
  42. val topic: String
  43. val unknownFields: UnknownFieldSet
  44. def update(ms: (Lens[Subscription, Subscription]) ⇒ Mutation[Subscription]*): Subscription
    Definition Classes
    Updatable
  45. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  46. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  47. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  48. def withAckDeadlineSeconds(__v: Int): Subscription
  49. def withDeadLetterPolicy(__v: DeadLetterPolicy): Subscription
  50. def withEnableMessageOrdering(__v: Boolean): Subscription
  51. def withExpirationPolicy(__v: ExpirationPolicy): Subscription
  52. def withLabels(__v: Map[String, String]): Subscription
  53. def withMessageRetentionDuration(__v: Duration): Subscription
  54. def withName(__v: String): Subscription
  55. def withPushConfig(__v: PushConfig): Subscription
  56. def withRetainAckedMessages(__v: Boolean): Subscription
  57. def withTopic(__v: String): Subscription
  58. def withUnknownFields(__v: UnknownFieldSet): Subscription
  59. final def writeDelimitedTo(output: OutputStream): Unit
    Definition Classes
    GeneratedMessage
  60. def writeTo(_output__: CodedOutputStream): Unit
    Definition Classes
    Subscription → GeneratedMessage
  61. final def writeTo(output: OutputStream): Unit
    Definition Classes
    GeneratedMessage

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated @deprecated
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from Product

Inherited from Equals

Inherited from Updatable[Subscription]

Inherited from GeneratedMessage

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped