public Builder mergeFrom(com.google.pubsub.v1.ListTopicsRequest other) { if (other == com.google.pubsub.v1.ListTopicsRequest.getDefaultInstance()) return this; if (!other.getProject().isEmpty()) { project_ = other.project_; onChanged(); } if (other.getPageSize() != 0) { setPageSize(other.getPageSize()); } if (!other.getPageToken().isEmpty()) { pageToken_ = other.pageToken_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
@java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.pubsub.v1.ListTopicsRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.pubsub.v1.ListTopicsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; }
/** * <code>optional string page_token = 3;</code> * * <pre> * The value returned by the last `ListTopicsResponse`; indicates that this is * a continuation of a prior `ListTopics` call, and that the system should * return the next page of data. * </pre> */ public Builder setPageTokenBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); pageToken_ = value; onChanged(); return this; } public final Builder setUnknownFields(
/** * * * <pre> * The value returned by the last `ListTopicsResponse`; indicates that this is * a continuation of a prior `ListTopics` call, and that the system should * return the next page of data. * </pre> * * <code>string page_token = 3;</code> */ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); pageToken_ = value; onChanged(); return this; }
/** * <pre> * The value returned by the last `ListTopicsResponse`; indicates that this is * a continuation of a prior `ListTopics` call, and that the system should * return the next page of data. * </pre> * * <code>optional string page_token = 3;</code> */ public Builder setPageTokenBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); pageToken_ = value; onChanged(); return this; } public final Builder setUnknownFields(
@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; }
/** * <code>optional string page_token = 3;</code> * * <pre> * The value returned by the last `ListTopicsResponse`; indicates that this is * a continuation of a prior `ListTopics` call, and that the system should * return the next page of data. * </pre> */ public Builder setPageToken( java.lang.String value) { if (value == null) { throw new NullPointerException(); } pageToken_ = value; onChanged(); return this; } /**
/** * * * <pre> * The name of the project in which to list topics. * Format is `projects/{project-id}`. * </pre> * * <code>string project = 1;</code> */ public Builder setProject(java.lang.String value) { if (value == null) { throw new NullPointerException(); } project_ = value; onChanged(); return this; } /**
/** * * * <pre> * The name of the project in which to list topics. * Format is `projects/{project-id}`. * </pre> * * <code>string project = 1;</code> */ public Builder setProjectBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); project_ = value; onChanged(); return this; }
/** * * * <pre> * The value returned by the last `ListTopicsResponse`; indicates that this is * a continuation of a prior `ListTopics` call, and that the system should * return the next page of data. * </pre> * * <code>string page_token = 3;</code> */ public Builder setPageToken(java.lang.String value) { if (value == null) { throw new NullPointerException(); } pageToken_ = value; onChanged(); return this; } /**
/** * <pre> * The value returned by the last `ListTopicsResponse`; indicates that this is * a continuation of a prior `ListTopics` call, and that the system should * return the next page of data. * </pre> * * <code>optional string page_token = 3;</code> */ public Builder setPageToken( java.lang.String value) { if (value == null) { throw new NullPointerException(); } pageToken_ = value; onChanged(); return this; } /**
/** * <code>optional string project = 1;</code> * * <pre> * The name of the cloud project that topics belong to. * </pre> */ public Builder setProject( java.lang.String value) { if (value == null) { throw new NullPointerException(); } project_ = value; onChanged(); return this; } /**
/** * <pre> * The name of the cloud project that topics belong to. * </pre> * * <code>optional string project = 1;</code> */ public Builder setProject( java.lang.String value) { if (value == null) { throw new NullPointerException(); } project_ = value; onChanged(); return this; } /**
/** * <pre> * The name of the cloud project that topics belong to. * </pre> * * <code>optional string project = 1;</code> */ public Builder setProjectBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); project_ = value; onChanged(); return this; }
public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.pubsub.v1.ListTopicsRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.pubsub.v1.ListTopicsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; }
@java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.pubsub.v1.ListTopicsRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.pubsub.v1.ListTopicsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; }
/** * <code>optional string project = 1;</code> * * <pre> * The name of the cloud project that topics belong to. * </pre> */ public Builder setProjectBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); project_ = value; onChanged(); return this; }
public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.pubsub.v1.ListTopicsRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.pubsub.v1.ListTopicsRequest) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; }
/** * * * <pre> * The name of the project in which to list topics. * Format is `projects/{project-id}`. * </pre> * * <code>string project = 1;</code> */ public Builder clearProject() { project_ = getDefaultInstance().getProject(); onChanged(); return this; } /**
public Builder mergeFrom(com.google.pubsub.v1.ListTopicsRequest other) { if (other == com.google.pubsub.v1.ListTopicsRequest.getDefaultInstance()) return this; if (!other.getProject().isEmpty()) { project_ = other.project_; onChanged(); } if (other.getPageSize() != 0) { setPageSize(other.getPageSize()); } if (!other.getPageToken().isEmpty()) { pageToken_ = other.pageToken_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }