/** * * * <pre> * Optional. If present, then retrieve the next batch of results from the * preceding call to this method. `page_token` must be the value of * `next_page_token` from the previous response. The values of other method * parameters should be identical to those in the previous call. * </pre> * * <code>string page_token = 5;</code> */ public Builder clearPageToken() { pageToken_ = getDefaultInstance().getPageToken(); onChanged(); return this; } /**
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.logging.v2.ListLogEntriesRequest)) { return super.equals(obj); } com.google.logging.v2.ListLogEntriesRequest other = (com.google.logging.v2.ListLogEntriesRequest) obj; boolean result = true; result = result && getProjectIdsList().equals(other.getProjectIdsList()); result = result && getResourceNamesList().equals(other.getResourceNamesList()); result = result && getFilter().equals(other.getFilter()); result = result && getOrderBy().equals(other.getOrderBy()); result = result && (getPageSize() == other.getPageSize()); result = result && getPageToken().equals(other.getPageToken()); 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 (getProjectIdsCount() > 0) { hash = (37 * hash) + PROJECT_IDS_FIELD_NUMBER; hash = (53 * hash) + getProjectIdsList().hashCode(); } if (getResourceNamesCount() > 0) { hash = (37 * hash) + RESOURCE_NAMES_FIELD_NUMBER; hash = (53 * hash) + getResourceNamesList().hashCode(); } hash = (37 * hash) + FILTER_FIELD_NUMBER; hash = (53 * hash) + getFilter().hashCode(); hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; hash = (53 * hash) + getOrderBy().hashCode(); hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; hash = (53 * hash) + getPageSize(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
setPageSize(other.getPageSize()); if (!other.getPageToken().isEmpty()) { pageToken_ = other.pageToken_; onChanged();
@Test public void testEntryListOption() { EntryListOption listOption = EntryListOption.pageToken(PAGE_TOKEN); assertEquals(PAGE_TOKEN, listOption.getValue()); assertEquals(ListOption.OptionType.PAGE_TOKEN, listOption.getOptionType()); // page size listOption = EntryListOption.pageSize(PAGE_SIZE); assertEquals(PAGE_SIZE, listOption.getValue()); assertEquals(ListOption.OptionType.PAGE_SIZE, listOption.getOptionType()); // filter listOption = EntryListOption.filter(FILTER); assertEquals(FILTER, listOption.getValue()); assertEquals(EntryListOption.OptionType.FILTER, listOption.getOptionType()); // sort order listOption = EntryListOption.sortOrder(SortingField.TIMESTAMP, SortingOrder.ASCENDING); assertEquals("timestamp asc", listOption.getValue()); assertEquals(EntryListOption.OptionType.ORDER_BY, listOption.getOptionType()); listOption = EntryListOption.sortOrder(SortingField.TIMESTAMP, SortingOrder.DESCENDING); assertEquals("timestamp desc", listOption.getValue()); assertEquals(EntryListOption.OptionType.ORDER_BY, listOption.getOptionType()); ListLogEntriesRequest request = LoggingImpl.listLogEntriesRequest( "some-project-id", LoggingImpl.optionMap( EntryListOption.pageToken(PAGE_TOKEN), EntryListOption.pageSize(PAGE_SIZE))); assertThat(request.getPageToken()).isEqualTo(PAGE_TOKEN); assertThat(request.getPageSize()).isEqualTo(PAGE_SIZE); }