@Override public Iterable<LogEntry> extractResources(ListLogEntriesResponse payload) { return payload.getEntriesList() != null ? payload.getEntriesList() : ImmutableList.<LogEntry>of(); } };
@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; }
@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; }
@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); } });
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(); } };
@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); } });