Skip to content
This repository was archived by the owner on Dec 8, 2021. It is now read-only.
Closed
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
@@ -1,5 +1,5 @@
/*
* Copyright 2016, Google Inc. All rights reserved.
* Copyright 2017, Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -22,12 +22,15 @@
import com.google.common.base.Function;
import com.google.common.collect.Iterables;
import com.google.protobuf.ExperimentalApi;
import com.google.pubsub.v1.ListSnapshotsRequest;
import com.google.pubsub.v1.ListSnapshotsResponse;
import com.google.pubsub.v1.ListSubscriptionsRequest;
import com.google.pubsub.v1.ListSubscriptionsResponse;
import com.google.pubsub.v1.ListTopicSubscriptionsRequest;
import com.google.pubsub.v1.ListTopicSubscriptionsResponse;
import com.google.pubsub.v1.ListTopicsRequest;
import com.google.pubsub.v1.ListTopicsResponse;
import com.google.pubsub.v1.Snapshot;
import com.google.pubsub.v1.Subscription;
import com.google.pubsub.v1.SubscriptionName;
import com.google.pubsub.v1.Topic;
Expand Down Expand Up @@ -93,4 +96,16 @@ public ListSubscriptionsPagedResponse(
super(callable, pageDescriptor, request, context);
}
}

public static class ListSnapshotsPagedResponse
extends PagedListResponseImpl<ListSnapshotsRequest, ListSnapshotsResponse, Snapshot> {

public ListSnapshotsPagedResponse(
UnaryCallable<ListSnapshotsRequest, ListSnapshotsResponse> callable,
PagedListDescriptor<ListSnapshotsRequest, ListSnapshotsResponse, Snapshot> pageDescriptor,
ListSnapshotsRequest request,
CallContext context) {
super(callable, pageDescriptor, request, context);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016, Google Inc. All rights reserved.
* Copyright 2017, Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016, Google Inc. All rights reserved.
* Copyright 2017, Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -110,6 +110,9 @@ public class PublisherSettings extends ClientSettings {
.add("https://www.googleapis.com/auth/pubsub")
.build();

private static final String DEFAULT_GENERATOR_NAME = "gapic";
private static final String DEFAULT_GENERATOR_VERSION = "0.0.5";

private final SimpleCallSettings<Topic, Topic> createTopicSettings;
private final BundlingCallSettings<PublishRequest, PublishResponse> publishSettings;
private final SimpleCallSettings<GetTopicRequest, Topic> getTopicSettings;
Expand Down Expand Up @@ -205,6 +208,7 @@ public static InstantiatingChannelProvider.Builder defaultChannelProviderBuilder
return InstantiatingChannelProvider.newBuilder()
.setServiceAddress(DEFAULT_SERVICE_ADDRESS)
.setPort(DEFAULT_SERVICE_PORT)
.setGeneratorHeader(DEFAULT_GENERATOR_NAME, DEFAULT_GENERATOR_VERSION)
.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
}

Expand Down
Loading