diff --git a/java-channel/README.md b/java-channel/README.md index 5f00f00dd6c9..d59a934a3d1b 100644 --- a/java-channel/README.md +++ b/java-channel/README.md @@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.16.0 + 26.17.0 pom import diff --git a/java-channel/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/CloudChannelServiceClient.java b/java-channel/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/CloudChannelServiceClient.java index a52d9a25dc6e..63e262e2c9e1 100644 --- a/java-channel/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/CloudChannelServiceClient.java +++ b/java-channel/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/CloudChannelServiceClient.java @@ -6163,6 +6163,453 @@ public final void deleteChannelPartnerRepricingConfig( return stub.deleteChannelPartnerRepricingConfigCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Rebilling supported SKU groups the account is authorized to sell. Reference: + * https://cloud.google.com/skus/sku-groups + * + *

Possible Error Codes: + * + *

+ * + *

Return Value: If successful, the [SkuGroup][google.cloud.channel.v1.SkuGroup] resources. The + * data for each resource is displayed in the alphabetical order of SKU group display name. The + * data for each resource is displayed in the ascending order of + * [SkuGroup.display_name][google.cloud.channel.v1.SkuGroup.display_name] + * + *

If unsuccessful, returns an error. + * + *

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 (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
+   *   String parent = "parent-995424086";
+   *   for (SkuGroup element : cloudChannelServiceClient.listSkuGroups(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the account from which to list SKU groups. Parent + * uses the format: accounts/{account}. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSkuGroupsPagedResponse listSkuGroups(String parent) { + ListSkuGroupsRequest request = ListSkuGroupsRequest.newBuilder().setParent(parent).build(); + return listSkuGroups(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Rebilling supported SKU groups the account is authorized to sell. Reference: + * https://cloud.google.com/skus/sku-groups + * + *

Possible Error Codes: + * + *

+ * + *

Return Value: If successful, the [SkuGroup][google.cloud.channel.v1.SkuGroup] resources. The + * data for each resource is displayed in the alphabetical order of SKU group display name. The + * data for each resource is displayed in the ascending order of + * [SkuGroup.display_name][google.cloud.channel.v1.SkuGroup.display_name] + * + *

If unsuccessful, returns an error. + * + *

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 (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
+   *   ListSkuGroupsRequest request =
+   *       ListSkuGroupsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (SkuGroup element : cloudChannelServiceClient.listSkuGroups(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 ListSkuGroupsPagedResponse listSkuGroups(ListSkuGroupsRequest request) { + return listSkuGroupsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Rebilling supported SKU groups the account is authorized to sell. Reference: + * https://cloud.google.com/skus/sku-groups + * + *

Possible Error Codes: + * + *

+ * + *

Return Value: If successful, the [SkuGroup][google.cloud.channel.v1.SkuGroup] resources. The + * data for each resource is displayed in the alphabetical order of SKU group display name. The + * data for each resource is displayed in the ascending order of + * [SkuGroup.display_name][google.cloud.channel.v1.SkuGroup.display_name] + * + *

If unsuccessful, returns an error. + * + *

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 (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
+   *   ListSkuGroupsRequest request =
+   *       ListSkuGroupsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       cloudChannelServiceClient.listSkuGroupsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (SkuGroup element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listSkuGroupsPagedCallable() { + return stub.listSkuGroupsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Rebilling supported SKU groups the account is authorized to sell. Reference: + * https://cloud.google.com/skus/sku-groups + * + *

Possible Error Codes: + * + *

+ * + *

Return Value: If successful, the [SkuGroup][google.cloud.channel.v1.SkuGroup] resources. The + * data for each resource is displayed in the alphabetical order of SKU group display name. The + * data for each resource is displayed in the ascending order of + * [SkuGroup.display_name][google.cloud.channel.v1.SkuGroup.display_name] + * + *

If unsuccessful, returns an error. + * + *

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 (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
+   *   ListSkuGroupsRequest request =
+   *       ListSkuGroupsRequest.newBuilder()
+   *           .setParent("parent-995424086")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListSkuGroupsResponse response =
+   *         cloudChannelServiceClient.listSkuGroupsCallable().call(request);
+   *     for (SkuGroup element : response.getSkuGroupsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listSkuGroupsCallable() { + return stub.listSkuGroupsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Billable SKUs in a given SKU group. + * + *

Possible error codes: PERMISSION_DENIED: If the account making the request and the account + * being queried for are different, or the account doesn't exist. INVALID_ARGUMENT: Missing or + * invalid required parameters in the request. INTERNAL: Any non-user error related to technical + * issue in the backend. In this case, contact cloud channel support. + * + *

Return Value: If successful, the [BillableSku][google.cloud.channel.v1.BillableSku] + * resources. The data for each resource is displayed in the ascending order of: + * + *

+ * + *

If unsuccessful, returns an error. + * + *

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 (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
+   *   SkuGroupName parent = SkuGroupName.of("[ACCOUNT]", "[SKU_GROUP]");
+   *   for (BillableSku element :
+   *       cloudChannelServiceClient.listSkuGroupBillableSkus(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Resource name of the SKU group. Format: + * accounts/{account}/skuGroups/{sku_group}. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSkuGroupBillableSkusPagedResponse listSkuGroupBillableSkus(SkuGroupName parent) { + ListSkuGroupBillableSkusRequest request = + ListSkuGroupBillableSkusRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listSkuGroupBillableSkus(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Billable SKUs in a given SKU group. + * + *

Possible error codes: PERMISSION_DENIED: If the account making the request and the account + * being queried for are different, or the account doesn't exist. INVALID_ARGUMENT: Missing or + * invalid required parameters in the request. INTERNAL: Any non-user error related to technical + * issue in the backend. In this case, contact cloud channel support. + * + *

Return Value: If successful, the [BillableSku][google.cloud.channel.v1.BillableSku] + * resources. The data for each resource is displayed in the ascending order of: + * + *

+ * + *

If unsuccessful, returns an error. + * + *

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 (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
+   *   String parent = SkuGroupName.of("[ACCOUNT]", "[SKU_GROUP]").toString();
+   *   for (BillableSku element :
+   *       cloudChannelServiceClient.listSkuGroupBillableSkus(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Resource name of the SKU group. Format: + * accounts/{account}/skuGroups/{sku_group}. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListSkuGroupBillableSkusPagedResponse listSkuGroupBillableSkus(String parent) { + ListSkuGroupBillableSkusRequest request = + ListSkuGroupBillableSkusRequest.newBuilder().setParent(parent).build(); + return listSkuGroupBillableSkus(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Billable SKUs in a given SKU group. + * + *

Possible error codes: PERMISSION_DENIED: If the account making the request and the account + * being queried for are different, or the account doesn't exist. INVALID_ARGUMENT: Missing or + * invalid required parameters in the request. INTERNAL: Any non-user error related to technical + * issue in the backend. In this case, contact cloud channel support. + * + *

Return Value: If successful, the [BillableSku][google.cloud.channel.v1.BillableSku] + * resources. The data for each resource is displayed in the ascending order of: + * + *

+ * + *

If unsuccessful, returns an error. + * + *

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 (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
+   *   ListSkuGroupBillableSkusRequest request =
+   *       ListSkuGroupBillableSkusRequest.newBuilder()
+   *           .setParent(SkuGroupName.of("[ACCOUNT]", "[SKU_GROUP]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (BillableSku element :
+   *       cloudChannelServiceClient.listSkuGroupBillableSkus(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 ListSkuGroupBillableSkusPagedResponse listSkuGroupBillableSkus( + ListSkuGroupBillableSkusRequest request) { + return listSkuGroupBillableSkusPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Billable SKUs in a given SKU group. + * + *

Possible error codes: PERMISSION_DENIED: If the account making the request and the account + * being queried for are different, or the account doesn't exist. INVALID_ARGUMENT: Missing or + * invalid required parameters in the request. INTERNAL: Any non-user error related to technical + * issue in the backend. In this case, contact cloud channel support. + * + *

Return Value: If successful, the [BillableSku][google.cloud.channel.v1.BillableSku] + * resources. The data for each resource is displayed in the ascending order of: + * + *

+ * + *

If unsuccessful, returns an error. + * + *

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 (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
+   *   ListSkuGroupBillableSkusRequest request =
+   *       ListSkuGroupBillableSkusRequest.newBuilder()
+   *           .setParent(SkuGroupName.of("[ACCOUNT]", "[SKU_GROUP]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       cloudChannelServiceClient.listSkuGroupBillableSkusPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (BillableSku element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listSkuGroupBillableSkusPagedCallable() { + return stub.listSkuGroupBillableSkusPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Billable SKUs in a given SKU group. + * + *

Possible error codes: PERMISSION_DENIED: If the account making the request and the account + * being queried for are different, or the account doesn't exist. INVALID_ARGUMENT: Missing or + * invalid required parameters in the request. INTERNAL: Any non-user error related to technical + * issue in the backend. In this case, contact cloud channel support. + * + *

Return Value: If successful, the [BillableSku][google.cloud.channel.v1.BillableSku] + * resources. The data for each resource is displayed in the ascending order of: + * + *

    + *
  • [BillableSku.service_display_name][google.cloud.channel.v1.BillableSku.service_display_name] + *
  • [BillableSku.sku_display_name][google.cloud.channel.v1.BillableSku.sku_display_name] + *
+ * + *

If unsuccessful, returns an error. + * + *

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 (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) {
+   *   ListSkuGroupBillableSkusRequest request =
+   *       ListSkuGroupBillableSkusRequest.newBuilder()
+   *           .setParent(SkuGroupName.of("[ACCOUNT]", "[SKU_GROUP]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListSkuGroupBillableSkusResponse response =
+   *         cloudChannelServiceClient.listSkuGroupBillableSkusCallable().call(request);
+   *     for (BillableSku element : response.getBillableSkusList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listSkuGroupBillableSkusCallable() { + return stub.listSkuGroupBillableSkusCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Returns the requested [Offer][google.cloud.channel.v1.Offer] resource. @@ -8148,6 +8595,166 @@ protected ListChannelPartnerRepricingConfigsFixedSizeCollection createCollection } } + public static class ListSkuGroupsPagedResponse + extends AbstractPagedListResponse< + ListSkuGroupsRequest, + ListSkuGroupsResponse, + SkuGroup, + ListSkuGroupsPage, + ListSkuGroupsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListSkuGroupsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListSkuGroupsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListSkuGroupsPagedResponse(ListSkuGroupsPage page) { + super(page, ListSkuGroupsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListSkuGroupsPage + extends AbstractPage< + ListSkuGroupsRequest, ListSkuGroupsResponse, SkuGroup, ListSkuGroupsPage> { + + private ListSkuGroupsPage( + PageContext context, + ListSkuGroupsResponse response) { + super(context, response); + } + + private static ListSkuGroupsPage createEmptyPage() { + return new ListSkuGroupsPage(null, null); + } + + @Override + protected ListSkuGroupsPage createPage( + PageContext context, + ListSkuGroupsResponse response) { + return new ListSkuGroupsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListSkuGroupsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListSkuGroupsRequest, + ListSkuGroupsResponse, + SkuGroup, + ListSkuGroupsPage, + ListSkuGroupsFixedSizeCollection> { + + private ListSkuGroupsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListSkuGroupsFixedSizeCollection createEmptyCollection() { + return new ListSkuGroupsFixedSizeCollection(null, 0); + } + + @Override + protected ListSkuGroupsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListSkuGroupsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListSkuGroupBillableSkusPagedResponse + extends AbstractPagedListResponse< + ListSkuGroupBillableSkusRequest, + ListSkuGroupBillableSkusResponse, + BillableSku, + ListSkuGroupBillableSkusPage, + ListSkuGroupBillableSkusFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListSkuGroupBillableSkusPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListSkuGroupBillableSkusPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListSkuGroupBillableSkusPagedResponse(ListSkuGroupBillableSkusPage page) { + super(page, ListSkuGroupBillableSkusFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListSkuGroupBillableSkusPage + extends AbstractPage< + ListSkuGroupBillableSkusRequest, + ListSkuGroupBillableSkusResponse, + BillableSku, + ListSkuGroupBillableSkusPage> { + + private ListSkuGroupBillableSkusPage( + PageContext + context, + ListSkuGroupBillableSkusResponse response) { + super(context, response); + } + + private static ListSkuGroupBillableSkusPage createEmptyPage() { + return new ListSkuGroupBillableSkusPage(null, null); + } + + @Override + protected ListSkuGroupBillableSkusPage createPage( + PageContext + context, + ListSkuGroupBillableSkusResponse response) { + return new ListSkuGroupBillableSkusPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListSkuGroupBillableSkusFixedSizeCollection + extends AbstractFixedSizeCollection< + ListSkuGroupBillableSkusRequest, + ListSkuGroupBillableSkusResponse, + BillableSku, + ListSkuGroupBillableSkusPage, + ListSkuGroupBillableSkusFixedSizeCollection> { + + private ListSkuGroupBillableSkusFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListSkuGroupBillableSkusFixedSizeCollection createEmptyCollection() { + return new ListSkuGroupBillableSkusFixedSizeCollection(null, 0); + } + + @Override + protected ListSkuGroupBillableSkusFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListSkuGroupBillableSkusFixedSizeCollection(pages, collectionSize); + } + } + public static class ListProductsPagedResponse extends AbstractPagedListResponse< ListProductsRequest, diff --git a/java-channel/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/CloudChannelServiceSettings.java b/java-channel/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/CloudChannelServiceSettings.java index 4c50a99322e9..02c4c7103745 100644 --- a/java-channel/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/CloudChannelServiceSettings.java +++ b/java-channel/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/CloudChannelServiceSettings.java @@ -26,6 +26,8 @@ import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListProductsPagedResponse; import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListPurchasableOffersPagedResponse; import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListPurchasableSkusPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListSkuGroupBillableSkusPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListSkuGroupsPagedResponse; import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListSkusPagedResponse; import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListSubscribersPagedResponse; import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListTransferableOffersPagedResponse; @@ -402,6 +404,21 @@ public UnaryCallSettings transferEntitle .deleteChannelPartnerRepricingConfigSettings(); } + /** Returns the object with the settings used for calls to listSkuGroups. */ + public PagedCallSettings + listSkuGroupsSettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()).listSkuGroupsSettings(); + } + + /** Returns the object with the settings used for calls to listSkuGroupBillableSkus. */ + public PagedCallSettings< + ListSkuGroupBillableSkusRequest, + ListSkuGroupBillableSkusResponse, + ListSkuGroupBillableSkusPagedResponse> + listSkuGroupBillableSkusSettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()).listSkuGroupBillableSkusSettings(); + } + /** Returns the object with the settings used for calls to lookupOffer. */ public UnaryCallSettings lookupOfferSettings() { return ((CloudChannelServiceStubSettings) getStubSettings()).lookupOfferSettings(); @@ -891,6 +908,22 @@ public UnaryCallSettings.Builder changeOfferSetti return getStubSettingsBuilder().deleteChannelPartnerRepricingConfigSettings(); } + /** Returns the builder for the settings used for calls to listSkuGroups. */ + public PagedCallSettings.Builder< + ListSkuGroupsRequest, ListSkuGroupsResponse, ListSkuGroupsPagedResponse> + listSkuGroupsSettings() { + return getStubSettingsBuilder().listSkuGroupsSettings(); + } + + /** Returns the builder for the settings used for calls to listSkuGroupBillableSkus. */ + public PagedCallSettings.Builder< + ListSkuGroupBillableSkusRequest, + ListSkuGroupBillableSkusResponse, + ListSkuGroupBillableSkusPagedResponse> + listSkuGroupBillableSkusSettings() { + return getStubSettingsBuilder().listSkuGroupBillableSkusSettings(); + } + /** Returns the builder for the settings used for calls to lookupOffer. */ public UnaryCallSettings.Builder lookupOfferSettings() { return getStubSettingsBuilder().lookupOfferSettings(); diff --git a/java-channel/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/gapic_metadata.json b/java-channel/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/gapic_metadata.json index 0a0a6d50bba3..5166f5308c8b 100644 --- a/java-channel/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/gapic_metadata.json +++ b/java-channel/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/gapic_metadata.json @@ -118,6 +118,12 @@ "ListPurchasableSkus": { "methods": ["listPurchasableSkus", "listPurchasableSkusPagedCallable", "listPurchasableSkusCallable"] }, + "ListSkuGroupBillableSkus": { + "methods": ["listSkuGroupBillableSkus", "listSkuGroupBillableSkus", "listSkuGroupBillableSkus", "listSkuGroupBillableSkusPagedCallable", "listSkuGroupBillableSkusCallable"] + }, + "ListSkuGroups": { + "methods": ["listSkuGroups", "listSkuGroups", "listSkuGroupsPagedCallable", "listSkuGroupsCallable"] + }, "ListSkus": { "methods": ["listSkus", "listSkusPagedCallable", "listSkusCallable"] }, diff --git a/java-channel/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/stub/CloudChannelServiceStub.java b/java-channel/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/stub/CloudChannelServiceStub.java index c8b2e9312912..9d06ce679cbb 100644 --- a/java-channel/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/stub/CloudChannelServiceStub.java +++ b/java-channel/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/stub/CloudChannelServiceStub.java @@ -26,6 +26,8 @@ import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListProductsPagedResponse; import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListPurchasableOffersPagedResponse; import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListPurchasableSkusPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListSkuGroupBillableSkusPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListSkuGroupsPagedResponse; import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListSkusPagedResponse; import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListSubscribersPagedResponse; import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListTransferableOffersPagedResponse; @@ -80,6 +82,10 @@ import com.google.cloud.channel.v1.ListPurchasableOffersResponse; import com.google.cloud.channel.v1.ListPurchasableSkusRequest; import com.google.cloud.channel.v1.ListPurchasableSkusResponse; +import com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest; +import com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse; +import com.google.cloud.channel.v1.ListSkuGroupsRequest; +import com.google.cloud.channel.v1.ListSkuGroupsResponse; import com.google.cloud.channel.v1.ListSkusRequest; import com.google.cloud.channel.v1.ListSkusResponse; import com.google.cloud.channel.v1.ListSubscribersRequest; @@ -410,6 +416,26 @@ public UnaryCallable transferEntitlement "Not implemented: deleteChannelPartnerRepricingConfigCallable()"); } + public UnaryCallable + listSkuGroupsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listSkuGroupsPagedCallable()"); + } + + public UnaryCallable listSkuGroupsCallable() { + throw new UnsupportedOperationException("Not implemented: listSkuGroupsCallable()"); + } + + public UnaryCallable + listSkuGroupBillableSkusPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listSkuGroupBillableSkusPagedCallable()"); + } + + public UnaryCallable + listSkuGroupBillableSkusCallable() { + throw new UnsupportedOperationException("Not implemented: listSkuGroupBillableSkusCallable()"); + } + public UnaryCallable lookupOfferCallable() { throw new UnsupportedOperationException("Not implemented: lookupOfferCallable()"); } diff --git a/java-channel/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/stub/CloudChannelServiceStubSettings.java b/java-channel/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/stub/CloudChannelServiceStubSettings.java index e17643862b0b..f5cace70ba58 100644 --- a/java-channel/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/stub/CloudChannelServiceStubSettings.java +++ b/java-channel/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/stub/CloudChannelServiceStubSettings.java @@ -26,6 +26,8 @@ import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListProductsPagedResponse; import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListPurchasableOffersPagedResponse; import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListPurchasableSkusPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListSkuGroupBillableSkusPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListSkuGroupsPagedResponse; import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListSkusPagedResponse; import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListSubscribersPagedResponse; import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListTransferableOffersPagedResponse; @@ -61,6 +63,7 @@ import com.google.api.gax.rpc.UnaryCallSettings; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.channel.v1.ActivateEntitlementRequest; +import com.google.cloud.channel.v1.BillableSku; import com.google.cloud.channel.v1.CancelEntitlementRequest; import com.google.cloud.channel.v1.ChangeOfferRequest; import com.google.cloud.channel.v1.ChangeParametersRequest; @@ -107,6 +110,10 @@ import com.google.cloud.channel.v1.ListPurchasableOffersResponse; import com.google.cloud.channel.v1.ListPurchasableSkusRequest; import com.google.cloud.channel.v1.ListPurchasableSkusResponse; +import com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest; +import com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse; +import com.google.cloud.channel.v1.ListSkuGroupsRequest; +import com.google.cloud.channel.v1.ListSkuGroupsResponse; import com.google.cloud.channel.v1.ListSkusRequest; import com.google.cloud.channel.v1.ListSkusResponse; import com.google.cloud.channel.v1.ListSubscribersRequest; @@ -125,6 +132,7 @@ import com.google.cloud.channel.v1.RegisterSubscriberRequest; import com.google.cloud.channel.v1.RegisterSubscriberResponse; import com.google.cloud.channel.v1.Sku; +import com.google.cloud.channel.v1.SkuGroup; import com.google.cloud.channel.v1.StartPaidServiceRequest; import com.google.cloud.channel.v1.SuspendEntitlementRequest; import com.google.cloud.channel.v1.TransferEntitlementsRequest; @@ -297,6 +305,14 @@ public class CloudChannelServiceStubSettings extends StubSettings deleteChannelPartnerRepricingConfigSettings; + private final PagedCallSettings< + ListSkuGroupsRequest, ListSkuGroupsResponse, ListSkuGroupsPagedResponse> + listSkuGroupsSettings; + private final PagedCallSettings< + ListSkuGroupBillableSkusRequest, + ListSkuGroupBillableSkusResponse, + ListSkuGroupBillableSkusPagedResponse> + listSkuGroupBillableSkusSettings; private final UnaryCallSettings lookupOfferSettings; private final PagedCallSettings< ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> @@ -629,6 +645,87 @@ public Iterable extractResources( } }; + private static final PagedListDescriptor + LIST_SKU_GROUPS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListSkuGroupsRequest injectToken(ListSkuGroupsRequest payload, String token) { + return ListSkuGroupsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListSkuGroupsRequest injectPageSize(ListSkuGroupsRequest payload, int pageSize) { + return ListSkuGroupsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListSkuGroupsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListSkuGroupsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListSkuGroupsResponse payload) { + return payload.getSkuGroupsList() == null + ? ImmutableList.of() + : payload.getSkuGroupsList(); + } + }; + + private static final PagedListDescriptor< + ListSkuGroupBillableSkusRequest, ListSkuGroupBillableSkusResponse, BillableSku> + LIST_SKU_GROUP_BILLABLE_SKUS_PAGE_STR_DESC = + new PagedListDescriptor< + ListSkuGroupBillableSkusRequest, ListSkuGroupBillableSkusResponse, BillableSku>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListSkuGroupBillableSkusRequest injectToken( + ListSkuGroupBillableSkusRequest payload, String token) { + return ListSkuGroupBillableSkusRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListSkuGroupBillableSkusRequest injectPageSize( + ListSkuGroupBillableSkusRequest payload, int pageSize) { + return ListSkuGroupBillableSkusRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListSkuGroupBillableSkusRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListSkuGroupBillableSkusResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListSkuGroupBillableSkusResponse payload) { + return payload.getBillableSkusList() == null + ? ImmutableList.of() + : payload.getBillableSkusList(); + } + }; + private static final PagedListDescriptor LIST_PRODUCTS_PAGE_STR_DESC = new PagedListDescriptor() { @@ -1079,6 +1176,50 @@ public ApiFuture getFuturePagedRespon } }; + private static final PagedListResponseFactory< + ListSkuGroupsRequest, ListSkuGroupsResponse, ListSkuGroupsPagedResponse> + LIST_SKU_GROUPS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListSkuGroupsRequest, ListSkuGroupsResponse, ListSkuGroupsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListSkuGroupsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_SKU_GROUPS_PAGE_STR_DESC, request, context); + return ListSkuGroupsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListSkuGroupBillableSkusRequest, + ListSkuGroupBillableSkusResponse, + ListSkuGroupBillableSkusPagedResponse> + LIST_SKU_GROUP_BILLABLE_SKUS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListSkuGroupBillableSkusRequest, + ListSkuGroupBillableSkusResponse, + ListSkuGroupBillableSkusPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + ListSkuGroupBillableSkusRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListSkuGroupBillableSkusRequest, + ListSkuGroupBillableSkusResponse, + BillableSku> + pageContext = + PageContext.create( + callable, LIST_SKU_GROUP_BILLABLE_SKUS_PAGE_STR_DESC, request, context); + return ListSkuGroupBillableSkusPagedResponse.createAsync(pageContext, futureResponse); + } + }; + private static final PagedListResponseFactory< ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> LIST_PRODUCTS_PAGE_STR_FACT = @@ -1506,6 +1647,21 @@ public UnaryCallSettings transferEntitle return deleteChannelPartnerRepricingConfigSettings; } + /** Returns the object with the settings used for calls to listSkuGroups. */ + public PagedCallSettings + listSkuGroupsSettings() { + return listSkuGroupsSettings; + } + + /** Returns the object with the settings used for calls to listSkuGroupBillableSkus. */ + public PagedCallSettings< + ListSkuGroupBillableSkusRequest, + ListSkuGroupBillableSkusResponse, + ListSkuGroupBillableSkusPagedResponse> + listSkuGroupBillableSkusSettings() { + return listSkuGroupBillableSkusSettings; + } + /** Returns the object with the settings used for calls to lookupOffer. */ public UnaryCallSettings lookupOfferSettings() { return lookupOfferSettings; @@ -1746,6 +1902,8 @@ protected CloudChannelServiceStubSettings(Builder settingsBuilder) throws IOExce settingsBuilder.updateChannelPartnerRepricingConfigSettings().build(); deleteChannelPartnerRepricingConfigSettings = settingsBuilder.deleteChannelPartnerRepricingConfigSettings().build(); + listSkuGroupsSettings = settingsBuilder.listSkuGroupsSettings().build(); + listSkuGroupBillableSkusSettings = settingsBuilder.listSkuGroupBillableSkusSettings().build(); lookupOfferSettings = settingsBuilder.lookupOfferSettings().build(); listProductsSettings = settingsBuilder.listProductsSettings().build(); listSkusSettings = settingsBuilder.listSkusSettings().build(); @@ -1883,6 +2041,14 @@ public static class Builder updateChannelPartnerRepricingConfigSettings; private final UnaryCallSettings.Builder deleteChannelPartnerRepricingConfigSettings; + private final PagedCallSettings.Builder< + ListSkuGroupsRequest, ListSkuGroupsResponse, ListSkuGroupsPagedResponse> + listSkuGroupsSettings; + private final PagedCallSettings.Builder< + ListSkuGroupBillableSkusRequest, + ListSkuGroupBillableSkusResponse, + ListSkuGroupBillableSkusPagedResponse> + listSkuGroupBillableSkusSettings; private final UnaryCallSettings.Builder lookupOfferSettings; private final PagedCallSettings.Builder< ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> @@ -2016,6 +2182,9 @@ protected Builder(ClientContext clientContext) { createChannelPartnerRepricingConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); updateChannelPartnerRepricingConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); deleteChannelPartnerRepricingConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listSkuGroupsSettings = PagedCallSettings.newBuilder(LIST_SKU_GROUPS_PAGE_STR_FACT); + listSkuGroupBillableSkusSettings = + PagedCallSettings.newBuilder(LIST_SKU_GROUP_BILLABLE_SKUS_PAGE_STR_FACT); lookupOfferSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listProductsSettings = PagedCallSettings.newBuilder(LIST_PRODUCTS_PAGE_STR_FACT); listSkusSettings = PagedCallSettings.newBuilder(LIST_SKUS_PAGE_STR_FACT); @@ -2068,6 +2237,8 @@ protected Builder(ClientContext clientContext) { createChannelPartnerRepricingConfigSettings, updateChannelPartnerRepricingConfigSettings, deleteChannelPartnerRepricingConfigSettings, + listSkuGroupsSettings, + listSkuGroupBillableSkusSettings, lookupOfferSettings, listProductsSettings, listSkusSettings, @@ -2148,6 +2319,8 @@ protected Builder(CloudChannelServiceStubSettings settings) { settings.updateChannelPartnerRepricingConfigSettings.toBuilder(); deleteChannelPartnerRepricingConfigSettings = settings.deleteChannelPartnerRepricingConfigSettings.toBuilder(); + listSkuGroupsSettings = settings.listSkuGroupsSettings.toBuilder(); + listSkuGroupBillableSkusSettings = settings.listSkuGroupBillableSkusSettings.toBuilder(); lookupOfferSettings = settings.lookupOfferSettings.toBuilder(); listProductsSettings = settings.listProductsSettings.toBuilder(); listSkusSettings = settings.listSkusSettings.toBuilder(); @@ -2197,6 +2370,8 @@ protected Builder(CloudChannelServiceStubSettings settings) { createChannelPartnerRepricingConfigSettings, updateChannelPartnerRepricingConfigSettings, deleteChannelPartnerRepricingConfigSettings, + listSkuGroupsSettings, + listSkuGroupBillableSkusSettings, lookupOfferSettings, listProductsSettings, listSkusSettings, @@ -2416,6 +2591,16 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder + .listSkuGroupsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listSkuGroupBillableSkusSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder .lookupOfferSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) @@ -3078,6 +3263,22 @@ public UnaryCallSettings.Builder changeOfferSetti return deleteChannelPartnerRepricingConfigSettings; } + /** Returns the builder for the settings used for calls to listSkuGroups. */ + public PagedCallSettings.Builder< + ListSkuGroupsRequest, ListSkuGroupsResponse, ListSkuGroupsPagedResponse> + listSkuGroupsSettings() { + return listSkuGroupsSettings; + } + + /** Returns the builder for the settings used for calls to listSkuGroupBillableSkus. */ + public PagedCallSettings.Builder< + ListSkuGroupBillableSkusRequest, + ListSkuGroupBillableSkusResponse, + ListSkuGroupBillableSkusPagedResponse> + listSkuGroupBillableSkusSettings() { + return listSkuGroupBillableSkusSettings; + } + /** Returns the builder for the settings used for calls to lookupOffer. */ public UnaryCallSettings.Builder lookupOfferSettings() { return lookupOfferSettings; diff --git a/java-channel/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/stub/GrpcCloudChannelServiceStub.java b/java-channel/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/stub/GrpcCloudChannelServiceStub.java index a22aa2048f6a..d940ea8e31b0 100644 --- a/java-channel/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/stub/GrpcCloudChannelServiceStub.java +++ b/java-channel/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/stub/GrpcCloudChannelServiceStub.java @@ -26,6 +26,8 @@ import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListProductsPagedResponse; import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListPurchasableOffersPagedResponse; import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListPurchasableSkusPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListSkuGroupBillableSkusPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListSkuGroupsPagedResponse; import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListSkusPagedResponse; import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListSubscribersPagedResponse; import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListTransferableOffersPagedResponse; @@ -85,6 +87,10 @@ import com.google.cloud.channel.v1.ListPurchasableOffersResponse; import com.google.cloud.channel.v1.ListPurchasableSkusRequest; import com.google.cloud.channel.v1.ListPurchasableSkusResponse; +import com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest; +import com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse; +import com.google.cloud.channel.v1.ListSkuGroupsRequest; +import com.google.cloud.channel.v1.ListSkuGroupsResponse; import com.google.cloud.channel.v1.ListSkusRequest; import com.google.cloud.channel.v1.ListSkusResponse; import com.google.cloud.channel.v1.ListSubscribersRequest; @@ -550,6 +556,31 @@ public class GrpcCloudChannelServiceStub extends CloudChannelServiceStub { .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) .build(); + private static final MethodDescriptor + listSkuGroupsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.channel.v1.CloudChannelService/ListSkuGroups") + .setRequestMarshaller( + ProtoUtils.marshaller(ListSkuGroupsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListSkuGroupsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + ListSkuGroupBillableSkusRequest, ListSkuGroupBillableSkusResponse> + listSkuGroupBillableSkusMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.channel.v1.CloudChannelService/ListSkuGroupBillableSkus") + .setRequestMarshaller( + ProtoUtils.marshaller(ListSkuGroupBillableSkusRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListSkuGroupBillableSkusResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor lookupOfferMethodDescriptor = MethodDescriptor.newBuilder() .setType(MethodDescriptor.MethodType.UNARY) @@ -759,6 +790,14 @@ public class GrpcCloudChannelServiceStub extends CloudChannelServiceStub { updateChannelPartnerRepricingConfigCallable; private final UnaryCallable deleteChannelPartnerRepricingConfigCallable; + private final UnaryCallable listSkuGroupsCallable; + private final UnaryCallable + listSkuGroupsPagedCallable; + private final UnaryCallable + listSkuGroupBillableSkusCallable; + private final UnaryCallable< + ListSkuGroupBillableSkusRequest, ListSkuGroupBillableSkusPagedResponse> + listSkuGroupBillableSkusPagedCallable; private final UnaryCallable lookupOfferCallable; private final UnaryCallable listProductsCallable; private final UnaryCallable @@ -1237,6 +1276,28 @@ protected GrpcCloudChannelServiceStub( return builder.build(); }) .build(); + GrpcCallSettings listSkuGroupsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listSkuGroupsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listSkuGroupBillableSkusTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listSkuGroupBillableSkusMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); GrpcCallSettings lookupOfferTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(lookupOfferMethodDescriptor) @@ -1595,6 +1656,22 @@ protected GrpcCloudChannelServiceStub( deleteChannelPartnerRepricingConfigTransportSettings, settings.deleteChannelPartnerRepricingConfigSettings(), clientContext); + this.listSkuGroupsCallable = + callableFactory.createUnaryCallable( + listSkuGroupsTransportSettings, settings.listSkuGroupsSettings(), clientContext); + this.listSkuGroupsPagedCallable = + callableFactory.createPagedCallable( + listSkuGroupsTransportSettings, settings.listSkuGroupsSettings(), clientContext); + this.listSkuGroupBillableSkusCallable = + callableFactory.createUnaryCallable( + listSkuGroupBillableSkusTransportSettings, + settings.listSkuGroupBillableSkusSettings(), + clientContext); + this.listSkuGroupBillableSkusPagedCallable = + callableFactory.createPagedCallable( + listSkuGroupBillableSkusTransportSettings, + settings.listSkuGroupBillableSkusSettings(), + clientContext); this.lookupOfferCallable = callableFactory.createUnaryCallable( lookupOfferTransportSettings, settings.lookupOfferSettings(), clientContext); @@ -1984,6 +2061,29 @@ public UnaryCallable transferEntitlement return deleteChannelPartnerRepricingConfigCallable; } + @Override + public UnaryCallable listSkuGroupsCallable() { + return listSkuGroupsCallable; + } + + @Override + public UnaryCallable + listSkuGroupsPagedCallable() { + return listSkuGroupsPagedCallable; + } + + @Override + public UnaryCallable + listSkuGroupBillableSkusCallable() { + return listSkuGroupBillableSkusCallable; + } + + @Override + public UnaryCallable + listSkuGroupBillableSkusPagedCallable() { + return listSkuGroupBillableSkusPagedCallable; + } + @Override public UnaryCallable lookupOfferCallable() { return lookupOfferCallable; diff --git a/java-channel/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/stub/HttpJsonCloudChannelServiceStub.java b/java-channel/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/stub/HttpJsonCloudChannelServiceStub.java index 2feb818ed2d6..4036fc7dec67 100644 --- a/java-channel/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/stub/HttpJsonCloudChannelServiceStub.java +++ b/java-channel/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/stub/HttpJsonCloudChannelServiceStub.java @@ -26,6 +26,8 @@ import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListProductsPagedResponse; import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListPurchasableOffersPagedResponse; import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListPurchasableSkusPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListSkuGroupBillableSkusPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListSkuGroupsPagedResponse; import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListSkusPagedResponse; import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListSubscribersPagedResponse; import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListTransferableOffersPagedResponse; @@ -94,6 +96,10 @@ import com.google.cloud.channel.v1.ListPurchasableOffersResponse; import com.google.cloud.channel.v1.ListPurchasableSkusRequest; import com.google.cloud.channel.v1.ListPurchasableSkusResponse; +import com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest; +import com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse; +import com.google.cloud.channel.v1.ListSkuGroupsRequest; +import com.google.cloud.channel.v1.ListSkuGroupsResponse; import com.google.cloud.channel.v1.ListSkusRequest; import com.google.cloud.channel.v1.ListSkusResponse; import com.google.cloud.channel.v1.ListSubscribersRequest; @@ -1575,6 +1581,81 @@ public class HttpJsonCloudChannelServiceStub extends CloudChannelServiceStub { .build()) .build(); + private static final ApiMethodDescriptor + listSkuGroupsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.channel.v1.CloudChannelService/ListSkuGroups") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=accounts/*}/skuGroups", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListSkuGroupsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + ListSkuGroupBillableSkusRequest, ListSkuGroupBillableSkusResponse> + listSkuGroupBillableSkusMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.channel.v1.CloudChannelService/ListSkuGroupBillableSkus") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=accounts/*/skuGroups/*}/billableSkus", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListSkuGroupBillableSkusResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor lookupOfferMethodDescriptor = ApiMethodDescriptor.newBuilder() .setFullMethodName("google.cloud.channel.v1.CloudChannelService/LookupOffer") @@ -2072,6 +2153,14 @@ public class HttpJsonCloudChannelServiceStub extends CloudChannelServiceStub { updateChannelPartnerRepricingConfigCallable; private final UnaryCallable deleteChannelPartnerRepricingConfigCallable; + private final UnaryCallable listSkuGroupsCallable; + private final UnaryCallable + listSkuGroupsPagedCallable; + private final UnaryCallable + listSkuGroupBillableSkusCallable; + private final UnaryCallable< + ListSkuGroupBillableSkusRequest, ListSkuGroupBillableSkusPagedResponse> + listSkuGroupBillableSkusPagedCallable; private final UnaryCallable lookupOfferCallable; private final UnaryCallable listProductsCallable; private final UnaryCallable @@ -2610,6 +2699,31 @@ protected HttpJsonCloudChannelServiceStub( return builder.build(); }) .build(); + HttpJsonCallSettings + listSkuGroupsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listSkuGroupsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listSkuGroupBillableSkusTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listSkuGroupBillableSkusMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); HttpJsonCallSettings lookupOfferTransportSettings = HttpJsonCallSettings.newBuilder() .setMethodDescriptor(lookupOfferMethodDescriptor) @@ -2980,6 +3094,22 @@ protected HttpJsonCloudChannelServiceStub( deleteChannelPartnerRepricingConfigTransportSettings, settings.deleteChannelPartnerRepricingConfigSettings(), clientContext); + this.listSkuGroupsCallable = + callableFactory.createUnaryCallable( + listSkuGroupsTransportSettings, settings.listSkuGroupsSettings(), clientContext); + this.listSkuGroupsPagedCallable = + callableFactory.createPagedCallable( + listSkuGroupsTransportSettings, settings.listSkuGroupsSettings(), clientContext); + this.listSkuGroupBillableSkusCallable = + callableFactory.createUnaryCallable( + listSkuGroupBillableSkusTransportSettings, + settings.listSkuGroupBillableSkusSettings(), + clientContext); + this.listSkuGroupBillableSkusPagedCallable = + callableFactory.createPagedCallable( + listSkuGroupBillableSkusTransportSettings, + settings.listSkuGroupBillableSkusSettings(), + clientContext); this.lookupOfferCallable = callableFactory.createUnaryCallable( lookupOfferTransportSettings, settings.lookupOfferSettings(), clientContext); @@ -3091,6 +3221,8 @@ public static List getMethodDescriptors() { methodDescriptors.add(createChannelPartnerRepricingConfigMethodDescriptor); methodDescriptors.add(updateChannelPartnerRepricingConfigMethodDescriptor); methodDescriptors.add(deleteChannelPartnerRepricingConfigMethodDescriptor); + methodDescriptors.add(listSkuGroupsMethodDescriptor); + methodDescriptors.add(listSkuGroupBillableSkusMethodDescriptor); methodDescriptors.add(lookupOfferMethodDescriptor); methodDescriptors.add(listProductsMethodDescriptor); methodDescriptors.add(listSkusMethodDescriptor); @@ -3421,6 +3553,29 @@ public UnaryCallable transferEntitlement return deleteChannelPartnerRepricingConfigCallable; } + @Override + public UnaryCallable listSkuGroupsCallable() { + return listSkuGroupsCallable; + } + + @Override + public UnaryCallable + listSkuGroupsPagedCallable() { + return listSkuGroupsPagedCallable; + } + + @Override + public UnaryCallable + listSkuGroupBillableSkusCallable() { + return listSkuGroupBillableSkusCallable; + } + + @Override + public UnaryCallable + listSkuGroupBillableSkusPagedCallable() { + return listSkuGroupBillableSkusPagedCallable; + } + @Override public UnaryCallable lookupOfferCallable() { return lookupOfferCallable; diff --git a/java-channel/google-cloud-channel/src/test/java/com/google/cloud/channel/v1/CloudChannelServiceClientHttpJsonTest.java b/java-channel/google-cloud-channel/src/test/java/com/google/cloud/channel/v1/CloudChannelServiceClientHttpJsonTest.java index 97621ccbf084..43e5d9521cfa 100644 --- a/java-channel/google-cloud-channel/src/test/java/com/google/cloud/channel/v1/CloudChannelServiceClientHttpJsonTest.java +++ b/java-channel/google-cloud-channel/src/test/java/com/google/cloud/channel/v1/CloudChannelServiceClientHttpJsonTest.java @@ -26,6 +26,8 @@ import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListProductsPagedResponse; import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListPurchasableOffersPagedResponse; import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListPurchasableSkusPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListSkuGroupBillableSkusPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListSkuGroupsPagedResponse; import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListSkusPagedResponse; import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListSubscribersPagedResponse; import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListTransferableOffersPagedResponse; @@ -2799,6 +2801,158 @@ public void deleteChannelPartnerRepricingConfigExceptionTest2() throws Exception } } + @Test + public void listSkuGroupsTest() throws Exception { + SkuGroup responsesElement = SkuGroup.newBuilder().build(); + ListSkuGroupsResponse expectedResponse = + ListSkuGroupsResponse.newBuilder() + .setNextPageToken("") + .addAllSkuGroups(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "accounts/account-4811"; + + ListSkuGroupsPagedResponse pagedListResponse = client.listSkuGroups(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSkuGroupsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listSkuGroupsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "accounts/account-4811"; + client.listSkuGroups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSkuGroupBillableSkusTest() throws Exception { + BillableSku responsesElement = BillableSku.newBuilder().build(); + ListSkuGroupBillableSkusResponse expectedResponse = + ListSkuGroupBillableSkusResponse.newBuilder() + .setNextPageToken("") + .addAllBillableSkus(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + SkuGroupName parent = SkuGroupName.of("[ACCOUNT]", "[SKU_GROUP]"); + + ListSkuGroupBillableSkusPagedResponse pagedListResponse = + client.listSkuGroupBillableSkus(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBillableSkusList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listSkuGroupBillableSkusExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + SkuGroupName parent = SkuGroupName.of("[ACCOUNT]", "[SKU_GROUP]"); + client.listSkuGroupBillableSkus(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSkuGroupBillableSkusTest2() throws Exception { + BillableSku responsesElement = BillableSku.newBuilder().build(); + ListSkuGroupBillableSkusResponse expectedResponse = + ListSkuGroupBillableSkusResponse.newBuilder() + .setNextPageToken("") + .addAllBillableSkus(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "accounts/account-7304/skuGroups/skuGroup-7304"; + + ListSkuGroupBillableSkusPagedResponse pagedListResponse = + client.listSkuGroupBillableSkus(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBillableSkusList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listSkuGroupBillableSkusExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "accounts/account-7304/skuGroups/skuGroup-7304"; + client.listSkuGroupBillableSkus(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void lookupOfferTest() throws Exception { Offer expectedResponse = diff --git a/java-channel/google-cloud-channel/src/test/java/com/google/cloud/channel/v1/CloudChannelServiceClientTest.java b/java-channel/google-cloud-channel/src/test/java/com/google/cloud/channel/v1/CloudChannelServiceClientTest.java index f2facefcccb4..4ef27a02515d 100644 --- a/java-channel/google-cloud-channel/src/test/java/com/google/cloud/channel/v1/CloudChannelServiceClientTest.java +++ b/java-channel/google-cloud-channel/src/test/java/com/google/cloud/channel/v1/CloudChannelServiceClientTest.java @@ -26,6 +26,8 @@ import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListProductsPagedResponse; import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListPurchasableOffersPagedResponse; import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListPurchasableSkusPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListSkuGroupBillableSkusPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListSkuGroupsPagedResponse; import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListSkusPagedResponse; import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListSubscribersPagedResponse; import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListTransferableOffersPagedResponse; @@ -2578,6 +2580,142 @@ public void deleteChannelPartnerRepricingConfigExceptionTest2() throws Exception } } + @Test + public void listSkuGroupsTest() throws Exception { + SkuGroup responsesElement = SkuGroup.newBuilder().build(); + ListSkuGroupsResponse expectedResponse = + ListSkuGroupsResponse.newBuilder() + .setNextPageToken("") + .addAllSkuGroups(Arrays.asList(responsesElement)) + .build(); + mockCloudChannelService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListSkuGroupsPagedResponse pagedListResponse = client.listSkuGroups(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSkuGroupsList().get(0), resources.get(0)); + + List actualRequests = mockCloudChannelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListSkuGroupsRequest actualRequest = ((ListSkuGroupsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listSkuGroupsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudChannelService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listSkuGroups(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSkuGroupBillableSkusTest() throws Exception { + BillableSku responsesElement = BillableSku.newBuilder().build(); + ListSkuGroupBillableSkusResponse expectedResponse = + ListSkuGroupBillableSkusResponse.newBuilder() + .setNextPageToken("") + .addAllBillableSkus(Arrays.asList(responsesElement)) + .build(); + mockCloudChannelService.addResponse(expectedResponse); + + SkuGroupName parent = SkuGroupName.of("[ACCOUNT]", "[SKU_GROUP]"); + + ListSkuGroupBillableSkusPagedResponse pagedListResponse = + client.listSkuGroupBillableSkus(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBillableSkusList().get(0), resources.get(0)); + + List actualRequests = mockCloudChannelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListSkuGroupBillableSkusRequest actualRequest = + ((ListSkuGroupBillableSkusRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listSkuGroupBillableSkusExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudChannelService.addException(exception); + + try { + SkuGroupName parent = SkuGroupName.of("[ACCOUNT]", "[SKU_GROUP]"); + client.listSkuGroupBillableSkus(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSkuGroupBillableSkusTest2() throws Exception { + BillableSku responsesElement = BillableSku.newBuilder().build(); + ListSkuGroupBillableSkusResponse expectedResponse = + ListSkuGroupBillableSkusResponse.newBuilder() + .setNextPageToken("") + .addAllBillableSkus(Arrays.asList(responsesElement)) + .build(); + mockCloudChannelService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListSkuGroupBillableSkusPagedResponse pagedListResponse = + client.listSkuGroupBillableSkus(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getBillableSkusList().get(0), resources.get(0)); + + List actualRequests = mockCloudChannelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListSkuGroupBillableSkusRequest actualRequest = + ((ListSkuGroupBillableSkusRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listSkuGroupBillableSkusExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudChannelService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listSkuGroupBillableSkus(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void lookupOfferTest() throws Exception { Offer expectedResponse = diff --git a/java-channel/google-cloud-channel/src/test/java/com/google/cloud/channel/v1/MockCloudChannelServiceImpl.java b/java-channel/google-cloud-channel/src/test/java/com/google/cloud/channel/v1/MockCloudChannelServiceImpl.java index d78f848c7246..88399969072b 100644 --- a/java-channel/google-cloud-channel/src/test/java/com/google/cloud/channel/v1/MockCloudChannelServiceImpl.java +++ b/java-channel/google-cloud-channel/src/test/java/com/google/cloud/channel/v1/MockCloudChannelServiceImpl.java @@ -828,6 +828,49 @@ public void deleteChannelPartnerRepricingConfig( } } + @Override + public void listSkuGroups( + ListSkuGroupsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListSkuGroupsResponse) { + requests.add(request); + responseObserver.onNext(((ListSkuGroupsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListSkuGroups, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListSkuGroupsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listSkuGroupBillableSkus( + ListSkuGroupBillableSkusRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListSkuGroupBillableSkusResponse) { + requests.add(request); + responseObserver.onNext(((ListSkuGroupBillableSkusResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListSkuGroupBillableSkus, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListSkuGroupBillableSkusResponse.class.getName(), + Exception.class.getName()))); + } + } + @Override public void lookupOffer(LookupOfferRequest request, StreamObserver responseObserver) { Object response = responses.poll(); diff --git a/java-channel/grpc-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CloudChannelServiceGrpc.java b/java-channel/grpc-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CloudChannelServiceGrpc.java index c04ee74a6281..daee7fa63c0d 100644 --- a/java-channel/grpc-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CloudChannelServiceGrpc.java +++ b/java-channel/grpc-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CloudChannelServiceGrpc.java @@ -1807,6 +1807,106 @@ private CloudChannelServiceGrpc() {} return getDeleteChannelPartnerRepricingConfigMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ListSkuGroupsRequest, + com.google.cloud.channel.v1.ListSkuGroupsResponse> + getListSkuGroupsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListSkuGroups", + requestType = com.google.cloud.channel.v1.ListSkuGroupsRequest.class, + responseType = com.google.cloud.channel.v1.ListSkuGroupsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ListSkuGroupsRequest, + com.google.cloud.channel.v1.ListSkuGroupsResponse> + getListSkuGroupsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ListSkuGroupsRequest, + com.google.cloud.channel.v1.ListSkuGroupsResponse> + getListSkuGroupsMethod; + if ((getListSkuGroupsMethod = CloudChannelServiceGrpc.getListSkuGroupsMethod) == null) { + synchronized (CloudChannelServiceGrpc.class) { + if ((getListSkuGroupsMethod = CloudChannelServiceGrpc.getListSkuGroupsMethod) == null) { + CloudChannelServiceGrpc.getListSkuGroupsMethod = + getListSkuGroupsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListSkuGroups")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.ListSkuGroupsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.ListSkuGroupsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new CloudChannelServiceMethodDescriptorSupplier("ListSkuGroups")) + .build(); + } + } + } + return getListSkuGroupsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest, + com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse> + getListSkuGroupBillableSkusMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListSkuGroupBillableSkus", + requestType = com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest.class, + responseType = com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest, + com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse> + getListSkuGroupBillableSkusMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest, + com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse> + getListSkuGroupBillableSkusMethod; + if ((getListSkuGroupBillableSkusMethod = + CloudChannelServiceGrpc.getListSkuGroupBillableSkusMethod) + == null) { + synchronized (CloudChannelServiceGrpc.class) { + if ((getListSkuGroupBillableSkusMethod = + CloudChannelServiceGrpc.getListSkuGroupBillableSkusMethod) + == null) { + CloudChannelServiceGrpc.getListSkuGroupBillableSkusMethod = + getListSkuGroupBillableSkusMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListSkuGroupBillableSkus")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new CloudChannelServiceMethodDescriptorSupplier( + "ListSkuGroupBillableSkus")) + .build(); + } + } + } + return getListSkuGroupBillableSkusMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.cloud.channel.v1.LookupOfferRequest, com.google.cloud.channel.v1.Offer> getLookupOfferMethod; @@ -3465,6 +3565,64 @@ default void deleteChannelPartnerRepricingConfig( getDeleteChannelPartnerRepricingConfigMethod(), responseObserver); } + /** + * + * + *
+     * Lists the Rebilling supported SKU groups the account is authorized to
+     * sell.
+     * Reference: https://cloud.google.com/skus/sku-groups
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the account making the request and the account
+     * being queried are different, or the account doesn't exist.
+     * * INTERNAL: Any non-user error related to technical issues in the
+     * backend. In this case, contact Cloud Channel support.
+     * Return Value:
+     * If successful, the [SkuGroup][google.cloud.channel.v1.SkuGroup] resources.
+     * The data for each resource is displayed in the alphabetical order of SKU
+     * group display name.
+     * The data for each resource is displayed in the ascending order of
+     * [SkuGroup.display_name][google.cloud.channel.v1.SkuGroup.display_name]
+     * If unsuccessful, returns an error.
+     * 
+ */ + default void listSkuGroups( + com.google.cloud.channel.v1.ListSkuGroupsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListSkuGroupsMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists the Billable SKUs in a given SKU group.
+     * Possible error codes:
+     * PERMISSION_DENIED: If the account making the request and the account
+     * being queried for are different, or the account doesn't exist.
+     * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * INTERNAL: Any non-user error related to technical issue in the
+     * backend. In this case, contact cloud channel support.
+     * Return Value:
+     * If successful, the [BillableSku][google.cloud.channel.v1.BillableSku]
+     * resources. The data for each resource is displayed in the ascending order
+     * of:
+     * * [BillableSku.service_display_name][google.cloud.channel.v1.BillableSku.service_display_name]
+     * * [BillableSku.sku_display_name][google.cloud.channel.v1.BillableSku.sku_display_name]
+     * If unsuccessful, returns an error.
+     * 
+ */ + default void listSkuGroupBillableSkus( + com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListSkuGroupBillableSkusMethod(), responseObserver); + } + /** * * @@ -4947,6 +5105,68 @@ public void deleteChannelPartnerRepricingConfig( responseObserver); } + /** + * + * + *
+     * Lists the Rebilling supported SKU groups the account is authorized to
+     * sell.
+     * Reference: https://cloud.google.com/skus/sku-groups
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the account making the request and the account
+     * being queried are different, or the account doesn't exist.
+     * * INTERNAL: Any non-user error related to technical issues in the
+     * backend. In this case, contact Cloud Channel support.
+     * Return Value:
+     * If successful, the [SkuGroup][google.cloud.channel.v1.SkuGroup] resources.
+     * The data for each resource is displayed in the alphabetical order of SKU
+     * group display name.
+     * The data for each resource is displayed in the ascending order of
+     * [SkuGroup.display_name][google.cloud.channel.v1.SkuGroup.display_name]
+     * If unsuccessful, returns an error.
+     * 
+ */ + public void listSkuGroups( + com.google.cloud.channel.v1.ListSkuGroupsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListSkuGroupsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists the Billable SKUs in a given SKU group.
+     * Possible error codes:
+     * PERMISSION_DENIED: If the account making the request and the account
+     * being queried for are different, or the account doesn't exist.
+     * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * INTERNAL: Any non-user error related to technical issue in the
+     * backend. In this case, contact cloud channel support.
+     * Return Value:
+     * If successful, the [BillableSku][google.cloud.channel.v1.BillableSku]
+     * resources. The data for each resource is displayed in the ascending order
+     * of:
+     * * [BillableSku.service_display_name][google.cloud.channel.v1.BillableSku.service_display_name]
+     * * [BillableSku.sku_display_name][google.cloud.channel.v1.BillableSku.sku_display_name]
+     * If unsuccessful, returns an error.
+     * 
+ */ + public void listSkuGroupBillableSkus( + com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListSkuGroupBillableSkusMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -6295,6 +6515,60 @@ public com.google.protobuf.Empty deleteChannelPartnerRepricingConfig( getChannel(), getDeleteChannelPartnerRepricingConfigMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Lists the Rebilling supported SKU groups the account is authorized to
+     * sell.
+     * Reference: https://cloud.google.com/skus/sku-groups
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the account making the request and the account
+     * being queried are different, or the account doesn't exist.
+     * * INTERNAL: Any non-user error related to technical issues in the
+     * backend. In this case, contact Cloud Channel support.
+     * Return Value:
+     * If successful, the [SkuGroup][google.cloud.channel.v1.SkuGroup] resources.
+     * The data for each resource is displayed in the alphabetical order of SKU
+     * group display name.
+     * The data for each resource is displayed in the ascending order of
+     * [SkuGroup.display_name][google.cloud.channel.v1.SkuGroup.display_name]
+     * If unsuccessful, returns an error.
+     * 
+ */ + public com.google.cloud.channel.v1.ListSkuGroupsResponse listSkuGroups( + com.google.cloud.channel.v1.ListSkuGroupsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListSkuGroupsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists the Billable SKUs in a given SKU group.
+     * Possible error codes:
+     * PERMISSION_DENIED: If the account making the request and the account
+     * being queried for are different, or the account doesn't exist.
+     * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * INTERNAL: Any non-user error related to technical issue in the
+     * backend. In this case, contact cloud channel support.
+     * Return Value:
+     * If successful, the [BillableSku][google.cloud.channel.v1.BillableSku]
+     * resources. The data for each resource is displayed in the ascending order
+     * of:
+     * * [BillableSku.service_display_name][google.cloud.channel.v1.BillableSku.service_display_name]
+     * * [BillableSku.sku_display_name][google.cloud.channel.v1.BillableSku.sku_display_name]
+     * If unsuccessful, returns an error.
+     * 
+ */ + public com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse listSkuGroupBillableSkus( + com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListSkuGroupBillableSkusMethod(), getCallOptions(), request); + } + /** * * @@ -7644,6 +7918,63 @@ protected CloudChannelServiceFutureStub build( request); } + /** + * + * + *
+     * Lists the Rebilling supported SKU groups the account is authorized to
+     * sell.
+     * Reference: https://cloud.google.com/skus/sku-groups
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the account making the request and the account
+     * being queried are different, or the account doesn't exist.
+     * * INTERNAL: Any non-user error related to technical issues in the
+     * backend. In this case, contact Cloud Channel support.
+     * Return Value:
+     * If successful, the [SkuGroup][google.cloud.channel.v1.SkuGroup] resources.
+     * The data for each resource is displayed in the alphabetical order of SKU
+     * group display name.
+     * The data for each resource is displayed in the ascending order of
+     * [SkuGroup.display_name][google.cloud.channel.v1.SkuGroup.display_name]
+     * If unsuccessful, returns an error.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.channel.v1.ListSkuGroupsResponse> + listSkuGroups(com.google.cloud.channel.v1.ListSkuGroupsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListSkuGroupsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists the Billable SKUs in a given SKU group.
+     * Possible error codes:
+     * PERMISSION_DENIED: If the account making the request and the account
+     * being queried for are different, or the account doesn't exist.
+     * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * INTERNAL: Any non-user error related to technical issue in the
+     * backend. In this case, contact cloud channel support.
+     * Return Value:
+     * If successful, the [BillableSku][google.cloud.channel.v1.BillableSku]
+     * resources. The data for each resource is displayed in the ascending order
+     * of:
+     * * [BillableSku.service_display_name][google.cloud.channel.v1.BillableSku.service_display_name]
+     * * [BillableSku.sku_display_name][google.cloud.channel.v1.BillableSku.sku_display_name]
+     * If unsuccessful, returns an error.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse> + listSkuGroupBillableSkus( + com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListSkuGroupBillableSkusMethod(), getCallOptions()), request); + } + /** * * @@ -7898,16 +8229,18 @@ protected CloudChannelServiceFutureStub build( private static final int METHODID_CREATE_CHANNEL_PARTNER_REPRICING_CONFIG = 33; private static final int METHODID_UPDATE_CHANNEL_PARTNER_REPRICING_CONFIG = 34; private static final int METHODID_DELETE_CHANNEL_PARTNER_REPRICING_CONFIG = 35; - private static final int METHODID_LOOKUP_OFFER = 36; - private static final int METHODID_LIST_PRODUCTS = 37; - private static final int METHODID_LIST_SKUS = 38; - private static final int METHODID_LIST_OFFERS = 39; - private static final int METHODID_LIST_PURCHASABLE_SKUS = 40; - private static final int METHODID_LIST_PURCHASABLE_OFFERS = 41; - private static final int METHODID_REGISTER_SUBSCRIBER = 42; - private static final int METHODID_UNREGISTER_SUBSCRIBER = 43; - private static final int METHODID_LIST_SUBSCRIBERS = 44; - private static final int METHODID_LIST_ENTITLEMENT_CHANGES = 45; + private static final int METHODID_LIST_SKU_GROUPS = 36; + private static final int METHODID_LIST_SKU_GROUP_BILLABLE_SKUS = 37; + private static final int METHODID_LOOKUP_OFFER = 38; + private static final int METHODID_LIST_PRODUCTS = 39; + private static final int METHODID_LIST_SKUS = 40; + private static final int METHODID_LIST_OFFERS = 41; + private static final int METHODID_LIST_PURCHASABLE_SKUS = 42; + private static final int METHODID_LIST_PURCHASABLE_OFFERS = 43; + private static final int METHODID_REGISTER_SUBSCRIBER = 44; + private static final int METHODID_UNREGISTER_SUBSCRIBER = 45; + private static final int METHODID_LIST_SUBSCRIBERS = 46; + private static final int METHODID_LIST_ENTITLEMENT_CHANGES = 47; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -8133,6 +8466,19 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.channel.v1.DeleteChannelPartnerRepricingConfigRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_LIST_SKU_GROUPS: + serviceImpl.listSkuGroups( + (com.google.cloud.channel.v1.ListSkuGroupsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_SKU_GROUP_BILLABLE_SKUS: + serviceImpl.listSkuGroupBillableSkus( + (com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse>) + responseObserver); + break; case METHODID_LOOKUP_OFFER: serviceImpl.lookupOffer( (com.google.cloud.channel.v1.LookupOfferRequest) request, @@ -8448,6 +8794,20 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.cloud.channel.v1.DeleteChannelPartnerRepricingConfigRequest, com.google.protobuf.Empty>( service, METHODID_DELETE_CHANNEL_PARTNER_REPRICING_CONFIG))) + .addMethod( + getListSkuGroupsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.channel.v1.ListSkuGroupsRequest, + com.google.cloud.channel.v1.ListSkuGroupsResponse>( + service, METHODID_LIST_SKU_GROUPS))) + .addMethod( + getListSkuGroupBillableSkusMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest, + com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse>( + service, METHODID_LIST_SKU_GROUP_BILLABLE_SKUS))) .addMethod( getLookupOfferMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -8602,6 +8962,8 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getCreateChannelPartnerRepricingConfigMethod()) .addMethod(getUpdateChannelPartnerRepricingConfigMethod()) .addMethod(getDeleteChannelPartnerRepricingConfigMethod()) + .addMethod(getListSkuGroupsMethod()) + .addMethod(getListSkuGroupBillableSkusMethod()) .addMethod(getLookupOfferMethod()) .addMethod(getListProductsMethod()) .addMethod(getListSkusMethod()) diff --git a/java-channel/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/BillableSku.java b/java-channel/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/BillableSku.java new file mode 100644 index 000000000000..bd1ef6ad39fd --- /dev/null +++ b/java-channel/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/BillableSku.java @@ -0,0 +1,1210 @@ +/* + * 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/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Represents the Billable SKU information.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.BillableSku} + */ +public final class BillableSku extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.BillableSku) + BillableSkuOrBuilder { + private static final long serialVersionUID = 0L; + // Use BillableSku.newBuilder() to construct. + private BillableSku(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BillableSku() { + sku_ = ""; + skuDisplayName_ = ""; + service_ = ""; + serviceDisplayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BillableSku(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_BillableSku_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_BillableSku_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.BillableSku.class, + com.google.cloud.channel.v1.BillableSku.Builder.class); + } + + public static final int SKU_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object sku_ = ""; + /** + * + * + *
+   * Resource name of Billable SKU. Format:
+   * billableSkus/{sku}.
+   * Example:
+   * billableSkus/6E1B-6634-470F".
+   * 
+ * + * string sku = 1; + * + * @return The sku. + */ + @java.lang.Override + public java.lang.String getSku() { + java.lang.Object ref = sku_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sku_ = s; + return s; + } + } + /** + * + * + *
+   * Resource name of Billable SKU. Format:
+   * billableSkus/{sku}.
+   * Example:
+   * billableSkus/6E1B-6634-470F".
+   * 
+ * + * string sku = 1; + * + * @return The bytes for sku. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSkuBytes() { + java.lang.Object ref = sku_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sku_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SKU_DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object skuDisplayName_ = ""; + /** + * + * + *
+   * Unique human readable name for the SKU.
+   * 
+ * + * string sku_display_name = 2; + * + * @return The skuDisplayName. + */ + @java.lang.Override + public java.lang.String getSkuDisplayName() { + java.lang.Object ref = skuDisplayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + skuDisplayName_ = s; + return s; + } + } + /** + * + * + *
+   * Unique human readable name for the SKU.
+   * 
+ * + * string sku_display_name = 2; + * + * @return The bytes for skuDisplayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSkuDisplayNameBytes() { + java.lang.Object ref = skuDisplayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + skuDisplayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object service_ = ""; + /** + * + * + *
+   * Resource name of Service which contains Repricing SKU. Format:
+   * services/{service}.
+   * Example:
+   * "services/B7D9-FDCB-15D8".
+   * 
+ * + * string service = 3; + * + * @return The service. + */ + @java.lang.Override + public java.lang.String getService() { + java.lang.Object ref = service_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + service_ = s; + return s; + } + } + /** + * + * + *
+   * Resource name of Service which contains Repricing SKU. Format:
+   * services/{service}.
+   * Example:
+   * "services/B7D9-FDCB-15D8".
+   * 
+ * + * string service = 3; + * + * @return The bytes for service. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceBytes() { + java.lang.Object ref = service_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + service_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_DISPLAY_NAME_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object serviceDisplayName_ = ""; + /** + * + * + *
+   * Unique human readable name for the Service.
+   * 
+ * + * string service_display_name = 4; + * + * @return The serviceDisplayName. + */ + @java.lang.Override + public java.lang.String getServiceDisplayName() { + java.lang.Object ref = serviceDisplayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceDisplayName_ = s; + return s; + } + } + /** + * + * + *
+   * Unique human readable name for the Service.
+   * 
+ * + * string service_display_name = 4; + * + * @return The bytes for serviceDisplayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceDisplayNameBytes() { + java.lang.Object ref = serviceDisplayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceDisplayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sku_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sku_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(skuDisplayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, skuDisplayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, service_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceDisplayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, serviceDisplayName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sku_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sku_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(skuDisplayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, skuDisplayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, service_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceDisplayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, serviceDisplayName_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.BillableSku)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.BillableSku other = (com.google.cloud.channel.v1.BillableSku) obj; + + if (!getSku().equals(other.getSku())) return false; + if (!getSkuDisplayName().equals(other.getSkuDisplayName())) return false; + if (!getService().equals(other.getService())) return false; + if (!getServiceDisplayName().equals(other.getServiceDisplayName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SKU_FIELD_NUMBER; + hash = (53 * hash) + getSku().hashCode(); + hash = (37 * hash) + SKU_DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getSkuDisplayName().hashCode(); + hash = (37 * hash) + SERVICE_FIELD_NUMBER; + hash = (53 * hash) + getService().hashCode(); + hash = (37 * hash) + SERVICE_DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getServiceDisplayName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.BillableSku parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.BillableSku parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.BillableSku parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.BillableSku parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.BillableSku parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.BillableSku parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.BillableSku parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.BillableSku parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.BillableSku parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.BillableSku parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.BillableSku parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.BillableSku parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.BillableSku prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Represents the Billable SKU information.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.BillableSku} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.BillableSku) + com.google.cloud.channel.v1.BillableSkuOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_BillableSku_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_BillableSku_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.BillableSku.class, + com.google.cloud.channel.v1.BillableSku.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.BillableSku.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + sku_ = ""; + skuDisplayName_ = ""; + service_ = ""; + serviceDisplayName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_BillableSku_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.BillableSku getDefaultInstanceForType() { + return com.google.cloud.channel.v1.BillableSku.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.BillableSku build() { + com.google.cloud.channel.v1.BillableSku result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.BillableSku buildPartial() { + com.google.cloud.channel.v1.BillableSku result = + new com.google.cloud.channel.v1.BillableSku(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.channel.v1.BillableSku result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.sku_ = sku_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.skuDisplayName_ = skuDisplayName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.service_ = service_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.serviceDisplayName_ = serviceDisplayName_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.BillableSku) { + return mergeFrom((com.google.cloud.channel.v1.BillableSku) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.BillableSku other) { + if (other == com.google.cloud.channel.v1.BillableSku.getDefaultInstance()) return this; + if (!other.getSku().isEmpty()) { + sku_ = other.sku_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getSkuDisplayName().isEmpty()) { + skuDisplayName_ = other.skuDisplayName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getService().isEmpty()) { + service_ = other.service_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getServiceDisplayName().isEmpty()) { + serviceDisplayName_ = other.serviceDisplayName_; + bitField0_ |= 0x00000008; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + sku_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + skuDisplayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + service_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + serviceDisplayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object sku_ = ""; + /** + * + * + *
+     * Resource name of Billable SKU. Format:
+     * billableSkus/{sku}.
+     * Example:
+     * billableSkus/6E1B-6634-470F".
+     * 
+ * + * string sku = 1; + * + * @return The sku. + */ + public java.lang.String getSku() { + java.lang.Object ref = sku_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sku_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Resource name of Billable SKU. Format:
+     * billableSkus/{sku}.
+     * Example:
+     * billableSkus/6E1B-6634-470F".
+     * 
+ * + * string sku = 1; + * + * @return The bytes for sku. + */ + public com.google.protobuf.ByteString getSkuBytes() { + java.lang.Object ref = sku_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sku_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Resource name of Billable SKU. Format:
+     * billableSkus/{sku}.
+     * Example:
+     * billableSkus/6E1B-6634-470F".
+     * 
+ * + * string sku = 1; + * + * @param value The sku to set. + * @return This builder for chaining. + */ + public Builder setSku(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sku_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of Billable SKU. Format:
+     * billableSkus/{sku}.
+     * Example:
+     * billableSkus/6E1B-6634-470F".
+     * 
+ * + * string sku = 1; + * + * @return This builder for chaining. + */ + public Builder clearSku() { + sku_ = getDefaultInstance().getSku(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of Billable SKU. Format:
+     * billableSkus/{sku}.
+     * Example:
+     * billableSkus/6E1B-6634-470F".
+     * 
+ * + * string sku = 1; + * + * @param value The bytes for sku to set. + * @return This builder for chaining. + */ + public Builder setSkuBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sku_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object skuDisplayName_ = ""; + /** + * + * + *
+     * Unique human readable name for the SKU.
+     * 
+ * + * string sku_display_name = 2; + * + * @return The skuDisplayName. + */ + public java.lang.String getSkuDisplayName() { + java.lang.Object ref = skuDisplayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + skuDisplayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Unique human readable name for the SKU.
+     * 
+ * + * string sku_display_name = 2; + * + * @return The bytes for skuDisplayName. + */ + public com.google.protobuf.ByteString getSkuDisplayNameBytes() { + java.lang.Object ref = skuDisplayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + skuDisplayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Unique human readable name for the SKU.
+     * 
+ * + * string sku_display_name = 2; + * + * @param value The skuDisplayName to set. + * @return This builder for chaining. + */ + public Builder setSkuDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + skuDisplayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Unique human readable name for the SKU.
+     * 
+ * + * string sku_display_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearSkuDisplayName() { + skuDisplayName_ = getDefaultInstance().getSkuDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Unique human readable name for the SKU.
+     * 
+ * + * string sku_display_name = 2; + * + * @param value The bytes for skuDisplayName to set. + * @return This builder for chaining. + */ + public Builder setSkuDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + skuDisplayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object service_ = ""; + /** + * + * + *
+     * Resource name of Service which contains Repricing SKU. Format:
+     * services/{service}.
+     * Example:
+     * "services/B7D9-FDCB-15D8".
+     * 
+ * + * string service = 3; + * + * @return The service. + */ + public java.lang.String getService() { + java.lang.Object ref = service_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + service_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Resource name of Service which contains Repricing SKU. Format:
+     * services/{service}.
+     * Example:
+     * "services/B7D9-FDCB-15D8".
+     * 
+ * + * string service = 3; + * + * @return The bytes for service. + */ + public com.google.protobuf.ByteString getServiceBytes() { + java.lang.Object ref = service_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + service_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Resource name of Service which contains Repricing SKU. Format:
+     * services/{service}.
+     * Example:
+     * "services/B7D9-FDCB-15D8".
+     * 
+ * + * string service = 3; + * + * @param value The service to set. + * @return This builder for chaining. + */ + public Builder setService(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + service_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of Service which contains Repricing SKU. Format:
+     * services/{service}.
+     * Example:
+     * "services/B7D9-FDCB-15D8".
+     * 
+ * + * string service = 3; + * + * @return This builder for chaining. + */ + public Builder clearService() { + service_ = getDefaultInstance().getService(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of Service which contains Repricing SKU. Format:
+     * services/{service}.
+     * Example:
+     * "services/B7D9-FDCB-15D8".
+     * 
+ * + * string service = 3; + * + * @param value The bytes for service to set. + * @return This builder for chaining. + */ + public Builder setServiceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + service_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object serviceDisplayName_ = ""; + /** + * + * + *
+     * Unique human readable name for the Service.
+     * 
+ * + * string service_display_name = 4; + * + * @return The serviceDisplayName. + */ + public java.lang.String getServiceDisplayName() { + java.lang.Object ref = serviceDisplayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceDisplayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Unique human readable name for the Service.
+     * 
+ * + * string service_display_name = 4; + * + * @return The bytes for serviceDisplayName. + */ + public com.google.protobuf.ByteString getServiceDisplayNameBytes() { + java.lang.Object ref = serviceDisplayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceDisplayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Unique human readable name for the Service.
+     * 
+ * + * string service_display_name = 4; + * + * @param value The serviceDisplayName to set. + * @return This builder for chaining. + */ + public Builder setServiceDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + serviceDisplayName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Unique human readable name for the Service.
+     * 
+ * + * string service_display_name = 4; + * + * @return This builder for chaining. + */ + public Builder clearServiceDisplayName() { + serviceDisplayName_ = getDefaultInstance().getServiceDisplayName(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Unique human readable name for the Service.
+     * 
+ * + * string service_display_name = 4; + * + * @param value The bytes for serviceDisplayName to set. + * @return This builder for chaining. + */ + public Builder setServiceDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + serviceDisplayName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.BillableSku) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.BillableSku) + private static final com.google.cloud.channel.v1.BillableSku DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.BillableSku(); + } + + public static com.google.cloud.channel.v1.BillableSku getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BillableSku parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.BillableSku getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-channel/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/BillableSkuOrBuilder.java b/java-channel/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/BillableSkuOrBuilder.java new file mode 100644 index 000000000000..ca441ac7ffbe --- /dev/null +++ b/java-channel/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/BillableSkuOrBuilder.java @@ -0,0 +1,137 @@ +/* + * 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/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface BillableSkuOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.BillableSku) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Resource name of Billable SKU. Format:
+   * billableSkus/{sku}.
+   * Example:
+   * billableSkus/6E1B-6634-470F".
+   * 
+ * + * string sku = 1; + * + * @return The sku. + */ + java.lang.String getSku(); + /** + * + * + *
+   * Resource name of Billable SKU. Format:
+   * billableSkus/{sku}.
+   * Example:
+   * billableSkus/6E1B-6634-470F".
+   * 
+ * + * string sku = 1; + * + * @return The bytes for sku. + */ + com.google.protobuf.ByteString getSkuBytes(); + + /** + * + * + *
+   * Unique human readable name for the SKU.
+   * 
+ * + * string sku_display_name = 2; + * + * @return The skuDisplayName. + */ + java.lang.String getSkuDisplayName(); + /** + * + * + *
+   * Unique human readable name for the SKU.
+   * 
+ * + * string sku_display_name = 2; + * + * @return The bytes for skuDisplayName. + */ + com.google.protobuf.ByteString getSkuDisplayNameBytes(); + + /** + * + * + *
+   * Resource name of Service which contains Repricing SKU. Format:
+   * services/{service}.
+   * Example:
+   * "services/B7D9-FDCB-15D8".
+   * 
+ * + * string service = 3; + * + * @return The service. + */ + java.lang.String getService(); + /** + * + * + *
+   * Resource name of Service which contains Repricing SKU. Format:
+   * services/{service}.
+   * Example:
+   * "services/B7D9-FDCB-15D8".
+   * 
+ * + * string service = 3; + * + * @return The bytes for service. + */ + com.google.protobuf.ByteString getServiceBytes(); + + /** + * + * + *
+   * Unique human readable name for the Service.
+   * 
+ * + * string service_display_name = 4; + * + * @return The serviceDisplayName. + */ + java.lang.String getServiceDisplayName(); + /** + * + * + *
+   * Unique human readable name for the Service.
+   * 
+ * + * string service_display_name = 4; + * + * @return The bytes for serviceDisplayName. + */ + com.google.protobuf.ByteString getServiceDisplayNameBytes(); +} diff --git a/java-channel/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListSkuGroupBillableSkusRequest.java b/java-channel/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListSkuGroupBillableSkusRequest.java new file mode 100644 index 000000000000..78bee628b8de --- /dev/null +++ b/java-channel/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListSkuGroupBillableSkusRequest.java @@ -0,0 +1,958 @@ +/* + * 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/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Request message for ListSkuGroupBillableSkus.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListSkuGroupBillableSkusRequest} + */ +public final class ListSkuGroupBillableSkusRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.ListSkuGroupBillableSkusRequest) + ListSkuGroupBillableSkusRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListSkuGroupBillableSkusRequest.newBuilder() to construct. + private ListSkuGroupBillableSkusRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListSkuGroupBillableSkusRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListSkuGroupBillableSkusRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListSkuGroupBillableSkusRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListSkuGroupBillableSkusRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest.class, + com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. Resource name of the SKU group.
+   * Format: accounts/{account}/skuGroups/{sku_group}.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Resource name of the SKU group.
+   * Format: accounts/{account}/skuGroups/{sku_group}.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * Optional. The maximum number of SKUs to return. The service may return
+   * fewer than this value. If unspecified, returns a maximum of 100000 SKUs.
+   * The maximum value is 100000; values above 100000 will be coerced to 100000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * Optional. A token identifying a page of results beyond the first page.
+   * Obtained through
+   * [ListSkuGroupBillableSkus.next_page_token][] of the previous
+   * [CloudChannelService.ListSkuGroupBillableSkus][google.cloud.channel.v1.CloudChannelService.ListSkuGroupBillableSkus]
+   * call.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A token identifying a page of results beyond the first page.
+   * Obtained through
+   * [ListSkuGroupBillableSkus.next_page_token][] of the previous
+   * [CloudChannelService.ListSkuGroupBillableSkus][google.cloud.channel.v1.CloudChannelService.ListSkuGroupBillableSkus]
+   * call.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest other = + (com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for ListSkuGroupBillableSkus.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListSkuGroupBillableSkusRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.ListSkuGroupBillableSkusRequest) + com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListSkuGroupBillableSkusRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListSkuGroupBillableSkusRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest.class, + com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListSkuGroupBillableSkusRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest getDefaultInstanceForType() { + return com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest build() { + com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest buildPartial() { + com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest result = + new com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest) { + return mergeFrom((com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest other) { + if (other == com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. Resource name of the SKU group.
+     * Format: accounts/{account}/skuGroups/{sku_group}.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Resource name of the SKU group.
+     * Format: accounts/{account}/skuGroups/{sku_group}.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Resource name of the SKU group.
+     * Format: accounts/{account}/skuGroups/{sku_group}.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the SKU group.
+     * Format: accounts/{account}/skuGroups/{sku_group}.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the SKU group.
+     * Format: accounts/{account}/skuGroups/{sku_group}.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. The maximum number of SKUs to return. The service may return
+     * fewer than this value. If unspecified, returns a maximum of 100000 SKUs.
+     * The maximum value is 100000; values above 100000 will be coerced to 100000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. The maximum number of SKUs to return. The service may return
+     * fewer than this value. If unspecified, returns a maximum of 100000 SKUs.
+     * The maximum value is 100000; values above 100000 will be coerced to 100000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The maximum number of SKUs to return. The service may return
+     * fewer than this value. If unspecified, returns a maximum of 100000 SKUs.
+     * The maximum value is 100000; values above 100000 will be coerced to 100000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. A token identifying a page of results beyond the first page.
+     * Obtained through
+     * [ListSkuGroupBillableSkus.next_page_token][] of the previous
+     * [CloudChannelService.ListSkuGroupBillableSkus][google.cloud.channel.v1.CloudChannelService.ListSkuGroupBillableSkus]
+     * call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A token identifying a page of results beyond the first page.
+     * Obtained through
+     * [ListSkuGroupBillableSkus.next_page_token][] of the previous
+     * [CloudChannelService.ListSkuGroupBillableSkus][google.cloud.channel.v1.CloudChannelService.ListSkuGroupBillableSkus]
+     * call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A token identifying a page of results beyond the first page.
+     * Obtained through
+     * [ListSkuGroupBillableSkus.next_page_token][] of the previous
+     * [CloudChannelService.ListSkuGroupBillableSkus][google.cloud.channel.v1.CloudChannelService.ListSkuGroupBillableSkus]
+     * call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A token identifying a page of results beyond the first page.
+     * Obtained through
+     * [ListSkuGroupBillableSkus.next_page_token][] of the previous
+     * [CloudChannelService.ListSkuGroupBillableSkus][google.cloud.channel.v1.CloudChannelService.ListSkuGroupBillableSkus]
+     * call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A token identifying a page of results beyond the first page.
+     * Obtained through
+     * [ListSkuGroupBillableSkus.next_page_token][] of the previous
+     * [CloudChannelService.ListSkuGroupBillableSkus][google.cloud.channel.v1.CloudChannelService.ListSkuGroupBillableSkus]
+     * call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.ListSkuGroupBillableSkusRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.ListSkuGroupBillableSkusRequest) + private static final com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest(); + } + + public static com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSkuGroupBillableSkusRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-channel/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListSkuGroupBillableSkusRequestOrBuilder.java b/java-channel/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListSkuGroupBillableSkusRequestOrBuilder.java new file mode 100644 index 000000000000..b484b0773ddf --- /dev/null +++ b/java-channel/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListSkuGroupBillableSkusRequestOrBuilder.java @@ -0,0 +1,104 @@ +/* + * 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/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface ListSkuGroupBillableSkusRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.ListSkuGroupBillableSkusRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Resource name of the SKU group.
+   * Format: accounts/{account}/skuGroups/{sku_group}.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. Resource name of the SKU group.
+   * Format: accounts/{account}/skuGroups/{sku_group}.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of SKUs to return. The service may return
+   * fewer than this value. If unspecified, returns a maximum of 100000 SKUs.
+   * The maximum value is 100000; values above 100000 will be coerced to 100000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results beyond the first page.
+   * Obtained through
+   * [ListSkuGroupBillableSkus.next_page_token][] of the previous
+   * [CloudChannelService.ListSkuGroupBillableSkus][google.cloud.channel.v1.CloudChannelService.ListSkuGroupBillableSkus]
+   * call.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. A token identifying a page of results beyond the first page.
+   * Obtained through
+   * [ListSkuGroupBillableSkus.next_page_token][] of the previous
+   * [CloudChannelService.ListSkuGroupBillableSkus][google.cloud.channel.v1.CloudChannelService.ListSkuGroupBillableSkus]
+   * call.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-channel/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListSkuGroupBillableSkusResponse.java b/java-channel/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListSkuGroupBillableSkusResponse.java new file mode 100644 index 000000000000..870974a4029e --- /dev/null +++ b/java-channel/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListSkuGroupBillableSkusResponse.java @@ -0,0 +1,1139 @@ +/* + * 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/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Response message for ListSkuGroupBillableSkus.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListSkuGroupBillableSkusResponse} + */ +public final class ListSkuGroupBillableSkusResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.ListSkuGroupBillableSkusResponse) + ListSkuGroupBillableSkusResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListSkuGroupBillableSkusResponse.newBuilder() to construct. + private ListSkuGroupBillableSkusResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListSkuGroupBillableSkusResponse() { + billableSkus_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListSkuGroupBillableSkusResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListSkuGroupBillableSkusResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListSkuGroupBillableSkusResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse.class, + com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse.Builder.class); + } + + public static final int BILLABLE_SKUS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List billableSkus_; + /** + * + * + *
+   * The list of billable SKUs in the requested SKU group.
+   * 
+ * + * repeated .google.cloud.channel.v1.BillableSku billable_skus = 1; + */ + @java.lang.Override + public java.util.List getBillableSkusList() { + return billableSkus_; + } + /** + * + * + *
+   * The list of billable SKUs in the requested SKU group.
+   * 
+ * + * repeated .google.cloud.channel.v1.BillableSku billable_skus = 1; + */ + @java.lang.Override + public java.util.List + getBillableSkusOrBuilderList() { + return billableSkus_; + } + /** + * + * + *
+   * The list of billable SKUs in the requested SKU group.
+   * 
+ * + * repeated .google.cloud.channel.v1.BillableSku billable_skus = 1; + */ + @java.lang.Override + public int getBillableSkusCount() { + return billableSkus_.size(); + } + /** + * + * + *
+   * The list of billable SKUs in the requested SKU group.
+   * 
+ * + * repeated .google.cloud.channel.v1.BillableSku billable_skus = 1; + */ + @java.lang.Override + public com.google.cloud.channel.v1.BillableSku getBillableSkus(int index) { + return billableSkus_.get(index); + } + /** + * + * + *
+   * The list of billable SKUs in the requested SKU group.
+   * 
+ * + * repeated .google.cloud.channel.v1.BillableSku billable_skus = 1; + */ + @java.lang.Override + public com.google.cloud.channel.v1.BillableSkuOrBuilder getBillableSkusOrBuilder(int index) { + return billableSkus_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListSkuGroupBillableSkus.page_token][] to obtain that
+   * page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListSkuGroupBillableSkus.page_token][] to obtain that
+   * page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < billableSkus_.size(); i++) { + output.writeMessage(1, billableSkus_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < billableSkus_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, billableSkus_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse other = + (com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse) obj; + + if (!getBillableSkusList().equals(other.getBillableSkusList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getBillableSkusCount() > 0) { + hash = (37 * hash) + BILLABLE_SKUS_FIELD_NUMBER; + hash = (53 * hash) + getBillableSkusList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for ListSkuGroupBillableSkus.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListSkuGroupBillableSkusResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.ListSkuGroupBillableSkusResponse) + com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListSkuGroupBillableSkusResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListSkuGroupBillableSkusResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse.class, + com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (billableSkusBuilder_ == null) { + billableSkus_ = java.util.Collections.emptyList(); + } else { + billableSkus_ = null; + billableSkusBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListSkuGroupBillableSkusResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse + getDefaultInstanceForType() { + return com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse build() { + com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse buildPartial() { + com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse result = + new com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse result) { + if (billableSkusBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + billableSkus_ = java.util.Collections.unmodifiableList(billableSkus_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.billableSkus_ = billableSkus_; + } else { + result.billableSkus_ = billableSkusBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse) { + return mergeFrom((com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse other) { + if (other + == com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse.getDefaultInstance()) + return this; + if (billableSkusBuilder_ == null) { + if (!other.billableSkus_.isEmpty()) { + if (billableSkus_.isEmpty()) { + billableSkus_ = other.billableSkus_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBillableSkusIsMutable(); + billableSkus_.addAll(other.billableSkus_); + } + onChanged(); + } + } else { + if (!other.billableSkus_.isEmpty()) { + if (billableSkusBuilder_.isEmpty()) { + billableSkusBuilder_.dispose(); + billableSkusBuilder_ = null; + billableSkus_ = other.billableSkus_; + bitField0_ = (bitField0_ & ~0x00000001); + billableSkusBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getBillableSkusFieldBuilder() + : null; + } else { + billableSkusBuilder_.addAllMessages(other.billableSkus_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.channel.v1.BillableSku m = + input.readMessage( + com.google.cloud.channel.v1.BillableSku.parser(), extensionRegistry); + if (billableSkusBuilder_ == null) { + ensureBillableSkusIsMutable(); + billableSkus_.add(m); + } else { + billableSkusBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List billableSkus_ = + java.util.Collections.emptyList(); + + private void ensureBillableSkusIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + billableSkus_ = + new java.util.ArrayList(billableSkus_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.BillableSku, + com.google.cloud.channel.v1.BillableSku.Builder, + com.google.cloud.channel.v1.BillableSkuOrBuilder> + billableSkusBuilder_; + + /** + * + * + *
+     * The list of billable SKUs in the requested SKU group.
+     * 
+ * + * repeated .google.cloud.channel.v1.BillableSku billable_skus = 1; + */ + public java.util.List getBillableSkusList() { + if (billableSkusBuilder_ == null) { + return java.util.Collections.unmodifiableList(billableSkus_); + } else { + return billableSkusBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of billable SKUs in the requested SKU group.
+     * 
+ * + * repeated .google.cloud.channel.v1.BillableSku billable_skus = 1; + */ + public int getBillableSkusCount() { + if (billableSkusBuilder_ == null) { + return billableSkus_.size(); + } else { + return billableSkusBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of billable SKUs in the requested SKU group.
+     * 
+ * + * repeated .google.cloud.channel.v1.BillableSku billable_skus = 1; + */ + public com.google.cloud.channel.v1.BillableSku getBillableSkus(int index) { + if (billableSkusBuilder_ == null) { + return billableSkus_.get(index); + } else { + return billableSkusBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of billable SKUs in the requested SKU group.
+     * 
+ * + * repeated .google.cloud.channel.v1.BillableSku billable_skus = 1; + */ + public Builder setBillableSkus(int index, com.google.cloud.channel.v1.BillableSku value) { + if (billableSkusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBillableSkusIsMutable(); + billableSkus_.set(index, value); + onChanged(); + } else { + billableSkusBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of billable SKUs in the requested SKU group.
+     * 
+ * + * repeated .google.cloud.channel.v1.BillableSku billable_skus = 1; + */ + public Builder setBillableSkus( + int index, com.google.cloud.channel.v1.BillableSku.Builder builderForValue) { + if (billableSkusBuilder_ == null) { + ensureBillableSkusIsMutable(); + billableSkus_.set(index, builderForValue.build()); + onChanged(); + } else { + billableSkusBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of billable SKUs in the requested SKU group.
+     * 
+ * + * repeated .google.cloud.channel.v1.BillableSku billable_skus = 1; + */ + public Builder addBillableSkus(com.google.cloud.channel.v1.BillableSku value) { + if (billableSkusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBillableSkusIsMutable(); + billableSkus_.add(value); + onChanged(); + } else { + billableSkusBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of billable SKUs in the requested SKU group.
+     * 
+ * + * repeated .google.cloud.channel.v1.BillableSku billable_skus = 1; + */ + public Builder addBillableSkus(int index, com.google.cloud.channel.v1.BillableSku value) { + if (billableSkusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBillableSkusIsMutable(); + billableSkus_.add(index, value); + onChanged(); + } else { + billableSkusBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of billable SKUs in the requested SKU group.
+     * 
+ * + * repeated .google.cloud.channel.v1.BillableSku billable_skus = 1; + */ + public Builder addBillableSkus( + com.google.cloud.channel.v1.BillableSku.Builder builderForValue) { + if (billableSkusBuilder_ == null) { + ensureBillableSkusIsMutable(); + billableSkus_.add(builderForValue.build()); + onChanged(); + } else { + billableSkusBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of billable SKUs in the requested SKU group.
+     * 
+ * + * repeated .google.cloud.channel.v1.BillableSku billable_skus = 1; + */ + public Builder addBillableSkus( + int index, com.google.cloud.channel.v1.BillableSku.Builder builderForValue) { + if (billableSkusBuilder_ == null) { + ensureBillableSkusIsMutable(); + billableSkus_.add(index, builderForValue.build()); + onChanged(); + } else { + billableSkusBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of billable SKUs in the requested SKU group.
+     * 
+ * + * repeated .google.cloud.channel.v1.BillableSku billable_skus = 1; + */ + public Builder addAllBillableSkus( + java.lang.Iterable values) { + if (billableSkusBuilder_ == null) { + ensureBillableSkusIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, billableSkus_); + onChanged(); + } else { + billableSkusBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of billable SKUs in the requested SKU group.
+     * 
+ * + * repeated .google.cloud.channel.v1.BillableSku billable_skus = 1; + */ + public Builder clearBillableSkus() { + if (billableSkusBuilder_ == null) { + billableSkus_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + billableSkusBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of billable SKUs in the requested SKU group.
+     * 
+ * + * repeated .google.cloud.channel.v1.BillableSku billable_skus = 1; + */ + public Builder removeBillableSkus(int index) { + if (billableSkusBuilder_ == null) { + ensureBillableSkusIsMutable(); + billableSkus_.remove(index); + onChanged(); + } else { + billableSkusBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of billable SKUs in the requested SKU group.
+     * 
+ * + * repeated .google.cloud.channel.v1.BillableSku billable_skus = 1; + */ + public com.google.cloud.channel.v1.BillableSku.Builder getBillableSkusBuilder(int index) { + return getBillableSkusFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of billable SKUs in the requested SKU group.
+     * 
+ * + * repeated .google.cloud.channel.v1.BillableSku billable_skus = 1; + */ + public com.google.cloud.channel.v1.BillableSkuOrBuilder getBillableSkusOrBuilder(int index) { + if (billableSkusBuilder_ == null) { + return billableSkus_.get(index); + } else { + return billableSkusBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of billable SKUs in the requested SKU group.
+     * 
+ * + * repeated .google.cloud.channel.v1.BillableSku billable_skus = 1; + */ + public java.util.List + getBillableSkusOrBuilderList() { + if (billableSkusBuilder_ != null) { + return billableSkusBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(billableSkus_); + } + } + /** + * + * + *
+     * The list of billable SKUs in the requested SKU group.
+     * 
+ * + * repeated .google.cloud.channel.v1.BillableSku billable_skus = 1; + */ + public com.google.cloud.channel.v1.BillableSku.Builder addBillableSkusBuilder() { + return getBillableSkusFieldBuilder() + .addBuilder(com.google.cloud.channel.v1.BillableSku.getDefaultInstance()); + } + /** + * + * + *
+     * The list of billable SKUs in the requested SKU group.
+     * 
+ * + * repeated .google.cloud.channel.v1.BillableSku billable_skus = 1; + */ + public com.google.cloud.channel.v1.BillableSku.Builder addBillableSkusBuilder(int index) { + return getBillableSkusFieldBuilder() + .addBuilder(index, com.google.cloud.channel.v1.BillableSku.getDefaultInstance()); + } + /** + * + * + *
+     * The list of billable SKUs in the requested SKU group.
+     * 
+ * + * repeated .google.cloud.channel.v1.BillableSku billable_skus = 1; + */ + public java.util.List + getBillableSkusBuilderList() { + return getBillableSkusFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.BillableSku, + com.google.cloud.channel.v1.BillableSku.Builder, + com.google.cloud.channel.v1.BillableSkuOrBuilder> + getBillableSkusFieldBuilder() { + if (billableSkusBuilder_ == null) { + billableSkusBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.BillableSku, + com.google.cloud.channel.v1.BillableSku.Builder, + com.google.cloud.channel.v1.BillableSkuOrBuilder>( + billableSkus_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + billableSkus_ = null; + } + return billableSkusBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListSkuGroupBillableSkus.page_token][] to obtain that
+     * page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListSkuGroupBillableSkus.page_token][] to obtain that
+     * page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListSkuGroupBillableSkus.page_token][] to obtain that
+     * page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListSkuGroupBillableSkus.page_token][] to obtain that
+     * page.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListSkuGroupBillableSkus.page_token][] to obtain that
+     * page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.ListSkuGroupBillableSkusResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.ListSkuGroupBillableSkusResponse) + private static final com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse(); + } + + public static com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSkuGroupBillableSkusResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-channel/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListSkuGroupBillableSkusResponseOrBuilder.java b/java-channel/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListSkuGroupBillableSkusResponseOrBuilder.java new file mode 100644 index 000000000000..db62ab9ed9e8 --- /dev/null +++ b/java-channel/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListSkuGroupBillableSkusResponseOrBuilder.java @@ -0,0 +1,106 @@ +/* + * 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/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface ListSkuGroupBillableSkusResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.ListSkuGroupBillableSkusResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of billable SKUs in the requested SKU group.
+   * 
+ * + * repeated .google.cloud.channel.v1.BillableSku billable_skus = 1; + */ + java.util.List getBillableSkusList(); + /** + * + * + *
+   * The list of billable SKUs in the requested SKU group.
+   * 
+ * + * repeated .google.cloud.channel.v1.BillableSku billable_skus = 1; + */ + com.google.cloud.channel.v1.BillableSku getBillableSkus(int index); + /** + * + * + *
+   * The list of billable SKUs in the requested SKU group.
+   * 
+ * + * repeated .google.cloud.channel.v1.BillableSku billable_skus = 1; + */ + int getBillableSkusCount(); + /** + * + * + *
+   * The list of billable SKUs in the requested SKU group.
+   * 
+ * + * repeated .google.cloud.channel.v1.BillableSku billable_skus = 1; + */ + java.util.List + getBillableSkusOrBuilderList(); + /** + * + * + *
+   * The list of billable SKUs in the requested SKU group.
+   * 
+ * + * repeated .google.cloud.channel.v1.BillableSku billable_skus = 1; + */ + com.google.cloud.channel.v1.BillableSkuOrBuilder getBillableSkusOrBuilder(int index); + + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListSkuGroupBillableSkus.page_token][] to obtain that
+   * page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListSkuGroupBillableSkus.page_token][] to obtain that
+   * page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-channel/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListSkuGroupsRequest.java b/java-channel/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListSkuGroupsRequest.java new file mode 100644 index 000000000000..e37a1f35221b --- /dev/null +++ b/java-channel/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListSkuGroupsRequest.java @@ -0,0 +1,946 @@ +/* + * 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/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Request message for ListSkuGroups.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListSkuGroupsRequest} + */ +public final class ListSkuGroupsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.ListSkuGroupsRequest) + ListSkuGroupsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListSkuGroupsRequest.newBuilder() to construct. + private ListSkuGroupsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListSkuGroupsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListSkuGroupsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListSkuGroupsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListSkuGroupsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListSkuGroupsRequest.class, + com.google.cloud.channel.v1.ListSkuGroupsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The resource name of the account from which to list SKU groups.
+   * Parent uses the format: accounts/{account}.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the account from which to list SKU groups.
+   * Parent uses the format: accounts/{account}.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + /** + * + * + *
+   * Optional. The maximum number of SKU groups to return. The service may
+   * return fewer than this value. If unspecified, returns a maximum of 1000 SKU
+   * groups. The maximum value is 1000; values above 1000 will be coerced to
+   * 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * Optional. A token identifying a page of results beyond the first page.
+   * Obtained through
+   * [ListSkuGroups.next_page_token][] of the previous
+   * [CloudChannelService.ListSkuGroups][google.cloud.channel.v1.CloudChannelService.ListSkuGroups]
+   * call.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A token identifying a page of results beyond the first page.
+   * Obtained through
+   * [ListSkuGroups.next_page_token][] of the previous
+   * [CloudChannelService.ListSkuGroups][google.cloud.channel.v1.CloudChannelService.ListSkuGroups]
+   * call.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.ListSkuGroupsRequest)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.ListSkuGroupsRequest other = + (com.google.cloud.channel.v1.ListSkuGroupsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.ListSkuGroupsRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListSkuGroupsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListSkuGroupsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListSkuGroupsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListSkuGroupsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListSkuGroupsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListSkuGroupsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListSkuGroupsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListSkuGroupsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListSkuGroupsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListSkuGroupsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListSkuGroupsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.ListSkuGroupsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for ListSkuGroups.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListSkuGroupsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.ListSkuGroupsRequest) + com.google.cloud.channel.v1.ListSkuGroupsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListSkuGroupsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListSkuGroupsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListSkuGroupsRequest.class, + com.google.cloud.channel.v1.ListSkuGroupsRequest.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.ListSkuGroupsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListSkuGroupsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListSkuGroupsRequest getDefaultInstanceForType() { + return com.google.cloud.channel.v1.ListSkuGroupsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListSkuGroupsRequest build() { + com.google.cloud.channel.v1.ListSkuGroupsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListSkuGroupsRequest buildPartial() { + com.google.cloud.channel.v1.ListSkuGroupsRequest result = + new com.google.cloud.channel.v1.ListSkuGroupsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.channel.v1.ListSkuGroupsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.ListSkuGroupsRequest) { + return mergeFrom((com.google.cloud.channel.v1.ListSkuGroupsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.ListSkuGroupsRequest other) { + if (other == com.google.cloud.channel.v1.ListSkuGroupsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the account from which to list SKU groups.
+     * Parent uses the format: accounts/{account}.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the account from which to list SKU groups.
+     * Parent uses the format: accounts/{account}.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the account from which to list SKU groups.
+     * Parent uses the format: accounts/{account}.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the account from which to list SKU groups.
+     * Parent uses the format: accounts/{account}.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the account from which to list SKU groups.
+     * Parent uses the format: accounts/{account}.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. The maximum number of SKU groups to return. The service may
+     * return fewer than this value. If unspecified, returns a maximum of 1000 SKU
+     * groups. The maximum value is 1000; values above 1000 will be coerced to
+     * 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. The maximum number of SKU groups to return. The service may
+     * return fewer than this value. If unspecified, returns a maximum of 1000 SKU
+     * groups. The maximum value is 1000; values above 1000 will be coerced to
+     * 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The maximum number of SKU groups to return. The service may
+     * return fewer than this value. If unspecified, returns a maximum of 1000 SKU
+     * groups. The maximum value is 1000; values above 1000 will be coerced to
+     * 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. A token identifying a page of results beyond the first page.
+     * Obtained through
+     * [ListSkuGroups.next_page_token][] of the previous
+     * [CloudChannelService.ListSkuGroups][google.cloud.channel.v1.CloudChannelService.ListSkuGroups]
+     * call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A token identifying a page of results beyond the first page.
+     * Obtained through
+     * [ListSkuGroups.next_page_token][] of the previous
+     * [CloudChannelService.ListSkuGroups][google.cloud.channel.v1.CloudChannelService.ListSkuGroups]
+     * call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A token identifying a page of results beyond the first page.
+     * Obtained through
+     * [ListSkuGroups.next_page_token][] of the previous
+     * [CloudChannelService.ListSkuGroups][google.cloud.channel.v1.CloudChannelService.ListSkuGroups]
+     * call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A token identifying a page of results beyond the first page.
+     * Obtained through
+     * [ListSkuGroups.next_page_token][] of the previous
+     * [CloudChannelService.ListSkuGroups][google.cloud.channel.v1.CloudChannelService.ListSkuGroups]
+     * call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A token identifying a page of results beyond the first page.
+     * Obtained through
+     * [ListSkuGroups.next_page_token][] of the previous
+     * [CloudChannelService.ListSkuGroups][google.cloud.channel.v1.CloudChannelService.ListSkuGroups]
+     * call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.ListSkuGroupsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.ListSkuGroupsRequest) + private static final com.google.cloud.channel.v1.ListSkuGroupsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.ListSkuGroupsRequest(); + } + + public static com.google.cloud.channel.v1.ListSkuGroupsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSkuGroupsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListSkuGroupsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-channel/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListSkuGroupsRequestOrBuilder.java b/java-channel/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListSkuGroupsRequestOrBuilder.java new file mode 100644 index 000000000000..1ddb5e850733 --- /dev/null +++ b/java-channel/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListSkuGroupsRequestOrBuilder.java @@ -0,0 +1,101 @@ +/* + * 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/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface ListSkuGroupsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.ListSkuGroupsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the account from which to list SKU groups.
+   * Parent uses the format: accounts/{account}.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the account from which to list SKU groups.
+   * Parent uses the format: accounts/{account}.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of SKU groups to return. The service may
+   * return fewer than this value. If unspecified, returns a maximum of 1000 SKU
+   * groups. The maximum value is 1000; values above 1000 will be coerced to
+   * 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results beyond the first page.
+   * Obtained through
+   * [ListSkuGroups.next_page_token][] of the previous
+   * [CloudChannelService.ListSkuGroups][google.cloud.channel.v1.CloudChannelService.ListSkuGroups]
+   * call.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. A token identifying a page of results beyond the first page.
+   * Obtained through
+   * [ListSkuGroups.next_page_token][] of the previous
+   * [CloudChannelService.ListSkuGroups][google.cloud.channel.v1.CloudChannelService.ListSkuGroups]
+   * call.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-channel/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListSkuGroupsResponse.java b/java-channel/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListSkuGroupsResponse.java new file mode 100644 index 000000000000..f9ca2149532d --- /dev/null +++ b/java-channel/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListSkuGroupsResponse.java @@ -0,0 +1,1130 @@ +/* + * 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/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Response message for ListSkuGroups.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListSkuGroupsResponse} + */ +public final class ListSkuGroupsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.ListSkuGroupsResponse) + ListSkuGroupsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListSkuGroupsResponse.newBuilder() to construct. + private ListSkuGroupsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListSkuGroupsResponse() { + skuGroups_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListSkuGroupsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListSkuGroupsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListSkuGroupsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListSkuGroupsResponse.class, + com.google.cloud.channel.v1.ListSkuGroupsResponse.Builder.class); + } + + public static final int SKU_GROUPS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List skuGroups_; + /** + * + * + *
+   * The list of SKU groups requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.SkuGroup sku_groups = 1; + */ + @java.lang.Override + public java.util.List getSkuGroupsList() { + return skuGroups_; + } + /** + * + * + *
+   * The list of SKU groups requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.SkuGroup sku_groups = 1; + */ + @java.lang.Override + public java.util.List + getSkuGroupsOrBuilderList() { + return skuGroups_; + } + /** + * + * + *
+   * The list of SKU groups requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.SkuGroup sku_groups = 1; + */ + @java.lang.Override + public int getSkuGroupsCount() { + return skuGroups_.size(); + } + /** + * + * + *
+   * The list of SKU groups requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.SkuGroup sku_groups = 1; + */ + @java.lang.Override + public com.google.cloud.channel.v1.SkuGroup getSkuGroups(int index) { + return skuGroups_.get(index); + } + /** + * + * + *
+   * The list of SKU groups requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.SkuGroup sku_groups = 1; + */ + @java.lang.Override + public com.google.cloud.channel.v1.SkuGroupOrBuilder getSkuGroupsOrBuilder(int index) { + return skuGroups_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListSkuGroups.page_token][] to obtain that
+   * page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListSkuGroups.page_token][] to obtain that
+   * page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < skuGroups_.size(); i++) { + output.writeMessage(1, skuGroups_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < skuGroups_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, skuGroups_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.ListSkuGroupsResponse)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.ListSkuGroupsResponse other = + (com.google.cloud.channel.v1.ListSkuGroupsResponse) obj; + + if (!getSkuGroupsList().equals(other.getSkuGroupsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getSkuGroupsCount() > 0) { + hash = (37 * hash) + SKU_GROUPS_FIELD_NUMBER; + hash = (53 * hash) + getSkuGroupsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.ListSkuGroupsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListSkuGroupsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListSkuGroupsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListSkuGroupsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListSkuGroupsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListSkuGroupsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListSkuGroupsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListSkuGroupsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListSkuGroupsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListSkuGroupsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListSkuGroupsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListSkuGroupsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.ListSkuGroupsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for ListSkuGroups.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListSkuGroupsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.ListSkuGroupsResponse) + com.google.cloud.channel.v1.ListSkuGroupsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListSkuGroupsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListSkuGroupsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListSkuGroupsResponse.class, + com.google.cloud.channel.v1.ListSkuGroupsResponse.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.ListSkuGroupsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (skuGroupsBuilder_ == null) { + skuGroups_ = java.util.Collections.emptyList(); + } else { + skuGroups_ = null; + skuGroupsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListSkuGroupsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListSkuGroupsResponse getDefaultInstanceForType() { + return com.google.cloud.channel.v1.ListSkuGroupsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListSkuGroupsResponse build() { + com.google.cloud.channel.v1.ListSkuGroupsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListSkuGroupsResponse buildPartial() { + com.google.cloud.channel.v1.ListSkuGroupsResponse result = + new com.google.cloud.channel.v1.ListSkuGroupsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.channel.v1.ListSkuGroupsResponse result) { + if (skuGroupsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + skuGroups_ = java.util.Collections.unmodifiableList(skuGroups_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.skuGroups_ = skuGroups_; + } else { + result.skuGroups_ = skuGroupsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.channel.v1.ListSkuGroupsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.ListSkuGroupsResponse) { + return mergeFrom((com.google.cloud.channel.v1.ListSkuGroupsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.ListSkuGroupsResponse other) { + if (other == com.google.cloud.channel.v1.ListSkuGroupsResponse.getDefaultInstance()) + return this; + if (skuGroupsBuilder_ == null) { + if (!other.skuGroups_.isEmpty()) { + if (skuGroups_.isEmpty()) { + skuGroups_ = other.skuGroups_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSkuGroupsIsMutable(); + skuGroups_.addAll(other.skuGroups_); + } + onChanged(); + } + } else { + if (!other.skuGroups_.isEmpty()) { + if (skuGroupsBuilder_.isEmpty()) { + skuGroupsBuilder_.dispose(); + skuGroupsBuilder_ = null; + skuGroups_ = other.skuGroups_; + bitField0_ = (bitField0_ & ~0x00000001); + skuGroupsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSkuGroupsFieldBuilder() + : null; + } else { + skuGroupsBuilder_.addAllMessages(other.skuGroups_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.channel.v1.SkuGroup m = + input.readMessage( + com.google.cloud.channel.v1.SkuGroup.parser(), extensionRegistry); + if (skuGroupsBuilder_ == null) { + ensureSkuGroupsIsMutable(); + skuGroups_.add(m); + } else { + skuGroupsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List skuGroups_ = + java.util.Collections.emptyList(); + + private void ensureSkuGroupsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + skuGroups_ = new java.util.ArrayList(skuGroups_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.SkuGroup, + com.google.cloud.channel.v1.SkuGroup.Builder, + com.google.cloud.channel.v1.SkuGroupOrBuilder> + skuGroupsBuilder_; + + /** + * + * + *
+     * The list of SKU groups requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.SkuGroup sku_groups = 1; + */ + public java.util.List getSkuGroupsList() { + if (skuGroupsBuilder_ == null) { + return java.util.Collections.unmodifiableList(skuGroups_); + } else { + return skuGroupsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of SKU groups requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.SkuGroup sku_groups = 1; + */ + public int getSkuGroupsCount() { + if (skuGroupsBuilder_ == null) { + return skuGroups_.size(); + } else { + return skuGroupsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of SKU groups requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.SkuGroup sku_groups = 1; + */ + public com.google.cloud.channel.v1.SkuGroup getSkuGroups(int index) { + if (skuGroupsBuilder_ == null) { + return skuGroups_.get(index); + } else { + return skuGroupsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of SKU groups requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.SkuGroup sku_groups = 1; + */ + public Builder setSkuGroups(int index, com.google.cloud.channel.v1.SkuGroup value) { + if (skuGroupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSkuGroupsIsMutable(); + skuGroups_.set(index, value); + onChanged(); + } else { + skuGroupsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of SKU groups requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.SkuGroup sku_groups = 1; + */ + public Builder setSkuGroups( + int index, com.google.cloud.channel.v1.SkuGroup.Builder builderForValue) { + if (skuGroupsBuilder_ == null) { + ensureSkuGroupsIsMutable(); + skuGroups_.set(index, builderForValue.build()); + onChanged(); + } else { + skuGroupsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of SKU groups requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.SkuGroup sku_groups = 1; + */ + public Builder addSkuGroups(com.google.cloud.channel.v1.SkuGroup value) { + if (skuGroupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSkuGroupsIsMutable(); + skuGroups_.add(value); + onChanged(); + } else { + skuGroupsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of SKU groups requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.SkuGroup sku_groups = 1; + */ + public Builder addSkuGroups(int index, com.google.cloud.channel.v1.SkuGroup value) { + if (skuGroupsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSkuGroupsIsMutable(); + skuGroups_.add(index, value); + onChanged(); + } else { + skuGroupsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of SKU groups requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.SkuGroup sku_groups = 1; + */ + public Builder addSkuGroups(com.google.cloud.channel.v1.SkuGroup.Builder builderForValue) { + if (skuGroupsBuilder_ == null) { + ensureSkuGroupsIsMutable(); + skuGroups_.add(builderForValue.build()); + onChanged(); + } else { + skuGroupsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of SKU groups requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.SkuGroup sku_groups = 1; + */ + public Builder addSkuGroups( + int index, com.google.cloud.channel.v1.SkuGroup.Builder builderForValue) { + if (skuGroupsBuilder_ == null) { + ensureSkuGroupsIsMutable(); + skuGroups_.add(index, builderForValue.build()); + onChanged(); + } else { + skuGroupsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of SKU groups requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.SkuGroup sku_groups = 1; + */ + public Builder addAllSkuGroups( + java.lang.Iterable values) { + if (skuGroupsBuilder_ == null) { + ensureSkuGroupsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, skuGroups_); + onChanged(); + } else { + skuGroupsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of SKU groups requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.SkuGroup sku_groups = 1; + */ + public Builder clearSkuGroups() { + if (skuGroupsBuilder_ == null) { + skuGroups_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + skuGroupsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of SKU groups requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.SkuGroup sku_groups = 1; + */ + public Builder removeSkuGroups(int index) { + if (skuGroupsBuilder_ == null) { + ensureSkuGroupsIsMutable(); + skuGroups_.remove(index); + onChanged(); + } else { + skuGroupsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of SKU groups requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.SkuGroup sku_groups = 1; + */ + public com.google.cloud.channel.v1.SkuGroup.Builder getSkuGroupsBuilder(int index) { + return getSkuGroupsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of SKU groups requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.SkuGroup sku_groups = 1; + */ + public com.google.cloud.channel.v1.SkuGroupOrBuilder getSkuGroupsOrBuilder(int index) { + if (skuGroupsBuilder_ == null) { + return skuGroups_.get(index); + } else { + return skuGroupsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of SKU groups requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.SkuGroup sku_groups = 1; + */ + public java.util.List + getSkuGroupsOrBuilderList() { + if (skuGroupsBuilder_ != null) { + return skuGroupsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(skuGroups_); + } + } + /** + * + * + *
+     * The list of SKU groups requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.SkuGroup sku_groups = 1; + */ + public com.google.cloud.channel.v1.SkuGroup.Builder addSkuGroupsBuilder() { + return getSkuGroupsFieldBuilder() + .addBuilder(com.google.cloud.channel.v1.SkuGroup.getDefaultInstance()); + } + /** + * + * + *
+     * The list of SKU groups requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.SkuGroup sku_groups = 1; + */ + public com.google.cloud.channel.v1.SkuGroup.Builder addSkuGroupsBuilder(int index) { + return getSkuGroupsFieldBuilder() + .addBuilder(index, com.google.cloud.channel.v1.SkuGroup.getDefaultInstance()); + } + /** + * + * + *
+     * The list of SKU groups requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.SkuGroup sku_groups = 1; + */ + public java.util.List getSkuGroupsBuilderList() { + return getSkuGroupsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.SkuGroup, + com.google.cloud.channel.v1.SkuGroup.Builder, + com.google.cloud.channel.v1.SkuGroupOrBuilder> + getSkuGroupsFieldBuilder() { + if (skuGroupsBuilder_ == null) { + skuGroupsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.SkuGroup, + com.google.cloud.channel.v1.SkuGroup.Builder, + com.google.cloud.channel.v1.SkuGroupOrBuilder>( + skuGroups_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + skuGroups_ = null; + } + return skuGroupsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListSkuGroups.page_token][] to obtain that
+     * page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListSkuGroups.page_token][] to obtain that
+     * page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListSkuGroups.page_token][] to obtain that
+     * page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListSkuGroups.page_token][] to obtain that
+     * page.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListSkuGroups.page_token][] to obtain that
+     * page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.ListSkuGroupsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.ListSkuGroupsResponse) + private static final com.google.cloud.channel.v1.ListSkuGroupsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.ListSkuGroupsResponse(); + } + + public static com.google.cloud.channel.v1.ListSkuGroupsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSkuGroupsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListSkuGroupsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-channel/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListSkuGroupsResponseOrBuilder.java b/java-channel/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListSkuGroupsResponseOrBuilder.java new file mode 100644 index 000000000000..ec7b6161fd2c --- /dev/null +++ b/java-channel/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListSkuGroupsResponseOrBuilder.java @@ -0,0 +1,106 @@ +/* + * 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/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface ListSkuGroupsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.ListSkuGroupsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of SKU groups requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.SkuGroup sku_groups = 1; + */ + java.util.List getSkuGroupsList(); + /** + * + * + *
+   * The list of SKU groups requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.SkuGroup sku_groups = 1; + */ + com.google.cloud.channel.v1.SkuGroup getSkuGroups(int index); + /** + * + * + *
+   * The list of SKU groups requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.SkuGroup sku_groups = 1; + */ + int getSkuGroupsCount(); + /** + * + * + *
+   * The list of SKU groups requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.SkuGroup sku_groups = 1; + */ + java.util.List + getSkuGroupsOrBuilderList(); + /** + * + * + *
+   * The list of SKU groups requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.SkuGroup sku_groups = 1; + */ + com.google.cloud.channel.v1.SkuGroupOrBuilder getSkuGroupsOrBuilder(int index); + + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListSkuGroups.page_token][] to obtain that
+   * page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListSkuGroups.page_token][] to obtain that
+   * page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-channel/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ServiceProto.java b/java-channel/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ServiceProto.java index 28617481dd35..b60381652602 100644 --- a/java-channel/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ServiceProto.java +++ b/java-channel/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ServiceProto.java @@ -171,6 +171,30 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_channel_v1_DeleteChannelPartnerRepricingConfigRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_channel_v1_DeleteChannelPartnerRepricingConfigRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_ListSkuGroupsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_ListSkuGroupsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_ListSkuGroupBillableSkusRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_ListSkuGroupBillableSkusRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_ListSkuGroupsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_ListSkuGroupsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_ListSkuGroupBillableSkusResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_ListSkuGroupBillableSkusResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_SkuGroup_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_SkuGroup_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_BillableSku_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_BillableSku_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_channel_v1_CreateEntitlementRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -472,376 +496,403 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "icingConfigB\004\342A\001\002\"~\n*DeleteChannelPartne" + "rRepricingConfigRequest\022P\n\004name\030\001 \001(\tBB\342" + "A\001\002\372A;\n9cloudchannel.googleapis.com/Chan" - + "nelPartnerRepricingConfig\"\264\001\n\030CreateEnti" - + "tlementRequest\022=\n\006parent\030\001 \001(\tB-\342A\001\002\372A&\n" - + "$cloudchannel.googleapis.com/Customer\022?\n" - + "\013entitlement\030\002 \001(\0132$.google.cloud.channe" - + "l.v1.EntitlementB\004\342A\001\002\022\030\n\nrequest_id\030\005 \001" - + "(\tB\004\342A\001\001\"\243\001\n\033TransferEntitlementsRequest" - + "\022\024\n\006parent\030\001 \001(\tB\004\342A\001\002\022@\n\014entitlements\030\002" - + " \003(\0132$.google.cloud.channel.v1.Entitleme" - + "ntB\004\342A\001\002\022\022\n\nauth_token\030\004 \001(\t\022\030\n\nrequest_" - + "id\030\006 \001(\tB\004\342A\001\001\"Z\n\034TransferEntitlementsRe" - + "sponse\022:\n\014entitlements\030\001 \003(\0132$.google.cl" - + "oud.channel.v1.Entitlement\"\227\001\n#TransferE" - + "ntitlementsToGoogleRequest\022\024\n\006parent\030\001 \001" - + "(\tB\004\342A\001\002\022@\n\014entitlements\030\002 \003(\0132$.google." - + "cloud.channel.v1.EntitlementB\004\342A\001\002\022\030\n\nre" - + "quest_id\030\003 \001(\tB\004\342A\001\001\"\246\001\n\027ChangeParameter" - + "sRequest\022\022\n\004name\030\001 \001(\tB\004\342A\001\002\022<\n\nparamete" - + "rs\030\002 \003(\0132\".google.cloud.channel.v1.Param" - + "eterB\004\342A\001\002\022\030\n\nrequest_id\030\004 \001(\tB\004\342A\001\001\022\037\n\021" - + "purchase_order_id\030\005 \001(\tB\004\342A\001\001\"\226\001\n\034Change" - + "RenewalSettingsRequest\022\022\n\004name\030\001 \001(\tB\004\342A" - + "\001\002\022H\n\020renewal_settings\030\004 \001(\0132(.google.cl" - + "oud.channel.v1.RenewalSettingsB\004\342A\001\002\022\030\n\n" - + "request_id\030\005 \001(\tB\004\342A\001\001\"\334\001\n\022ChangeOfferRe" - + "quest\022\022\n\004name\030\001 \001(\tB\004\342A\001\002\0229\n\005offer\030\002 \001(\t" - + "B*\342A\001\002\372A#\n!cloudchannel.googleapis.com/O" - + "ffer\022<\n\nparameters\030\003 \003(\0132\".google.cloud." - + "channel.v1.ParameterB\004\342A\001\001\022\037\n\021purchase_o" - + "rder_id\030\005 \001(\tB\004\342A\001\001\022\030\n\nrequest_id\030\006 \001(\tB" - + "\004\342A\001\001\"G\n\027StartPaidServiceRequest\022\022\n\004name" - + "\030\001 \001(\tB\004\342A\001\002\022\030\n\nrequest_id\030\003 \001(\tB\004\342A\001\001\"H" - + "\n\030CancelEntitlementRequest\022\022\n\004name\030\001 \001(\t" - + "B\004\342A\001\002\022\030\n\nrequest_id\030\003 \001(\tB\004\342A\001\001\"I\n\031Susp" - + "endEntitlementRequest\022\022\n\004name\030\001 \001(\tB\004\342A\001" - + "\002\022\030\n\nrequest_id\030\003 \001(\tB\004\342A\001\001\"J\n\032ActivateE" - + "ntitlementRequest\022\022\n\004name\030\001 \001(\tB\004\342A\001\002\022\030\n" - + "\nrequest_id\030\003 \001(\tB\004\342A\001\001\"[\n\022LookupOfferRe" - + "quest\022E\n\013entitlement\030\001 \001(\tB0\342A\001\002\372A)\n\'clo" - + "udchannel.googleapis.com/Entitlement\"|\n\023" - + "ListProductsRequest\022\025\n\007account\030\001 \001(\tB\004\342A" - + "\001\002\022\027\n\tpage_size\030\002 \001(\005B\004\342A\001\001\022\030\n\npage_toke" - + "n\030\003 \001(\tB\004\342A\001\001\022\033\n\rlanguage_code\030\004 \001(\tB\004\342A" - + "\001\001\"c\n\024ListProductsResponse\0222\n\010products\030\001" - + " \003(\0132 .google.cloud.channel.v1.Product\022\027" - + "\n\017next_page_token\030\002 \001(\t\"\266\001\n\017ListSkusRequ" - + "est\022<\n\006parent\030\001 \001(\tB,\342A\001\002\372A%\n#cloudchann" - + "el.googleapis.com/Product\022\025\n\007account\030\002 \001" - + "(\tB\004\342A\001\002\022\027\n\tpage_size\030\003 \001(\005B\004\342A\001\001\022\030\n\npag" - + "e_token\030\004 \001(\tB\004\342A\001\001\022\033\n\rlanguage_code\030\005 \001" - + "(\tB\004\342A\001\001\"W\n\020ListSkusResponse\022*\n\004skus\030\001 \003" - + "(\0132\034.google.cloud.channel.v1.Sku\022\027\n\017next" - + "_page_token\030\002 \001(\t\"\261\001\n\021ListOffersRequest\022" - + "\024\n\006parent\030\001 \001(\tB\004\342A\001\002\022\027\n\tpage_size\030\002 \001(\005" - + "B\004\342A\001\001\022\030\n\npage_token\030\003 \001(\tB\004\342A\001\001\022\024\n\006filt" - + "er\030\004 \001(\tB\004\342A\001\001\022\033\n\rlanguage_code\030\005 \001(\tB\004\342" - + "A\001\001\022 \n\022show_future_offers\030\007 \001(\010B\004\342A\001\001\"]\n" - + "\022ListOffersResponse\022.\n\006offers\030\001 \003(\0132\036.go" - + "ogle.cloud.channel.v1.Offer\022\027\n\017next_page" - + "_token\030\002 \001(\t\"\275\005\n\032ListPurchasableSkusRequ" - + "est\022t\n\033create_entitlement_purchase\030\002 \001(\013" - + "2M.google.cloud.channel.v1.ListPurchasab" - + "leSkusRequest.CreateEntitlementPurchaseH" - + "\000\022h\n\025change_offer_purchase\030\003 \001(\0132G.googl" - + "e.cloud.channel.v1.ListPurchasableSkusRe" - + "quest.ChangeOfferPurchaseH\000\022?\n\010customer\030" - + "\001 \001(\tB-\342A\001\002\372A&\n$cloudchannel.googleapis." - + "com/Customer\022\027\n\tpage_size\030\004 \001(\005B\004\342A\001\001\022\030\n" - + "\npage_token\030\005 \001(\tB\004\342A\001\001\022\033\n\rlanguage_code" - + "\030\006 \001(\tB\004\342A\001\001\0322\n\031CreateEntitlementPurchas" - + "e\022\025\n\007product\030\001 \001(\tB\004\342A\001\002\032\346\001\n\023ChangeOffer" - + "Purchase\022\031\n\013entitlement\030\001 \001(\tB\004\342A\001\002\022m\n\013c" - + "hange_type\030\002 \001(\0162R.google.cloud.channel." - + "v1.ListPurchasableSkusRequest.ChangeOffe" - + "rPurchase.ChangeTypeB\004\342A\001\002\"E\n\nChangeType" - + "\022\033\n\027CHANGE_TYPE_UNSPECIFIED\020\000\022\013\n\007UPGRADE" - + "\020\001\022\r\n\tDOWNGRADE\020\002B\021\n\017purchase_option\"y\n\033" - + "ListPurchasableSkusResponse\022A\n\020purchasab" - + "le_skus\030\001 \003(\0132\'.google.cloud.channel.v1." - + "PurchasableSku\022\027\n\017next_page_token\030\002 \001(\t\"" - + ";\n\016PurchasableSku\022)\n\003sku\030\001 \001(\0132\034.google." - + "cloud.channel.v1.Sku\"\237\004\n\034ListPurchasable" - + "OffersRequest\022v\n\033create_entitlement_purc" - + "hase\030\002 \001(\0132O.google.cloud.channel.v1.Lis" - + "tPurchasableOffersRequest.CreateEntitlem" - + "entPurchaseH\000\022j\n\025change_offer_purchase\030\003" - + " \001(\0132I.google.cloud.channel.v1.ListPurch" - + "asableOffersRequest.ChangeOfferPurchaseH" - + "\000\022?\n\010customer\030\001 \001(\tB-\342A\001\002\372A&\n$cloudchann" - + "el.googleapis.com/Customer\022\027\n\tpage_size\030" - + "\004 \001(\005B\004\342A\001\001\022\030\n\npage_token\030\005 \001(\tB\004\342A\001\001\022\033\n" - + "\rlanguage_code\030\006 \001(\tB\004\342A\001\001\032.\n\031CreateEnti" - + "tlementPurchase\022\021\n\003sku\030\001 \001(\tB\004\342A\001\002\032G\n\023Ch" - + "angeOfferPurchase\022\031\n\013entitlement\030\001 \001(\tB\004" - + "\342A\001\002\022\025\n\007new_sku\030\002 \001(\tB\004\342A\001\001B\021\n\017purchase_" - + "option\"\177\n\035ListPurchasableOffersResponse\022" - + "E\n\022purchasable_offers\030\001 \003(\0132).google.clo" - + "ud.channel.v1.PurchasableOffer\022\027\n\017next_p" - + "age_token\030\002 \001(\t\"A\n\020PurchasableOffer\022-\n\005o" - + "ffer\030\001 \001(\0132\036.google.cloud.channel.v1.Off" - + "er\"Q\n\031RegisterSubscriberRequest\022\025\n\007accou" - + "nt\030\001 \001(\tB\004\342A\001\002\022\035\n\017service_account\030\002 \001(\tB" - + "\004\342A\001\002\"+\n\032RegisterSubscriberResponse\022\r\n\005t" - + "opic\030\001 \001(\t\"S\n\033UnregisterSubscriberReques" - + "t\022\025\n\007account\030\001 \001(\tB\004\342A\001\002\022\035\n\017service_acco" - + "unt\030\002 \001(\tB\004\342A\001\002\"-\n\034UnregisterSubscriberR" - + "esponse\022\r\n\005topic\030\001 \001(\t\"b\n\026ListSubscriber" + + "nelPartnerRepricingConfig\"_\n\024ListSkuGrou" + + "psRequest\022\024\n\006parent\030\001 \001(\tB\004\342A\001\002\022\027\n\tpage_" + + "size\030\002 \001(\005B\004\342A\001\001\022\030\n\npage_token\030\003 \001(\tB\004\342A" + + "\001\001\"\223\001\n\037ListSkuGroupBillableSkusRequest\022=" + + "\n\006parent\030\001 \001(\tB-\342A\001\002\372A&\n$cloudchannel.go" + + "ogleapis.com/SkuGroup\022\027\n\tpage_size\030\002 \001(\005" + + "B\004\342A\001\001\022\030\n\npage_token\030\003 \001(\tB\004\342A\001\001\"g\n\025List" + + "SkuGroupsResponse\0225\n\nsku_groups\030\001 \003(\0132!." + + "google.cloud.channel.v1.SkuGroup\022\027\n\017next" + + "_page_token\030\002 \001(\t\"x\n ListSkuGroupBillabl" + + "eSkusResponse\022;\n\rbillable_skus\030\001 \003(\0132$.g" + + "oogle.cloud.channel.v1.BillableSku\022\027\n\017ne" + + "xt_page_token\030\002 \001(\t\"\203\001\n\010SkuGroup\022\014\n\004name" + + "\030\001 \001(\t\022\024\n\014display_name\030\002 \001(\t:S\352AP\n$cloud" + + "channel.googleapis.com/SkuGroup\022(account" + + "s/{account}/skuGroups/{sku_group}\"c\n\013Bil" + + "lableSku\022\013\n\003sku\030\001 \001(\t\022\030\n\020sku_display_nam" + + "e\030\002 \001(\t\022\017\n\007service\030\003 \001(\t\022\034\n\024service_disp" + + "lay_name\030\004 \001(\t\"\264\001\n\030CreateEntitlementRequ" + + "est\022=\n\006parent\030\001 \001(\tB-\342A\001\002\372A&\n$cloudchann" + + "el.googleapis.com/Customer\022?\n\013entitlemen" + + "t\030\002 \001(\0132$.google.cloud.channel.v1.Entitl" + + "ementB\004\342A\001\002\022\030\n\nrequest_id\030\005 \001(\tB\004\342A\001\001\"\243\001" + + "\n\033TransferEntitlementsRequest\022\024\n\006parent\030" + + "\001 \001(\tB\004\342A\001\002\022@\n\014entitlements\030\002 \003(\0132$.goog" + + "le.cloud.channel.v1.EntitlementB\004\342A\001\002\022\022\n" + + "\nauth_token\030\004 \001(\t\022\030\n\nrequest_id\030\006 \001(\tB\004\342" + + "A\001\001\"Z\n\034TransferEntitlementsResponse\022:\n\014e" + + "ntitlements\030\001 \003(\0132$.google.cloud.channel" + + ".v1.Entitlement\"\227\001\n#TransferEntitlements" + + "ToGoogleRequest\022\024\n\006parent\030\001 \001(\tB\004\342A\001\002\022@\n" + + "\014entitlements\030\002 \003(\0132$.google.cloud.chann" + + "el.v1.EntitlementB\004\342A\001\002\022\030\n\nrequest_id\030\003 " + + "\001(\tB\004\342A\001\001\"\246\001\n\027ChangeParametersRequest\022\022\n" + + "\004name\030\001 \001(\tB\004\342A\001\002\022<\n\nparameters\030\002 \003(\0132\"." + + "google.cloud.channel.v1.ParameterB\004\342A\001\002\022" + + "\030\n\nrequest_id\030\004 \001(\tB\004\342A\001\001\022\037\n\021purchase_or" + + "der_id\030\005 \001(\tB\004\342A\001\001\"\226\001\n\034ChangeRenewalSett" + + "ingsRequest\022\022\n\004name\030\001 \001(\tB\004\342A\001\002\022H\n\020renew" + + "al_settings\030\004 \001(\0132(.google.cloud.channel" + + ".v1.RenewalSettingsB\004\342A\001\002\022\030\n\nrequest_id\030" + + "\005 \001(\tB\004\342A\001\001\"\334\001\n\022ChangeOfferRequest\022\022\n\004na" + + "me\030\001 \001(\tB\004\342A\001\002\0229\n\005offer\030\002 \001(\tB*\342A\001\002\372A#\n!" + + "cloudchannel.googleapis.com/Offer\022<\n\npar" + + "ameters\030\003 \003(\0132\".google.cloud.channel.v1." + + "ParameterB\004\342A\001\001\022\037\n\021purchase_order_id\030\005 \001" + + "(\tB\004\342A\001\001\022\030\n\nrequest_id\030\006 \001(\tB\004\342A\001\001\"G\n\027St" + + "artPaidServiceRequest\022\022\n\004name\030\001 \001(\tB\004\342A\001" + + "\002\022\030\n\nrequest_id\030\003 \001(\tB\004\342A\001\001\"H\n\030CancelEnt" + + "itlementRequest\022\022\n\004name\030\001 \001(\tB\004\342A\001\002\022\030\n\nr" + + "equest_id\030\003 \001(\tB\004\342A\001\001\"I\n\031SuspendEntitlem" + + "entRequest\022\022\n\004name\030\001 \001(\tB\004\342A\001\002\022\030\n\nreques" + + "t_id\030\003 \001(\tB\004\342A\001\001\"J\n\032ActivateEntitlementR" + + "equest\022\022\n\004name\030\001 \001(\tB\004\342A\001\002\022\030\n\nrequest_id" + + "\030\003 \001(\tB\004\342A\001\001\"[\n\022LookupOfferRequest\022E\n\013en" + + "titlement\030\001 \001(\tB0\342A\001\002\372A)\n\'cloudchannel.g" + + "oogleapis.com/Entitlement\"|\n\023ListProduct" + "sRequest\022\025\n\007account\030\001 \001(\tB\004\342A\001\002\022\027\n\tpage_" + "size\030\002 \001(\005B\004\342A\001\001\022\030\n\npage_token\030\003 \001(\tB\004\342A" - + "\001\001\"[\n\027ListSubscribersResponse\022\r\n\005topic\030\001" - + " \001(\t\022\030\n\020service_accounts\030\002 \003(\t\022\027\n\017next_p" - + "age_token\030\003 \001(\t\"\252\001\n\035ListEntitlementChang" - + "esRequest\022@\n\006parent\030\001 \001(\tB0\342A\001\002\372A)\n\'clou" - + "dchannel.googleapis.com/Entitlement\022\027\n\tp" - + "age_size\030\002 \001(\005B\004\342A\001\001\022\030\n\npage_token\030\003 \001(\t" - + "B\004\342A\001\001\022\024\n\006filter\030\004 \001(\tB\004\342A\001\001\"\202\001\n\036ListEnt" - + "itlementChangesResponse\022G\n\023entitlement_c" - + "hanges\030\001 \003(\0132*.google.cloud.channel.v1.E" - + "ntitlementChange\022\027\n\017next_page_token\030\002 \001(" - + "\t2\341M\n\023CloudChannelService\022\324\001\n\rListCustom" - + "ers\022-.google.cloud.channel.v1.ListCustom" - + "ersRequest\032..google.cloud.channel.v1.Lis" - + "tCustomersResponse\"d\202\323\344\223\002^\022!/v1/{parent=" - + "accounts/*}/customersZ9\0227/v1/{parent=acc" - + "ounts/*/channelPartnerLinks/*}/customers" - + "\022\312\001\n\013GetCustomer\022+.google.cloud.channel." - + "v1.GetCustomerRequest\032!.google.cloud.cha" - + "nnel.v1.Customer\"k\332A\004name\202\323\344\223\002^\022!/v1/{na" - + "me=accounts/*/customers/*}Z9\0227/v1/{name=" - + "accounts/*/channelPartnerLinks/*/custome" - + "rs/*}\022\350\001\n\037CheckCloudIdentityAccountsExis" - + "t\022?.google.cloud.channel.v1.CheckCloudId" - + "entityAccountsExistRequest\032@.google.clou" - + "d.channel.v1.CheckCloudIdentityAccountsE" - + "xistResponse\"B\202\323\344\223\002<\"7/v1/{parent=accoun" - + "ts/*}:checkCloudIdentityAccountsExist:\001*" - + "\022\335\001\n\016CreateCustomer\022..google.cloud.chann" - + "el.v1.CreateCustomerRequest\032!.google.clo" - + "ud.channel.v1.Customer\"x\202\323\344\223\002r\"!/v1/{par" - + "ent=accounts/*}/customers:\010customerZC\"7/" - + "v1/{parent=accounts/*/channelPartnerLink" - + "s/*}/customers:\010customer\022\361\001\n\016UpdateCusto" - + "mer\022..google.cloud.channel.v1.UpdateCust" - + "omerRequest\032!.google.cloud.channel.v1.Cu" - + "stomer\"\213\001\202\323\344\223\002\204\0012*/v1/{customer.name=acc" - + "ounts/*/customers/*}:\010customerZL2@/v1/{c" - + "ustomer.name=accounts/*/channelPartnerLi" - + "nks/*/customers/*}:\010customer\022\305\001\n\016DeleteC" - + "ustomer\022..google.cloud.channel.v1.Delete" - + "CustomerRequest\032\026.google.protobuf.Empty\"" - + "k\332A\004name\202\323\344\223\002^*!/v1/{name=accounts/*/cus" - + "tomers/*}Z9*7/v1/{name=accounts/*/channe" - + "lPartnerLinks/*/customers/*}\022\335\001\n\016ImportC" - + "ustomer\022..google.cloud.channel.v1.Import" - + "CustomerRequest\032!.google.cloud.channel.v" - + "1.Customer\"x\202\323\344\223\002r\"(/v1/{parent=accounts" - + "/*}/customers:import:\001*ZC\">/v1/{parent=a" - + "ccounts/*/channelPartnerLinks/*}/custome" - + "rs:import:\001*\022\330\001\n\026ProvisionCloudIdentity\022" - + "6.google.cloud.channel.v1.ProvisionCloud" - + "IdentityRequest\032\035.google.longrunning.Ope" - + "ration\"g\312A\035\n\010Customer\022\021OperationMetadata" - + "\202\323\344\223\002A\"/v1/{parent=accounts/*/c" + + "hannelPartnerLinks/*}/customers:import:\001" + + "*\022\330\001\n\026ProvisionCloudIdentity\0226.google.cl" + + "oud.channel.v1.ProvisionCloudIdentityReq" + + "uest\032\035.google.longrunning.Operation\"g\312A\035" + + "\n\010Customer\022\021OperationMetadata\202\323\344\223\002A\"\"9/v1/{name=accounts/*/customers/*/ent" - + "itlements/*}:activate:\001*\022\344\001\n\024TransferEnt" - + "itlements\0224.google.cloud.channel.v1.Tran" - + "sferEntitlementsRequest\032\035.google.longrun" - + "ning.Operation\"w\312A1\n\034TransferEntitlement" - + "sResponse\022\021OperationMetadata\202\323\344\223\002=\"8/v1/" - + "{parent=accounts/*/customers/*}:transfer" - + "Entitlements:\001*\022\365\001\n\034TransferEntitlements" - + "ToGoogle\022<.google.cloud.channel.v1.Trans" - + "ferEntitlementsToGoogleRequest\032\035.google." - + "longrunning.Operation\"x\312A*\n\025google.proto" - + "buf.Empty\022\021OperationMetadata\202\323\344\223\002E\"@/v1/" - + "{parent=accounts/*/customers/*}:transfer" - + "EntitlementsToGoogle:\001*\022\301\001\n\027ListChannelP" - + "artnerLinks\0227.google.cloud.channel.v1.Li" - + "stChannelPartnerLinksRequest\0328.google.cl" - + "oud.channel.v1.ListChannelPartnerLinksRe" - + "sponse\"3\202\323\344\223\002-\022+/v1/{parent=accounts/*}/" - + "channelPartnerLinks\022\260\001\n\025GetChannelPartne" - + "rLink\0225.google.cloud.channel.v1.GetChann" - + "elPartnerLinkRequest\032+.google.cloud.chan" - + "nel.v1.ChannelPartnerLink\"3\202\323\344\223\002-\022+/v1/{" - + "name=accounts/*/channelPartnerLinks/*}\022\314" - + "\001\n\030CreateChannelPartnerLink\0228.google.clo" - + "ud.channel.v1.CreateChannelPartnerLinkRe" - + "quest\032+.google.cloud.channel.v1.ChannelP" - + "artnerLink\"I\202\323\344\223\002C\"+/v1/{parent=accounts" - + "/*}/channelPartnerLinks:\024channel_partner" - + "_link\022\271\001\n\030UpdateChannelPartnerLink\0228.goo" - + "gle.cloud.channel.v1.UpdateChannelPartne", - "rLinkRequest\032+.google.cloud.channel.v1.C" - + "hannelPartnerLink\"6\202\323\344\223\00202+/v1/{name=acc" - + "ounts/*/channelPartnerLinks/*}:\001*\022\327\001\n\032Ge" - + "tCustomerRepricingConfig\022:.google.cloud." - + "channel.v1.GetCustomerRepricingConfigReq" - + "uest\0320.google.cloud.channel.v1.CustomerR" - + "epricingConfig\"K\332A\004name\202\323\344\223\002>\022\022\"9/v1/{na" + + "me=accounts/*/customers/*/entitlements/*" + + "}:activate:\001*\022\344\001\n\024TransferEntitlements\0224" + + ".google.cloud.channel.v1.TransferEntitle" + + "mentsRequest\032\035.google.longrunning.Operat" + + "ion\"w\312A1\n\034TransferEntitlementsResponse\022\021" + + "OperationMetadata\202\323\344\223\002=\"8/v1/{parent=acc" + + "ounts/*/customers/*}:transferEntitlement" + + "s:\001*\022\365\001\n\034TransferEntitlementsToGoogle\022<." + + "google.cloud.channel.v1.TransferEntitlem" + + "entsToGoogleRequest\032\035.google.longrunning" + + ".Operation\"x\312A*\n\025google.protobuf.Empty\022\021" + + "OperationMetadata\202\323\344\223\002E\"@/v1/{parent=acc", + "ounts/*/customers/*}:transferEntitlement" + + "sToGoogle:\001*\022\301\001\n\027ListChannelPartnerLinks" + + "\0227.google.cloud.channel.v1.ListChannelPa" + + "rtnerLinksRequest\0328.google.cloud.channel" + + ".v1.ListChannelPartnerLinksResponse\"3\202\323\344" + + "\223\002-\022+/v1/{parent=accounts/*}/channelPart" + + "nerLinks\022\260\001\n\025GetChannelPartnerLink\0225.goo" + + "gle.cloud.channel.v1.GetChannelPartnerLi" + + "nkRequest\032+.google.cloud.channel.v1.Chan" + + "nelPartnerLink\"3\202\323\344\223\002-\022+/v1/{name=accoun" + + "ts/*/channelPartnerLinks/*}\022\314\001\n\030CreateCh" + + "annelPartnerLink\0228.google.cloud.channel." + + "v1.CreateChannelPartnerLinkRequest\032+.goo" + + "gle.cloud.channel.v1.ChannelPartnerLink\"" + + "I\202\323\344\223\002C\"+/v1/{parent=accounts/*}/channel" + + "PartnerLinks:\024channel_partner_link\022\271\001\n\030U" + + "pdateChannelPartnerLink\0228.google.cloud.c" + + "hannel.v1.UpdateChannelPartnerLinkReques" + + "t\032+.google.cloud.channel.v1.ChannelPartn" + + "erLink\"6\202\323\344\223\00202+/v1/{name=accounts/*/cha" + + "nnelPartnerLinks/*}:\001*\022\327\001\n\032GetCustomerRe" + + "pricingConfig\022:.google.cloud.channel.v1." + + "GetCustomerRepricingConfigRequest\0320.goog" + + "le.cloud.channel.v1.CustomerRepricingCon" + + "fig\"K\332A\004name\202\323\344\223\002>\022*\022* + * Represents the SKU group information. + * + * + * Protobuf type {@code google.cloud.channel.v1.SkuGroup} + */ +public final class SkuGroup extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.SkuGroup) + SkuGroupOrBuilder { + private static final long serialVersionUID = 0L; + // Use SkuGroup.newBuilder() to construct. + private SkuGroup(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SkuGroup() { + name_ = ""; + displayName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SkuGroup(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_SkuGroup_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_SkuGroup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.SkuGroup.class, + com.google.cloud.channel.v1.SkuGroup.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Resource name of SKU group. Format:
+   * accounts/{account}/skuGroups/{sku_group}.
+   * Example:
+   * "accounts/C01234/skuGroups/3d50fd57-3157-4577-a5a9-a219b8490041".
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Resource name of SKU group. Format:
+   * accounts/{account}/skuGroups/{sku_group}.
+   * Example:
+   * "accounts/C01234/skuGroups/3d50fd57-3157-4577-a5a9-a219b8490041".
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Unique human readable identifier for the SKU group.
+   * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Unique human readable identifier for the SKU group.
+   * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.SkuGroup)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.SkuGroup other = (com.google.cloud.channel.v1.SkuGroup) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.SkuGroup parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.SkuGroup parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.SkuGroup parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.SkuGroup parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.SkuGroup parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.SkuGroup parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.SkuGroup parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.SkuGroup parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.SkuGroup parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.SkuGroup parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.SkuGroup parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.SkuGroup parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.SkuGroup prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Represents the SKU group information.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.SkuGroup} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.SkuGroup) + com.google.cloud.channel.v1.SkuGroupOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_SkuGroup_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_SkuGroup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.SkuGroup.class, + com.google.cloud.channel.v1.SkuGroup.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.SkuGroup.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + displayName_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_SkuGroup_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.SkuGroup getDefaultInstanceForType() { + return com.google.cloud.channel.v1.SkuGroup.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.SkuGroup build() { + com.google.cloud.channel.v1.SkuGroup result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.SkuGroup buildPartial() { + com.google.cloud.channel.v1.SkuGroup result = new com.google.cloud.channel.v1.SkuGroup(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.channel.v1.SkuGroup result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.displayName_ = displayName_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.SkuGroup) { + return mergeFrom((com.google.cloud.channel.v1.SkuGroup) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.SkuGroup other) { + if (other == com.google.cloud.channel.v1.SkuGroup.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Resource name of SKU group. Format:
+     * accounts/{account}/skuGroups/{sku_group}.
+     * Example:
+     * "accounts/C01234/skuGroups/3d50fd57-3157-4577-a5a9-a219b8490041".
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Resource name of SKU group. Format:
+     * accounts/{account}/skuGroups/{sku_group}.
+     * Example:
+     * "accounts/C01234/skuGroups/3d50fd57-3157-4577-a5a9-a219b8490041".
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Resource name of SKU group. Format:
+     * accounts/{account}/skuGroups/{sku_group}.
+     * Example:
+     * "accounts/C01234/skuGroups/3d50fd57-3157-4577-a5a9-a219b8490041".
+     * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of SKU group. Format:
+     * accounts/{account}/skuGroups/{sku_group}.
+     * Example:
+     * "accounts/C01234/skuGroups/3d50fd57-3157-4577-a5a9-a219b8490041".
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of SKU group. Format:
+     * accounts/{account}/skuGroups/{sku_group}.
+     * Example:
+     * "accounts/C01234/skuGroups/3d50fd57-3157-4577-a5a9-a219b8490041".
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Unique human readable identifier for the SKU group.
+     * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Unique human readable identifier for the SKU group.
+     * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Unique human readable identifier for the SKU group.
+     * 
+ * + * string display_name = 2; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Unique human readable identifier for the SKU group.
+     * 
+ * + * string display_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Unique human readable identifier for the SKU group.
+     * 
+ * + * string display_name = 2; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + displayName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.SkuGroup) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.SkuGroup) + private static final com.google.cloud.channel.v1.SkuGroup DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.SkuGroup(); + } + + public static com.google.cloud.channel.v1.SkuGroup getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SkuGroup parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.SkuGroup getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-channel/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/SkuGroupName.java b/java-channel/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/SkuGroupName.java new file mode 100644 index 000000000000..14b7f6fc5899 --- /dev/null +++ b/java-channel/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/SkuGroupName.java @@ -0,0 +1,192 @@ +/* + * 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.channel.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class SkuGroupName implements ResourceName { + private static final PathTemplate ACCOUNT_SKU_GROUP = + PathTemplate.createWithoutUrlEncoding("accounts/{account}/skuGroups/{sku_group}"); + private volatile Map fieldValuesMap; + private final String account; + private final String skuGroup; + + @Deprecated + protected SkuGroupName() { + account = null; + skuGroup = null; + } + + private SkuGroupName(Builder builder) { + account = Preconditions.checkNotNull(builder.getAccount()); + skuGroup = Preconditions.checkNotNull(builder.getSkuGroup()); + } + + public String getAccount() { + return account; + } + + public String getSkuGroup() { + return skuGroup; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static SkuGroupName of(String account, String skuGroup) { + return newBuilder().setAccount(account).setSkuGroup(skuGroup).build(); + } + + public static String format(String account, String skuGroup) { + return newBuilder().setAccount(account).setSkuGroup(skuGroup).build().toString(); + } + + public static SkuGroupName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + ACCOUNT_SKU_GROUP.validatedMatch( + formattedString, "SkuGroupName.parse: formattedString not in valid format"); + return of(matchMap.get("account"), matchMap.get("sku_group")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (SkuGroupName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return ACCOUNT_SKU_GROUP.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (account != null) { + fieldMapBuilder.put("account", account); + } + if (skuGroup != null) { + fieldMapBuilder.put("sku_group", skuGroup); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return ACCOUNT_SKU_GROUP.instantiate("account", account, "sku_group", skuGroup); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + SkuGroupName that = ((SkuGroupName) o); + return Objects.equals(this.account, that.account) + && Objects.equals(this.skuGroup, that.skuGroup); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(account); + h *= 1000003; + h ^= Objects.hashCode(skuGroup); + return h; + } + + /** Builder for accounts/{account}/skuGroups/{sku_group}. */ + public static class Builder { + private String account; + private String skuGroup; + + protected Builder() {} + + public String getAccount() { + return account; + } + + public String getSkuGroup() { + return skuGroup; + } + + public Builder setAccount(String account) { + this.account = account; + return this; + } + + public Builder setSkuGroup(String skuGroup) { + this.skuGroup = skuGroup; + return this; + } + + private Builder(SkuGroupName skuGroupName) { + this.account = skuGroupName.account; + this.skuGroup = skuGroupName.skuGroup; + } + + public SkuGroupName build() { + return new SkuGroupName(this); + } + } +} diff --git a/java-channel/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/SkuGroupOrBuilder.java b/java-channel/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/SkuGroupOrBuilder.java new file mode 100644 index 000000000000..5256183cacfa --- /dev/null +++ b/java-channel/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/SkuGroupOrBuilder.java @@ -0,0 +1,81 @@ +/* + * 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/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface SkuGroupOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.SkuGroup) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Resource name of SKU group. Format:
+   * accounts/{account}/skuGroups/{sku_group}.
+   * Example:
+   * "accounts/C01234/skuGroups/3d50fd57-3157-4577-a5a9-a219b8490041".
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Resource name of SKU group. Format:
+   * accounts/{account}/skuGroups/{sku_group}.
+   * Example:
+   * "accounts/C01234/skuGroups/3d50fd57-3157-4577-a5a9-a219b8490041".
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Unique human readable identifier for the SKU group.
+   * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Unique human readable identifier for the SKU group.
+   * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); +} diff --git a/java-channel/proto-google-cloud-channel-v1/src/main/proto/google/cloud/channel/v1/service.proto b/java-channel/proto-google-cloud-channel-v1/src/main/proto/google/cloud/channel/v1/service.proto index ec62a437832b..eee63aea794a 100644 --- a/java-channel/proto-google-cloud-channel-v1/src/main/proto/google/cloud/channel/v1/service.proto +++ b/java-channel/proto-google-cloud-channel-v1/src/main/proto/google/cloud/channel/v1/service.proto @@ -1185,6 +1185,59 @@ service CloudChannelService { option (google.api.method_signature) = "name"; } + // Lists the Rebilling supported SKU groups the account is authorized to + // sell. + // Reference: https://cloud.google.com/skus/sku-groups + // + // Possible Error Codes: + // + // * PERMISSION_DENIED: If the account making the request and the account + // being queried are different, or the account doesn't exist. + // * INTERNAL: Any non-user error related to technical issues in the + // backend. In this case, contact Cloud Channel support. + // + // Return Value: + // If successful, the [SkuGroup][google.cloud.channel.v1.SkuGroup] resources. + // The data for each resource is displayed in the alphabetical order of SKU + // group display name. + // The data for each resource is displayed in the ascending order of + // [SkuGroup.display_name][google.cloud.channel.v1.SkuGroup.display_name] + // + // If unsuccessful, returns an error. + rpc ListSkuGroups(ListSkuGroupsRequest) returns (ListSkuGroupsResponse) { + option (google.api.http) = { + get: "/v1/{parent=accounts/*}/skuGroups" + }; + option (google.api.method_signature) = "parent"; + } + + // Lists the Billable SKUs in a given SKU group. + // + // Possible error codes: + // PERMISSION_DENIED: If the account making the request and the account + // being queried for are different, or the account doesn't exist. + // INVALID_ARGUMENT: Missing or invalid required parameters in the + // request. + // INTERNAL: Any non-user error related to technical issue in the + // backend. In this case, contact cloud channel support. + // + // Return Value: + // If successful, the [BillableSku][google.cloud.channel.v1.BillableSku] + // resources. The data for each resource is displayed in the ascending order + // of: + // + // * [BillableSku.service_display_name][google.cloud.channel.v1.BillableSku.service_display_name] + // * [BillableSku.sku_display_name][google.cloud.channel.v1.BillableSku.sku_display_name] + // + // If unsuccessful, returns an error. + rpc ListSkuGroupBillableSkus(ListSkuGroupBillableSkusRequest) + returns (ListSkuGroupBillableSkusResponse) { + option (google.api.http) = { + get: "/v1/{parent=accounts/*/skuGroups/*}/billableSkus" + }; + option (google.api.method_signature) = "parent"; + } + // Returns the requested [Offer][google.cloud.channel.v1.Offer] resource. // // Possible error codes: @@ -2035,6 +2088,110 @@ message DeleteChannelPartnerRepricingConfigRequest { ]; } +// Request message for ListSkuGroups. +message ListSkuGroupsRequest { + // Required. The resource name of the account from which to list SKU groups. + // Parent uses the format: accounts/{account}. + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The maximum number of SKU groups to return. The service may + // return fewer than this value. If unspecified, returns a maximum of 1000 SKU + // groups. The maximum value is 1000; values above 1000 will be coerced to + // 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results beyond the first page. + // Obtained through + // [ListSkuGroups.next_page_token][] of the previous + // [CloudChannelService.ListSkuGroups][google.cloud.channel.v1.CloudChannelService.ListSkuGroups] + // call. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for ListSkuGroupBillableSkus. +message ListSkuGroupBillableSkusRequest { + // Required. Resource name of the SKU group. + // Format: accounts/{account}/skuGroups/{sku_group}. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudchannel.googleapis.com/SkuGroup" + } + ]; + + // Optional. The maximum number of SKUs to return. The service may return + // fewer than this value. If unspecified, returns a maximum of 100000 SKUs. + // The maximum value is 100000; values above 100000 will be coerced to 100000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results beyond the first page. + // Obtained through + // [ListSkuGroupBillableSkus.next_page_token][] of the previous + // [CloudChannelService.ListSkuGroupBillableSkus][google.cloud.channel.v1.CloudChannelService.ListSkuGroupBillableSkus] + // call. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for ListSkuGroups. +message ListSkuGroupsResponse { + // The list of SKU groups requested. + repeated SkuGroup sku_groups = 1; + + // A token to retrieve the next page of results. + // Pass to [ListSkuGroups.page_token][] to obtain that + // page. + string next_page_token = 2; +} + +// Response message for ListSkuGroupBillableSkus. +message ListSkuGroupBillableSkusResponse { + // The list of billable SKUs in the requested SKU group. + repeated BillableSku billable_skus = 1; + + // A token to retrieve the next page of results. + // Pass to [ListSkuGroupBillableSkus.page_token][] to obtain that + // page. + string next_page_token = 2; +} + +// Represents the SKU group information. +message SkuGroup { + option (google.api.resource) = { + type: "cloudchannel.googleapis.com/SkuGroup" + pattern: "accounts/{account}/skuGroups/{sku_group}" + }; + + // Resource name of SKU group. Format: + // accounts/{account}/skuGroups/{sku_group}. + // Example: + // "accounts/C01234/skuGroups/3d50fd57-3157-4577-a5a9-a219b8490041". + string name = 1; + + // Unique human readable identifier for the SKU group. + string display_name = 2; +} + +// Represents the Billable SKU information. +message BillableSku { + // Resource name of Billable SKU. Format: + // billableSkus/{sku}. + // Example: + // billableSkus/6E1B-6634-470F". + string sku = 1; + + // Unique human readable name for the SKU. + string sku_display_name = 2; + + // Resource name of Service which contains Repricing SKU. Format: + // services/{service}. + // Example: + // "services/B7D9-FDCB-15D8". + string service = 3; + + // Unique human readable name for the Service. + string service_display_name = 4; +} + // Request message for // [CloudChannelService.CreateEntitlement][google.cloud.channel.v1.CloudChannelService.CreateEntitlement] message CreateEntitlementRequest { diff --git a/java-channel/samples/snippets/generated/com/google/cloud/channel/v1/cloudchannelservice/listskugroupbillableskus/AsyncListSkuGroupBillableSkus.java b/java-channel/samples/snippets/generated/com/google/cloud/channel/v1/cloudchannelservice/listskugroupbillableskus/AsyncListSkuGroupBillableSkus.java new file mode 100644 index 000000000000..1792c4ab25e0 --- /dev/null +++ b/java-channel/samples/snippets/generated/com/google/cloud/channel/v1/cloudchannelservice/listskugroupbillableskus/AsyncListSkuGroupBillableSkus.java @@ -0,0 +1,54 @@ +/* + * 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.channel.v1.samples; + +// [START cloudchannel_v1_generated_CloudChannelService_ListSkuGroupBillableSkus_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.channel.v1.BillableSku; +import com.google.cloud.channel.v1.CloudChannelServiceClient; +import com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest; +import com.google.cloud.channel.v1.SkuGroupName; + +public class AsyncListSkuGroupBillableSkus { + + public static void main(String[] args) throws Exception { + asyncListSkuGroupBillableSkus(); + } + + public static void asyncListSkuGroupBillableSkus() throws Exception { + // 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 (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) { + ListSkuGroupBillableSkusRequest request = + ListSkuGroupBillableSkusRequest.newBuilder() + .setParent(SkuGroupName.of("[ACCOUNT]", "[SKU_GROUP]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + cloudChannelServiceClient.listSkuGroupBillableSkusPagedCallable().futureCall(request); + // Do something. + for (BillableSku element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudchannel_v1_generated_CloudChannelService_ListSkuGroupBillableSkus_async] diff --git a/java-channel/samples/snippets/generated/com/google/cloud/channel/v1/cloudchannelservice/listskugroupbillableskus/AsyncListSkuGroupBillableSkusPaged.java b/java-channel/samples/snippets/generated/com/google/cloud/channel/v1/cloudchannelservice/listskugroupbillableskus/AsyncListSkuGroupBillableSkusPaged.java new file mode 100644 index 000000000000..5c071d20c034 --- /dev/null +++ b/java-channel/samples/snippets/generated/com/google/cloud/channel/v1/cloudchannelservice/listskugroupbillableskus/AsyncListSkuGroupBillableSkusPaged.java @@ -0,0 +1,62 @@ +/* + * 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.channel.v1.samples; + +// [START cloudchannel_v1_generated_CloudChannelService_ListSkuGroupBillableSkus_Paged_async] +import com.google.cloud.channel.v1.BillableSku; +import com.google.cloud.channel.v1.CloudChannelServiceClient; +import com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest; +import com.google.cloud.channel.v1.ListSkuGroupBillableSkusResponse; +import com.google.cloud.channel.v1.SkuGroupName; +import com.google.common.base.Strings; + +public class AsyncListSkuGroupBillableSkusPaged { + + public static void main(String[] args) throws Exception { + asyncListSkuGroupBillableSkusPaged(); + } + + public static void asyncListSkuGroupBillableSkusPaged() throws Exception { + // 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 (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) { + ListSkuGroupBillableSkusRequest request = + ListSkuGroupBillableSkusRequest.newBuilder() + .setParent(SkuGroupName.of("[ACCOUNT]", "[SKU_GROUP]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListSkuGroupBillableSkusResponse response = + cloudChannelServiceClient.listSkuGroupBillableSkusCallable().call(request); + for (BillableSku element : response.getBillableSkusList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END cloudchannel_v1_generated_CloudChannelService_ListSkuGroupBillableSkus_Paged_async] diff --git a/java-channel/samples/snippets/generated/com/google/cloud/channel/v1/cloudchannelservice/listskugroupbillableskus/SyncListSkuGroupBillableSkus.java b/java-channel/samples/snippets/generated/com/google/cloud/channel/v1/cloudchannelservice/listskugroupbillableskus/SyncListSkuGroupBillableSkus.java new file mode 100644 index 000000000000..3a2b1a36da1c --- /dev/null +++ b/java-channel/samples/snippets/generated/com/google/cloud/channel/v1/cloudchannelservice/listskugroupbillableskus/SyncListSkuGroupBillableSkus.java @@ -0,0 +1,51 @@ +/* + * 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.channel.v1.samples; + +// [START cloudchannel_v1_generated_CloudChannelService_ListSkuGroupBillableSkus_sync] +import com.google.cloud.channel.v1.BillableSku; +import com.google.cloud.channel.v1.CloudChannelServiceClient; +import com.google.cloud.channel.v1.ListSkuGroupBillableSkusRequest; +import com.google.cloud.channel.v1.SkuGroupName; + +public class SyncListSkuGroupBillableSkus { + + public static void main(String[] args) throws Exception { + syncListSkuGroupBillableSkus(); + } + + public static void syncListSkuGroupBillableSkus() throws Exception { + // 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 (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) { + ListSkuGroupBillableSkusRequest request = + ListSkuGroupBillableSkusRequest.newBuilder() + .setParent(SkuGroupName.of("[ACCOUNT]", "[SKU_GROUP]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (BillableSku element : + cloudChannelServiceClient.listSkuGroupBillableSkus(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudchannel_v1_generated_CloudChannelService_ListSkuGroupBillableSkus_sync] diff --git a/java-channel/samples/snippets/generated/com/google/cloud/channel/v1/cloudchannelservice/listskugroupbillableskus/SyncListSkuGroupBillableSkusSkugroupname.java b/java-channel/samples/snippets/generated/com/google/cloud/channel/v1/cloudchannelservice/listskugroupbillableskus/SyncListSkuGroupBillableSkusSkugroupname.java new file mode 100644 index 000000000000..859cb107524c --- /dev/null +++ b/java-channel/samples/snippets/generated/com/google/cloud/channel/v1/cloudchannelservice/listskugroupbillableskus/SyncListSkuGroupBillableSkusSkugroupname.java @@ -0,0 +1,45 @@ +/* + * 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.channel.v1.samples; + +// [START cloudchannel_v1_generated_CloudChannelService_ListSkuGroupBillableSkus_Skugroupname_sync] +import com.google.cloud.channel.v1.BillableSku; +import com.google.cloud.channel.v1.CloudChannelServiceClient; +import com.google.cloud.channel.v1.SkuGroupName; + +public class SyncListSkuGroupBillableSkusSkugroupname { + + public static void main(String[] args) throws Exception { + syncListSkuGroupBillableSkusSkugroupname(); + } + + public static void syncListSkuGroupBillableSkusSkugroupname() throws Exception { + // 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 (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) { + SkuGroupName parent = SkuGroupName.of("[ACCOUNT]", "[SKU_GROUP]"); + for (BillableSku element : + cloudChannelServiceClient.listSkuGroupBillableSkus(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudchannel_v1_generated_CloudChannelService_ListSkuGroupBillableSkus_Skugroupname_sync] diff --git a/java-channel/samples/snippets/generated/com/google/cloud/channel/v1/cloudchannelservice/listskugroupbillableskus/SyncListSkuGroupBillableSkusString.java b/java-channel/samples/snippets/generated/com/google/cloud/channel/v1/cloudchannelservice/listskugroupbillableskus/SyncListSkuGroupBillableSkusString.java new file mode 100644 index 000000000000..9867dee08073 --- /dev/null +++ b/java-channel/samples/snippets/generated/com/google/cloud/channel/v1/cloudchannelservice/listskugroupbillableskus/SyncListSkuGroupBillableSkusString.java @@ -0,0 +1,45 @@ +/* + * 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.channel.v1.samples; + +// [START cloudchannel_v1_generated_CloudChannelService_ListSkuGroupBillableSkus_String_sync] +import com.google.cloud.channel.v1.BillableSku; +import com.google.cloud.channel.v1.CloudChannelServiceClient; +import com.google.cloud.channel.v1.SkuGroupName; + +public class SyncListSkuGroupBillableSkusString { + + public static void main(String[] args) throws Exception { + syncListSkuGroupBillableSkusString(); + } + + public static void syncListSkuGroupBillableSkusString() throws Exception { + // 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 (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) { + String parent = SkuGroupName.of("[ACCOUNT]", "[SKU_GROUP]").toString(); + for (BillableSku element : + cloudChannelServiceClient.listSkuGroupBillableSkus(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudchannel_v1_generated_CloudChannelService_ListSkuGroupBillableSkus_String_sync] diff --git a/java-channel/samples/snippets/generated/com/google/cloud/channel/v1/cloudchannelservice/listskugroups/AsyncListSkuGroups.java b/java-channel/samples/snippets/generated/com/google/cloud/channel/v1/cloudchannelservice/listskugroups/AsyncListSkuGroups.java new file mode 100644 index 000000000000..6b93a6027cdb --- /dev/null +++ b/java-channel/samples/snippets/generated/com/google/cloud/channel/v1/cloudchannelservice/listskugroups/AsyncListSkuGroups.java @@ -0,0 +1,53 @@ +/* + * 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.channel.v1.samples; + +// [START cloudchannel_v1_generated_CloudChannelService_ListSkuGroups_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.channel.v1.CloudChannelServiceClient; +import com.google.cloud.channel.v1.ListSkuGroupsRequest; +import com.google.cloud.channel.v1.SkuGroup; + +public class AsyncListSkuGroups { + + public static void main(String[] args) throws Exception { + asyncListSkuGroups(); + } + + public static void asyncListSkuGroups() throws Exception { + // 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 (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) { + ListSkuGroupsRequest request = + ListSkuGroupsRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + cloudChannelServiceClient.listSkuGroupsPagedCallable().futureCall(request); + // Do something. + for (SkuGroup element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudchannel_v1_generated_CloudChannelService_ListSkuGroups_async] diff --git a/java-channel/samples/snippets/generated/com/google/cloud/channel/v1/cloudchannelservice/listskugroups/AsyncListSkuGroupsPaged.java b/java-channel/samples/snippets/generated/com/google/cloud/channel/v1/cloudchannelservice/listskugroups/AsyncListSkuGroupsPaged.java new file mode 100644 index 000000000000..3e0d329f02a1 --- /dev/null +++ b/java-channel/samples/snippets/generated/com/google/cloud/channel/v1/cloudchannelservice/listskugroups/AsyncListSkuGroupsPaged.java @@ -0,0 +1,61 @@ +/* + * 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.channel.v1.samples; + +// [START cloudchannel_v1_generated_CloudChannelService_ListSkuGroups_Paged_async] +import com.google.cloud.channel.v1.CloudChannelServiceClient; +import com.google.cloud.channel.v1.ListSkuGroupsRequest; +import com.google.cloud.channel.v1.ListSkuGroupsResponse; +import com.google.cloud.channel.v1.SkuGroup; +import com.google.common.base.Strings; + +public class AsyncListSkuGroupsPaged { + + public static void main(String[] args) throws Exception { + asyncListSkuGroupsPaged(); + } + + public static void asyncListSkuGroupsPaged() throws Exception { + // 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 (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) { + ListSkuGroupsRequest request = + ListSkuGroupsRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListSkuGroupsResponse response = + cloudChannelServiceClient.listSkuGroupsCallable().call(request); + for (SkuGroup element : response.getSkuGroupsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END cloudchannel_v1_generated_CloudChannelService_ListSkuGroups_Paged_async] diff --git a/java-channel/samples/snippets/generated/com/google/cloud/channel/v1/cloudchannelservice/listskugroups/SyncListSkuGroups.java b/java-channel/samples/snippets/generated/com/google/cloud/channel/v1/cloudchannelservice/listskugroups/SyncListSkuGroups.java new file mode 100644 index 000000000000..b086f8fff265 --- /dev/null +++ b/java-channel/samples/snippets/generated/com/google/cloud/channel/v1/cloudchannelservice/listskugroups/SyncListSkuGroups.java @@ -0,0 +1,49 @@ +/* + * 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.channel.v1.samples; + +// [START cloudchannel_v1_generated_CloudChannelService_ListSkuGroups_sync] +import com.google.cloud.channel.v1.CloudChannelServiceClient; +import com.google.cloud.channel.v1.ListSkuGroupsRequest; +import com.google.cloud.channel.v1.SkuGroup; + +public class SyncListSkuGroups { + + public static void main(String[] args) throws Exception { + syncListSkuGroups(); + } + + public static void syncListSkuGroups() throws Exception { + // 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 (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) { + ListSkuGroupsRequest request = + ListSkuGroupsRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (SkuGroup element : cloudChannelServiceClient.listSkuGroups(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudchannel_v1_generated_CloudChannelService_ListSkuGroups_sync] diff --git a/java-channel/samples/snippets/generated/com/google/cloud/channel/v1/cloudchannelservice/listskugroups/SyncListSkuGroupsString.java b/java-channel/samples/snippets/generated/com/google/cloud/channel/v1/cloudchannelservice/listskugroups/SyncListSkuGroupsString.java new file mode 100644 index 000000000000..d26d9647fdd2 --- /dev/null +++ b/java-channel/samples/snippets/generated/com/google/cloud/channel/v1/cloudchannelservice/listskugroups/SyncListSkuGroupsString.java @@ -0,0 +1,43 @@ +/* + * 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.channel.v1.samples; + +// [START cloudchannel_v1_generated_CloudChannelService_ListSkuGroups_String_sync] +import com.google.cloud.channel.v1.CloudChannelServiceClient; +import com.google.cloud.channel.v1.SkuGroup; + +public class SyncListSkuGroupsString { + + public static void main(String[] args) throws Exception { + syncListSkuGroupsString(); + } + + public static void syncListSkuGroupsString() throws Exception { + // 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 (CloudChannelServiceClient cloudChannelServiceClient = CloudChannelServiceClient.create()) { + String parent = "parent-995424086"; + for (SkuGroup element : cloudChannelServiceClient.listSkuGroups(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END cloudchannel_v1_generated_CloudChannelService_ListSkuGroups_String_sync]