@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (getEntriesCount() > 0) { hash = (37 * hash) + ENTRIES_FIELD_NUMBER; hash = (53 * hash) + getEntriesList().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 there might be more results than those appearing in this response, then * `nextPageToken` is included. To get the next set of results, call this * method again using the value of `nextPageToken` as `pageToken`. * If a value for `next_page_token` appears and the `entries` field is empty, * it means that the search found no log entries so far but it did not have * time to search all the possible log entries. Retry the method with this * value for `page_token` to continue the search. Alternatively, consider * speeding up the search by changing your filter to specify a single log name * or resource type, or to narrow the time range of the search. * </pre> * * <code>string next_page_token = 2;</code> */ public Builder clearNextPageToken() { nextPageToken_ = getDefaultInstance().getNextPageToken(); onChanged(); return this; } /**
@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.logging.v2.ListLogEntriesResponse)) { return super.equals(obj); } com.google.logging.v2.ListLogEntriesResponse other = (com.google.logging.v2.ListLogEntriesResponse) obj; boolean result = true; result = result && getEntriesList().equals(other.getEntriesList()); result = result && getNextPageToken().equals(other.getNextPageToken()); result = result && unknownFields.equals(other.unknownFields); return result; }
List<LogEntry> entries = Arrays.asList(entriesElement); ListLogEntriesResponse expectedResponse = ListLogEntriesResponse.newBuilder() .setNextPageToken(nextPageToken) .addAllEntries(entries) Assert.assertEquals(expectedResponse.getEntriesList().get(0), resources.get(0));
@Override public Iterable<LogEntry> extractResources(ListLogEntriesResponse payload) { return payload.getEntriesList() != null ? payload.getEntriesList() : ImmutableList.<LogEntry>of(); } };
@java.lang.Override public com.google.logging.v2.ListLogEntriesResponse getDefaultInstanceForType() { return com.google.logging.v2.ListLogEntriesResponse.getDefaultInstance(); }
@Override public String extractNextToken(ListLogEntriesResponse payload) { return payload.getNextPageToken(); }
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < entries_.size(); i++) { output.writeMessage(1, entries_.get(i)); } if (!getNextPageTokenBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } unknownFields.writeTo(output); }
@java.lang.Override public com.google.logging.v2.ListLogEntriesResponse buildPartial() { com.google.logging.v2.ListLogEntriesResponse result = new com.google.logging.v2.ListLogEntriesResponse(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (entriesBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001)) { entries_ = java.util.Collections.unmodifiableList(entries_); bitField0_ = (bitField0_ & ~0x00000001); } result.entries_ = entries_; } else { result.entries_ = entriesBuilder_.build(); } result.nextPageToken_ = nextPageToken_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
@java.lang.Override public com.google.logging.v2.ListLogEntriesResponse build() { com.google.logging.v2.ListLogEntriesResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
@Override public AsyncPage<LogEntry> apply(ListLogEntriesResponse listLogEntrysResponse) { List<LogEntry> entries = listLogEntrysResponse.getEntriesList() == null ? ImmutableList.<LogEntry>of() : Lists.transform( listLogEntrysResponse.getEntriesList(), LogEntry.FROM_PB_FUNCTION); String cursor = listLogEntrysResponse.getNextPageToken().equals("") ? null : listLogEntrysResponse.getNextPageToken(); return new AsyncPageImpl<>( new LogEntryPageFetcher(serviceOptions, cursor, options), cursor, entries); } });
@Override public Iterable<LogEntry> extractResources(ListLogEntriesResponse payload) { return payload.getEntriesList() != null ? payload.getEntriesList() : ImmutableList.<LogEntry>of(); } };
.setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( com.google.logging.v2.ListLogEntriesResponse.getDefaultInstance())) .setSchemaDescriptor( new LoggingServiceV2MethodDescriptorSupplier("ListLogEntries"))
@Override public String extractNextToken(ListLogEntriesResponse payload) { return payload.getNextPageToken(); }
@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; for (int i = 0; i < entries_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, entries_.get(i)); } if (!getNextPageTokenBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
@Override public AsyncPage<LogEntry> apply(ListLogEntriesResponse listLogEntrysResponse) { List<LogEntry> entries = listLogEntrysResponse.getEntriesList() == null ? ImmutableList.<LogEntry>of() : Lists.transform( listLogEntrysResponse.getEntriesList(), LogEntry.FROM_PB_FUNCTION); String cursor = listLogEntrysResponse.getNextPageToken().equals("") ? null : listLogEntrysResponse.getNextPageToken(); return new AsyncPageImpl<>( new LogEntryPageFetcher(serviceOptions, cursor, options), cursor, entries); } });
@Override public void listLogEntries( ListLogEntriesRequest request, StreamObserver<ListLogEntriesResponse> responseObserver) { List<LogEntry> entries = new ArrayList<>(); for (ByteString proj : request.getProjectIdsList().asByteStringList()) { String prefix = "projects/" + proj.toStringUtf8() + "/"; for (Map.Entry<String, List<LogEntry>> entry : logs.entrySet()) { if (entry.getKey().startsWith(prefix)) { entries.addAll(entry.getValue()); } } } responseObserver.onNext(ListLogEntriesResponse.newBuilder().addAllEntries(entries).build()); responseObserver.onCompleted(); }
public Builder mergeFrom(com.google.logging.v2.ListLogEntriesResponse other) { if (other == com.google.logging.v2.ListLogEntriesResponse.getDefaultInstance()) return this; if (entriesBuilder_ == null) { if (!other.entries_.isEmpty()) { if (!other.getNextPageToken().isEmpty()) { nextPageToken_ = other.nextPageToken_; onChanged();
.setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( com.google.logging.v2.ListLogEntriesResponse.getDefaultInstance())) .setSchemaDescriptor( new LoggingServiceV2MethodDescriptorSupplier("ListLogEntries"))