diff --git a/gcloud-java-pubsub/baseline/src/main/java/com/google/cloud/pubsub/spi/v1/PublisherApi.java b/gcloud-java-pubsub/baseline/src/main/java/com/google/cloud/pubsub/spi/v1/PublisherApi.java index 6f7139bf4270..ab7de7e3534a 100644 --- a/gcloud-java-pubsub/baseline/src/main/java/com/google/cloud/pubsub/spi/v1/PublisherApi.java +++ b/gcloud-java-pubsub/baseline/src/main/java/com/google/cloud/pubsub/spi/v1/PublisherApi.java @@ -52,6 +52,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; +import java.util.concurrent.ScheduledExecutorService; // Manually-added imports: add custom (non-generated) imports after this point. @@ -65,10 +66,10 @@ * *
  * 
- * try (PublisherApi publisherApi = PublisherApi.defaultInstance()) {
- *   // make calls here
- * String name = "";
- * Topic callResult = createTopic(name);
+ * try (PublisherApi publisherApi = PublisherApi.createWithDefaults()) {
+ *   String name = "";
+ *
+ *   Topic callResult = publisherApi.createTopic(name);
  * }
  * 
  * 
@@ -100,15 +101,10 @@ *

This class can be customized by passing in a custom instance of PublisherSettings to * create(). For example: * - * *

  * 
- * ConnectionSettings defaultConnectionSettings =
- *     PublisherSettings.defaultInstance().toBuilder().getConnectionSettings();
- * ConnectionSettings updatedConnectionSettings =
- *     defaultConnectionSettings.toBuilder().provideCredentialsWith(myCredentials).build();
- * PublisherSettings publisherSettings = PublisherSettings.defaultInstance().toBuilder().
- *     provideChannelWith(updatedConnectionSettings)
+ * PublisherSettings publisherSettings = PublisherSettings.defaultBuilder()
+ *     .provideChannelWith(myCredentials)
  *     .build();
  * PublisherApi publisherApi = PublisherApi.create(publisherSettings);
  * 
@@ -119,7 +115,9 @@
  */
 @javax.annotation.Generated("by GAPIC")
 public class PublisherApi implements AutoCloseable {
+  private final PublisherSettings settings;
   private final ManagedChannel channel;
+  private final ScheduledExecutorService executor;
   private final List closeables = new ArrayList<>();
 
   private final ApiCallable createTopicCallable;
@@ -133,11 +131,15 @@ public class PublisherApi implements AutoCloseable {
       listTopicSubscriptionsPagedCallable;
   private final ApiCallable deleteTopicCallable;
 
+  public final PublisherSettings getSettings() {
+    return settings;
+  }
+
   private static final PathTemplate PROJECT_PATH_TEMPLATE =
-      PathTemplate.create("projects/{project}");
+      PathTemplate.createWithoutUrlEncoding("projects/{project}");
 
   private static final PathTemplate TOPIC_PATH_TEMPLATE =
-      PathTemplate.create("projects/{project}/topics/{topic}");
+      PathTemplate.createWithoutUrlEncoding("projects/{project}/topics/{topic}");
 
   /**
    * Formats a string containing the fully-qualified path to represent
@@ -200,8 +202,8 @@ public static final String parseTopicFromTopicName(String topicName) {
    * 
    * 
    */
-  public static final PublisherApi defaultInstance() throws IOException {
-    return create(PublisherSettings.defaultInstance());
+  public static final PublisherApi createWithDefaults() throws IOException {
+    return create(PublisherSettings.defaultBuilder().build());
   }
 
   /**
@@ -225,24 +227,32 @@ public static final PublisherApi create(PublisherSettings settings) throws IOExc
    * 
    */
   protected PublisherApi(PublisherSettings settings) throws IOException {
-    this.channel = settings.getChannel();
-
-    this.createTopicCallable = ApiCallable.create(settings.createTopicSettings(), settings);
-    this.publishCallable = ApiCallable.create(settings.publishSettings(), settings);
+    this.settings = settings;
+    this.executor = settings.getExecutorProvider().getOrBuildExecutor();
+    this.channel = settings.getChannelProvider().getOrBuildChannel(this.executor);
+
+    this.createTopicCallable =
+        ApiCallable.create(settings.createTopicSettings(), this.channel, this.executor);
+    this.publishCallable =
+        ApiCallable.create(settings.publishSettings(), this.channel, this.executor);
     if (settings.publishSettings().getBundlerFactory() != null) {
       closeables.add(settings.publishSettings().getBundlerFactory());
     }
-    this.getTopicCallable = ApiCallable.create(settings.getTopicSettings(), settings);
-    this.listTopicsCallable = ApiCallable.create(settings.listTopicsSettings(), settings);
+    this.getTopicCallable =
+        ApiCallable.create(settings.getTopicSettings(), this.channel, this.executor);
+    this.listTopicsCallable =
+        ApiCallable.create(settings.listTopicsSettings(), this.channel, this.executor);
     this.listTopicsPagedCallable =
-        ApiCallable.createPagedVariant(settings.listTopicsSettings(), settings);
+        ApiCallable.createPagedVariant(settings.listTopicsSettings(), this.channel, this.executor);
     this.listTopicSubscriptionsCallable =
-        ApiCallable.create(settings.listTopicSubscriptionsSettings(), settings);
+        ApiCallable.create(settings.listTopicSubscriptionsSettings(), this.channel, this.executor);
     this.listTopicSubscriptionsPagedCallable =
-        ApiCallable.createPagedVariant(settings.listTopicSubscriptionsSettings(), settings);
-    this.deleteTopicCallable = ApiCallable.create(settings.deleteTopicSettings(), settings);
+        ApiCallable.createPagedVariant(
+            settings.listTopicSubscriptionsSettings(), this.channel, this.executor);
+    this.deleteTopicCallable =
+        ApiCallable.create(settings.deleteTopicSettings(), this.channel, this.executor);
 
-    if (settings.shouldAutoCloseChannel()) {
+    if (settings.getChannelProvider().shouldAutoClose()) {
       closeables.add(
           new Closeable() {
             @Override
@@ -251,6 +261,15 @@ public void close() throws IOException {
             }
           });
     }
+    if (settings.getExecutorProvider().shouldAutoClose()) {
+      closeables.add(
+          new Closeable() {
+            @Override
+            public void close() throws IOException {
+              executor.shutdown();
+            }
+          });
+    }
   }
 
   // ----- createTopic -----
@@ -296,7 +315,6 @@ private Topic createTopic(Topic request) {
    *
    * 
    * 
-   * @throws com.google.api.gax.grpc.ApiException if the remote call fails
    */
   public final ApiCallable createTopicCallable() {
     return createTopicCallable;
@@ -306,7 +324,7 @@ public final ApiCallable createTopicCallable() {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing.
   /**
-   * Adds one or more messages to the topic. Generates `NOT_FOUND` if the topic
+   * Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic
    * does not exist. The message payload must not be empty; it must contain
    *  either a non-empty data field, or at least one attribute.
    *
@@ -326,7 +344,7 @@ public final PublishResponse publish(String topic, List messages)
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing.
   /**
-   * Adds one or more messages to the topic. Generates `NOT_FOUND` if the topic
+   * Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic
    * does not exist. The message payload must not be empty; it must contain
    *  either a non-empty data field, or at least one attribute.
    *
@@ -342,13 +360,12 @@ public PublishResponse publish(PublishRequest request) {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing.
   /**
-   * Adds one or more messages to the topic. Generates `NOT_FOUND` if the topic
+   * Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic
    * does not exist. The message payload must not be empty; it must contain
    *  either a non-empty data field, or at least one attribute.
    *
    * 
    * 
-   * @throws com.google.api.gax.grpc.ApiException if the remote call fails
    */
   public final ApiCallable publishCallable() {
     return publishCallable;
@@ -392,7 +409,6 @@ private Topic getTopic(GetTopicRequest request) {
    *
    * 
    * 
-   * @throws com.google.api.gax.grpc.ApiException if the remote call fails
    */
   public final ApiCallable getTopicCallable() {
     return getTopicCallable;
@@ -435,7 +451,6 @@ public final PageAccessor listTopics(ListTopicsRequest request) {
    *
    * 
    * 
-   * @throws com.google.api.gax.grpc.ApiException if the remote call fails
    */
   public final ApiCallable> listTopicsPagedCallable() {
     return listTopicsPagedCallable;
@@ -447,7 +462,6 @@ public final ApiCallable> listTopicsPaged
    *
    * 
    * 
-   * @throws com.google.api.gax.grpc.ApiException if the remote call fails
    */
   public final ApiCallable listTopicsCallable() {
     return listTopicsCallable;
@@ -491,7 +505,6 @@ public final PageAccessor listTopicSubscriptions(ListTopicSubscriptionsR
    *
    * 
    * 
-   * @throws com.google.api.gax.grpc.ApiException if the remote call fails
    */
   public final ApiCallable>
       listTopicSubscriptionsPagedCallable() {
@@ -504,7 +517,6 @@ public final PageAccessor listTopicSubscriptions(ListTopicSubscriptionsR
    *
    * 
    * 
-   * @throws com.google.api.gax.grpc.ApiException if the remote call fails
    */
   public final ApiCallable
       listTopicSubscriptionsCallable() {
@@ -515,7 +527,7 @@ public final PageAccessor listTopicSubscriptions(ListTopicSubscriptionsR
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing.
   /**
-   * Deletes the topic with the given name. Generates `NOT_FOUND` if the topic
+   * Deletes the topic with the given name. Returns `NOT_FOUND` if the topic
    * does not exist. After a topic is deleted, a new topic may be created with
    * the same name; this is an entirely new topic with none of the old
    * configuration or subscriptions. Existing subscriptions to this topic are
@@ -535,7 +547,7 @@ public final void deleteTopic(String topic) {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing.
   /**
-   * Deletes the topic with the given name. Generates `NOT_FOUND` if the topic
+   * Deletes the topic with the given name. Returns `NOT_FOUND` if the topic
    * does not exist. After a topic is deleted, a new topic may be created with
    * the same name; this is an entirely new topic with none of the old
    * configuration or subscriptions. Existing subscriptions to this topic are
@@ -553,7 +565,7 @@ private void deleteTopic(DeleteTopicRequest request) {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing.
   /**
-   * Deletes the topic with the given name. Generates `NOT_FOUND` if the topic
+   * Deletes the topic with the given name. Returns `NOT_FOUND` if the topic
    * does not exist. After a topic is deleted, a new topic may be created with
    * the same name; this is an entirely new topic with none of the old
    * configuration or subscriptions. Existing subscriptions to this topic are
@@ -561,7 +573,6 @@ private void deleteTopic(DeleteTopicRequest request) {
    *
    * 
    * 
-   * @throws com.google.api.gax.grpc.ApiException if the remote call fails
    */
   public final ApiCallable deleteTopicCallable() {
     return deleteTopicCallable;
diff --git a/gcloud-java-pubsub/baseline/src/main/java/com/google/cloud/pubsub/spi/v1/PublisherSettings.java b/gcloud-java-pubsub/baseline/src/main/java/com/google/cloud/pubsub/spi/v1/PublisherSettings.java
index 230adc5ec35c..9e2b9941d741 100644
--- a/gcloud-java-pubsub/baseline/src/main/java/com/google/cloud/pubsub/spi/v1/PublisherSettings.java
+++ b/gcloud-java-pubsub/baseline/src/main/java/com/google/cloud/pubsub/spi/v1/PublisherSettings.java
@@ -44,6 +44,7 @@
 import com.google.api.gax.grpc.RequestIssuer;
 import com.google.api.gax.grpc.ServiceApiSettings;
 import com.google.api.gax.grpc.SimpleCallSettings;
+import com.google.auth.Credentials;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableSet;
@@ -92,7 +93,7 @@
  * 
  * 
  * PublisherSettings.Builder publisherSettingsBuilder =
- *     PublisherSettings.defaultInstance().toBuilder();
+ *     PublisherSettings.defaultBuilder();
  * publisherSettingsBuilder.CreateTopicSettings().getRetrySettingsBuilder()
  *     .setTotalTimeout(Duration.standardSeconds(30));
  * PublisherSettings publisherSettings = publisherSettingsBuilder.build();
@@ -127,6 +128,16 @@ public class PublisherSettings extends ServiceApiSettings {
           .add("https://www.googleapis.com/auth/cloud-platform")
           .build();
 
+  /**
+   * The default connection settings of the service.
+   */
+  public static final ConnectionSettings DEFAULT_CONNECTION_SETTINGS =
+      ConnectionSettings.newBuilder()
+          .setServiceAddress(DEFAULT_SERVICE_ADDRESS)
+          .setPort(DEFAULT_SERVICE_PORT)
+          .provideCredentialsWith(DEFAULT_SERVICE_SCOPES)
+          .build();
+
   private final SimpleCallSettings createTopicSettings;
   private final BundlingCallSettings publishSettings;
   private final SimpleCallSettings getTopicSettings;
@@ -185,10 +196,10 @@ public SimpleCallSettings deleteTopicSettings() {
   }
 
   /**
-   * Returns an instance of this class with recommended defaults.
+   * Returns a builder for this class with recommended defaults.
    */
-  public static PublisherSettings defaultInstance() throws IOException {
-    return newBuilder().build();
+  public static Builder defaultBuilder() {
+    return Builder.createDefault();
   }
 
   /**
@@ -207,10 +218,8 @@ public Builder toBuilder() {
 
   private PublisherSettings(Builder settingsBuilder) throws IOException {
     super(
-        settingsBuilder.getOrBuildChannel(),
-        settingsBuilder.shouldAutoCloseChannel(),
-        settingsBuilder.getOrBuildExecutor(),
-        settingsBuilder.getConnectionSettings(),
+        settingsBuilder.getChannelProvider(),
+        settingsBuilder.getExecutorProvider(),
         settingsBuilder.getGeneratorName(),
         settingsBuilder.getGeneratorVersion(),
         settingsBuilder.getClientLibName(),
@@ -387,54 +396,26 @@ public static class Builder extends ServiceApiSettings.Builder {
     }
 
     private Builder() {
-      super(
-          ConnectionSettings.newBuilder()
-              .setServiceAddress(DEFAULT_SERVICE_ADDRESS)
-              .setPort(DEFAULT_SERVICE_PORT)
-              .provideCredentialsWith(DEFAULT_SERVICE_SCOPES)
-              .build());
-
-      createTopicSettings =
-          SimpleCallSettings.newBuilder(PublisherGrpc.METHOD_CREATE_TOPIC)
-              .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
-              .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
-
-      BundlingSettings.Builder publishBundlingSettingsBuilder =
-          BundlingSettings.newBuilder()
-              .setElementCountThreshold(800)
-              .setElementCountLimit(1000)
-              .setRequestByteThreshold(8388608)
-              .setRequestByteLimit(10485760)
-              .setDelayThreshold(Duration.millis(100))
-              .setBlockingCallCountThreshold(1);
+      super(DEFAULT_CONNECTION_SETTINGS);
+
+      createTopicSettings = SimpleCallSettings.newBuilder(PublisherGrpc.METHOD_CREATE_TOPIC);
+
       publishSettings =
           BundlingCallSettings.newBuilder(PublisherGrpc.METHOD_PUBLISH, PUBLISH_BUNDLING_DESC)
-              .setBundlingSettingsBuilder(publishBundlingSettingsBuilder)
-              .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
-              .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+              .setBundlingSettingsBuilder(BundlingSettings.newBuilder());
 
-      getTopicSettings =
-          SimpleCallSettings.newBuilder(PublisherGrpc.METHOD_GET_TOPIC)
-              .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
-              .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+      getTopicSettings = SimpleCallSettings.newBuilder(PublisherGrpc.METHOD_GET_TOPIC);
 
       listTopicsSettings =
           PageStreamingCallSettings.newBuilder(
-                  PublisherGrpc.METHOD_LIST_TOPICS, LIST_TOPICS_PAGE_STR_DESC)
-              .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
-              .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+              PublisherGrpc.METHOD_LIST_TOPICS, LIST_TOPICS_PAGE_STR_DESC);
 
       listTopicSubscriptionsSettings =
           PageStreamingCallSettings.newBuilder(
-                  PublisherGrpc.METHOD_LIST_TOPIC_SUBSCRIPTIONS,
-                  LIST_TOPIC_SUBSCRIPTIONS_PAGE_STR_DESC)
-              .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
-              .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+              PublisherGrpc.METHOD_LIST_TOPIC_SUBSCRIPTIONS,
+              LIST_TOPIC_SUBSCRIPTIONS_PAGE_STR_DESC);
 
-      deleteTopicSettings =
-          SimpleCallSettings.newBuilder(PublisherGrpc.METHOD_DELETE_TOPIC)
-              .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
-              .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+      deleteTopicSettings = SimpleCallSettings.newBuilder(PublisherGrpc.METHOD_DELETE_TOPIC);
 
       methodSettingsBuilders =
           ImmutableList.of(
@@ -446,6 +427,50 @@ private Builder() {
               deleteTopicSettings);
     }
 
+    private static Builder createDefault() {
+      Builder builder = new Builder();
+      builder
+          .createTopicSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+
+      builder
+          .publishSettings()
+          .getBundlingSettingsBuilder()
+          .setElementCountThreshold(800)
+          .setElementCountLimit(1000)
+          .setRequestByteThreshold(8388608)
+          .setRequestByteLimit(10485760)
+          .setDelayThreshold(Duration.millis(100))
+          .setBlockingCallCountThreshold(1);
+      builder
+          .publishSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+          .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+
+      builder
+          .getTopicSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+
+      builder
+          .listTopicsSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+
+      builder
+          .listTopicSubscriptionsSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+
+      builder
+          .deleteTopicSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+
+      return builder;
+    }
+
     private Builder(PublisherSettings settings) {
       super(settings);
 
@@ -466,6 +491,17 @@ private Builder(PublisherSettings settings) {
               deleteTopicSettings);
     }
 
+    @Override
+    protected ConnectionSettings getDefaultConnectionSettings() {
+      return DEFAULT_CONNECTION_SETTINGS;
+    }
+
+    @Override
+    public Builder provideExecutorWith(ScheduledExecutorService executor, boolean shouldAutoClose) {
+      super.provideExecutorWith(executor, shouldAutoClose);
+      return this;
+    }
+
     @Override
     public Builder provideChannelWith(ManagedChannel channel, boolean shouldAutoClose) {
       super.provideChannelWith(channel, shouldAutoClose);
@@ -479,8 +515,14 @@ public Builder provideChannelWith(ConnectionSettings settings) {
     }
 
     @Override
-    public Builder setExecutor(ScheduledExecutorService executor) {
-      super.setExecutor(executor);
+    public Builder provideChannelWith(Credentials credentials) {
+      super.provideChannelWith(credentials);
+      return this;
+    }
+
+    @Override
+    public Builder provideChannelWith(List scopes) {
+      super.provideChannelWith(scopes);
       return this;
     }
 
diff --git a/gcloud-java-pubsub/baseline/src/main/java/com/google/cloud/pubsub/spi/v1/SubscriberApi.java b/gcloud-java-pubsub/baseline/src/main/java/com/google/cloud/pubsub/spi/v1/SubscriberApi.java
index 322154991e5b..5aeb9d8bcc37 100644
--- a/gcloud-java-pubsub/baseline/src/main/java/com/google/cloud/pubsub/spi/v1/SubscriberApi.java
+++ b/gcloud-java-pubsub/baseline/src/main/java/com/google/cloud/pubsub/spi/v1/SubscriberApi.java
@@ -53,6 +53,7 @@
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.concurrent.ScheduledExecutorService;
 
 // Manually-added imports: add custom (non-generated) imports after this point.
 
@@ -66,13 +67,13 @@
  *
  * 
  * 
- * try (SubscriberApi subscriberApi = SubscriberApi.defaultInstance()) {
- *   // make calls here
- * String name = "";
- * String topic = "";
- * PushConfig pushConfig = PushConfig.newBuilder().build();
- * int ackDeadlineSeconds = 0;
- * Subscription callResult = createSubscription(name, topic, pushConfig, ackDeadlineSeconds);
+ * try (SubscriberApi subscriberApi = SubscriberApi.createWithDefaults()) {
+ *   String name = "";
+ *   String topic = "";
+ *   PushConfig pushConfig = PushConfig.newBuilder().build();
+ *   int ackDeadlineSeconds = 0;
+ *
+ *   Subscription callResult = subscriberApi.createSubscription(name, topic, pushConfig, ackDeadlineSeconds);
  * }
  * 
  * 
@@ -104,15 +105,10 @@ *

This class can be customized by passing in a custom instance of SubscriberSettings to * create(). For example: * - * *

  * 
- * ConnectionSettings defaultConnectionSettings =
- *     SubscriberSettings.defaultInstance().toBuilder().getConnectionSettings();
- * ConnectionSettings updatedConnectionSettings =
- *     defaultConnectionSettings.toBuilder().provideCredentialsWith(myCredentials).build();
- * SubscriberSettings subscriberSettings = SubscriberSettings.defaultInstance().toBuilder().
- *     provideChannelWith(updatedConnectionSettings)
+ * SubscriberSettings subscriberSettings = SubscriberSettings.defaultBuilder()
+ *     .provideChannelWith(myCredentials)
  *     .build();
  * SubscriberApi subscriberApi = SubscriberApi.create(subscriberSettings);
  * 
@@ -123,7 +119,9 @@
  */
 @javax.annotation.Generated("by GAPIC")
 public class SubscriberApi implements AutoCloseable {
+  private final SubscriberSettings settings;
   private final ManagedChannel channel;
+  private final ScheduledExecutorService executor;
   private final List closeables = new ArrayList<>();
 
   private final ApiCallable createSubscriptionCallable;
@@ -138,11 +136,18 @@ public class SubscriberApi implements AutoCloseable {
   private final ApiCallable pullCallable;
   private final ApiCallable modifyPushConfigCallable;
 
+  public final SubscriberSettings getSettings() {
+    return settings;
+  }
+
   private static final PathTemplate PROJECT_PATH_TEMPLATE =
-      PathTemplate.create("projects/{project}");
+      PathTemplate.createWithoutUrlEncoding("projects/{project}");
 
   private static final PathTemplate SUBSCRIPTION_PATH_TEMPLATE =
-      PathTemplate.create("projects/{project}/subscriptions/{subscription}");
+      PathTemplate.createWithoutUrlEncoding("projects/{project}/subscriptions/{subscription}");
+
+  private static final PathTemplate TOPIC_PATH_TEMPLATE =
+      PathTemplate.createWithoutUrlEncoding("projects/{project}/topics/{topic}");
 
   /**
    * Formats a string containing the fully-qualified path to represent
@@ -166,6 +171,17 @@ public static final String formatSubscriptionName(String project, String subscri
     return SUBSCRIPTION_PATH_TEMPLATE.instantiate("project", project, "subscription", subscription);
   }
 
+  /**
+   * Formats a string containing the fully-qualified path to represent
+   * a topic resource.
+   *
+   * 
+   * 
+   */
+  public static final String formatTopicName(String project, String topic) {
+    return TOPIC_PATH_TEMPLATE.instantiate("project", project, "topic", topic);
+  }
+
   /**
    * Parses the project from the given fully-qualified path which
    * represents a project resource.
@@ -199,14 +215,36 @@ public static final String parseSubscriptionFromSubscriptionName(String subscrip
     return SUBSCRIPTION_PATH_TEMPLATE.parse(subscriptionName).get("subscription");
   }
 
+  /**
+   * Parses the project from the given fully-qualified path which
+   * represents a topic resource.
+   *
+   * 
+   * 
+   */
+  public static final String parseProjectFromTopicName(String topicName) {
+    return TOPIC_PATH_TEMPLATE.parse(topicName).get("project");
+  }
+
+  /**
+   * Parses the topic from the given fully-qualified path which
+   * represents a topic resource.
+   *
+   * 
+   * 
+   */
+  public static final String parseTopicFromTopicName(String topicName) {
+    return TOPIC_PATH_TEMPLATE.parse(topicName).get("topic");
+  }
+
   /**
    * Constructs an instance of SubscriberApi with default settings.
    *
    * 
    * 
    */
-  public static final SubscriberApi defaultInstance() throws IOException {
-    return create(SubscriberSettings.defaultInstance());
+  public static final SubscriberApi createWithDefaults() throws IOException {
+    return create(SubscriberSettings.defaultBuilder().build());
   }
 
   /**
@@ -230,25 +268,30 @@ public static final SubscriberApi create(SubscriberSettings settings) throws IOE
    * 
    */
   protected SubscriberApi(SubscriberSettings settings) throws IOException {
-    this.channel = settings.getChannel();
+    this.settings = settings;
+    this.executor = settings.getExecutorProvider().getOrBuildExecutor();
+    this.channel = settings.getChannelProvider().getOrBuildChannel(this.executor);
 
     this.createSubscriptionCallable =
-        ApiCallable.create(settings.createSubscriptionSettings(), settings);
-    this.getSubscriptionCallable = ApiCallable.create(settings.getSubscriptionSettings(), settings);
+        ApiCallable.create(settings.createSubscriptionSettings(), this.channel, this.executor);
+    this.getSubscriptionCallable =
+        ApiCallable.create(settings.getSubscriptionSettings(), this.channel, this.executor);
     this.listSubscriptionsCallable =
-        ApiCallable.create(settings.listSubscriptionsSettings(), settings);
+        ApiCallable.create(settings.listSubscriptionsSettings(), this.channel, this.executor);
     this.listSubscriptionsPagedCallable =
-        ApiCallable.createPagedVariant(settings.listSubscriptionsSettings(), settings);
+        ApiCallable.createPagedVariant(
+            settings.listSubscriptionsSettings(), this.channel, this.executor);
     this.deleteSubscriptionCallable =
-        ApiCallable.create(settings.deleteSubscriptionSettings(), settings);
+        ApiCallable.create(settings.deleteSubscriptionSettings(), this.channel, this.executor);
     this.modifyAckDeadlineCallable =
-        ApiCallable.create(settings.modifyAckDeadlineSettings(), settings);
-    this.acknowledgeCallable = ApiCallable.create(settings.acknowledgeSettings(), settings);
-    this.pullCallable = ApiCallable.create(settings.pullSettings(), settings);
+        ApiCallable.create(settings.modifyAckDeadlineSettings(), this.channel, this.executor);
+    this.acknowledgeCallable =
+        ApiCallable.create(settings.acknowledgeSettings(), this.channel, this.executor);
+    this.pullCallable = ApiCallable.create(settings.pullSettings(), this.channel, this.executor);
     this.modifyPushConfigCallable =
-        ApiCallable.create(settings.modifyPushConfigSettings(), settings);
+        ApiCallable.create(settings.modifyPushConfigSettings(), this.channel, this.executor);
 
-    if (settings.shouldAutoCloseChannel()) {
+    if (settings.getChannelProvider().shouldAutoClose()) {
       closeables.add(
           new Closeable() {
             @Override
@@ -257,6 +300,15 @@ public void close() throws IOException {
             }
           });
     }
+    if (settings.getExecutorProvider().shouldAutoClose()) {
+      closeables.add(
+          new Closeable() {
+            @Override
+            public void close() throws IOException {
+              executor.shutdown();
+            }
+          });
+    }
   }
 
   // ----- createSubscription -----
@@ -264,8 +316,8 @@ public void close() throws IOException {
   // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing.
   /**
    * Creates a subscription to a given topic for a given subscriber.
-   * If the subscription already exists, generates `ALREADY_EXISTS`.
-   * If the corresponding topic doesn't exist, generates `NOT_FOUND`.
+   * If the subscription already exists, returns `ALREADY_EXISTS`.
+   * If the corresponding topic doesn't exist, returns `NOT_FOUND`.
    *
    * If the name is not provided in the request, the server will assign a random
    * name for this subscription on the same project as the topic.
@@ -280,6 +332,8 @@ public void close() throws IOException {
    * plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
    * in length, and it must not start with `"goog"`.
    * @param topic The name of the topic from which this subscription is receiving messages.
+   * The value of this field will be `_deleted-topic_` if the topic has been
+   * deleted.
    * @param pushConfig If push delivery is used with this subscription, this field is
    * used to configure it. An empty `pushConfig` signifies that the subscriber
    * will pull and ack messages using API methods.
@@ -319,8 +373,8 @@ public final Subscription createSubscription(
   // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing.
   /**
    * Creates a subscription to a given topic for a given subscriber.
-   * If the subscription already exists, generates `ALREADY_EXISTS`.
-   * If the corresponding topic doesn't exist, generates `NOT_FOUND`.
+   * If the subscription already exists, returns `ALREADY_EXISTS`.
+   * If the corresponding topic doesn't exist, returns `NOT_FOUND`.
    *
    * If the name is not provided in the request, the server will assign a random
    * name for this subscription on the same project as the topic.
@@ -338,15 +392,14 @@ public Subscription createSubscription(Subscription request) {
   // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing.
   /**
    * Creates a subscription to a given topic for a given subscriber.
-   * If the subscription already exists, generates `ALREADY_EXISTS`.
-   * If the corresponding topic doesn't exist, generates `NOT_FOUND`.
+   * If the subscription already exists, returns `ALREADY_EXISTS`.
+   * If the corresponding topic doesn't exist, returns `NOT_FOUND`.
    *
    * If the name is not provided in the request, the server will assign a random
    * name for this subscription on the same project as the topic.
    *
    * 
    * 
-   * @throws com.google.api.gax.grpc.ApiException if the remote call fails
    */
   public final ApiCallable createSubscriptionCallable() {
     return createSubscriptionCallable;
@@ -358,9 +411,6 @@ public final ApiCallable createSubscriptionCallable(
   /**
    * Gets the configuration details of a subscription.
    *
-   * If the topic of a subscription has been deleted, the subscription itself is
-   * not deleted, but the value of the `topic` field is set to `_deleted-topic_`.
-   *
    * 
    * 
    *
@@ -378,9 +428,6 @@ public final Subscription getSubscription(String subscription) {
   /**
    * Gets the configuration details of a subscription.
    *
-   * If the topic of a subscription has been deleted, the subscription itself is
-   * not deleted, but the value of the `topic` field is set to `_deleted-topic_`.
-   *
    * 
    * 
    *
@@ -395,12 +442,8 @@ private Subscription getSubscription(GetSubscriptionRequest request) {
   /**
    * Gets the configuration details of a subscription.
    *
-   * If the topic of a subscription has been deleted, the subscription itself is
-   * not deleted, but the value of the `topic` field is set to `_deleted-topic_`.
-   *
    * 
    * 
-   * @throws com.google.api.gax.grpc.ApiException if the remote call fails
    */
   public final ApiCallable getSubscriptionCallable() {
     return getSubscriptionCallable;
@@ -412,9 +455,6 @@ public final ApiCallable getSubscriptionCa
   /**
    * Lists matching subscriptions.
    *
-   * If the topic of a subscription has been deleted, the subscription itself is
-   * not deleted, but the value of the `topic` field is set to `_deleted-topic_`.
-   *
    * 
    * 
    *
@@ -431,9 +471,6 @@ public final PageAccessor listSubscriptions(String project) {
   /**
    * Lists matching subscriptions.
    *
-   * If the topic of a subscription has been deleted, the subscription itself is
-   * not deleted, but the value of the `topic` field is set to `_deleted-topic_`.
-   *
    * 
    * 
    *
@@ -448,12 +485,8 @@ public final PageAccessor listSubscriptions(ListSubscriptionsReque
   /**
    * Lists matching subscriptions.
    *
-   * If the topic of a subscription has been deleted, the subscription itself is
-   * not deleted, but the value of the `topic` field is set to `_deleted-topic_`.
-   *
    * 
    * 
-   * @throws com.google.api.gax.grpc.ApiException if the remote call fails
    */
   public final ApiCallable>
       listSubscriptionsPagedCallable() {
@@ -464,12 +497,8 @@ public final PageAccessor listSubscriptions(ListSubscriptionsReque
   /**
    * Lists matching subscriptions.
    *
-   * If the topic of a subscription has been deleted, the subscription itself is
-   * not deleted, but the value of the `topic` field is set to `_deleted-topic_`.
-   *
    * 
    * 
-   * @throws com.google.api.gax.grpc.ApiException if the remote call fails
    */
   public final ApiCallable
       listSubscriptionsCallable() {
@@ -481,7 +510,7 @@ public final PageAccessor listSubscriptions(ListSubscriptionsReque
   // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing.
   /**
    * Deletes an existing subscription. All pending messages in the subscription
-   * are immediately dropped. Calls to `Pull` after deletion will generate
+   * are immediately dropped. Calls to `Pull` after deletion will return
    * `NOT_FOUND`. After a subscription is deleted, a new one may be created with
    * the same name, but the new one has no association with the old
    * subscription, or its topic unless the same topic is specified.
@@ -502,7 +531,7 @@ public final void deleteSubscription(String subscription) {
   // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing.
   /**
    * Deletes an existing subscription. All pending messages in the subscription
-   * are immediately dropped. Calls to `Pull` after deletion will generate
+   * are immediately dropped. Calls to `Pull` after deletion will return
    * `NOT_FOUND`. After a subscription is deleted, a new one may be created with
    * the same name, but the new one has no association with the old
    * subscription, or its topic unless the same topic is specified.
@@ -520,14 +549,13 @@ private void deleteSubscription(DeleteSubscriptionRequest request) {
   // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing.
   /**
    * Deletes an existing subscription. All pending messages in the subscription
-   * are immediately dropped. Calls to `Pull` after deletion will generate
+   * are immediately dropped. Calls to `Pull` after deletion will return
    * `NOT_FOUND`. After a subscription is deleted, a new one may be created with
    * the same name, but the new one has no association with the old
    * subscription, or its topic unless the same topic is specified.
    *
    * 
    * 
-   * @throws com.google.api.gax.grpc.ApiException if the remote call fails
    */
   public final ApiCallable deleteSubscriptionCallable() {
     return deleteSubscriptionCallable;
@@ -592,7 +620,6 @@ public void modifyAckDeadline(ModifyAckDeadlineRequest request) {
    *
    * 
    * 
-   * @throws com.google.api.gax.grpc.ApiException if the remote call fails
    */
   public final ApiCallable modifyAckDeadlineCallable() {
     return modifyAckDeadlineCallable;
@@ -657,7 +684,6 @@ public void acknowledge(AcknowledgeRequest request) {
    *
    * 
    * 
-   * @throws com.google.api.gax.grpc.ApiException if the remote call fails
    */
   public final ApiCallable acknowledgeCallable() {
     return acknowledgeCallable;
@@ -668,7 +694,7 @@ public final ApiCallable acknowledgeCallable() {
   // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing.
   /**
    * Pulls messages from the server. Returns an empty list if there are no
-   * messages available in the backlog. The server may generate `UNAVAILABLE` if
+   * messages available in the backlog. The server may return `UNAVAILABLE` if
    * there are too many concurrent pull requests pending for the given
    * subscription.
    *
@@ -679,7 +705,8 @@ public final ApiCallable acknowledgeCallable() {
    * @param returnImmediately If this is specified as true the system will respond immediately even if
    * it is not able to return a message in the `Pull` response. Otherwise the
    * system is allowed to wait until at least one message is available rather
-   * than returning no messages.
+   * than returning no messages. The client may cancel the request if it does
+   * not wish to wait any longer for the response.
    * @param maxMessages The maximum number of messages returned for this request. The Pub/Sub
    * system may return fewer than the number specified.
    * @throws com.google.api.gax.grpc.ApiException if the remote call fails
@@ -698,7 +725,7 @@ public final PullResponse pull(String subscription, boolean returnImmediately, i
   // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing.
   /**
    * Pulls messages from the server. Returns an empty list if there are no
-   * messages available in the backlog. The server may generate `UNAVAILABLE` if
+   * messages available in the backlog. The server may return `UNAVAILABLE` if
    * there are too many concurrent pull requests pending for the given
    * subscription.
    *
@@ -715,13 +742,12 @@ public PullResponse pull(PullRequest request) {
   // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing.
   /**
    * Pulls messages from the server. Returns an empty list if there are no
-   * messages available in the backlog. The server may generate `UNAVAILABLE` if
+   * messages available in the backlog. The server may return `UNAVAILABLE` if
    * there are too many concurrent pull requests pending for the given
    * subscription.
    *
    * 
    * 
-   * @throws com.google.api.gax.grpc.ApiException if the remote call fails
    */
   public final ApiCallable pullCallable() {
     return pullCallable;
@@ -790,7 +816,6 @@ public void modifyPushConfig(ModifyPushConfigRequest request) {
    *
    * 
    * 
-   * @throws com.google.api.gax.grpc.ApiException if the remote call fails
    */
   public final ApiCallable modifyPushConfigCallable() {
     return modifyPushConfigCallable;
diff --git a/gcloud-java-pubsub/baseline/src/main/java/com/google/cloud/pubsub/spi/v1/SubscriberSettings.java b/gcloud-java-pubsub/baseline/src/main/java/com/google/cloud/pubsub/spi/v1/SubscriberSettings.java
index 39fdadccea2a..b7a34d966b26 100644
--- a/gcloud-java-pubsub/baseline/src/main/java/com/google/cloud/pubsub/spi/v1/SubscriberSettings.java
+++ b/gcloud-java-pubsub/baseline/src/main/java/com/google/cloud/pubsub/spi/v1/SubscriberSettings.java
@@ -40,6 +40,7 @@
 import com.google.api.gax.grpc.PageStreamingDescriptor;
 import com.google.api.gax.grpc.ServiceApiSettings;
 import com.google.api.gax.grpc.SimpleCallSettings;
+import com.google.auth.Credentials;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableSet;
@@ -60,6 +61,7 @@
 import io.grpc.ManagedChannel;
 import io.grpc.Status;
 import java.io.IOException;
+import java.util.List;
 import java.util.concurrent.ScheduledExecutorService;
 import org.joda.time.Duration;
 
@@ -85,7 +87,7 @@
  * 
  * 
  * SubscriberSettings.Builder subscriberSettingsBuilder =
- *     SubscriberSettings.defaultInstance().toBuilder();
+ *     SubscriberSettings.defaultBuilder();
  * subscriberSettingsBuilder.CreateSubscriptionSettings().getRetrySettingsBuilder()
  *     .setTotalTimeout(Duration.standardSeconds(30));
  * SubscriberSettings subscriberSettings = subscriberSettingsBuilder.build();
@@ -120,6 +122,16 @@ public class SubscriberSettings extends ServiceApiSettings {
           .add("https://www.googleapis.com/auth/cloud-platform")
           .build();
 
+  /**
+   * The default connection settings of the service.
+   */
+  public static final ConnectionSettings DEFAULT_CONNECTION_SETTINGS =
+      ConnectionSettings.newBuilder()
+          .setServiceAddress(DEFAULT_SERVICE_ADDRESS)
+          .setPort(DEFAULT_SERVICE_PORT)
+          .provideCredentialsWith(DEFAULT_SERVICE_SCOPES)
+          .build();
+
   private final SimpleCallSettings createSubscriptionSettings;
   private final SimpleCallSettings getSubscriptionSettings;
   private final PageStreamingCallSettings<
@@ -191,10 +203,10 @@ public SimpleCallSettings modifyPushConfigSettin
   }
 
   /**
-   * Returns an instance of this class with recommended defaults.
+   * Returns a builder for this class with recommended defaults.
    */
-  public static SubscriberSettings defaultInstance() throws IOException {
-    return newBuilder().build();
+  public static Builder defaultBuilder() {
+    return Builder.createDefault();
   }
 
   /**
@@ -213,10 +225,8 @@ public Builder toBuilder() {
 
   private SubscriberSettings(Builder settingsBuilder) throws IOException {
     super(
-        settingsBuilder.getOrBuildChannel(),
-        settingsBuilder.shouldAutoCloseChannel(),
-        settingsBuilder.getOrBuildExecutor(),
-        settingsBuilder.getConnectionSettings(),
+        settingsBuilder.getChannelProvider(),
+        settingsBuilder.getExecutorProvider(),
         settingsBuilder.getGeneratorName(),
         settingsBuilder.getGeneratorVersion(),
         settingsBuilder.getClientLibName(),
@@ -311,53 +321,30 @@ public static class Builder extends ServiceApiSettings.Builder {
     }
 
     private Builder() {
-      super(
-          ConnectionSettings.newBuilder()
-              .setServiceAddress(DEFAULT_SERVICE_ADDRESS)
-              .setPort(DEFAULT_SERVICE_PORT)
-              .provideCredentialsWith(DEFAULT_SERVICE_SCOPES)
-              .build());
+      super(DEFAULT_CONNECTION_SETTINGS);
 
       createSubscriptionSettings =
-          SimpleCallSettings.newBuilder(SubscriberGrpc.METHOD_CREATE_SUBSCRIPTION)
-              .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
-              .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+          SimpleCallSettings.newBuilder(SubscriberGrpc.METHOD_CREATE_SUBSCRIPTION);
 
       getSubscriptionSettings =
-          SimpleCallSettings.newBuilder(SubscriberGrpc.METHOD_GET_SUBSCRIPTION)
-              .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
-              .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+          SimpleCallSettings.newBuilder(SubscriberGrpc.METHOD_GET_SUBSCRIPTION);
 
       listSubscriptionsSettings =
           PageStreamingCallSettings.newBuilder(
-                  SubscriberGrpc.METHOD_LIST_SUBSCRIPTIONS, LIST_SUBSCRIPTIONS_PAGE_STR_DESC)
-              .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
-              .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+              SubscriberGrpc.METHOD_LIST_SUBSCRIPTIONS, LIST_SUBSCRIPTIONS_PAGE_STR_DESC);
 
       deleteSubscriptionSettings =
-          SimpleCallSettings.newBuilder(SubscriberGrpc.METHOD_DELETE_SUBSCRIPTION)
-              .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
-              .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+          SimpleCallSettings.newBuilder(SubscriberGrpc.METHOD_DELETE_SUBSCRIPTION);
 
       modifyAckDeadlineSettings =
-          SimpleCallSettings.newBuilder(SubscriberGrpc.METHOD_MODIFY_ACK_DEADLINE)
-              .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
-              .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+          SimpleCallSettings.newBuilder(SubscriberGrpc.METHOD_MODIFY_ACK_DEADLINE);
 
-      acknowledgeSettings =
-          SimpleCallSettings.newBuilder(SubscriberGrpc.METHOD_ACKNOWLEDGE)
-              .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
-              .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+      acknowledgeSettings = SimpleCallSettings.newBuilder(SubscriberGrpc.METHOD_ACKNOWLEDGE);
 
-      pullSettings =
-          SimpleCallSettings.newBuilder(SubscriberGrpc.METHOD_PULL)
-              .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
-              .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+      pullSettings = SimpleCallSettings.newBuilder(SubscriberGrpc.METHOD_PULL);
 
       modifyPushConfigSettings =
-          SimpleCallSettings.newBuilder(SubscriberGrpc.METHOD_MODIFY_PUSH_CONFIG)
-              .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
-              .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+          SimpleCallSettings.newBuilder(SubscriberGrpc.METHOD_MODIFY_PUSH_CONFIG);
 
       methodSettingsBuilders =
           ImmutableList.of(
@@ -371,6 +358,51 @@ private Builder() {
               modifyPushConfigSettings);
     }
 
+    private static Builder createDefault() {
+      Builder builder = new Builder();
+      builder
+          .createSubscriptionSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+          .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+
+      builder
+          .getSubscriptionSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+
+      builder
+          .listSubscriptionsSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+
+      builder
+          .deleteSubscriptionSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+
+      builder
+          .modifyAckDeadlineSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+          .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+
+      builder
+          .acknowledgeSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+          .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+
+      builder
+          .pullSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+          .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+
+      builder
+          .modifyPushConfigSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+          .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+
+      return builder;
+    }
+
     private Builder(SubscriberSettings settings) {
       super(settings);
 
@@ -395,6 +427,17 @@ private Builder(SubscriberSettings settings) {
               modifyPushConfigSettings);
     }
 
+    @Override
+    protected ConnectionSettings getDefaultConnectionSettings() {
+      return DEFAULT_CONNECTION_SETTINGS;
+    }
+
+    @Override
+    public Builder provideExecutorWith(ScheduledExecutorService executor, boolean shouldAutoClose) {
+      super.provideExecutorWith(executor, shouldAutoClose);
+      return this;
+    }
+
     @Override
     public Builder provideChannelWith(ManagedChannel channel, boolean shouldAutoClose) {
       super.provideChannelWith(channel, shouldAutoClose);
@@ -408,8 +451,14 @@ public Builder provideChannelWith(ConnectionSettings settings) {
     }
 
     @Override
-    public Builder setExecutor(ScheduledExecutorService executor) {
-      super.setExecutor(executor);
+    public Builder provideChannelWith(Credentials credentials) {
+      super.provideChannelWith(credentials);
+      return this;
+    }
+
+    @Override
+    public Builder provideChannelWith(List scopes) {
+      super.provideChannelWith(scopes);
       return this;
     }
 
diff --git a/gcloud-java-pubsub/pom.xml b/gcloud-java-pubsub/pom.xml
index 8724ed627e1c..f9b9b6533f78 100644
--- a/gcloud-java-pubsub/pom.xml
+++ b/gcloud-java-pubsub/pom.xml
@@ -25,7 +25,7 @@
     
       com.google.api
       gax
-      0.0.11
+      0.0.12
     
     
       com.google.api.grpc
diff --git a/gcloud-java-pubsub/src/main/java/com/google/cloud/pubsub/spi/DefaultPubSubRpc.java b/gcloud-java-pubsub/src/main/java/com/google/cloud/pubsub/spi/DefaultPubSubRpc.java
index ebe83841a4ac..e313c98a7087 100644
--- a/gcloud-java-pubsub/src/main/java/com/google/cloud/pubsub/spi/DefaultPubSubRpc.java
+++ b/gcloud-java-pubsub/src/main/java/com/google/cloud/pubsub/spi/DefaultPubSubRpc.java
@@ -69,12 +69,12 @@ public DefaultPubSubRpc(PubSubOptions options) throws IOException {
     try {
       // Provide (and use a common thread-pool).
       // This depends on https://github.com/googleapis/gax-java/issues/73
-      PublisherSettings.Builder pbuilder = PublisherSettings.defaultInstance().toBuilder();
+      PublisherSettings.Builder pbuilder = PublisherSettings.defaultBuilder();
       pbuilder.provideChannelWith(ConnectionSettings.newBuilder()
           .provideCredentialsWith(options.authCredentials().credentials()).build());
       pbuilder.applyToAllApiMethods(apiCallSettings(options));
       publisherApi = PublisherApi.create(pbuilder.build());
-      SubscriberSettings.Builder sBuilder = SubscriberSettings.defaultInstance().toBuilder();
+      SubscriberSettings.Builder sBuilder = SubscriberSettings.defaultBuilder();
       sBuilder.provideChannelWith(ConnectionSettings.newBuilder()
           .provideCredentialsWith(options.authCredentials().credentials()).build());
       sBuilder.applyToAllApiMethods(apiCallSettings(options));
diff --git a/gcloud-java-pubsub/src/main/java/com/google/cloud/pubsub/spi/v1/PublisherApi.java b/gcloud-java-pubsub/src/main/java/com/google/cloud/pubsub/spi/v1/PublisherApi.java
index 6f7139bf4270..ab7de7e3534a 100644
--- a/gcloud-java-pubsub/src/main/java/com/google/cloud/pubsub/spi/v1/PublisherApi.java
+++ b/gcloud-java-pubsub/src/main/java/com/google/cloud/pubsub/spi/v1/PublisherApi.java
@@ -52,6 +52,7 @@
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.concurrent.ScheduledExecutorService;
 
 // Manually-added imports: add custom (non-generated) imports after this point.
 
@@ -65,10 +66,10 @@
  *
  * 
  * 
- * try (PublisherApi publisherApi = PublisherApi.defaultInstance()) {
- *   // make calls here
- * String name = "";
- * Topic callResult = createTopic(name);
+ * try (PublisherApi publisherApi = PublisherApi.createWithDefaults()) {
+ *   String name = "";
+ *
+ *   Topic callResult = publisherApi.createTopic(name);
  * }
  * 
  * 
@@ -100,15 +101,10 @@ *

This class can be customized by passing in a custom instance of PublisherSettings to * create(). For example: * - * *

  * 
- * ConnectionSettings defaultConnectionSettings =
- *     PublisherSettings.defaultInstance().toBuilder().getConnectionSettings();
- * ConnectionSettings updatedConnectionSettings =
- *     defaultConnectionSettings.toBuilder().provideCredentialsWith(myCredentials).build();
- * PublisherSettings publisherSettings = PublisherSettings.defaultInstance().toBuilder().
- *     provideChannelWith(updatedConnectionSettings)
+ * PublisherSettings publisherSettings = PublisherSettings.defaultBuilder()
+ *     .provideChannelWith(myCredentials)
  *     .build();
  * PublisherApi publisherApi = PublisherApi.create(publisherSettings);
  * 
@@ -119,7 +115,9 @@
  */
 @javax.annotation.Generated("by GAPIC")
 public class PublisherApi implements AutoCloseable {
+  private final PublisherSettings settings;
   private final ManagedChannel channel;
+  private final ScheduledExecutorService executor;
   private final List closeables = new ArrayList<>();
 
   private final ApiCallable createTopicCallable;
@@ -133,11 +131,15 @@ public class PublisherApi implements AutoCloseable {
       listTopicSubscriptionsPagedCallable;
   private final ApiCallable deleteTopicCallable;
 
+  public final PublisherSettings getSettings() {
+    return settings;
+  }
+
   private static final PathTemplate PROJECT_PATH_TEMPLATE =
-      PathTemplate.create("projects/{project}");
+      PathTemplate.createWithoutUrlEncoding("projects/{project}");
 
   private static final PathTemplate TOPIC_PATH_TEMPLATE =
-      PathTemplate.create("projects/{project}/topics/{topic}");
+      PathTemplate.createWithoutUrlEncoding("projects/{project}/topics/{topic}");
 
   /**
    * Formats a string containing the fully-qualified path to represent
@@ -200,8 +202,8 @@ public static final String parseTopicFromTopicName(String topicName) {
    * 
    * 
    */
-  public static final PublisherApi defaultInstance() throws IOException {
-    return create(PublisherSettings.defaultInstance());
+  public static final PublisherApi createWithDefaults() throws IOException {
+    return create(PublisherSettings.defaultBuilder().build());
   }
 
   /**
@@ -225,24 +227,32 @@ public static final PublisherApi create(PublisherSettings settings) throws IOExc
    * 
    */
   protected PublisherApi(PublisherSettings settings) throws IOException {
-    this.channel = settings.getChannel();
-
-    this.createTopicCallable = ApiCallable.create(settings.createTopicSettings(), settings);
-    this.publishCallable = ApiCallable.create(settings.publishSettings(), settings);
+    this.settings = settings;
+    this.executor = settings.getExecutorProvider().getOrBuildExecutor();
+    this.channel = settings.getChannelProvider().getOrBuildChannel(this.executor);
+
+    this.createTopicCallable =
+        ApiCallable.create(settings.createTopicSettings(), this.channel, this.executor);
+    this.publishCallable =
+        ApiCallable.create(settings.publishSettings(), this.channel, this.executor);
     if (settings.publishSettings().getBundlerFactory() != null) {
       closeables.add(settings.publishSettings().getBundlerFactory());
     }
-    this.getTopicCallable = ApiCallable.create(settings.getTopicSettings(), settings);
-    this.listTopicsCallable = ApiCallable.create(settings.listTopicsSettings(), settings);
+    this.getTopicCallable =
+        ApiCallable.create(settings.getTopicSettings(), this.channel, this.executor);
+    this.listTopicsCallable =
+        ApiCallable.create(settings.listTopicsSettings(), this.channel, this.executor);
     this.listTopicsPagedCallable =
-        ApiCallable.createPagedVariant(settings.listTopicsSettings(), settings);
+        ApiCallable.createPagedVariant(settings.listTopicsSettings(), this.channel, this.executor);
     this.listTopicSubscriptionsCallable =
-        ApiCallable.create(settings.listTopicSubscriptionsSettings(), settings);
+        ApiCallable.create(settings.listTopicSubscriptionsSettings(), this.channel, this.executor);
     this.listTopicSubscriptionsPagedCallable =
-        ApiCallable.createPagedVariant(settings.listTopicSubscriptionsSettings(), settings);
-    this.deleteTopicCallable = ApiCallable.create(settings.deleteTopicSettings(), settings);
+        ApiCallable.createPagedVariant(
+            settings.listTopicSubscriptionsSettings(), this.channel, this.executor);
+    this.deleteTopicCallable =
+        ApiCallable.create(settings.deleteTopicSettings(), this.channel, this.executor);
 
-    if (settings.shouldAutoCloseChannel()) {
+    if (settings.getChannelProvider().shouldAutoClose()) {
       closeables.add(
           new Closeable() {
             @Override
@@ -251,6 +261,15 @@ public void close() throws IOException {
             }
           });
     }
+    if (settings.getExecutorProvider().shouldAutoClose()) {
+      closeables.add(
+          new Closeable() {
+            @Override
+            public void close() throws IOException {
+              executor.shutdown();
+            }
+          });
+    }
   }
 
   // ----- createTopic -----
@@ -296,7 +315,6 @@ private Topic createTopic(Topic request) {
    *
    * 
    * 
-   * @throws com.google.api.gax.grpc.ApiException if the remote call fails
    */
   public final ApiCallable createTopicCallable() {
     return createTopicCallable;
@@ -306,7 +324,7 @@ public final ApiCallable createTopicCallable() {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing.
   /**
-   * Adds one or more messages to the topic. Generates `NOT_FOUND` if the topic
+   * Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic
    * does not exist. The message payload must not be empty; it must contain
    *  either a non-empty data field, or at least one attribute.
    *
@@ -326,7 +344,7 @@ public final PublishResponse publish(String topic, List messages)
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing.
   /**
-   * Adds one or more messages to the topic. Generates `NOT_FOUND` if the topic
+   * Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic
    * does not exist. The message payload must not be empty; it must contain
    *  either a non-empty data field, or at least one attribute.
    *
@@ -342,13 +360,12 @@ public PublishResponse publish(PublishRequest request) {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing.
   /**
-   * Adds one or more messages to the topic. Generates `NOT_FOUND` if the topic
+   * Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic
    * does not exist. The message payload must not be empty; it must contain
    *  either a non-empty data field, or at least one attribute.
    *
    * 
    * 
-   * @throws com.google.api.gax.grpc.ApiException if the remote call fails
    */
   public final ApiCallable publishCallable() {
     return publishCallable;
@@ -392,7 +409,6 @@ private Topic getTopic(GetTopicRequest request) {
    *
    * 
    * 
-   * @throws com.google.api.gax.grpc.ApiException if the remote call fails
    */
   public final ApiCallable getTopicCallable() {
     return getTopicCallable;
@@ -435,7 +451,6 @@ public final PageAccessor listTopics(ListTopicsRequest request) {
    *
    * 
    * 
-   * @throws com.google.api.gax.grpc.ApiException if the remote call fails
    */
   public final ApiCallable> listTopicsPagedCallable() {
     return listTopicsPagedCallable;
@@ -447,7 +462,6 @@ public final ApiCallable> listTopicsPaged
    *
    * 
    * 
-   * @throws com.google.api.gax.grpc.ApiException if the remote call fails
    */
   public final ApiCallable listTopicsCallable() {
     return listTopicsCallable;
@@ -491,7 +505,6 @@ public final PageAccessor listTopicSubscriptions(ListTopicSubscriptionsR
    *
    * 
    * 
-   * @throws com.google.api.gax.grpc.ApiException if the remote call fails
    */
   public final ApiCallable>
       listTopicSubscriptionsPagedCallable() {
@@ -504,7 +517,6 @@ public final PageAccessor listTopicSubscriptions(ListTopicSubscriptionsR
    *
    * 
    * 
-   * @throws com.google.api.gax.grpc.ApiException if the remote call fails
    */
   public final ApiCallable
       listTopicSubscriptionsCallable() {
@@ -515,7 +527,7 @@ public final PageAccessor listTopicSubscriptions(ListTopicSubscriptionsR
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing.
   /**
-   * Deletes the topic with the given name. Generates `NOT_FOUND` if the topic
+   * Deletes the topic with the given name. Returns `NOT_FOUND` if the topic
    * does not exist. After a topic is deleted, a new topic may be created with
    * the same name; this is an entirely new topic with none of the old
    * configuration or subscriptions. Existing subscriptions to this topic are
@@ -535,7 +547,7 @@ public final void deleteTopic(String topic) {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing.
   /**
-   * Deletes the topic with the given name. Generates `NOT_FOUND` if the topic
+   * Deletes the topic with the given name. Returns `NOT_FOUND` if the topic
    * does not exist. After a topic is deleted, a new topic may be created with
    * the same name; this is an entirely new topic with none of the old
    * configuration or subscriptions. Existing subscriptions to this topic are
@@ -553,7 +565,7 @@ private void deleteTopic(DeleteTopicRequest request) {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing.
   /**
-   * Deletes the topic with the given name. Generates `NOT_FOUND` if the topic
+   * Deletes the topic with the given name. Returns `NOT_FOUND` if the topic
    * does not exist. After a topic is deleted, a new topic may be created with
    * the same name; this is an entirely new topic with none of the old
    * configuration or subscriptions. Existing subscriptions to this topic are
@@ -561,7 +573,6 @@ private void deleteTopic(DeleteTopicRequest request) {
    *
    * 
    * 
-   * @throws com.google.api.gax.grpc.ApiException if the remote call fails
    */
   public final ApiCallable deleteTopicCallable() {
     return deleteTopicCallable;
diff --git a/gcloud-java-pubsub/src/main/java/com/google/cloud/pubsub/spi/v1/PublisherSettings.java b/gcloud-java-pubsub/src/main/java/com/google/cloud/pubsub/spi/v1/PublisherSettings.java
index 230adc5ec35c..9e2b9941d741 100644
--- a/gcloud-java-pubsub/src/main/java/com/google/cloud/pubsub/spi/v1/PublisherSettings.java
+++ b/gcloud-java-pubsub/src/main/java/com/google/cloud/pubsub/spi/v1/PublisherSettings.java
@@ -44,6 +44,7 @@
 import com.google.api.gax.grpc.RequestIssuer;
 import com.google.api.gax.grpc.ServiceApiSettings;
 import com.google.api.gax.grpc.SimpleCallSettings;
+import com.google.auth.Credentials;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableSet;
@@ -92,7 +93,7 @@
  * 
  * 
  * PublisherSettings.Builder publisherSettingsBuilder =
- *     PublisherSettings.defaultInstance().toBuilder();
+ *     PublisherSettings.defaultBuilder();
  * publisherSettingsBuilder.CreateTopicSettings().getRetrySettingsBuilder()
  *     .setTotalTimeout(Duration.standardSeconds(30));
  * PublisherSettings publisherSettings = publisherSettingsBuilder.build();
@@ -127,6 +128,16 @@ public class PublisherSettings extends ServiceApiSettings {
           .add("https://www.googleapis.com/auth/cloud-platform")
           .build();
 
+  /**
+   * The default connection settings of the service.
+   */
+  public static final ConnectionSettings DEFAULT_CONNECTION_SETTINGS =
+      ConnectionSettings.newBuilder()
+          .setServiceAddress(DEFAULT_SERVICE_ADDRESS)
+          .setPort(DEFAULT_SERVICE_PORT)
+          .provideCredentialsWith(DEFAULT_SERVICE_SCOPES)
+          .build();
+
   private final SimpleCallSettings createTopicSettings;
   private final BundlingCallSettings publishSettings;
   private final SimpleCallSettings getTopicSettings;
@@ -185,10 +196,10 @@ public SimpleCallSettings deleteTopicSettings() {
   }
 
   /**
-   * Returns an instance of this class with recommended defaults.
+   * Returns a builder for this class with recommended defaults.
    */
-  public static PublisherSettings defaultInstance() throws IOException {
-    return newBuilder().build();
+  public static Builder defaultBuilder() {
+    return Builder.createDefault();
   }
 
   /**
@@ -207,10 +218,8 @@ public Builder toBuilder() {
 
   private PublisherSettings(Builder settingsBuilder) throws IOException {
     super(
-        settingsBuilder.getOrBuildChannel(),
-        settingsBuilder.shouldAutoCloseChannel(),
-        settingsBuilder.getOrBuildExecutor(),
-        settingsBuilder.getConnectionSettings(),
+        settingsBuilder.getChannelProvider(),
+        settingsBuilder.getExecutorProvider(),
         settingsBuilder.getGeneratorName(),
         settingsBuilder.getGeneratorVersion(),
         settingsBuilder.getClientLibName(),
@@ -387,54 +396,26 @@ public static class Builder extends ServiceApiSettings.Builder {
     }
 
     private Builder() {
-      super(
-          ConnectionSettings.newBuilder()
-              .setServiceAddress(DEFAULT_SERVICE_ADDRESS)
-              .setPort(DEFAULT_SERVICE_PORT)
-              .provideCredentialsWith(DEFAULT_SERVICE_SCOPES)
-              .build());
-
-      createTopicSettings =
-          SimpleCallSettings.newBuilder(PublisherGrpc.METHOD_CREATE_TOPIC)
-              .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
-              .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
-
-      BundlingSettings.Builder publishBundlingSettingsBuilder =
-          BundlingSettings.newBuilder()
-              .setElementCountThreshold(800)
-              .setElementCountLimit(1000)
-              .setRequestByteThreshold(8388608)
-              .setRequestByteLimit(10485760)
-              .setDelayThreshold(Duration.millis(100))
-              .setBlockingCallCountThreshold(1);
+      super(DEFAULT_CONNECTION_SETTINGS);
+
+      createTopicSettings = SimpleCallSettings.newBuilder(PublisherGrpc.METHOD_CREATE_TOPIC);
+
       publishSettings =
           BundlingCallSettings.newBuilder(PublisherGrpc.METHOD_PUBLISH, PUBLISH_BUNDLING_DESC)
-              .setBundlingSettingsBuilder(publishBundlingSettingsBuilder)
-              .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
-              .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+              .setBundlingSettingsBuilder(BundlingSettings.newBuilder());
 
-      getTopicSettings =
-          SimpleCallSettings.newBuilder(PublisherGrpc.METHOD_GET_TOPIC)
-              .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
-              .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+      getTopicSettings = SimpleCallSettings.newBuilder(PublisherGrpc.METHOD_GET_TOPIC);
 
       listTopicsSettings =
           PageStreamingCallSettings.newBuilder(
-                  PublisherGrpc.METHOD_LIST_TOPICS, LIST_TOPICS_PAGE_STR_DESC)
-              .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
-              .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+              PublisherGrpc.METHOD_LIST_TOPICS, LIST_TOPICS_PAGE_STR_DESC);
 
       listTopicSubscriptionsSettings =
           PageStreamingCallSettings.newBuilder(
-                  PublisherGrpc.METHOD_LIST_TOPIC_SUBSCRIPTIONS,
-                  LIST_TOPIC_SUBSCRIPTIONS_PAGE_STR_DESC)
-              .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
-              .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+              PublisherGrpc.METHOD_LIST_TOPIC_SUBSCRIPTIONS,
+              LIST_TOPIC_SUBSCRIPTIONS_PAGE_STR_DESC);
 
-      deleteTopicSettings =
-          SimpleCallSettings.newBuilder(PublisherGrpc.METHOD_DELETE_TOPIC)
-              .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
-              .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+      deleteTopicSettings = SimpleCallSettings.newBuilder(PublisherGrpc.METHOD_DELETE_TOPIC);
 
       methodSettingsBuilders =
           ImmutableList.of(
@@ -446,6 +427,50 @@ private Builder() {
               deleteTopicSettings);
     }
 
+    private static Builder createDefault() {
+      Builder builder = new Builder();
+      builder
+          .createTopicSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+
+      builder
+          .publishSettings()
+          .getBundlingSettingsBuilder()
+          .setElementCountThreshold(800)
+          .setElementCountLimit(1000)
+          .setRequestByteThreshold(8388608)
+          .setRequestByteLimit(10485760)
+          .setDelayThreshold(Duration.millis(100))
+          .setBlockingCallCountThreshold(1);
+      builder
+          .publishSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+          .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+
+      builder
+          .getTopicSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+
+      builder
+          .listTopicsSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+
+      builder
+          .listTopicSubscriptionsSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+
+      builder
+          .deleteTopicSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+
+      return builder;
+    }
+
     private Builder(PublisherSettings settings) {
       super(settings);
 
@@ -466,6 +491,17 @@ private Builder(PublisherSettings settings) {
               deleteTopicSettings);
     }
 
+    @Override
+    protected ConnectionSettings getDefaultConnectionSettings() {
+      return DEFAULT_CONNECTION_SETTINGS;
+    }
+
+    @Override
+    public Builder provideExecutorWith(ScheduledExecutorService executor, boolean shouldAutoClose) {
+      super.provideExecutorWith(executor, shouldAutoClose);
+      return this;
+    }
+
     @Override
     public Builder provideChannelWith(ManagedChannel channel, boolean shouldAutoClose) {
       super.provideChannelWith(channel, shouldAutoClose);
@@ -479,8 +515,14 @@ public Builder provideChannelWith(ConnectionSettings settings) {
     }
 
     @Override
-    public Builder setExecutor(ScheduledExecutorService executor) {
-      super.setExecutor(executor);
+    public Builder provideChannelWith(Credentials credentials) {
+      super.provideChannelWith(credentials);
+      return this;
+    }
+
+    @Override
+    public Builder provideChannelWith(List scopes) {
+      super.provideChannelWith(scopes);
       return this;
     }
 
diff --git a/gcloud-java-pubsub/src/main/java/com/google/cloud/pubsub/spi/v1/SubscriberApi.java b/gcloud-java-pubsub/src/main/java/com/google/cloud/pubsub/spi/v1/SubscriberApi.java
index 322154991e5b..5aeb9d8bcc37 100644
--- a/gcloud-java-pubsub/src/main/java/com/google/cloud/pubsub/spi/v1/SubscriberApi.java
+++ b/gcloud-java-pubsub/src/main/java/com/google/cloud/pubsub/spi/v1/SubscriberApi.java
@@ -53,6 +53,7 @@
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.concurrent.ScheduledExecutorService;
 
 // Manually-added imports: add custom (non-generated) imports after this point.
 
@@ -66,13 +67,13 @@
  *
  * 
  * 
- * try (SubscriberApi subscriberApi = SubscriberApi.defaultInstance()) {
- *   // make calls here
- * String name = "";
- * String topic = "";
- * PushConfig pushConfig = PushConfig.newBuilder().build();
- * int ackDeadlineSeconds = 0;
- * Subscription callResult = createSubscription(name, topic, pushConfig, ackDeadlineSeconds);
+ * try (SubscriberApi subscriberApi = SubscriberApi.createWithDefaults()) {
+ *   String name = "";
+ *   String topic = "";
+ *   PushConfig pushConfig = PushConfig.newBuilder().build();
+ *   int ackDeadlineSeconds = 0;
+ *
+ *   Subscription callResult = subscriberApi.createSubscription(name, topic, pushConfig, ackDeadlineSeconds);
  * }
  * 
  * 
@@ -104,15 +105,10 @@ *

This class can be customized by passing in a custom instance of SubscriberSettings to * create(). For example: * - * *

  * 
- * ConnectionSettings defaultConnectionSettings =
- *     SubscriberSettings.defaultInstance().toBuilder().getConnectionSettings();
- * ConnectionSettings updatedConnectionSettings =
- *     defaultConnectionSettings.toBuilder().provideCredentialsWith(myCredentials).build();
- * SubscriberSettings subscriberSettings = SubscriberSettings.defaultInstance().toBuilder().
- *     provideChannelWith(updatedConnectionSettings)
+ * SubscriberSettings subscriberSettings = SubscriberSettings.defaultBuilder()
+ *     .provideChannelWith(myCredentials)
  *     .build();
  * SubscriberApi subscriberApi = SubscriberApi.create(subscriberSettings);
  * 
@@ -123,7 +119,9 @@
  */
 @javax.annotation.Generated("by GAPIC")
 public class SubscriberApi implements AutoCloseable {
+  private final SubscriberSettings settings;
   private final ManagedChannel channel;
+  private final ScheduledExecutorService executor;
   private final List closeables = new ArrayList<>();
 
   private final ApiCallable createSubscriptionCallable;
@@ -138,11 +136,18 @@ public class SubscriberApi implements AutoCloseable {
   private final ApiCallable pullCallable;
   private final ApiCallable modifyPushConfigCallable;
 
+  public final SubscriberSettings getSettings() {
+    return settings;
+  }
+
   private static final PathTemplate PROJECT_PATH_TEMPLATE =
-      PathTemplate.create("projects/{project}");
+      PathTemplate.createWithoutUrlEncoding("projects/{project}");
 
   private static final PathTemplate SUBSCRIPTION_PATH_TEMPLATE =
-      PathTemplate.create("projects/{project}/subscriptions/{subscription}");
+      PathTemplate.createWithoutUrlEncoding("projects/{project}/subscriptions/{subscription}");
+
+  private static final PathTemplate TOPIC_PATH_TEMPLATE =
+      PathTemplate.createWithoutUrlEncoding("projects/{project}/topics/{topic}");
 
   /**
    * Formats a string containing the fully-qualified path to represent
@@ -166,6 +171,17 @@ public static final String formatSubscriptionName(String project, String subscri
     return SUBSCRIPTION_PATH_TEMPLATE.instantiate("project", project, "subscription", subscription);
   }
 
+  /**
+   * Formats a string containing the fully-qualified path to represent
+   * a topic resource.
+   *
+   * 
+   * 
+   */
+  public static final String formatTopicName(String project, String topic) {
+    return TOPIC_PATH_TEMPLATE.instantiate("project", project, "topic", topic);
+  }
+
   /**
    * Parses the project from the given fully-qualified path which
    * represents a project resource.
@@ -199,14 +215,36 @@ public static final String parseSubscriptionFromSubscriptionName(String subscrip
     return SUBSCRIPTION_PATH_TEMPLATE.parse(subscriptionName).get("subscription");
   }
 
+  /**
+   * Parses the project from the given fully-qualified path which
+   * represents a topic resource.
+   *
+   * 
+   * 
+   */
+  public static final String parseProjectFromTopicName(String topicName) {
+    return TOPIC_PATH_TEMPLATE.parse(topicName).get("project");
+  }
+
+  /**
+   * Parses the topic from the given fully-qualified path which
+   * represents a topic resource.
+   *
+   * 
+   * 
+   */
+  public static final String parseTopicFromTopicName(String topicName) {
+    return TOPIC_PATH_TEMPLATE.parse(topicName).get("topic");
+  }
+
   /**
    * Constructs an instance of SubscriberApi with default settings.
    *
    * 
    * 
    */
-  public static final SubscriberApi defaultInstance() throws IOException {
-    return create(SubscriberSettings.defaultInstance());
+  public static final SubscriberApi createWithDefaults() throws IOException {
+    return create(SubscriberSettings.defaultBuilder().build());
   }
 
   /**
@@ -230,25 +268,30 @@ public static final SubscriberApi create(SubscriberSettings settings) throws IOE
    * 
    */
   protected SubscriberApi(SubscriberSettings settings) throws IOException {
-    this.channel = settings.getChannel();
+    this.settings = settings;
+    this.executor = settings.getExecutorProvider().getOrBuildExecutor();
+    this.channel = settings.getChannelProvider().getOrBuildChannel(this.executor);
 
     this.createSubscriptionCallable =
-        ApiCallable.create(settings.createSubscriptionSettings(), settings);
-    this.getSubscriptionCallable = ApiCallable.create(settings.getSubscriptionSettings(), settings);
+        ApiCallable.create(settings.createSubscriptionSettings(), this.channel, this.executor);
+    this.getSubscriptionCallable =
+        ApiCallable.create(settings.getSubscriptionSettings(), this.channel, this.executor);
     this.listSubscriptionsCallable =
-        ApiCallable.create(settings.listSubscriptionsSettings(), settings);
+        ApiCallable.create(settings.listSubscriptionsSettings(), this.channel, this.executor);
     this.listSubscriptionsPagedCallable =
-        ApiCallable.createPagedVariant(settings.listSubscriptionsSettings(), settings);
+        ApiCallable.createPagedVariant(
+            settings.listSubscriptionsSettings(), this.channel, this.executor);
     this.deleteSubscriptionCallable =
-        ApiCallable.create(settings.deleteSubscriptionSettings(), settings);
+        ApiCallable.create(settings.deleteSubscriptionSettings(), this.channel, this.executor);
     this.modifyAckDeadlineCallable =
-        ApiCallable.create(settings.modifyAckDeadlineSettings(), settings);
-    this.acknowledgeCallable = ApiCallable.create(settings.acknowledgeSettings(), settings);
-    this.pullCallable = ApiCallable.create(settings.pullSettings(), settings);
+        ApiCallable.create(settings.modifyAckDeadlineSettings(), this.channel, this.executor);
+    this.acknowledgeCallable =
+        ApiCallable.create(settings.acknowledgeSettings(), this.channel, this.executor);
+    this.pullCallable = ApiCallable.create(settings.pullSettings(), this.channel, this.executor);
     this.modifyPushConfigCallable =
-        ApiCallable.create(settings.modifyPushConfigSettings(), settings);
+        ApiCallable.create(settings.modifyPushConfigSettings(), this.channel, this.executor);
 
-    if (settings.shouldAutoCloseChannel()) {
+    if (settings.getChannelProvider().shouldAutoClose()) {
       closeables.add(
           new Closeable() {
             @Override
@@ -257,6 +300,15 @@ public void close() throws IOException {
             }
           });
     }
+    if (settings.getExecutorProvider().shouldAutoClose()) {
+      closeables.add(
+          new Closeable() {
+            @Override
+            public void close() throws IOException {
+              executor.shutdown();
+            }
+          });
+    }
   }
 
   // ----- createSubscription -----
@@ -264,8 +316,8 @@ public void close() throws IOException {
   // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing.
   /**
    * Creates a subscription to a given topic for a given subscriber.
-   * If the subscription already exists, generates `ALREADY_EXISTS`.
-   * If the corresponding topic doesn't exist, generates `NOT_FOUND`.
+   * If the subscription already exists, returns `ALREADY_EXISTS`.
+   * If the corresponding topic doesn't exist, returns `NOT_FOUND`.
    *
    * If the name is not provided in the request, the server will assign a random
    * name for this subscription on the same project as the topic.
@@ -280,6 +332,8 @@ public void close() throws IOException {
    * plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters
    * in length, and it must not start with `"goog"`.
    * @param topic The name of the topic from which this subscription is receiving messages.
+   * The value of this field will be `_deleted-topic_` if the topic has been
+   * deleted.
    * @param pushConfig If push delivery is used with this subscription, this field is
    * used to configure it. An empty `pushConfig` signifies that the subscriber
    * will pull and ack messages using API methods.
@@ -319,8 +373,8 @@ public final Subscription createSubscription(
   // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing.
   /**
    * Creates a subscription to a given topic for a given subscriber.
-   * If the subscription already exists, generates `ALREADY_EXISTS`.
-   * If the corresponding topic doesn't exist, generates `NOT_FOUND`.
+   * If the subscription already exists, returns `ALREADY_EXISTS`.
+   * If the corresponding topic doesn't exist, returns `NOT_FOUND`.
    *
    * If the name is not provided in the request, the server will assign a random
    * name for this subscription on the same project as the topic.
@@ -338,15 +392,14 @@ public Subscription createSubscription(Subscription request) {
   // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing.
   /**
    * Creates a subscription to a given topic for a given subscriber.
-   * If the subscription already exists, generates `ALREADY_EXISTS`.
-   * If the corresponding topic doesn't exist, generates `NOT_FOUND`.
+   * If the subscription already exists, returns `ALREADY_EXISTS`.
+   * If the corresponding topic doesn't exist, returns `NOT_FOUND`.
    *
    * If the name is not provided in the request, the server will assign a random
    * name for this subscription on the same project as the topic.
    *
    * 
    * 
-   * @throws com.google.api.gax.grpc.ApiException if the remote call fails
    */
   public final ApiCallable createSubscriptionCallable() {
     return createSubscriptionCallable;
@@ -358,9 +411,6 @@ public final ApiCallable createSubscriptionCallable(
   /**
    * Gets the configuration details of a subscription.
    *
-   * If the topic of a subscription has been deleted, the subscription itself is
-   * not deleted, but the value of the `topic` field is set to `_deleted-topic_`.
-   *
    * 
    * 
    *
@@ -378,9 +428,6 @@ public final Subscription getSubscription(String subscription) {
   /**
    * Gets the configuration details of a subscription.
    *
-   * If the topic of a subscription has been deleted, the subscription itself is
-   * not deleted, but the value of the `topic` field is set to `_deleted-topic_`.
-   *
    * 
    * 
    *
@@ -395,12 +442,8 @@ private Subscription getSubscription(GetSubscriptionRequest request) {
   /**
    * Gets the configuration details of a subscription.
    *
-   * If the topic of a subscription has been deleted, the subscription itself is
-   * not deleted, but the value of the `topic` field is set to `_deleted-topic_`.
-   *
    * 
    * 
-   * @throws com.google.api.gax.grpc.ApiException if the remote call fails
    */
   public final ApiCallable getSubscriptionCallable() {
     return getSubscriptionCallable;
@@ -412,9 +455,6 @@ public final ApiCallable getSubscriptionCa
   /**
    * Lists matching subscriptions.
    *
-   * If the topic of a subscription has been deleted, the subscription itself is
-   * not deleted, but the value of the `topic` field is set to `_deleted-topic_`.
-   *
    * 
    * 
    *
@@ -431,9 +471,6 @@ public final PageAccessor listSubscriptions(String project) {
   /**
    * Lists matching subscriptions.
    *
-   * If the topic of a subscription has been deleted, the subscription itself is
-   * not deleted, but the value of the `topic` field is set to `_deleted-topic_`.
-   *
    * 
    * 
    *
@@ -448,12 +485,8 @@ public final PageAccessor listSubscriptions(ListSubscriptionsReque
   /**
    * Lists matching subscriptions.
    *
-   * If the topic of a subscription has been deleted, the subscription itself is
-   * not deleted, but the value of the `topic` field is set to `_deleted-topic_`.
-   *
    * 
    * 
-   * @throws com.google.api.gax.grpc.ApiException if the remote call fails
    */
   public final ApiCallable>
       listSubscriptionsPagedCallable() {
@@ -464,12 +497,8 @@ public final PageAccessor listSubscriptions(ListSubscriptionsReque
   /**
    * Lists matching subscriptions.
    *
-   * If the topic of a subscription has been deleted, the subscription itself is
-   * not deleted, but the value of the `topic` field is set to `_deleted-topic_`.
-   *
    * 
    * 
-   * @throws com.google.api.gax.grpc.ApiException if the remote call fails
    */
   public final ApiCallable
       listSubscriptionsCallable() {
@@ -481,7 +510,7 @@ public final PageAccessor listSubscriptions(ListSubscriptionsReque
   // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing.
   /**
    * Deletes an existing subscription. All pending messages in the subscription
-   * are immediately dropped. Calls to `Pull` after deletion will generate
+   * are immediately dropped. Calls to `Pull` after deletion will return
    * `NOT_FOUND`. After a subscription is deleted, a new one may be created with
    * the same name, but the new one has no association with the old
    * subscription, or its topic unless the same topic is specified.
@@ -502,7 +531,7 @@ public final void deleteSubscription(String subscription) {
   // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing.
   /**
    * Deletes an existing subscription. All pending messages in the subscription
-   * are immediately dropped. Calls to `Pull` after deletion will generate
+   * are immediately dropped. Calls to `Pull` after deletion will return
    * `NOT_FOUND`. After a subscription is deleted, a new one may be created with
    * the same name, but the new one has no association with the old
    * subscription, or its topic unless the same topic is specified.
@@ -520,14 +549,13 @@ private void deleteSubscription(DeleteSubscriptionRequest request) {
   // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing.
   /**
    * Deletes an existing subscription. All pending messages in the subscription
-   * are immediately dropped. Calls to `Pull` after deletion will generate
+   * are immediately dropped. Calls to `Pull` after deletion will return
    * `NOT_FOUND`. After a subscription is deleted, a new one may be created with
    * the same name, but the new one has no association with the old
    * subscription, or its topic unless the same topic is specified.
    *
    * 
    * 
-   * @throws com.google.api.gax.grpc.ApiException if the remote call fails
    */
   public final ApiCallable deleteSubscriptionCallable() {
     return deleteSubscriptionCallable;
@@ -592,7 +620,6 @@ public void modifyAckDeadline(ModifyAckDeadlineRequest request) {
    *
    * 
    * 
-   * @throws com.google.api.gax.grpc.ApiException if the remote call fails
    */
   public final ApiCallable modifyAckDeadlineCallable() {
     return modifyAckDeadlineCallable;
@@ -657,7 +684,6 @@ public void acknowledge(AcknowledgeRequest request) {
    *
    * 
    * 
-   * @throws com.google.api.gax.grpc.ApiException if the remote call fails
    */
   public final ApiCallable acknowledgeCallable() {
     return acknowledgeCallable;
@@ -668,7 +694,7 @@ public final ApiCallable acknowledgeCallable() {
   // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing.
   /**
    * Pulls messages from the server. Returns an empty list if there are no
-   * messages available in the backlog. The server may generate `UNAVAILABLE` if
+   * messages available in the backlog. The server may return `UNAVAILABLE` if
    * there are too many concurrent pull requests pending for the given
    * subscription.
    *
@@ -679,7 +705,8 @@ public final ApiCallable acknowledgeCallable() {
    * @param returnImmediately If this is specified as true the system will respond immediately even if
    * it is not able to return a message in the `Pull` response. Otherwise the
    * system is allowed to wait until at least one message is available rather
-   * than returning no messages.
+   * than returning no messages. The client may cancel the request if it does
+   * not wish to wait any longer for the response.
    * @param maxMessages The maximum number of messages returned for this request. The Pub/Sub
    * system may return fewer than the number specified.
    * @throws com.google.api.gax.grpc.ApiException if the remote call fails
@@ -698,7 +725,7 @@ public final PullResponse pull(String subscription, boolean returnImmediately, i
   // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing.
   /**
    * Pulls messages from the server. Returns an empty list if there are no
-   * messages available in the backlog. The server may generate `UNAVAILABLE` if
+   * messages available in the backlog. The server may return `UNAVAILABLE` if
    * there are too many concurrent pull requests pending for the given
    * subscription.
    *
@@ -715,13 +742,12 @@ public PullResponse pull(PullRequest request) {
   // AUTO-GENERATED DOCUMENTATION AND METHOD - see instructions at the top of the file for editing.
   /**
    * Pulls messages from the server. Returns an empty list if there are no
-   * messages available in the backlog. The server may generate `UNAVAILABLE` if
+   * messages available in the backlog. The server may return `UNAVAILABLE` if
    * there are too many concurrent pull requests pending for the given
    * subscription.
    *
    * 
    * 
-   * @throws com.google.api.gax.grpc.ApiException if the remote call fails
    */
   public final ApiCallable pullCallable() {
     return pullCallable;
@@ -790,7 +816,6 @@ public void modifyPushConfig(ModifyPushConfigRequest request) {
    *
    * 
    * 
-   * @throws com.google.api.gax.grpc.ApiException if the remote call fails
    */
   public final ApiCallable modifyPushConfigCallable() {
     return modifyPushConfigCallable;
diff --git a/gcloud-java-pubsub/src/main/java/com/google/cloud/pubsub/spi/v1/SubscriberSettings.java b/gcloud-java-pubsub/src/main/java/com/google/cloud/pubsub/spi/v1/SubscriberSettings.java
index 39fdadccea2a..b7a34d966b26 100644
--- a/gcloud-java-pubsub/src/main/java/com/google/cloud/pubsub/spi/v1/SubscriberSettings.java
+++ b/gcloud-java-pubsub/src/main/java/com/google/cloud/pubsub/spi/v1/SubscriberSettings.java
@@ -40,6 +40,7 @@
 import com.google.api.gax.grpc.PageStreamingDescriptor;
 import com.google.api.gax.grpc.ServiceApiSettings;
 import com.google.api.gax.grpc.SimpleCallSettings;
+import com.google.auth.Credentials;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableSet;
@@ -60,6 +61,7 @@
 import io.grpc.ManagedChannel;
 import io.grpc.Status;
 import java.io.IOException;
+import java.util.List;
 import java.util.concurrent.ScheduledExecutorService;
 import org.joda.time.Duration;
 
@@ -85,7 +87,7 @@
  * 
  * 
  * SubscriberSettings.Builder subscriberSettingsBuilder =
- *     SubscriberSettings.defaultInstance().toBuilder();
+ *     SubscriberSettings.defaultBuilder();
  * subscriberSettingsBuilder.CreateSubscriptionSettings().getRetrySettingsBuilder()
  *     .setTotalTimeout(Duration.standardSeconds(30));
  * SubscriberSettings subscriberSettings = subscriberSettingsBuilder.build();
@@ -120,6 +122,16 @@ public class SubscriberSettings extends ServiceApiSettings {
           .add("https://www.googleapis.com/auth/cloud-platform")
           .build();
 
+  /**
+   * The default connection settings of the service.
+   */
+  public static final ConnectionSettings DEFAULT_CONNECTION_SETTINGS =
+      ConnectionSettings.newBuilder()
+          .setServiceAddress(DEFAULT_SERVICE_ADDRESS)
+          .setPort(DEFAULT_SERVICE_PORT)
+          .provideCredentialsWith(DEFAULT_SERVICE_SCOPES)
+          .build();
+
   private final SimpleCallSettings createSubscriptionSettings;
   private final SimpleCallSettings getSubscriptionSettings;
   private final PageStreamingCallSettings<
@@ -191,10 +203,10 @@ public SimpleCallSettings modifyPushConfigSettin
   }
 
   /**
-   * Returns an instance of this class with recommended defaults.
+   * Returns a builder for this class with recommended defaults.
    */
-  public static SubscriberSettings defaultInstance() throws IOException {
-    return newBuilder().build();
+  public static Builder defaultBuilder() {
+    return Builder.createDefault();
   }
 
   /**
@@ -213,10 +225,8 @@ public Builder toBuilder() {
 
   private SubscriberSettings(Builder settingsBuilder) throws IOException {
     super(
-        settingsBuilder.getOrBuildChannel(),
-        settingsBuilder.shouldAutoCloseChannel(),
-        settingsBuilder.getOrBuildExecutor(),
-        settingsBuilder.getConnectionSettings(),
+        settingsBuilder.getChannelProvider(),
+        settingsBuilder.getExecutorProvider(),
         settingsBuilder.getGeneratorName(),
         settingsBuilder.getGeneratorVersion(),
         settingsBuilder.getClientLibName(),
@@ -311,53 +321,30 @@ public static class Builder extends ServiceApiSettings.Builder {
     }
 
     private Builder() {
-      super(
-          ConnectionSettings.newBuilder()
-              .setServiceAddress(DEFAULT_SERVICE_ADDRESS)
-              .setPort(DEFAULT_SERVICE_PORT)
-              .provideCredentialsWith(DEFAULT_SERVICE_SCOPES)
-              .build());
+      super(DEFAULT_CONNECTION_SETTINGS);
 
       createSubscriptionSettings =
-          SimpleCallSettings.newBuilder(SubscriberGrpc.METHOD_CREATE_SUBSCRIPTION)
-              .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
-              .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+          SimpleCallSettings.newBuilder(SubscriberGrpc.METHOD_CREATE_SUBSCRIPTION);
 
       getSubscriptionSettings =
-          SimpleCallSettings.newBuilder(SubscriberGrpc.METHOD_GET_SUBSCRIPTION)
-              .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
-              .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+          SimpleCallSettings.newBuilder(SubscriberGrpc.METHOD_GET_SUBSCRIPTION);
 
       listSubscriptionsSettings =
           PageStreamingCallSettings.newBuilder(
-                  SubscriberGrpc.METHOD_LIST_SUBSCRIPTIONS, LIST_SUBSCRIPTIONS_PAGE_STR_DESC)
-              .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
-              .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+              SubscriberGrpc.METHOD_LIST_SUBSCRIPTIONS, LIST_SUBSCRIPTIONS_PAGE_STR_DESC);
 
       deleteSubscriptionSettings =
-          SimpleCallSettings.newBuilder(SubscriberGrpc.METHOD_DELETE_SUBSCRIPTION)
-              .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
-              .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+          SimpleCallSettings.newBuilder(SubscriberGrpc.METHOD_DELETE_SUBSCRIPTION);
 
       modifyAckDeadlineSettings =
-          SimpleCallSettings.newBuilder(SubscriberGrpc.METHOD_MODIFY_ACK_DEADLINE)
-              .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
-              .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+          SimpleCallSettings.newBuilder(SubscriberGrpc.METHOD_MODIFY_ACK_DEADLINE);
 
-      acknowledgeSettings =
-          SimpleCallSettings.newBuilder(SubscriberGrpc.METHOD_ACKNOWLEDGE)
-              .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
-              .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+      acknowledgeSettings = SimpleCallSettings.newBuilder(SubscriberGrpc.METHOD_ACKNOWLEDGE);
 
-      pullSettings =
-          SimpleCallSettings.newBuilder(SubscriberGrpc.METHOD_PULL)
-              .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
-              .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+      pullSettings = SimpleCallSettings.newBuilder(SubscriberGrpc.METHOD_PULL);
 
       modifyPushConfigSettings =
-          SimpleCallSettings.newBuilder(SubscriberGrpc.METHOD_MODIFY_PUSH_CONFIG)
-              .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
-              .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+          SimpleCallSettings.newBuilder(SubscriberGrpc.METHOD_MODIFY_PUSH_CONFIG);
 
       methodSettingsBuilders =
           ImmutableList.of(
@@ -371,6 +358,51 @@ private Builder() {
               modifyPushConfigSettings);
     }
 
+    private static Builder createDefault() {
+      Builder builder = new Builder();
+      builder
+          .createSubscriptionSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+          .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+
+      builder
+          .getSubscriptionSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+
+      builder
+          .listSubscriptionsSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+
+      builder
+          .deleteSubscriptionSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+          .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+
+      builder
+          .modifyAckDeadlineSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+          .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+
+      builder
+          .acknowledgeSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+          .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+
+      builder
+          .pullSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+          .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+
+      builder
+          .modifyPushConfigSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+          .setRetrySettingsBuilder(RETRY_PARAM_DEFINITIONS.get("default"));
+
+      return builder;
+    }
+
     private Builder(SubscriberSettings settings) {
       super(settings);
 
@@ -395,6 +427,17 @@ private Builder(SubscriberSettings settings) {
               modifyPushConfigSettings);
     }
 
+    @Override
+    protected ConnectionSettings getDefaultConnectionSettings() {
+      return DEFAULT_CONNECTION_SETTINGS;
+    }
+
+    @Override
+    public Builder provideExecutorWith(ScheduledExecutorService executor, boolean shouldAutoClose) {
+      super.provideExecutorWith(executor, shouldAutoClose);
+      return this;
+    }
+
     @Override
     public Builder provideChannelWith(ManagedChannel channel, boolean shouldAutoClose) {
       super.provideChannelWith(channel, shouldAutoClose);
@@ -408,8 +451,14 @@ public Builder provideChannelWith(ConnectionSettings settings) {
     }
 
     @Override
-    public Builder setExecutor(ScheduledExecutorService executor) {
-      super.setExecutor(executor);
+    public Builder provideChannelWith(Credentials credentials) {
+      super.provideChannelWith(credentials);
+      return this;
+    }
+
+    @Override
+    public Builder provideChannelWith(List scopes) {
+      super.provideChannelWith(scopes);
       return this;
     }
 
diff --git a/gcloud-java-pubsub/src/test/java/com/google/cloud/pubsub/spi/v1/PublisherApiTest.java b/gcloud-java-pubsub/src/test/java/com/google/cloud/pubsub/spi/v1/PublisherApiTest.java
index 0b508efec143..fdb8234d51da 100644
--- a/gcloud-java-pubsub/src/test/java/com/google/cloud/pubsub/spi/v1/PublisherApiTest.java
+++ b/gcloud-java-pubsub/src/test/java/com/google/cloud/pubsub/spi/v1/PublisherApiTest.java
@@ -59,7 +59,7 @@ public void setUp() throws Exception {
     ManagedChannel channel = pubsubHelper.createChannel();
 
     PublisherSettings publisherSettings =
-        PublisherSettings.newBuilder()
+        PublisherSettings.defaultBuilder()
             .provideChannelWith(channel, true)
             .build();
     publisherApi = PublisherApi.create(publisherSettings);
@@ -69,7 +69,7 @@ public void setUp() throws Exception {
             .setElementCountThreshold(10)
             .setDelayThreshold(Duration.standardSeconds(30));
 
-    PublisherSettings.Builder bundledPublisherSettingsBuilder = PublisherSettings.newBuilder();
+    PublisherSettings.Builder bundledPublisherSettingsBuilder = PublisherSettings.defaultBuilder();
     bundledPublisherSettingsBuilder
         .provideChannelWith(channel, true)
         .publishSettings()
@@ -78,7 +78,7 @@ public void setUp() throws Exception {
     PublisherSettings bundledPublisherSettings = bundledPublisherSettingsBuilder.build();
     bundledPublisherApi = PublisherApi.create(bundledPublisherSettings);
 
-    SubscriberSettings subscriberSettings = SubscriberSettings.newBuilder()
+    SubscriberSettings subscriberSettings = SubscriberSettings.defaultBuilder()
         .provideChannelWith(channel, true)
         .build();
     subscriberApi = SubscriberApi.create(subscriberSettings);