2020import com .google .api .gax .rpc .ServerStreamingCallSettings ;
2121import com .google .api .gax .rpc .UnaryCallSettings ;
2222import com .google .cloud .bigtable .data .v2 .models .ConditionalRowMutation ;
23- import com .google .cloud .bigtable .data .v2 .models .InstanceName ;
2423import com .google .cloud .bigtable .data .v2 .models .KeyOffset ;
2524import com .google .cloud .bigtable .data .v2 .models .Query ;
2625import com .google .cloud .bigtable .data .v2 .models .ReadModifyWriteRow ;
4948 *
5049 * <pre>{@code
5150 * BigtableDataSettings.Builder settingsBuilder = BigtableDataSettings.newBuilder()
52- * .setInstanceName(InstanceName.of("my-project", "my-instance-id"))
51+ * .setProjectId("my-project")
52+ * .setInstanceId("my-instance-id")
5353 * .setAppProfileId("default");
5454 *
5555 * settingsBuilder.readRowsSettings().setRetryableCodes(Code.DEADLINE_EXCEEDED, Code.UNAVAILABLE);
@@ -67,12 +67,27 @@ public static Builder newBuilder() {
6767 return new Builder ();
6868 }
6969
70- /** Returns the target instance */
71- public InstanceName getInstanceName () {
70+ /**
71+ * Returns the target instance.
72+ *
73+ * @deprecated Please use {@link #getProjectId()} and {@link #getInstanceId()}.
74+ */
75+ @ Deprecated ()
76+ public com .google .cloud .bigtable .data .v2 .models .InstanceName getInstanceName () {
7277 return getTypedStubSettings ().getInstanceName ();
7378 }
7479
75- /** Returns the configured AppProfile to use */
80+ /** Returns the target project id. */
81+ public String getProjectId () {
82+ return getTypedStubSettings ().getProjectId ();
83+ }
84+
85+ /** Returns the target instance id. */
86+ public String getInstanceId () {
87+ return getTypedStubSettings ().getInstanceId ();
88+ }
89+
90+ /** Returns the configured AppProfile id to use. */
7691 public String getAppProfileId () {
7792 return getTypedStubSettings ().getAppProfileId ();
7893 }
@@ -142,17 +157,55 @@ private Builder(BigtableDataSettings settings) {
142157 /**
143158 * Sets the target instance. This setting is required. All RPCs will be made in the context of
144159 * this setting.
160+ *
161+ * @deprecated Please use {@link #setProjectId(String)} and {@link #setInstanceId(String)}.
145162 */
146- public Builder setInstanceName (@ Nonnull InstanceName instanceName ) {
163+ @ Deprecated
164+ public Builder setInstanceName (
165+ @ Nonnull com .google .cloud .bigtable .data .v2 .models .InstanceName instanceName ) {
147166 getTypedStubSettings ().setInstanceName (instanceName );
148167 return this ;
149168 }
150169
151- /** Gets the {@link InstanceName} that was previously set on this Builder. */
152- public InstanceName getInstanceName () {
170+ /**
171+ * Gets the {@link com.google.cloud.bigtable.data.v2.models.InstanceName} that was previously
172+ * set on this Builder.
173+ *
174+ * @deprecated Please use {@link #getProjectId()} and {@link #getInstanceId()}.
175+ */
176+ @ Deprecated
177+ public com .google .cloud .bigtable .data .v2 .models .InstanceName getInstanceName () {
153178 return getTypedStubSettings ().getInstanceName ();
154179 }
155180
181+ /**
182+ * Sets the target project. This setting is required. All RPCs will be made in the context of
183+ * this setting.
184+ */
185+ public Builder setProjectId (@ Nonnull String projectId ) {
186+ getTypedStubSettings ().setProjectId (projectId );
187+ return this ;
188+ }
189+
190+ /** Gets the project id that was previously set on this Builder. */
191+ public String getProjectId () {
192+ return getTypedStubSettings ().getProjectId ();
193+ }
194+
195+ /**
196+ * Sets the target instance. This setting is required. All RPCs will be made in the context of
197+ * this setting.
198+ */
199+ public Builder setInstanceId (@ Nonnull String instanceId ) {
200+ getTypedStubSettings ().setInstanceId (instanceId );
201+ return this ;
202+ }
203+
204+ /** Gets the instance id that was previously set on this Builder. */
205+ public String getInstanceId () {
206+ return getTypedStubSettings ().getInstanceId ();
207+ }
208+
156209 /**
157210 * Sets the AppProfile to use. An application profile (sometimes also shortened to "app
158211 * profile") is a group of configuration parameters for an individual use case. A client will
0 commit comments