|
58 | 58 | * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
|
59 | 59 | * try (ConsumerProcurementServiceClient consumerProcurementServiceClient =
|
60 | 60 | * ConsumerProcurementServiceClient.create()) {
|
61 |
| - * GetOrderRequest request = GetOrderRequest.newBuilder().setName("name3373707").build(); |
62 |
| - * Order response = consumerProcurementServiceClient.getOrder(request); |
| 61 | + * String name = "name3373707"; |
| 62 | + * Order response = consumerProcurementServiceClient.getOrder(name); |
63 | 63 | * }
|
64 | 64 | * }</pre>
|
65 | 65 | *
|
@@ -219,6 +219,9 @@ public final OperationsClient getHttpJsonOperationsClient() {
|
219 | 219 | /**
|
220 | 220 | * Creates a new [Order][google.cloud.commerce.consumer.procurement.v1alpha1.Order].
|
221 | 221 | *
|
| 222 | + * <p>This API only supports GCP spend-based committed use discounts specified by GCP |
| 223 | + * documentation. |
| 224 | + * |
222 | 225 | * <p>The returned long-running operation is in-progress until the backend completes the creation
|
223 | 226 | * of the resource. Once completed, the order is in
|
224 | 227 | * [OrderState.ORDER_STATE_ACTIVE][google.cloud.commerce.consumer.procurement.v1alpha1.OrderState.ORDER_STATE_ACTIVE].
|
@@ -257,6 +260,9 @@ public final OperationFuture<Order, PlaceOrderMetadata> placeOrderAsync(
|
257 | 260 | /**
|
258 | 261 | * Creates a new [Order][google.cloud.commerce.consumer.procurement.v1alpha1.Order].
|
259 | 262 | *
|
| 263 | + * <p>This API only supports GCP spend-based committed use discounts specified by GCP |
| 264 | + * documentation. |
| 265 | + * |
260 | 266 | * <p>The returned long-running operation is in-progress until the backend completes the creation
|
261 | 267 | * of the resource. Once completed, the order is in
|
262 | 268 | * [OrderState.ORDER_STATE_ACTIVE][google.cloud.commerce.consumer.procurement.v1alpha1.OrderState.ORDER_STATE_ACTIVE].
|
@@ -295,6 +301,9 @@ public final OperationFuture<Order, PlaceOrderMetadata> placeOrderAsync(
|
295 | 301 | /**
|
296 | 302 | * Creates a new [Order][google.cloud.commerce.consumer.procurement.v1alpha1.Order].
|
297 | 303 | *
|
| 304 | + * <p>This API only supports GCP spend-based committed use discounts specified by GCP |
| 305 | + * documentation. |
| 306 | + * |
298 | 307 | * <p>The returned long-running operation is in-progress until the backend completes the creation
|
299 | 308 | * of the resource. Once completed, the order is in
|
300 | 309 | * [OrderState.ORDER_STATE_ACTIVE][google.cloud.commerce.consumer.procurement.v1alpha1.OrderState.ORDER_STATE_ACTIVE].
|
@@ -328,6 +337,34 @@ public final UnaryCallable<PlaceOrderRequest, Operation> placeOrderCallable() {
|
328 | 337 | return stub.placeOrderCallable();
|
329 | 338 | }
|
330 | 339 |
|
| 340 | + // AUTO-GENERATED DOCUMENTATION AND METHOD. |
| 341 | + /** |
| 342 | + * Returns the requested [Order][google.cloud.commerce.consumer.procurement.v1alpha1.Order] |
| 343 | + * resource. |
| 344 | + * |
| 345 | + * <p>Sample code: |
| 346 | + * |
| 347 | + * <pre>{@code |
| 348 | + * // This snippet has been automatically generated and should be regarded as a code template only. |
| 349 | + * // It will require modifications to work: |
| 350 | + * // - It may require correct/in-range values for request initialization. |
| 351 | + * // - It may require specifying regional endpoints when creating the service client as shown in |
| 352 | + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library |
| 353 | + * try (ConsumerProcurementServiceClient consumerProcurementServiceClient = |
| 354 | + * ConsumerProcurementServiceClient.create()) { |
| 355 | + * String name = "name3373707"; |
| 356 | + * Order response = consumerProcurementServiceClient.getOrder(name); |
| 357 | + * } |
| 358 | + * }</pre> |
| 359 | + * |
| 360 | + * @param name Required. The name of the order to retrieve. |
| 361 | + * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
| 362 | + */ |
| 363 | + public final Order getOrder(String name) { |
| 364 | + GetOrderRequest request = GetOrderRequest.newBuilder().setName(name).build(); |
| 365 | + return getOrder(request); |
| 366 | + } |
| 367 | + |
331 | 368 | // AUTO-GENERATED DOCUMENTATION AND METHOD.
|
332 | 369 | /**
|
333 | 370 | * Returns the requested [Order][google.cloud.commerce.consumer.procurement.v1alpha1.Order]
|
@@ -382,6 +419,37 @@ public final UnaryCallable<GetOrderRequest, Order> getOrderCallable() {
|
382 | 419 | return stub.getOrderCallable();
|
383 | 420 | }
|
384 | 421 |
|
| 422 | + // AUTO-GENERATED DOCUMENTATION AND METHOD. |
| 423 | + /** |
| 424 | + * Lists [Order][google.cloud.commerce.consumer.procurement.v1alpha1.Order] resources that the |
| 425 | + * user has access to, within the scope of the parent resource. |
| 426 | + * |
| 427 | + * <p>Sample code: |
| 428 | + * |
| 429 | + * <pre>{@code |
| 430 | + * // This snippet has been automatically generated and should be regarded as a code template only. |
| 431 | + * // It will require modifications to work: |
| 432 | + * // - It may require correct/in-range values for request initialization. |
| 433 | + * // - It may require specifying regional endpoints when creating the service client as shown in |
| 434 | + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library |
| 435 | + * try (ConsumerProcurementServiceClient consumerProcurementServiceClient = |
| 436 | + * ConsumerProcurementServiceClient.create()) { |
| 437 | + * String parent = "parent-995424086"; |
| 438 | + * for (Order element : consumerProcurementServiceClient.listOrders(parent).iterateAll()) { |
| 439 | + * // doThingsWith(element); |
| 440 | + * } |
| 441 | + * } |
| 442 | + * }</pre> |
| 443 | + * |
| 444 | + * @param parent Required. The parent resource to query for orders. This field has the form |
| 445 | + * `billingAccounts/{billing-account-id}`. |
| 446 | + * @throws com.google.api.gax.rpc.ApiException if the remote call fails |
| 447 | + */ |
| 448 | + public final ListOrdersPagedResponse listOrders(String parent) { |
| 449 | + ListOrdersRequest request = ListOrdersRequest.newBuilder().setParent(parent).build(); |
| 450 | + return listOrders(request); |
| 451 | + } |
| 452 | + |
385 | 453 | // AUTO-GENERATED DOCUMENTATION AND METHOD.
|
386 | 454 | /**
|
387 | 455 | * Lists [Order][google.cloud.commerce.consumer.procurement.v1alpha1.Order] resources that the
|
|
0 commit comments