static TopicDestination fromPb(String destinationPb) { Matcher matcher = PATTERN.matcher(destinationPb); if (!matcher.matches()) { throw new IllegalArgumentException(destinationPb + " is not a valid sink destination"); } return new TopicDestination(matcher.group(1), matcher.group(2)); } }
static TopicDestination fromPb(String destinationPb) { Matcher matcher = PATTERN.matcher(destinationPb); if (!matcher.matches()) { throw new IllegalArgumentException(destinationPb + " is not a valid sink destination"); } return new TopicDestination(matcher.group(1), matcher.group(2)); } }
/** * Creates a {@code DatasetDestination} object given the name of the topic to be used as sink * destination. Topic is assumed to reside in the default project. */ public static TopicDestination of(String topic) { return new TopicDestination(null, topic); }
/** * Creates a {@code TopicDestination} object given the name of the project and topic to be * used as sink destination. */ public static TopicDestination of(String project, String topic) { return new TopicDestination(project, topic); }
/** * Creates a {@code DatasetDestination} object given the name of the topic to be used as sink * destination. Topic is assumed to reside in the default project. */ public static TopicDestination of(String topic) { return new TopicDestination(null, topic); }
/** * Creates a {@code TopicDestination} object given the name of the project and topic to be * used as sink destination. */ public static TopicDestination of(String project, String topic) { return new TopicDestination(project, topic); }