Class PubsubIO.PubsubSubscription

  • All Implemented Interfaces:
    java.io.Serializable
    Enclosing class:
    PubsubIO

    public static class PubsubIO.PubsubSubscription
    extends java.lang.Object
    implements java.io.Serializable
    Class representing a Cloud Pub/Sub Subscription.
    See Also:
    Serialized Form
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      java.lang.String asPath()
      Returns the string representation of this subscription as a path used in the Cloud Pub/Sub API.
      java.lang.String asV1Beta1Path()
      Deprecated.
      the v1beta1 API for Cloud Pub/Sub is deprecated.
      java.lang.String asV1Beta2Path()
      Deprecated.
      the v1beta2 API for Cloud Pub/Sub is deprecated.
      static PubsubIO.PubsubSubscription fromPath​(java.lang.String path)
      Creates a class representing a Pub/Sub subscription from the specified subscription path.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • fromPath

        public static PubsubIO.PubsubSubscription fromPath​(java.lang.String path)
        Creates a class representing a Pub/Sub subscription from the specified subscription path.

        Cloud Pub/Sub subscription names should be of the form projects/<project>/subscriptions/<subscription>, where <project> is the name of the project the subscription belongs to. The <subscription> component must comply with the following requirements:

        • Can only contain lowercase letters, numbers, dashes ('-'), underscores ('_') and periods ('.').
        • Must be between 3 and 255 characters.
        • Must begin with a letter.
        • Must end with a letter or a number.
        • Cannot begin with 'goog' prefix.
      • asV1Beta1Path

        @Deprecated
        public java.lang.String asV1Beta1Path()
        Deprecated.
        the v1beta1 API for Cloud Pub/Sub is deprecated.
        Returns the string representation of this subscription as a path used in the Cloud Pub/Sub v1beta1 API.
      • asV1Beta2Path

        @Deprecated
        public java.lang.String asV1Beta2Path()
        Deprecated.
        the v1beta2 API for Cloud Pub/Sub is deprecated.
        Returns the string representation of this subscription as a path used in the Cloud Pub/Sub v1beta2 API.
      • asPath

        public java.lang.String asPath()
        Returns the string representation of this subscription as a path used in the Cloud Pub/Sub API.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object