@Override public SubscriptionAdminSettings build() throws IOException { return new SubscriptionAdminSettings(this); } }
/** Returns the object with the settings used for calls to testIamPermissions. */ public UnaryCallSettings<TestIamPermissionsRequest, TestIamPermissionsResponse> testIamPermissionsSettings() { return ((SubscriberStubSettings) getStubSettings()).testIamPermissionsSettings(); }
/** Constructs an instance of SubscriptionAdminClient with default settings. */ public static final SubscriptionAdminClient create() throws IOException { return create(SubscriptionAdminSettings.newBuilder().build()); }
@Before public void setUp() throws IOException { serviceHelper.reset(); channelProvider = serviceHelper.createChannelProvider(); SubscriptionAdminSettings settings = SubscriptionAdminSettings.newBuilder() .setTransportChannelProvider(channelProvider) .setCredentialsProvider(NoCredentialsProvider.create()) .build(); client = SubscriptionAdminClient.create(settings); }
@Bean @ConditionalOnMissingBean public SubscriptionAdminClient subscriptionAdminClient( TransportChannelProvider transportChannelProvider) { try { return SubscriptionAdminClient.create( SubscriptionAdminSettings.newBuilder() .setCredentialsProvider(this.finalCredentialsProvider) .setHeaderProvider(this.headerProvider) .setTransportChannelProvider(transportChannelProvider) .build()); } catch (IOException ioe) { throw new PubSubException("An error occurred while creating SubscriptionAdminClient.", ioe); } }
/** * Constructs an instance of SubscriptionAdminClient, using the given settings. This is protected * so that it is easy to make a subclass, but otherwise, the static factory methods should be * preferred. */ protected SubscriptionAdminClient(SubscriptionAdminSettings settings) throws IOException { this.settings = settings; this.stub = ((SubscriberStubSettings) settings.getStubSettings()).createStub(); }
/** * This constructor instantiates TopicAdminClient and SubscriptionAdminClient with all their * defaults and the provided credentials provider. * @param projectIdProvider the project id provider to use * @param credentialsProvider the credentials provider to use * @throws IOException thrown when there are errors in contacting Google Cloud Pub/Sub */ public PubSubAdmin(GcpProjectIdProvider projectIdProvider, CredentialsProvider credentialsProvider) throws IOException { this(projectIdProvider, TopicAdminClient.create( TopicAdminSettings.newBuilder() .setCredentialsProvider(credentialsProvider) .build()), SubscriptionAdminClient.create( SubscriptionAdminSettings.newBuilder() .setCredentialsProvider(credentialsProvider) .build())); }
/** Returns the object with the settings used for calls to streamingPull. */ /* package-private */ StreamingCallSettings<StreamingPullRequest, StreamingPullResponse> streamingPullSettings() { return ((SubscriberStubSettings) getStubSettings()).streamingPullSettings(); }
/** * This constructor instantiates TopicAdminClient and SubscriptionAdminClient with all their * defaults and the provided credentials provider. * @param projectIdProvider the project id provider to use * @param credentialsProvider the credentials provider to use * @throws IOException thrown when there are errors in contacting Google Cloud Pub/Sub */ public PubSubAdmin(GcpProjectIdProvider projectIdProvider, CredentialsProvider credentialsProvider) throws IOException { this(projectIdProvider, TopicAdminClient.create( TopicAdminSettings.newBuilder() .setCredentialsProvider(credentialsProvider) .build()), SubscriptionAdminClient.create( SubscriptionAdminSettings.newBuilder() .setCredentialsProvider(credentialsProvider) .build())); }
/** Returns the object with the settings used for calls to deleteSubscription. */ public UnaryCallSettings<DeleteSubscriptionRequest, Empty> deleteSubscriptionSettings() { return ((SubscriberStubSettings) getStubSettings()).deleteSubscriptionSettings(); }
/** Returns the object with the settings used for calls to getSubscription. */ public UnaryCallSettings<GetSubscriptionRequest, Subscription> getSubscriptionSettings() { return ((SubscriberStubSettings) getStubSettings()).getSubscriptionSettings(); }
/** Returns the object with the settings used for calls to createSnapshot. */ public UnaryCallSettings<CreateSnapshotRequest, Snapshot> createSnapshotSettings() { return ((SubscriberStubSettings) getStubSettings()).createSnapshotSettings(); }
/** Returns the object with the settings used for calls to listSnapshots. */ public PagedCallSettings<ListSnapshotsRequest, ListSnapshotsResponse, ListSnapshotsPagedResponse> listSnapshotsSettings() { return ((SubscriberStubSettings) getStubSettings()).listSnapshotsSettings(); }
/** Returns the object with the settings used for calls to listSubscriptions. */ public PagedCallSettings< ListSubscriptionsRequest, ListSubscriptionsResponse, ListSubscriptionsPagedResponse> listSubscriptionsSettings() { return ((SubscriberStubSettings) getStubSettings()).listSubscriptionsSettings(); }
/** Returns the object with the settings used for calls to modifyAckDeadline. */ /* package-private */ UnaryCallSettings<ModifyAckDeadlineRequest, Empty> modifyAckDeadlineSettings() { return ((SubscriberStubSettings) getStubSettings()).modifyAckDeadlineSettings(); }
/** Returns the object with the settings used for calls to acknowledge. */ /* package-private */ UnaryCallSettings<AcknowledgeRequest, Empty> acknowledgeSettings() { return ((SubscriberStubSettings) getStubSettings()).acknowledgeSettings(); }
/** Returns the object with the settings used for calls to updateSnapshot. */ public UnaryCallSettings<UpdateSnapshotRequest, Snapshot> updateSnapshotSettings() { return ((SubscriberStubSettings) getStubSettings()).updateSnapshotSettings(); }
/** Returns the object with the settings used for calls to setIamPolicy. */ public UnaryCallSettings<SetIamPolicyRequest, Policy> setIamPolicySettings() { return ((SubscriberStubSettings) getStubSettings()).setIamPolicySettings(); }
/** Returns the object with the settings used for calls to getIamPolicy. */ public UnaryCallSettings<GetIamPolicyRequest, Policy> getIamPolicySettings() { return ((SubscriberStubSettings) getStubSettings()).getIamPolicySettings(); }
/** Returns the object with the settings used for calls to createSubscription. */ public UnaryCallSettings<Subscription, Subscription> createSubscriptionSettings() { return ((SubscriberStubSettings) getStubSettings()).createSubscriptionSettings(); }