|
20 | 20 | import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListChannelPartnerRepricingConfigsPagedResponse;
|
21 | 21 | import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListCustomerRepricingConfigsPagedResponse;
|
22 | 22 | import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListCustomersPagedResponse;
|
| 23 | +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListEntitlementChangesPagedResponse; |
23 | 24 | import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListEntitlementsPagedResponse;
|
24 | 25 | import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListOffersPagedResponse;
|
25 | 26 | import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListProductsPagedResponse;
|
|
79 | 80 | import com.google.cloud.channel.v1.DeleteCustomerRepricingConfigRequest;
|
80 | 81 | import com.google.cloud.channel.v1.DeleteCustomerRequest;
|
81 | 82 | import com.google.cloud.channel.v1.Entitlement;
|
| 83 | +import com.google.cloud.channel.v1.EntitlementChange; |
82 | 84 | import com.google.cloud.channel.v1.GetChannelPartnerLinkRequest;
|
83 | 85 | import com.google.cloud.channel.v1.GetChannelPartnerRepricingConfigRequest;
|
84 | 86 | import com.google.cloud.channel.v1.GetCustomerRepricingConfigRequest;
|
|
93 | 95 | import com.google.cloud.channel.v1.ListCustomerRepricingConfigsResponse;
|
94 | 96 | import com.google.cloud.channel.v1.ListCustomersRequest;
|
95 | 97 | import com.google.cloud.channel.v1.ListCustomersResponse;
|
| 98 | +import com.google.cloud.channel.v1.ListEntitlementChangesRequest; |
| 99 | +import com.google.cloud.channel.v1.ListEntitlementChangesResponse; |
96 | 100 | import com.google.cloud.channel.v1.ListEntitlementsRequest;
|
97 | 101 | import com.google.cloud.channel.v1.ListEntitlementsResponse;
|
98 | 102 | import com.google.cloud.channel.v1.ListOffersRequest;
|
@@ -316,6 +320,11 @@ public class CloudChannelServiceStubSettings extends StubSettings<CloudChannelSe
|
316 | 320 | private final PagedCallSettings<
|
317 | 321 | ListSubscribersRequest, ListSubscribersResponse, ListSubscribersPagedResponse>
|
318 | 322 | listSubscribersSettings;
|
| 323 | + private final PagedCallSettings< |
| 324 | + ListEntitlementChangesRequest, |
| 325 | + ListEntitlementChangesResponse, |
| 326 | + ListEntitlementChangesPagedResponse> |
| 327 | + listEntitlementChangesSettings; |
319 | 328 |
|
320 | 329 | private static final PagedListDescriptor<ListCustomersRequest, ListCustomersResponse, Customer>
|
321 | 330 | LIST_CUSTOMERS_PAGE_STR_DESC =
|
@@ -847,6 +856,49 @@ public Iterable<String> extractResources(ListSubscribersResponse payload) {
|
847 | 856 | }
|
848 | 857 | };
|
849 | 858 |
|
| 859 | + private static final PagedListDescriptor< |
| 860 | + ListEntitlementChangesRequest, ListEntitlementChangesResponse, EntitlementChange> |
| 861 | + LIST_ENTITLEMENT_CHANGES_PAGE_STR_DESC = |
| 862 | + new PagedListDescriptor< |
| 863 | + ListEntitlementChangesRequest, ListEntitlementChangesResponse, EntitlementChange>() { |
| 864 | + @Override |
| 865 | + public String emptyToken() { |
| 866 | + return ""; |
| 867 | + } |
| 868 | + |
| 869 | + @Override |
| 870 | + public ListEntitlementChangesRequest injectToken( |
| 871 | + ListEntitlementChangesRequest payload, String token) { |
| 872 | + return ListEntitlementChangesRequest.newBuilder(payload).setPageToken(token).build(); |
| 873 | + } |
| 874 | + |
| 875 | + @Override |
| 876 | + public ListEntitlementChangesRequest injectPageSize( |
| 877 | + ListEntitlementChangesRequest payload, int pageSize) { |
| 878 | + return ListEntitlementChangesRequest.newBuilder(payload) |
| 879 | + .setPageSize(pageSize) |
| 880 | + .build(); |
| 881 | + } |
| 882 | + |
| 883 | + @Override |
| 884 | + public Integer extractPageSize(ListEntitlementChangesRequest payload) { |
| 885 | + return payload.getPageSize(); |
| 886 | + } |
| 887 | + |
| 888 | + @Override |
| 889 | + public String extractNextToken(ListEntitlementChangesResponse payload) { |
| 890 | + return payload.getNextPageToken(); |
| 891 | + } |
| 892 | + |
| 893 | + @Override |
| 894 | + public Iterable<EntitlementChange> extractResources( |
| 895 | + ListEntitlementChangesResponse payload) { |
| 896 | + return payload.getEntitlementChangesList() == null |
| 897 | + ? ImmutableList.<EntitlementChange>of() |
| 898 | + : payload.getEntitlementChangesList(); |
| 899 | + } |
| 900 | + }; |
| 901 | + |
850 | 902 | private static final PagedListResponseFactory<
|
851 | 903 | ListCustomersRequest, ListCustomersResponse, ListCustomersPagedResponse>
|
852 | 904 | LIST_CUSTOMERS_PAGE_STR_FACT =
|
@@ -1139,6 +1191,33 @@ public ApiFuture<ListSubscribersPagedResponse> getFuturePagedResponse(
|
1139 | 1191 | }
|
1140 | 1192 | };
|
1141 | 1193 |
|
| 1194 | + private static final PagedListResponseFactory< |
| 1195 | + ListEntitlementChangesRequest, |
| 1196 | + ListEntitlementChangesResponse, |
| 1197 | + ListEntitlementChangesPagedResponse> |
| 1198 | + LIST_ENTITLEMENT_CHANGES_PAGE_STR_FACT = |
| 1199 | + new PagedListResponseFactory< |
| 1200 | + ListEntitlementChangesRequest, |
| 1201 | + ListEntitlementChangesResponse, |
| 1202 | + ListEntitlementChangesPagedResponse>() { |
| 1203 | + @Override |
| 1204 | + public ApiFuture<ListEntitlementChangesPagedResponse> getFuturePagedResponse( |
| 1205 | + UnaryCallable<ListEntitlementChangesRequest, ListEntitlementChangesResponse> |
| 1206 | + callable, |
| 1207 | + ListEntitlementChangesRequest request, |
| 1208 | + ApiCallContext context, |
| 1209 | + ApiFuture<ListEntitlementChangesResponse> futureResponse) { |
| 1210 | + PageContext< |
| 1211 | + ListEntitlementChangesRequest, |
| 1212 | + ListEntitlementChangesResponse, |
| 1213 | + EntitlementChange> |
| 1214 | + pageContext = |
| 1215 | + PageContext.create( |
| 1216 | + callable, LIST_ENTITLEMENT_CHANGES_PAGE_STR_DESC, request, context); |
| 1217 | + return ListEntitlementChangesPagedResponse.createAsync(pageContext, futureResponse); |
| 1218 | + } |
| 1219 | + }; |
| 1220 | + |
1142 | 1221 | /** Returns the object with the settings used for calls to listCustomers. */
|
1143 | 1222 | public PagedCallSettings<ListCustomersRequest, ListCustomersResponse, ListCustomersPagedResponse>
|
1144 | 1223 | listCustomersSettings() {
|
@@ -1485,6 +1564,15 @@ public UnaryCallSettings<LookupOfferRequest, Offer> lookupOfferSettings() {
|
1485 | 1564 | return listSubscribersSettings;
|
1486 | 1565 | }
|
1487 | 1566 |
|
| 1567 | + /** Returns the object with the settings used for calls to listEntitlementChanges. */ |
| 1568 | + public PagedCallSettings< |
| 1569 | + ListEntitlementChangesRequest, |
| 1570 | + ListEntitlementChangesResponse, |
| 1571 | + ListEntitlementChangesPagedResponse> |
| 1572 | + listEntitlementChangesSettings() { |
| 1573 | + return listEntitlementChangesSettings; |
| 1574 | + } |
| 1575 | + |
1488 | 1576 | public CloudChannelServiceStub createStub() throws IOException {
|
1489 | 1577 | if (getTransportChannelProvider()
|
1490 | 1578 | .getTransportName()
|
@@ -1667,6 +1755,7 @@ protected CloudChannelServiceStubSettings(Builder settingsBuilder) throws IOExce
|
1667 | 1755 | registerSubscriberSettings = settingsBuilder.registerSubscriberSettings().build();
|
1668 | 1756 | unregisterSubscriberSettings = settingsBuilder.unregisterSubscriberSettings().build();
|
1669 | 1757 | listSubscribersSettings = settingsBuilder.listSubscribersSettings().build();
|
| 1758 | + listEntitlementChangesSettings = settingsBuilder.listEntitlementChangesSettings().build(); |
1670 | 1759 | }
|
1671 | 1760 |
|
1672 | 1761 | /** Builder for CloudChannelServiceStubSettings. */
|
@@ -1822,6 +1911,11 @@ public static class Builder
|
1822 | 1911 | private final PagedCallSettings.Builder<
|
1823 | 1912 | ListSubscribersRequest, ListSubscribersResponse, ListSubscribersPagedResponse>
|
1824 | 1913 | listSubscribersSettings;
|
| 1914 | + private final PagedCallSettings.Builder< |
| 1915 | + ListEntitlementChangesRequest, |
| 1916 | + ListEntitlementChangesResponse, |
| 1917 | + ListEntitlementChangesPagedResponse> |
| 1918 | + listEntitlementChangesSettings; |
1825 | 1919 | private static final ImmutableMap<String, ImmutableSet<StatusCode.Code>>
|
1826 | 1920 | RETRYABLE_CODE_DEFINITIONS;
|
1827 | 1921 |
|
@@ -1933,6 +2027,8 @@ protected Builder(ClientContext clientContext) {
|
1933 | 2027 | registerSubscriberSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
|
1934 | 2028 | unregisterSubscriberSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
|
1935 | 2029 | listSubscribersSettings = PagedCallSettings.newBuilder(LIST_SUBSCRIBERS_PAGE_STR_FACT);
|
| 2030 | + listEntitlementChangesSettings = |
| 2031 | + PagedCallSettings.newBuilder(LIST_ENTITLEMENT_CHANGES_PAGE_STR_FACT); |
1936 | 2032 |
|
1937 | 2033 | unaryMethodSettingsBuilders =
|
1938 | 2034 | ImmutableList.<UnaryCallSettings.Builder<?, ?>>of(
|
@@ -1980,7 +2076,8 @@ protected Builder(ClientContext clientContext) {
|
1980 | 2076 | listPurchasableOffersSettings,
|
1981 | 2077 | registerSubscriberSettings,
|
1982 | 2078 | unregisterSubscriberSettings,
|
1983 |
| - listSubscribersSettings); |
| 2079 | + listSubscribersSettings, |
| 2080 | + listEntitlementChangesSettings); |
1984 | 2081 | initDefaults(this);
|
1985 | 2082 | }
|
1986 | 2083 |
|
@@ -2060,6 +2157,7 @@ protected Builder(CloudChannelServiceStubSettings settings) {
|
2060 | 2157 | registerSubscriberSettings = settings.registerSubscriberSettings.toBuilder();
|
2061 | 2158 | unregisterSubscriberSettings = settings.unregisterSubscriberSettings.toBuilder();
|
2062 | 2159 | listSubscribersSettings = settings.listSubscribersSettings.toBuilder();
|
| 2160 | + listEntitlementChangesSettings = settings.listEntitlementChangesSettings.toBuilder(); |
2063 | 2161 |
|
2064 | 2162 | unaryMethodSettingsBuilders =
|
2065 | 2163 | ImmutableList.<UnaryCallSettings.Builder<?, ?>>of(
|
@@ -2107,7 +2205,8 @@ protected Builder(CloudChannelServiceStubSettings settings) {
|
2107 | 2205 | listPurchasableOffersSettings,
|
2108 | 2206 | registerSubscriberSettings,
|
2109 | 2207 | unregisterSubscriberSettings,
|
2110 |
| - listSubscribersSettings); |
| 2208 | + listSubscribersSettings, |
| 2209 | + listEntitlementChangesSettings); |
2111 | 2210 | }
|
2112 | 2211 |
|
2113 | 2212 | private static Builder createDefault() {
|
@@ -2362,6 +2461,11 @@ private static Builder initDefaults(Builder builder) {
|
2362 | 2461 | .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
|
2363 | 2462 | .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
|
2364 | 2463 |
|
| 2464 | + builder |
| 2465 | + .listEntitlementChangesSettings() |
| 2466 | + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) |
| 2467 | + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); |
| 2468 | + |
2365 | 2469 | builder
|
2366 | 2470 | .provisionCloudIdentityOperationSettings()
|
2367 | 2471 | .setInitialCallSettings(
|
@@ -3035,6 +3139,15 @@ public UnaryCallSettings.Builder<LookupOfferRequest, Offer> lookupOfferSettings(
|
3035 | 3139 | return listSubscribersSettings;
|
3036 | 3140 | }
|
3037 | 3141 |
|
| 3142 | + /** Returns the builder for the settings used for calls to listEntitlementChanges. */ |
| 3143 | + public PagedCallSettings.Builder< |
| 3144 | + ListEntitlementChangesRequest, |
| 3145 | + ListEntitlementChangesResponse, |
| 3146 | + ListEntitlementChangesPagedResponse> |
| 3147 | + listEntitlementChangesSettings() { |
| 3148 | + return listEntitlementChangesSettings; |
| 3149 | + } |
| 3150 | + |
3038 | 3151 | @Override
|
3039 | 3152 | public CloudChannelServiceStubSettings build() throws IOException {
|
3040 | 3153 | return new CloudChannelServiceStubSettings(this);
|
|
0 commit comments