Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ public final UnaryCallable<DeleteProfileRequest, Empty> deleteProfileCallable()
* .setParent(parent.toString())
* .setRequestMetadata(requestMetadata)
* .build();
* for (HistogramQueryResult element : profileServiceClient.searchProfiles(request).iterateAll()) {
* for (SummarizedProfile element : profileServiceClient.searchProfiles(request).iterateAll()) {
* // doThingsWith(element);
* }
* }
Expand Down Expand Up @@ -721,7 +721,7 @@ public final SearchProfilesPagedResponse searchProfiles(SearchProfilesRequest re
* .build();
* ApiFuture&lt;SearchProfilesPagedResponse&gt; future = profileServiceClient.searchProfilesPagedCallable().futureCall(request);
* // Do something
* for (HistogramQueryResult element : future.get().iterateAll()) {
* for (SummarizedProfile element : future.get().iterateAll()) {
* // doThingsWith(element);
* }
* }
Expand Down Expand Up @@ -754,7 +754,7 @@ public final SearchProfilesPagedResponse searchProfiles(SearchProfilesRequest re
* .build();
* while (true) {
* SearchProfilesResponse response = profileServiceClient.searchProfilesCallable().call(request);
* for (HistogramQueryResult element : response.getHistogramQueryResultsList()) {
* for (SummarizedProfile element : response.getSummarizedProfilesList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
Expand Down Expand Up @@ -886,12 +886,12 @@ public static class SearchProfilesPagedResponse
extends AbstractPagedListResponse<
SearchProfilesRequest,
SearchProfilesResponse,
HistogramQueryResult,
SummarizedProfile,
SearchProfilesPage,
SearchProfilesFixedSizeCollection> {

public static ApiFuture<SearchProfilesPagedResponse> createAsync(
PageContext<SearchProfilesRequest, SearchProfilesResponse, HistogramQueryResult> context,
PageContext<SearchProfilesRequest, SearchProfilesResponse, SummarizedProfile> context,
ApiFuture<SearchProfilesResponse> futureResponse) {
ApiFuture<SearchProfilesPage> futurePage =
SearchProfilesPage.createEmptyPage().createPageAsync(context, futureResponse);
Expand All @@ -913,10 +913,10 @@ private SearchProfilesPagedResponse(SearchProfilesPage page) {

public static class SearchProfilesPage
extends AbstractPage<
SearchProfilesRequest, SearchProfilesResponse, HistogramQueryResult, SearchProfilesPage> {
SearchProfilesRequest, SearchProfilesResponse, SummarizedProfile, SearchProfilesPage> {

private SearchProfilesPage(
PageContext<SearchProfilesRequest, SearchProfilesResponse, HistogramQueryResult> context,
PageContext<SearchProfilesRequest, SearchProfilesResponse, SummarizedProfile> context,
SearchProfilesResponse response) {
super(context, response);
}
Expand All @@ -927,14 +927,14 @@ private static SearchProfilesPage createEmptyPage() {

@Override
protected SearchProfilesPage createPage(
PageContext<SearchProfilesRequest, SearchProfilesResponse, HistogramQueryResult> context,
PageContext<SearchProfilesRequest, SearchProfilesResponse, SummarizedProfile> context,
SearchProfilesResponse response) {
return new SearchProfilesPage(context, response);
}

@Override
public ApiFuture<SearchProfilesPage> createPageAsync(
PageContext<SearchProfilesRequest, SearchProfilesResponse, HistogramQueryResult> context,
PageContext<SearchProfilesRequest, SearchProfilesResponse, SummarizedProfile> context,
ApiFuture<SearchProfilesResponse> futureResponse) {
return super.createPageAsync(context, futureResponse);
}
Expand All @@ -944,7 +944,7 @@ public static class SearchProfilesFixedSizeCollection
extends AbstractFixedSizeCollection<
SearchProfilesRequest,
SearchProfilesResponse,
HistogramQueryResult,
SummarizedProfile,
SearchProfilesPage,
SearchProfilesFixedSizeCollection> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@
import com.google.cloud.talent.v4beta1.CreateProfileRequest;
import com.google.cloud.talent.v4beta1.DeleteProfileRequest;
import com.google.cloud.talent.v4beta1.GetProfileRequest;
import com.google.cloud.talent.v4beta1.HistogramQueryResult;
import com.google.cloud.talent.v4beta1.ListProfilesRequest;
import com.google.cloud.talent.v4beta1.ListProfilesResponse;
import com.google.cloud.talent.v4beta1.Profile;
import com.google.cloud.talent.v4beta1.SearchProfilesRequest;
import com.google.cloud.talent.v4beta1.SearchProfilesResponse;
import com.google.cloud.talent.v4beta1.SummarizedProfile;
import com.google.cloud.talent.v4beta1.UpdateProfileRequest;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
Expand Down Expand Up @@ -253,10 +253,10 @@ public Iterable<Profile> extractResources(ListProfilesResponse payload) {
};

private static final PagedListDescriptor<
SearchProfilesRequest, SearchProfilesResponse, HistogramQueryResult>
SearchProfilesRequest, SearchProfilesResponse, SummarizedProfile>
SEARCH_PROFILES_PAGE_STR_DESC =
new PagedListDescriptor<
SearchProfilesRequest, SearchProfilesResponse, HistogramQueryResult>() {
SearchProfilesRequest, SearchProfilesResponse, SummarizedProfile>() {
@Override
public String emptyToken() {
return "";
Expand Down Expand Up @@ -284,10 +284,10 @@ public String extractNextToken(SearchProfilesResponse payload) {
}

@Override
public Iterable<HistogramQueryResult> extractResources(SearchProfilesResponse payload) {
return payload.getHistogramQueryResultsList() != null
? payload.getHistogramQueryResultsList()
: ImmutableList.<HistogramQueryResult>of();
public Iterable<SummarizedProfile> extractResources(SearchProfilesResponse payload) {
return payload.getSummarizedProfilesList() != null
? payload.getSummarizedProfilesList()
: ImmutableList.<SummarizedProfile>of();
}
};

Expand Down Expand Up @@ -319,7 +319,7 @@ public ApiFuture<SearchProfilesPagedResponse> getFuturePagedResponse(
SearchProfilesRequest request,
ApiCallContext context,
ApiFuture<SearchProfilesResponse> futureResponse) {
PageContext<SearchProfilesRequest, SearchProfilesResponse, HistogramQueryResult>
PageContext<SearchProfilesRequest, SearchProfilesResponse, SummarizedProfile>
pageContext =
PageContext.create(callable, SEARCH_PROFILES_PAGE_STR_DESC, request, context);
return SearchProfilesPagedResponse.createAsync(pageContext, futureResponse);
Expand Down
6 changes: 3 additions & 3 deletions google-cloud-clients/google-cloud-talent/synth.metadata
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"updateTime": "2019-05-10T07:54:49.349091Z",
"updateTime": "2019-05-14T07:54:55.302661Z",
"sources": [
{
"generator": {
Expand All @@ -12,8 +12,8 @@
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "07883be5bf3c3233095e99d8e92b8094f5d7084a",
"internalRef": "247530843"
"sha": "ffa256646fb15c4a6c720f0ed8f984a0ea513416",
"internalRef": "248066377"
}
}
],
Expand Down