@Override public String extractNextToken(ListTopicsResponse payload) { return payload.getNextPageToken(); }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.pubsub.v1.ListTopicsResponse)) { return super.equals(obj); } com.google.pubsub.v1.ListTopicsResponse other = (com.google.pubsub.v1.ListTopicsResponse) obj; boolean result = true; result = result && getTopicsList().equals(other.getTopicsList()); result = result && getNextPageToken().equals(other.getNextPageToken()); result = result && unknownFields.equals(other.unknownFields); return result; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (getTopicsCount() > 0) { hash = (37 * hash) + TOPICS_FIELD_NUMBER; hash = (53 * hash) + getTopicsList().hashCode(); } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * * * <pre> * If not empty, indicates that there may be more topics that match the * request; this value should be passed in a new `ListTopicsRequest`. * </pre> * * <code>string next_page_token = 2;</code> */ public Builder clearNextPageToken() { nextPageToken_ = getDefaultInstance().getNextPageToken(); onChanged(); return this; } /**
if (!other.getNextPageToken().isEmpty()) { nextPageToken_ = other.nextPageToken_; onChanged();
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.pubsub.v1.ListTopicsResponse)) { return super.equals(obj); } com.google.pubsub.v1.ListTopicsResponse other = (com.google.pubsub.v1.ListTopicsResponse) obj; boolean result = true; result = result && getTopicsList().equals(other.getTopicsList()); result = result && getNextPageToken().equals(other.getNextPageToken()); result = result && unknownFields.equals(other.unknownFields); return result; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.pubsub.v1.ListTopicsResponse)) { return super.equals(obj); } com.google.pubsub.v1.ListTopicsResponse other = (com.google.pubsub.v1.ListTopicsResponse) obj; boolean result = true; result = result && getTopicsList() .equals(other.getTopicsList()); result = result && getNextPageToken() .equals(other.getNextPageToken()); return result; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (getTopicsCount() > 0) { hash = (37 * hash) + TOPICS_FIELD_NUMBER; hash = (53 * hash) + getTopicsList().hashCode(); } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (getTopicsCount() > 0) { hash = (37 * hash) + TOPICS_FIELD_NUMBER; hash = (53 * hash) + getTopicsList().hashCode(); } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
/** * <pre> * If not empty, indicates that there may be more topics that match the * request; this value should be passed in a new `ListTopicsRequest`. * </pre> * * <code>optional string next_page_token = 2;</code> */ public Builder clearNextPageToken() { nextPageToken_ = getDefaultInstance().getNextPageToken(); onChanged(); return this; } /**
/** * <code>optional string next_page_token = 2;</code> * * <pre> * If not empty, indicates that there may be more topics that match the * request; this value should be passed in a new `ListTopicsRequest`. * </pre> */ public Builder clearNextPageToken() { nextPageToken_ = getDefaultInstance().getNextPageToken(); onChanged(); return this; } /**
/** * * * <pre> * If not empty, indicates that there may be more topics that match the * request; this value should be passed in a new `ListTopicsRequest`. * </pre> * * <code>string next_page_token = 2;</code> */ public Builder clearNextPageToken() { nextPageToken_ = getDefaultInstance().getNextPageToken(); onChanged(); return this; } /**
if (!other.getNextPageToken().isEmpty()) { nextPageToken_ = other.nextPageToken_; onChanged();
if (!other.getNextPageToken().isEmpty()) { nextPageToken_ = other.nextPageToken_; onChanged();
if (!other.getNextPageToken().isEmpty()) { nextPageToken_ = other.nextPageToken_; onChanged();
@Override public List<TopicPath> listTopics(ProjectPath project) throws IOException { ListTopicsRequest.Builder request = ListTopicsRequest.newBuilder().setProject(project.getPath()).setPageSize(LIST_BATCH_SIZE); ListTopicsResponse response = publisherStub().listTopics(request.build()); if (response.getTopicsCount() == 0) { return ImmutableList.of(); } List<TopicPath> topics = new ArrayList<>(response.getTopicsCount()); while (true) { for (Topic topic : response.getTopicsList()) { topics.add(topicPathFromPath(topic.getName())); } if (response.getNextPageToken().isEmpty()) { break; } request.setPageToken(response.getNextPageToken()); response = publisherStub().listTopics(request.build()); } return topics; }