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