|
44 | 44 | * <pre> |
45 | 45 | * <code> |
46 | 46 | * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) { |
| 47 | + * RegionName parent = RegionName.of("[PROJECT]", "[REGION]"); |
47 | 48 | * AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build(); |
48 | | - * AutoscalingPolicy response = autoscalingPolicyServiceClient.updateAutoscalingPolicy(policy); |
| 49 | + * AutoscalingPolicy response = autoscalingPolicyServiceClient.createAutoscalingPolicy(parent, policy); |
49 | 50 | * } |
50 | 51 | * </code> |
51 | 52 | * </pre> |
@@ -157,80 +158,6 @@ public AutoscalingPolicyServiceStub getStub() { |
157 | 158 | return stub; |
158 | 159 | } |
159 | 160 |
|
160 | | - // AUTO-GENERATED DOCUMENTATION AND METHOD |
161 | | - /** |
162 | | - * Updates (replaces) autoscaling policy. |
163 | | - * |
164 | | - * <p>Disabled check for update_mask, because all updates will be full replacements. |
165 | | - * |
166 | | - * <p>Sample code: |
167 | | - * |
168 | | - * <pre><code> |
169 | | - * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) { |
170 | | - * AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build(); |
171 | | - * AutoscalingPolicy response = autoscalingPolicyServiceClient.updateAutoscalingPolicy(policy); |
172 | | - * } |
173 | | - * </code></pre> |
174 | | - * |
175 | | - * @param policy Required. The updated autoscaling policy. |
176 | | - * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
177 | | - */ |
178 | | - public final AutoscalingPolicy updateAutoscalingPolicy(AutoscalingPolicy policy) { |
179 | | - UpdateAutoscalingPolicyRequest request = |
180 | | - UpdateAutoscalingPolicyRequest.newBuilder().setPolicy(policy).build(); |
181 | | - return updateAutoscalingPolicy(request); |
182 | | - } |
183 | | - |
184 | | - // AUTO-GENERATED DOCUMENTATION AND METHOD |
185 | | - /** |
186 | | - * Updates (replaces) autoscaling policy. |
187 | | - * |
188 | | - * <p>Disabled check for update_mask, because all updates will be full replacements. |
189 | | - * |
190 | | - * <p>Sample code: |
191 | | - * |
192 | | - * <pre><code> |
193 | | - * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) { |
194 | | - * AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build(); |
195 | | - * UpdateAutoscalingPolicyRequest request = UpdateAutoscalingPolicyRequest.newBuilder() |
196 | | - * .setPolicy(policy) |
197 | | - * .build(); |
198 | | - * AutoscalingPolicy response = autoscalingPolicyServiceClient.updateAutoscalingPolicy(request); |
199 | | - * } |
200 | | - * </code></pre> |
201 | | - * |
202 | | - * @param request The request object containing all of the parameters for the API call. |
203 | | - * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
204 | | - */ |
205 | | - public final AutoscalingPolicy updateAutoscalingPolicy(UpdateAutoscalingPolicyRequest request) { |
206 | | - return updateAutoscalingPolicyCallable().call(request); |
207 | | - } |
208 | | - |
209 | | - // AUTO-GENERATED DOCUMENTATION AND METHOD |
210 | | - /** |
211 | | - * Updates (replaces) autoscaling policy. |
212 | | - * |
213 | | - * <p>Disabled check for update_mask, because all updates will be full replacements. |
214 | | - * |
215 | | - * <p>Sample code: |
216 | | - * |
217 | | - * <pre><code> |
218 | | - * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) { |
219 | | - * AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build(); |
220 | | - * UpdateAutoscalingPolicyRequest request = UpdateAutoscalingPolicyRequest.newBuilder() |
221 | | - * .setPolicy(policy) |
222 | | - * .build(); |
223 | | - * ApiFuture<AutoscalingPolicy> future = autoscalingPolicyServiceClient.updateAutoscalingPolicyCallable().futureCall(request); |
224 | | - * // Do something |
225 | | - * AutoscalingPolicy response = future.get(); |
226 | | - * } |
227 | | - * </code></pre> |
228 | | - */ |
229 | | - public final UnaryCallable<UpdateAutoscalingPolicyRequest, AutoscalingPolicy> |
230 | | - updateAutoscalingPolicyCallable() { |
231 | | - return stub.updateAutoscalingPolicyCallable(); |
232 | | - } |
233 | | - |
234 | 161 | // AUTO-GENERATED DOCUMENTATION AND METHOD |
235 | 162 | /** |
236 | 163 | * Creates new autoscaling policy. |
@@ -376,6 +303,80 @@ public final AutoscalingPolicy createAutoscalingPolicy(CreateAutoscalingPolicyRe |
376 | 303 | return stub.createAutoscalingPolicyCallable(); |
377 | 304 | } |
378 | 305 |
|
| 306 | + // AUTO-GENERATED DOCUMENTATION AND METHOD |
| 307 | + /** |
| 308 | + * Updates (replaces) autoscaling policy. |
| 309 | + * |
| 310 | + * <p>Disabled check for update_mask, because all updates will be full replacements. |
| 311 | + * |
| 312 | + * <p>Sample code: |
| 313 | + * |
| 314 | + * <pre><code> |
| 315 | + * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) { |
| 316 | + * AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build(); |
| 317 | + * AutoscalingPolicy response = autoscalingPolicyServiceClient.updateAutoscalingPolicy(policy); |
| 318 | + * } |
| 319 | + * </code></pre> |
| 320 | + * |
| 321 | + * @param policy Required. The updated autoscaling policy. |
| 322 | + * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
| 323 | + */ |
| 324 | + public final AutoscalingPolicy updateAutoscalingPolicy(AutoscalingPolicy policy) { |
| 325 | + UpdateAutoscalingPolicyRequest request = |
| 326 | + UpdateAutoscalingPolicyRequest.newBuilder().setPolicy(policy).build(); |
| 327 | + return updateAutoscalingPolicy(request); |
| 328 | + } |
| 329 | + |
| 330 | + // AUTO-GENERATED DOCUMENTATION AND METHOD |
| 331 | + /** |
| 332 | + * Updates (replaces) autoscaling policy. |
| 333 | + * |
| 334 | + * <p>Disabled check for update_mask, because all updates will be full replacements. |
| 335 | + * |
| 336 | + * <p>Sample code: |
| 337 | + * |
| 338 | + * <pre><code> |
| 339 | + * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) { |
| 340 | + * AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build(); |
| 341 | + * UpdateAutoscalingPolicyRequest request = UpdateAutoscalingPolicyRequest.newBuilder() |
| 342 | + * .setPolicy(policy) |
| 343 | + * .build(); |
| 344 | + * AutoscalingPolicy response = autoscalingPolicyServiceClient.updateAutoscalingPolicy(request); |
| 345 | + * } |
| 346 | + * </code></pre> |
| 347 | + * |
| 348 | + * @param request The request object containing all of the parameters for the API call. |
| 349 | + * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
| 350 | + */ |
| 351 | + public final AutoscalingPolicy updateAutoscalingPolicy(UpdateAutoscalingPolicyRequest request) { |
| 352 | + return updateAutoscalingPolicyCallable().call(request); |
| 353 | + } |
| 354 | + |
| 355 | + // AUTO-GENERATED DOCUMENTATION AND METHOD |
| 356 | + /** |
| 357 | + * Updates (replaces) autoscaling policy. |
| 358 | + * |
| 359 | + * <p>Disabled check for update_mask, because all updates will be full replacements. |
| 360 | + * |
| 361 | + * <p>Sample code: |
| 362 | + * |
| 363 | + * <pre><code> |
| 364 | + * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = AutoscalingPolicyServiceClient.create()) { |
| 365 | + * AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build(); |
| 366 | + * UpdateAutoscalingPolicyRequest request = UpdateAutoscalingPolicyRequest.newBuilder() |
| 367 | + * .setPolicy(policy) |
| 368 | + * .build(); |
| 369 | + * ApiFuture<AutoscalingPolicy> future = autoscalingPolicyServiceClient.updateAutoscalingPolicyCallable().futureCall(request); |
| 370 | + * // Do something |
| 371 | + * AutoscalingPolicy response = future.get(); |
| 372 | + * } |
| 373 | + * </code></pre> |
| 374 | + */ |
| 375 | + public final UnaryCallable<UpdateAutoscalingPolicyRequest, AutoscalingPolicy> |
| 376 | + updateAutoscalingPolicyCallable() { |
| 377 | + return stub.updateAutoscalingPolicyCallable(); |
| 378 | + } |
| 379 | + |
379 | 380 | // AUTO-GENERATED DOCUMENTATION AND METHOD |
380 | 381 | /** |
381 | 382 | * Retrieves autoscaling policy. |
|
0 commit comments