public final class PubSubSubscriptionUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static com.google.pubsub.v1.ProjectSubscriptionName |
toProjectSubscriptionName(java.lang.String subscription,
java.lang.String projectId)
Create a
ProjectSubscriptionName based on a subscription name within a project or the
fully-qualified subscription name. |
public static com.google.pubsub.v1.ProjectSubscriptionName toProjectSubscriptionName(@Nonnull java.lang.String subscription, @Nullable java.lang.String projectId)
ProjectSubscriptionName
based on a subscription name within a project or the
fully-qualified subscription name. If the specified subscription is in the
projects/<project_name>/subscriptions/<subscription_name>
format, then the projectId
is
ignored}subscription
- the subscription name in the project or the fully-qualified project nameprojectId
- the project ID to use if the subscription is not a fully-qualified name