diff --git a/java-cloudcommerceconsumerprocurement/proto-google-cloud-cloudcommerceconsumerprocurement-v1alpha1/src/main/java/com/google/cloud/commerce/consumer/procurement/v1alpha1/LineItemInfoOrBuilder.java b/java-cloudcommerceconsumerprocurement/proto-google-cloud-cloudcommerceconsumerprocurement-v1alpha1/src/main/java/com/google/cloud/commerce/consumer/procurement/v1alpha1/LineItemInfoOrBuilder.java deleted file mode 100644 index 1aee64e7c347..000000000000 --- a/java-cloudcommerceconsumerprocurement/proto-google-cloud-cloudcommerceconsumerprocurement-v1alpha1/src/main/java/com/google/cloud/commerce/consumer/procurement/v1alpha1/LineItemInfoOrBuilder.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/commerce/consumer/procurement/v1alpha1/order.proto - -package com.google.cloud.commerce.consumer.procurement.v1alpha1; - -public interface LineItemInfoOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
- * Optional. The name of the offer can have either of these formats: - * 'billingAccounts/{billing_account}/offers/{offer}', - * or 'services/{service}/standardOffers/{offer}'. - *- * - *
- * string offer = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
- *
- *
- * @return The offer.
- */
- java.lang.String getOffer();
- /**
- *
- *
- * - * Optional. The name of the offer can have either of these formats: - * 'billingAccounts/{billing_account}/offers/{offer}', - * or 'services/{service}/standardOffers/{offer}'. - *- * - *
- * string offer = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
- *
- *
- * @return The bytes for offer.
- */
- com.google.protobuf.ByteString getOfferBytes();
-
- /**
- *
- *
- * - * Optional. User-provided parameters. - *- * - *
- * repeated .google.cloud.commerce.consumer.procurement.v1alpha1.Parameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL];
- *
- */
- java.util.List- * Optional. User-provided parameters. - *- * - *
- * repeated .google.cloud.commerce.consumer.procurement.v1alpha1.Parameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL];
- *
- */
- com.google.cloud.commerce.consumer.procurement.v1alpha1.Parameter getParameters(int index);
- /**
- *
- *
- * - * Optional. User-provided parameters. - *- * - *
- * repeated .google.cloud.commerce.consumer.procurement.v1alpha1.Parameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL];
- *
- */
- int getParametersCount();
- /**
- *
- *
- * - * Optional. User-provided parameters. - *- * - *
- * repeated .google.cloud.commerce.consumer.procurement.v1alpha1.Parameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL];
- *
- */
- java.util.List<
- ? extends com.google.cloud.commerce.consumer.procurement.v1alpha1.ParameterOrBuilder>
- getParametersOrBuilderList();
- /**
- *
- *
- * - * Optional. User-provided parameters. - *- * - *
- * repeated .google.cloud.commerce.consumer.procurement.v1alpha1.Parameter parameters = 9 [(.google.api.field_behavior) = OPTIONAL];
- *
- */
- com.google.cloud.commerce.consumer.procurement.v1alpha1.ParameterOrBuilder getParametersOrBuilder(
- int index);
-
- /**
- *
- *
- * - * Output only. Information about the subscription created, if applicable. - *- * - *
- * .google.cloud.commerce.consumer.procurement.v1alpha1.Subscription subscription = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
- *
- *
- * @return Whether the subscription field is set.
- */
- boolean hasSubscription();
- /**
- *
- *
- * - * Output only. Information about the subscription created, if applicable. - *- * - *
- * .google.cloud.commerce.consumer.procurement.v1alpha1.Subscription subscription = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
- *
- *
- * @return The subscription.
- */
- com.google.cloud.commerce.consumer.procurement.v1alpha1.Subscription getSubscription();
- /**
- *
- *
- * - * Output only. Information about the subscription created, if applicable. - *- * - *
- * .google.cloud.commerce.consumer.procurement.v1alpha1.Subscription subscription = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
- *
- */
- com.google.cloud.commerce.consumer.procurement.v1alpha1.SubscriptionOrBuilder
- getSubscriptionOrBuilder();
-}
diff --git a/java-cloudcommerceconsumerprocurement/proto-google-cloud-cloudcommerceconsumerprocurement-v1alpha1/src/main/java/com/google/cloud/commerce/consumer/procurement/v1alpha1/OrderOuterClass.java b/java-cloudcommerceconsumerprocurement/proto-google-cloud-cloudcommerceconsumerprocurement-v1alpha1/src/main/java/com/google/cloud/commerce/consumer/procurement/v1alpha1/OrderOuterClass.java
deleted file mode 100644
index 634b3972c73e..000000000000
--- a/java-cloudcommerceconsumerprocurement/proto-google-cloud-cloudcommerceconsumerprocurement-v1alpha1/src/main/java/com/google/cloud/commerce/consumer/procurement/v1alpha1/OrderOuterClass.java
+++ /dev/null
@@ -1,250 +0,0 @@
-/*
- * Copyright 2023 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/cloud/commerce/consumer/procurement/v1alpha1/order.proto
-
-package com.google.cloud.commerce.consumer.procurement.v1alpha1;
-
-public final class OrderOuterClass {
- private OrderOuterClass() {}
-
- public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {}
-
- public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) {
- registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry);
- }
-
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_Order_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_Order_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_LineItem_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_LineItem_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_LineItemChange_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_LineItemChange_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_LineItemInfo_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_LineItemInfo_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_Parameter_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_Parameter_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_Parameter_Value_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_Parameter_Value_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_Subscription_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_Subscription_fieldAccessorTable;
-
- public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
- return descriptor;
- }
-
- private static com.google.protobuf.Descriptors.FileDescriptor descriptor;
-
- static {
- java.lang.String[] descriptorData = {
- "\n?google/cloud/commerce/consumer/procure"
- + "ment/v1alpha1/order.proto\0223google.cloud."
- + "commerce.consumer.procurement.v1alpha1\032\037"
- + "google/api/field_behavior.proto\032\031google/"
- + "api/resource.proto\032\037google/protobuf/time"
- + "stamp.proto\"\335\003\n\005Order\022\022\n\004name\030\001 \001(\tB\004\342A\001"
- + "\003\022\032\n\014display_name\030\n \001(\tB\004\342A\001\002\022W\n\nline_it"
- + "ems\030\006 \003(\0132=.google.cloud.commerce.consum"
- + "er.procurement.v1alpha1.LineItemB\004\342A\001\003\022a"
- + "\n\024cancelled_line_items\030\007 \003(\0132=.google.cl"
- + "oud.commerce.consumer.procurement.v1alph"
- + "a1.LineItemB\004\342A\001\003\0225\n\013create_time\030\010 \001(\0132\032"
- + ".google.protobuf.TimestampB\004\342A\001\003\0225\n\013upda"
- + "te_time\030\t \001(\0132\032.google.protobuf.Timestam"
- + "pB\004\342A\001\003\022\014\n\004etag\030\013 \001(\t:l\352Ai\n5cloudcommerc"
- + "econsumerprocurement.googleapis.com/Orde"
- + "r\0220billingAccounts/{billing_account}/ord"
- + "ers/{order}\"\315\002\n\010LineItem\022\032\n\014line_item_id"
- + "\030\001 \001(\tB\004\342A\001\003\022_\n\016line_item_info\030\002 \001(\0132A.g"
- + "oogle.cloud.commerce.consumer.procuremen"
- + "t.v1alpha1.LineItemInfoB\004\342A\001\003\022a\n\016pending"
- + "_change\030\003 \001(\0132C.google.cloud.commerce.co"
- + "nsumer.procurement.v1alpha1.LineItemChan"
- + "geB\004\342A\001\003\022a\n\016change_history\030\004 \003(\0132C.googl"
- + "e.cloud.commerce.consumer.procurement.v1"
- + "alpha1.LineItemChangeB\004\342A\001\003\"\376\005\n\016LineItem"
- + "Change\022\027\n\tchange_id\030\001 \001(\tB\004\342A\001\003\022b\n\013chang"
- + "e_type\030\002 \001(\0162G.google.cloud.commerce.con"
- + "sumer.procurement.v1alpha1.LineItemChang"
- + "eTypeB\004\342A\001\002\022c\n\022old_line_item_info\030\003 \001(\0132"
- + "A.google.cloud.commerce.consumer.procure"
- + "ment.v1alpha1.LineItemInfoB\004\342A\001\003\022]\n\022new_"
- + "line_item_info\030\004 \001(\0132A.google.cloud.comm"
- + "erce.consumer.procurement.v1alpha1.LineI"
- + "temInfo\022d\n\014change_state\030\005 \001(\0162H.google.c"
- + "loud.commerce.consumer.procurement.v1alp"
- + "ha1.LineItemChangeStateB\004\342A\001\003\022\032\n\014state_r"
- + "eason\030\006 \001(\tB\004\342A\001\003\022z\n\030change_state_reason"
- + "_type\030\n \001(\0162R.google.cloud.commerce.cons"
- + "umer.procurement.v1alpha1.LineItemChange"
- + "StateReasonTypeB\004\342A\001\003\022?\n\025change_effectiv"
- + "e_time\030\007 \001(\0132\032.google.protobuf.Timestamp"
- + "B\004\342A\001\003\0225\n\013create_time\030\010 \001(\0132\032.google.pro"
- + "tobuf.TimestampB\004\342A\001\003\0225\n\013update_time\030\t \001"
- + "(\0132\032.google.protobuf.TimestampB\004\342A\001\003\"\212\002\n"
- + "\014LineItemInfo\022A\n\005offer\030\r \001(\tB2\342A\001\001\372A+\n)c"
- + "ommerceoffercatalog.googleapis.com/Offer"
- + "\022X\n\nparameters\030\t \003(\0132>.google.cloud.comm"
- + "erce.consumer.procurement.v1alpha1.Param"
- + "eterB\004\342A\001\001\022]\n\014subscription\030\n \001(\0132A.googl"
- + "e.cloud.commerce.consumer.procurement.v1"
- + "alpha1.SubscriptionB\004\342A\001\003\"\306\001\n\tParameter\022"
- + "\014\n\004name\030\001 \001(\t\022S\n\005value\030\002 \001(\0132D.google.cl"
- + "oud.commerce.consumer.procurement.v1alph"
- + "a1.Parameter.Value\032V\n\005Value\022\025\n\013int64_val"
- + "ue\030\003 \001(\003H\000\022\026\n\014string_value\030\004 \001(\tH\000\022\026\n\014do"
- + "uble_value\030\005 \001(\001H\000B\006\n\004kind\"\212\001\n\014Subscript"
- + "ion\022.\n\nstart_time\030\003 \001(\0132\032.google.protobu"
- + "f.Timestamp\022,\n\010end_time\030\001 \001(\0132\032.google.p"
- + "rotobuf.Timestamp\022\034\n\024auto_renewal_enable"
- + "d\030\002 \001(\010*\320\001\n\022LineItemChangeType\022%\n!LINE_I"
- + "TEM_CHANGE_TYPE_UNSPECIFIED\020\000\022 \n\034LINE_IT"
- + "EM_CHANGE_TYPE_CREATE\020\001\022 \n\034LINE_ITEM_CHA"
- + "NGE_TYPE_UPDATE\020\002\022 \n\034LINE_ITEM_CHANGE_TY"
- + "PE_CANCEL\020\003\022-\n)LINE_ITEM_CHANGE_TYPE_REV"
- + "ERT_CANCELLATION\020\004*\247\002\n\023LineItemChangeSta"
- + "te\022&\n\"LINE_ITEM_CHANGE_STATE_UNSPECIFIED"
- + "\020\000\022+\n\'LINE_ITEM_CHANGE_STATE_PENDING_APP"
- + "ROVAL\020\001\022#\n\037LINE_ITEM_CHANGE_STATE_APPROV"
- + "ED\020\002\022$\n LINE_ITEM_CHANGE_STATE_COMPLETED"
- + "\020\003\022#\n\037LINE_ITEM_CHANGE_STATE_REJECTED\020\004\022"
- + "$\n LINE_ITEM_CHANGE_STATE_ABANDONED\020\005\022%\n"
- + "!LINE_ITEM_CHANGE_STATE_ACTIVATING\020\006*\363\001\n"
- + "\035LineItemChangeStateReasonType\0222\n.LINE_I"
- + "TEM_CHANGE_STATE_REASON_TYPE_UNSPECIFIED"
- + "\020\000\022.\n*LINE_ITEM_CHANGE_STATE_REASON_TYPE"
- + "_EXPIRED\020\001\0225\n1LINE_ITEM_CHANGE_STATE_REA"
- + "SON_TYPE_USER_CANCELLED\020\002\0227\n3LINE_ITEM_C"
- + "HANGE_STATE_REASON_TYPE_SYSTEM_CANCELLED"
- + "\020\003B\253\002\n7com.google.cloud.commerce.consume"
- + "r.procurement.v1alpha1P\001ZYcloud.google.c"
- + "om/go/commerce/consumer/procurement/apiv"
- + "1alpha1/procurementpb;procurementpb\352A\221\001\n"
- + ")commerceoffercatalog.googleapis.com/Off"
- + "er\022)services/{service}/standardOffers/{o"
- + "ffer}\0229billingAccounts/{consumer_billing"
- + "_account}/offers/{offer}b\006proto3"
- };
- descriptor =
- com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
- descriptorData,
- new com.google.protobuf.Descriptors.FileDescriptor[] {
- com.google.api.FieldBehaviorProto.getDescriptor(),
- com.google.api.ResourceProto.getDescriptor(),
- com.google.protobuf.TimestampProto.getDescriptor(),
- });
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_Order_descriptor =
- getDescriptor().getMessageTypes().get(0);
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_Order_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_Order_descriptor,
- new java.lang.String[] {
- "Name",
- "DisplayName",
- "LineItems",
- "CancelledLineItems",
- "CreateTime",
- "UpdateTime",
- "Etag",
- });
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_LineItem_descriptor =
- getDescriptor().getMessageTypes().get(1);
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_LineItem_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_LineItem_descriptor,
- new java.lang.String[] {
- "LineItemId", "LineItemInfo", "PendingChange", "ChangeHistory",
- });
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_LineItemChange_descriptor =
- getDescriptor().getMessageTypes().get(2);
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_LineItemChange_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_LineItemChange_descriptor,
- new java.lang.String[] {
- "ChangeId",
- "ChangeType",
- "OldLineItemInfo",
- "NewLineItemInfo",
- "ChangeState",
- "StateReason",
- "ChangeStateReasonType",
- "ChangeEffectiveTime",
- "CreateTime",
- "UpdateTime",
- });
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_LineItemInfo_descriptor =
- getDescriptor().getMessageTypes().get(3);
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_LineItemInfo_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_LineItemInfo_descriptor,
- new java.lang.String[] {
- "Offer", "Parameters", "Subscription",
- });
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_Parameter_descriptor =
- getDescriptor().getMessageTypes().get(4);
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_Parameter_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_Parameter_descriptor,
- new java.lang.String[] {
- "Name", "Value",
- });
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_Parameter_Value_descriptor =
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_Parameter_descriptor
- .getNestedTypes()
- .get(0);
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_Parameter_Value_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_Parameter_Value_descriptor,
- new java.lang.String[] {
- "Int64Value", "StringValue", "DoubleValue", "Kind",
- });
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_Subscription_descriptor =
- getDescriptor().getMessageTypes().get(5);
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_Subscription_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_Subscription_descriptor,
- new java.lang.String[] {
- "StartTime", "EndTime", "AutoRenewalEnabled",
- });
- com.google.protobuf.ExtensionRegistry registry =
- com.google.protobuf.ExtensionRegistry.newInstance();
- registry.add(com.google.api.FieldBehaviorProto.fieldBehavior);
- registry.add(com.google.api.ResourceProto.resource);
- registry.add(com.google.api.ResourceProto.resourceDefinition);
- registry.add(com.google.api.ResourceProto.resourceReference);
- com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor(
- descriptor, registry);
- com.google.api.FieldBehaviorProto.getDescriptor();
- com.google.api.ResourceProto.getDescriptor();
- com.google.protobuf.TimestampProto.getDescriptor();
- }
-
- // @@protoc_insertion_point(outer_class_scope)
-}
diff --git a/java-cloudcommerceconsumerprocurement/proto-google-cloud-cloudcommerceconsumerprocurement-v1alpha1/src/main/java/com/google/cloud/commerce/consumer/procurement/v1alpha1/PlaceOrderMetadataOrBuilder.java b/java-cloudcommerceconsumerprocurement/proto-google-cloud-cloudcommerceconsumerprocurement-v1alpha1/src/main/java/com/google/cloud/commerce/consumer/procurement/v1alpha1/PlaceOrderMetadataOrBuilder.java
deleted file mode 100644
index 20fdb1c3088f..000000000000
--- a/java-cloudcommerceconsumerprocurement/proto-google-cloud-cloudcommerceconsumerprocurement-v1alpha1/src/main/java/com/google/cloud/commerce/consumer/procurement/v1alpha1/PlaceOrderMetadataOrBuilder.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright 2023 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/cloud/commerce/consumer/procurement/v1alpha1/procurement_service.proto
-
-package com.google.cloud.commerce.consumer.procurement.v1alpha1;
-
-public interface PlaceOrderMetadataOrBuilder
- extends
- // @@protoc_insertion_point(interface_extends:google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata)
- com.google.protobuf.MessageOrBuilder {}
diff --git a/java-cloudcommerceconsumerprocurement/proto-google-cloud-cloudcommerceconsumerprocurement-v1alpha1/src/main/java/com/google/cloud/commerce/consumer/procurement/v1alpha1/ProcurementService.java b/java-cloudcommerceconsumerprocurement/proto-google-cloud-cloudcommerceconsumerprocurement-v1alpha1/src/main/java/com/google/cloud/commerce/consumer/procurement/v1alpha1/ProcurementService.java
deleted file mode 100644
index 3276bf0ba183..000000000000
--- a/java-cloudcommerceconsumerprocurement/proto-google-cloud-cloudcommerceconsumerprocurement-v1alpha1/src/main/java/com/google/cloud/commerce/consumer/procurement/v1alpha1/ProcurementService.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- * Copyright 2023 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/cloud/commerce/consumer/procurement/v1alpha1/procurement_service.proto
-
-package com.google.cloud.commerce.consumer.procurement.v1alpha1;
-
-public final class ProcurementService {
- private ProcurementService() {}
-
- public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {}
-
- public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) {
- registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry);
- }
-
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_PlaceOrderRequest_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_PlaceOrderRequest_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_PlaceOrderMetadata_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_PlaceOrderMetadata_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_GetOrderRequest_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_GetOrderRequest_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_ListOrdersRequest_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_ListOrdersRequest_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_ListOrdersResponse_descriptor;
- static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_ListOrdersResponse_fieldAccessorTable;
-
- public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
- return descriptor;
- }
-
- private static com.google.protobuf.Descriptors.FileDescriptor descriptor;
-
- static {
- java.lang.String[] descriptorData = {
- "\nMgoogle/cloud/commerce/consumer/procure"
- + "ment/v1alpha1/procurement_service.proto\022"
- + "3google.cloud.commerce.consumer.procurem"
- + "ent.v1alpha1\032\034google/api/annotations.pro"
- + "to\032\027google/api/client.proto\032\037google/api/"
- + "field_behavior.proto\032\031google/api/resourc"
- + "e.proto\032?google/cloud/commerce/consumer/"
- + "procurement/v1alpha1/order.proto\032#google"
- + "/longrunning/operations.proto\"\357\001\n\021PlaceO"
- + "rderRequest\022C\n\006parent\030\001 \001(\tB3\342A\001\002\372A,\n*cl"
- + "oudbilling.googleapis.com/BillingAccount"
- + "\022\032\n\014display_name\030\006 \001(\tB\004\342A\001\002\022_\n\016line_ite"
- + "m_info\030\n \003(\0132A.google.cloud.commerce.con"
- + "sumer.procurement.v1alpha1.LineItemInfoB"
- + "\004\342A\001\001\022\030\n\nrequest_id\030\007 \001(\tB\004\342A\001\001\"\024\n\022Place"
- + "OrderMetadata\"%\n\017GetOrderRequest\022\022\n\004name"
- + "\030\001 \001(\tB\004\342A\001\002\"`\n\021ListOrdersRequest\022\024\n\006par"
- + "ent\030\001 \001(\tB\004\342A\001\002\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npa"
- + "ge_token\030\003 \001(\t\022\016\n\006filter\030\004 \001(\t\"y\n\022ListOr"
- + "dersResponse\022J\n\006orders\030\001 \003(\0132:.google.cl"
- + "oud.commerce.consumer.procurement.v1alph"
- + "a1.Order\022\027\n\017next_page_token\030\002 \001(\t2\374\005\n\032Co"
- + "nsumerProcurementService\022\317\001\n\nPlaceOrder\022"
- + "F.google.cloud.commerce.consumer.procure"
- + "ment.v1alpha1.PlaceOrderRequest\032\035.google"
- + ".longrunning.Operation\"Z\312A\033\n\005Order\022\022Plac"
- + "eOrderMetadata\202\323\344\223\0026\"1/v1alpha1/{parent="
- + "billingAccounts/*}/orders:place:\001*\022\310\001\n\010G"
- + "etOrder\022D.google.cloud.commerce.consumer"
- + ".procurement.v1alpha1.GetOrderRequest\032:."
- + "google.cloud.commerce.consumer.procureme"
- + "nt.v1alpha1.Order\":\332A\004name\202\323\344\223\002-\022+/v1alp"
- + "ha1/{name=billingAccounts/*/orders/*}\022\333\001"
- + "\n\nListOrders\022F.google.cloud.commerce.con"
- + "sumer.procurement.v1alpha1.ListOrdersReq"
- + "uest\032G.google.cloud.commerce.consumer.pr"
- + "ocurement.v1alpha1.ListOrdersResponse\"<\332"
- + "A\006parent\202\323\344\223\002-\022+/v1alpha1/{parent=billin"
- + "gAccounts/*}/orders\032c\312A/cloudcommercecon"
- + "sumerprocurement.googleapis.com\322A.https:"
- + "//www.googleapis.com/auth/cloud-platform"
- + "B\226\001\n7com.google.cloud.commerce.consumer."
- + "procurement.v1alpha1P\001ZYcloud.google.com"
- + "/go/commerce/consumer/procurement/apiv1a"
- + "lpha1/procurementpb;procurementpbb\006proto"
- + "3"
- };
- descriptor =
- com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
- descriptorData,
- new com.google.protobuf.Descriptors.FileDescriptor[] {
- com.google.api.AnnotationsProto.getDescriptor(),
- com.google.api.ClientProto.getDescriptor(),
- com.google.api.FieldBehaviorProto.getDescriptor(),
- com.google.api.ResourceProto.getDescriptor(),
- com.google.cloud.commerce.consumer.procurement.v1alpha1.OrderOuterClass
- .getDescriptor(),
- com.google.longrunning.OperationsProto.getDescriptor(),
- });
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_PlaceOrderRequest_descriptor =
- getDescriptor().getMessageTypes().get(0);
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_PlaceOrderRequest_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_PlaceOrderRequest_descriptor,
- new java.lang.String[] {
- "Parent", "DisplayName", "LineItemInfo", "RequestId",
- });
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_PlaceOrderMetadata_descriptor =
- getDescriptor().getMessageTypes().get(1);
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_PlaceOrderMetadata_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_PlaceOrderMetadata_descriptor,
- new java.lang.String[] {});
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_GetOrderRequest_descriptor =
- getDescriptor().getMessageTypes().get(2);
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_GetOrderRequest_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_GetOrderRequest_descriptor,
- new java.lang.String[] {
- "Name",
- });
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_ListOrdersRequest_descriptor =
- getDescriptor().getMessageTypes().get(3);
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_ListOrdersRequest_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_ListOrdersRequest_descriptor,
- new java.lang.String[] {
- "Parent", "PageSize", "PageToken", "Filter",
- });
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_ListOrdersResponse_descriptor =
- getDescriptor().getMessageTypes().get(4);
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_ListOrdersResponse_fieldAccessorTable =
- new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_google_cloud_commerce_consumer_procurement_v1alpha1_ListOrdersResponse_descriptor,
- new java.lang.String[] {
- "Orders", "NextPageToken",
- });
- com.google.protobuf.ExtensionRegistry registry =
- com.google.protobuf.ExtensionRegistry.newInstance();
- registry.add(com.google.api.ClientProto.defaultHost);
- registry.add(com.google.api.FieldBehaviorProto.fieldBehavior);
- registry.add(com.google.api.AnnotationsProto.http);
- registry.add(com.google.api.ClientProto.methodSignature);
- registry.add(com.google.api.ClientProto.oauthScopes);
- registry.add(com.google.api.ResourceProto.resourceReference);
- registry.add(com.google.longrunning.OperationsProto.operationInfo);
- com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor(
- descriptor, registry);
- com.google.api.AnnotationsProto.getDescriptor();
- com.google.api.ClientProto.getDescriptor();
- com.google.api.FieldBehaviorProto.getDescriptor();
- com.google.api.ResourceProto.getDescriptor();
- com.google.cloud.commerce.consumer.procurement.v1alpha1.OrderOuterClass.getDescriptor();
- com.google.longrunning.OperationsProto.getDescriptor();
- }
-
- // @@protoc_insertion_point(outer_class_scope)
-}
diff --git a/owl-bot-staging/java-cloudcommerceconsumerprocurement/v1/google-cloud-cloudcommerceconsumerprocurement/src/main/java/com/google/cloud/commerce/consumer/procurement/v1/ConsumerProcurementServiceClient.java b/owl-bot-staging/java-cloudcommerceconsumerprocurement/v1/google-cloud-cloudcommerceconsumerprocurement/src/main/java/com/google/cloud/commerce/consumer/procurement/v1/ConsumerProcurementServiceClient.java
new file mode 100644
index 000000000000..df9fb68c5cd3
--- /dev/null
+++ b/owl-bot-staging/java-cloudcommerceconsumerprocurement/v1/google-cloud-cloudcommerceconsumerprocurement/src/main/java/com/google/cloud/commerce/consumer/procurement/v1/ConsumerProcurementServiceClient.java
@@ -0,0 +1,663 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.commerce.consumer.procurement.v1;
+
+import com.google.api.core.ApiFuture;
+import com.google.api.core.ApiFutures;
+import com.google.api.core.BetaApi;
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.httpjson.longrunning.OperationsClient;
+import com.google.api.gax.longrunning.OperationFuture;
+import com.google.api.gax.paging.AbstractFixedSizeCollection;
+import com.google.api.gax.paging.AbstractPage;
+import com.google.api.gax.paging.AbstractPagedListResponse;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.PageContext;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.commerce.consumer.procurement.v1.stub.ConsumerProcurementServiceStub;
+import com.google.cloud.commerce.consumer.procurement.v1.stub.ConsumerProcurementServiceStubSettings;
+import com.google.common.util.concurrent.MoreExecutors;
+import com.google.longrunning.Operation;
+import java.io.IOException;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Service Description: ConsumerProcurementService allows customers to make purchases of products
+ * served by the Cloud Commerce platform.
+ *
+ * When purchases are made, the + * [ConsumerProcurementService][google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService] + * programs the appropriate backends, including both Google's own infrastructure, as well as + * third-party systems, and to enable billing setup for charging for the procured item. + * + *
This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (ConsumerProcurementServiceClient consumerProcurementServiceClient = + * ConsumerProcurementServiceClient.create()) { + * String name = "name3373707"; + * Order response = consumerProcurementServiceClient.getOrder(name); + * } + * }+ * + *
Note: close() needs to be called on the ConsumerProcurementServiceClient object to clean up + * resources such as threads. In the example above, try-with-resources is used, which automatically + * calls close(). + * + *
The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *
See the individual methods for example code. + * + *
Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *
This class can be customized by passing in a custom instance of + * ConsumerProcurementServiceSettings to create(). For example: + * + *
To customize credentials: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * ConsumerProcurementServiceSettings consumerProcurementServiceSettings = + * ConsumerProcurementServiceSettings.newBuilder() + * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + * .build(); + * ConsumerProcurementServiceClient consumerProcurementServiceClient = + * ConsumerProcurementServiceClient.create(consumerProcurementServiceSettings); + * }+ * + *
To customize the endpoint: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * ConsumerProcurementServiceSettings consumerProcurementServiceSettings = + * ConsumerProcurementServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + * ConsumerProcurementServiceClient consumerProcurementServiceClient = + * ConsumerProcurementServiceClient.create(consumerProcurementServiceSettings); + * }+ * + *
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * ConsumerProcurementServiceSettings consumerProcurementServiceSettings = + * ConsumerProcurementServiceSettings.newHttpJsonBuilder().build(); + * ConsumerProcurementServiceClient consumerProcurementServiceClient = + * ConsumerProcurementServiceClient.create(consumerProcurementServiceSettings); + * }+ * + *
Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class ConsumerProcurementServiceClient implements BackgroundResource { + private final ConsumerProcurementServiceSettings settings; + private final ConsumerProcurementServiceStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of ConsumerProcurementServiceClient with default settings. */ + public static final ConsumerProcurementServiceClient create() throws IOException { + return create(ConsumerProcurementServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of ConsumerProcurementServiceClient, using the given settings. The + * channels are created based on the settings passed in, or defaults for any settings that are not + * set. + */ + public static final ConsumerProcurementServiceClient create( + ConsumerProcurementServiceSettings settings) throws IOException { + return new ConsumerProcurementServiceClient(settings); + } + + /** + * Constructs an instance of ConsumerProcurementServiceClient, using the given stub for making + * calls. This is for advanced usage - prefer using create(ConsumerProcurementServiceSettings). + */ + public static final ConsumerProcurementServiceClient create(ConsumerProcurementServiceStub stub) { + return new ConsumerProcurementServiceClient(stub); + } + + /** + * Constructs an instance of ConsumerProcurementServiceClient, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected ConsumerProcurementServiceClient(ConsumerProcurementServiceSettings settings) + throws IOException { + this.settings = settings; + this.stub = ((ConsumerProcurementServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected ConsumerProcurementServiceClient(ConsumerProcurementServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final ConsumerProcurementServiceSettings getSettings() { + return settings; + } + + public ConsumerProcurementServiceStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new [Order][google.cloud.commerce.consumer.procurement.v1.Order]. + * + *
This API only supports GCP spend-based committed use discounts specified by GCP + * documentation. + * + *
The returned long-running operation is in-progress until the backend completes the creation + * of the resource. Once completed, the order is in + * [OrderState.ORDER_STATE_ACTIVE][google.cloud.commerce.consumer.procurement.v1.OrderState.ORDER_STATE_ACTIVE]. + * In case of failure, the order resource will be removed. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (ConsumerProcurementServiceClient consumerProcurementServiceClient = + * ConsumerProcurementServiceClient.create()) { + * PlaceOrderRequest request = + * PlaceOrderRequest.newBuilder() + * .setParent(BillingAccountName.of("[BILLING_ACCOUNT]").toString()) + * .setDisplayName("displayName1714148973") + * .addAllLineItemInfo(new ArrayList+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture()) + * .setRequestId("requestId693933066") + * .build(); + * Order response = consumerProcurementServiceClient.placeOrderAsync(request).get(); + * } + * }
This API only supports GCP spend-based committed use discounts specified by GCP + * documentation. + * + *
The returned long-running operation is in-progress until the backend completes the creation + * of the resource. Once completed, the order is in + * [OrderState.ORDER_STATE_ACTIVE][google.cloud.commerce.consumer.procurement.v1.OrderState.ORDER_STATE_ACTIVE]. + * In case of failure, the order resource will be removed. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (ConsumerProcurementServiceClient consumerProcurementServiceClient = + * ConsumerProcurementServiceClient.create()) { + * PlaceOrderRequest request = + * PlaceOrderRequest.newBuilder() + * .setParent(BillingAccountName.of("[BILLING_ACCOUNT]").toString()) + * .setDisplayName("displayName1714148973") + * .addAllLineItemInfo(new ArrayList+ */ + public final OperationCallable()) + * .setRequestId("requestId693933066") + * .build(); + * OperationFuture future = + * consumerProcurementServiceClient.placeOrderOperationCallable().futureCall(request); + * // Do something. + * Order response = future.get(); + * } + * }
This API only supports GCP spend-based committed use discounts specified by GCP + * documentation. + * + *
The returned long-running operation is in-progress until the backend completes the creation + * of the resource. Once completed, the order is in + * [OrderState.ORDER_STATE_ACTIVE][google.cloud.commerce.consumer.procurement.v1.OrderState.ORDER_STATE_ACTIVE]. + * In case of failure, the order resource will be removed. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (ConsumerProcurementServiceClient consumerProcurementServiceClient = + * ConsumerProcurementServiceClient.create()) { + * PlaceOrderRequest request = + * PlaceOrderRequest.newBuilder() + * .setParent(BillingAccountName.of("[BILLING_ACCOUNT]").toString()) + * .setDisplayName("displayName1714148973") + * .addAllLineItemInfo(new ArrayList+ */ + public final UnaryCallable()) + * .setRequestId("requestId693933066") + * .build(); + * ApiFuture future = + * consumerProcurementServiceClient.placeOrderCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (ConsumerProcurementServiceClient consumerProcurementServiceClient = + * ConsumerProcurementServiceClient.create()) { + * String name = "name3373707"; + * Order response = consumerProcurementServiceClient.getOrder(name); + * } + * }+ * + * @param name Required. The name of the order to retrieve. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Order getOrder(String name) { + GetOrderRequest request = GetOrderRequest.newBuilder().setName(name).build(); + return getOrder(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the requested [Order][google.cloud.commerce.consumer.procurement.v1.Order] resource. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (ConsumerProcurementServiceClient consumerProcurementServiceClient = + * ConsumerProcurementServiceClient.create()) { + * GetOrderRequest request = GetOrderRequest.newBuilder().setName("name3373707").build(); + * Order response = consumerProcurementServiceClient.getOrder(request); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Order getOrder(GetOrderRequest request) { + return getOrderCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the requested [Order][google.cloud.commerce.consumer.procurement.v1.Order] resource. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (ConsumerProcurementServiceClient consumerProcurementServiceClient = + * ConsumerProcurementServiceClient.create()) { + * GetOrderRequest request = GetOrderRequest.newBuilder().setName("name3373707").build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * consumerProcurementServiceClient.getOrderCallable().futureCall(request); + * // Do something. + * Order response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (ConsumerProcurementServiceClient consumerProcurementServiceClient = + * ConsumerProcurementServiceClient.create()) { + * String parent = "parent-995424086"; + * for (Order element : consumerProcurementServiceClient.listOrders(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The parent resource to query for orders. This field has the form + * `billingAccounts/{billing-account-id}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListOrdersPagedResponse listOrders(String parent) { + ListOrdersRequest request = ListOrdersRequest.newBuilder().setParent(parent).build(); + return listOrders(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists [Order][google.cloud.commerce.consumer.procurement.v1.Order] resources that the user has + * access to, within the scope of the parent resource. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (ConsumerProcurementServiceClient consumerProcurementServiceClient = + * ConsumerProcurementServiceClient.create()) { + * ListOrdersRequest request = + * ListOrdersRequest.newBuilder() + * .setParent("parent-995424086") + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .build(); + * for (Order element : consumerProcurementServiceClient.listOrders(request).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListOrdersPagedResponse listOrders(ListOrdersRequest request) { + return listOrdersPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists [Order][google.cloud.commerce.consumer.procurement.v1.Order] resources that the user has + * access to, within the scope of the parent resource. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (ConsumerProcurementServiceClient consumerProcurementServiceClient = + * ConsumerProcurementServiceClient.create()) { + * ListOrdersRequest request = + * ListOrdersRequest.newBuilder() + * .setParent("parent-995424086") + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * consumerProcurementServiceClient.listOrdersPagedCallable().futureCall(request); + * // Do something. + * for (Order element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (ConsumerProcurementServiceClient consumerProcurementServiceClient = + * ConsumerProcurementServiceClient.create()) { + * ListOrdersRequest request = + * ListOrdersRequest.newBuilder() + * .setParent("parent-995424086") + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .build(); + * while (true) { + * ListOrdersResponse response = + * consumerProcurementServiceClient.listOrdersCallable().call(request); + * for (Order element : response.getOrdersList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }+ */ + public final UnaryCallable
The default instance has everything set to sensible defaults: + * + *
The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *
For example, to set the total timeout of getOrder to 30 seconds: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * ConsumerProcurementServiceSettings.Builder consumerProcurementServiceSettingsBuilder = + * ConsumerProcurementServiceSettings.newBuilder(); + * consumerProcurementServiceSettingsBuilder + * .getOrderSettings() + * .setRetrySettings( + * consumerProcurementServiceSettingsBuilder + * .getOrderSettings() + * .getRetrySettings() + * .toBuilder() + * .setTotalTimeout(Duration.ofSeconds(30)) + * .build()); + * ConsumerProcurementServiceSettings consumerProcurementServiceSettings = + * consumerProcurementServiceSettingsBuilder.build(); + * }+ */ +@Generated("by gapic-generator-java") +public class ConsumerProcurementServiceSettings + extends ClientSettings
Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction The interfaces provided are listed below, along with usage samples.
+ *
+ * ======================= ConsumerProcurementServiceClient =======================
+ *
+ * Service Description: ConsumerProcurementService allows customers to make purchases of products
+ * served by the Cloud Commerce platform.
+ *
+ * When purchases are made, the
+ * [ConsumerProcurementService][google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService]
+ * programs the appropriate backends, including both Google's own infrastructure, as well as
+ * third-party systems, and to enable billing setup for charging for the procured item.
+ *
+ * Sample for ConsumerProcurementServiceClient:
+ *
+ * This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public abstract class ConsumerProcurementServiceStub implements BackgroundResource {
+
+ public OperationsStub getOperationsStub() {
+ return null;
+ }
+
+ public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() {
+ return null;
+ }
+
+ public OperationCallable The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the total timeout of getOrder to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class is for advanced usage.
+ */
+@Generated("by gapic-generator-java")
+public class GrpcConsumerProcurementServiceCallableFactory implements GrpcStubCallableFactory {
+
+ @Override
+ public This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public class GrpcConsumerProcurementServiceStub extends ConsumerProcurementServiceStub {
+ private static final MethodDescriptor This class is for advanced usage.
+ */
+@Generated("by gapic-generator-java")
+@BetaApi
+public class HttpJsonConsumerProcurementServiceCallableFactory
+ implements HttpJsonStubCallableFactory This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+@BetaApi
+public class HttpJsonConsumerProcurementServiceStub extends ConsumerProcurementServiceStub {
+ private static final TypeRegistry typeRegistry =
+ TypeRegistry.newBuilder()
+ .add(Order.getDescriptor())
+ .add(PlaceOrderMetadata.getDescriptor())
+ .build();
+
+ private static final ApiMethodDescriptor{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ConsumerProcurementServiceClient consumerProcurementServiceClient =
+ * ConsumerProcurementServiceClient.create()) {
+ * String name = "name3373707";
+ * Order response = consumerProcurementServiceClient.getOrder(name);
+ * }
+ * }
+ */
+@Generated("by gapic-generator-java")
+package com.google.cloud.commerce.consumer.procurement.v1;
+
+import javax.annotation.Generated;
diff --git a/owl-bot-staging/java-cloudcommerceconsumerprocurement/v1/google-cloud-cloudcommerceconsumerprocurement/src/main/java/com/google/cloud/commerce/consumer/procurement/v1/stub/ConsumerProcurementServiceStub.java b/owl-bot-staging/java-cloudcommerceconsumerprocurement/v1/google-cloud-cloudcommerceconsumerprocurement/src/main/java/com/google/cloud/commerce/consumer/procurement/v1/stub/ConsumerProcurementServiceStub.java
new file mode 100644
index 000000000000..698abbafe6ac
--- /dev/null
+++ b/owl-bot-staging/java-cloudcommerceconsumerprocurement/v1/google-cloud-cloudcommerceconsumerprocurement/src/main/java/com/google/cloud/commerce/consumer/procurement/v1/stub/ConsumerProcurementServiceStub.java
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2023 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.commerce.consumer.procurement.v1.stub;
+
+import static com.google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementServiceClient.ListOrdersPagedResponse;
+
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.commerce.consumer.procurement.v1.GetOrderRequest;
+import com.google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest;
+import com.google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse;
+import com.google.cloud.commerce.consumer.procurement.v1.Order;
+import com.google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata;
+import com.google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest;
+import com.google.longrunning.Operation;
+import com.google.longrunning.stub.OperationsStub;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Base stub class for the ConsumerProcurementService service API.
+ *
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ConsumerProcurementServiceStubSettings.Builder consumerProcurementServiceSettingsBuilder =
+ * ConsumerProcurementServiceStubSettings.newBuilder();
+ * consumerProcurementServiceSettingsBuilder
+ * .getOrderSettings()
+ * .setRetrySettings(
+ * consumerProcurementServiceSettingsBuilder
+ * .getOrderSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * ConsumerProcurementServiceStubSettings consumerProcurementServiceSettings =
+ * consumerProcurementServiceSettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class ConsumerProcurementServiceStubSettings
+ extends StubSettings