Skip to content

Commit 752495f

Browse files
feat: [cloudchannel] add show_future_offers to ListOffers (#9212)
* feat: add show_future_offers to ListOffers feat: add ListEntitlementChanges PiperOrigin-RevId: 516294330 Source-Link: googleapis/googleapis@c0eb8fa Source-Link: https://github.com/googleapis/googleapis-gen/commit/7217f212c41d6ec35d35af61b587bdee92ebd11a Copy-Tag: eyJwIjoiamF2YS1jaGFubmVsLy5Pd2xCb3QueWFtbCIsImgiOiI3MjE3ZjIxMmM0MWQ2ZWMzNWQzNWFmNjFiNTg3YmRlZTkyZWJkMTFhIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent ac73d23 commit 752495f

File tree

48 files changed

+10363
-686
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+10363
-686
lines changed

java-channel/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ Java idiomatic client for [Channel Services][product-docs].
1414

1515
If you are using Maven, add this to your pom.xml file:
1616

17-
<!--- {x-version-update-start:google-cloud-channel:released} -->
1817

1918
```xml
2019
<dependency>
@@ -35,7 +34,6 @@ If you are using SBT, add this to your dependencies:
3534
```Scala
3635
libraryDependencies += "com.google.cloud" % "google-cloud-channel" % "3.16.0"
3736
```
38-
<!--- {x-version-update-end} -->
3937

4038
## Authentication
4139

java-channel/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/CloudChannelServiceClient.java

Lines changed: 349 additions & 0 deletions
Large diffs are not rendered by default.

java-channel/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/CloudChannelServiceSettings.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListChannelPartnerRepricingConfigsPagedResponse;
2121
import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListCustomerRepricingConfigsPagedResponse;
2222
import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListCustomersPagedResponse;
23+
import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListEntitlementChangesPagedResponse;
2324
import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListEntitlementsPagedResponse;
2425
import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListOffersPagedResponse;
2526
import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListProductsPagedResponse;
@@ -459,6 +460,15 @@ public UnaryCallSettings<LookupOfferRequest, Offer> lookupOfferSettings() {
459460
return ((CloudChannelServiceStubSettings) getStubSettings()).listSubscribersSettings();
460461
}
461462

463+
/** Returns the object with the settings used for calls to listEntitlementChanges. */
464+
public PagedCallSettings<
465+
ListEntitlementChangesRequest,
466+
ListEntitlementChangesResponse,
467+
ListEntitlementChangesPagedResponse>
468+
listEntitlementChangesSettings() {
469+
return ((CloudChannelServiceStubSettings) getStubSettings()).listEntitlementChangesSettings();
470+
}
471+
462472
public static final CloudChannelServiceSettings create(CloudChannelServiceStubSettings stub)
463473
throws IOException {
464474
return new CloudChannelServiceSettings.Builder(stub.toBuilder()).build();
@@ -942,6 +952,15 @@ public UnaryCallSettings.Builder<LookupOfferRequest, Offer> lookupOfferSettings(
942952
return getStubSettingsBuilder().listSubscribersSettings();
943953
}
944954

955+
/** Returns the builder for the settings used for calls to listEntitlementChanges. */
956+
public PagedCallSettings.Builder<
957+
ListEntitlementChangesRequest,
958+
ListEntitlementChangesResponse,
959+
ListEntitlementChangesPagedResponse>
960+
listEntitlementChangesSettings() {
961+
return getStubSettingsBuilder().listEntitlementChangesSettings();
962+
}
963+
945964
@Override
946965
public CloudChannelServiceSettings build() throws IOException {
947966
return new CloudChannelServiceSettings(this);

java-channel/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/gapic_metadata.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@
100100
"ListCustomers": {
101101
"methods": ["listCustomers", "listCustomersPagedCallable", "listCustomersCallable"]
102102
},
103+
"ListEntitlementChanges": {
104+
"methods": ["listEntitlementChanges", "listEntitlementChanges", "listEntitlementChanges", "listEntitlementChangesPagedCallable", "listEntitlementChangesCallable"]
105+
},
103106
"ListEntitlements": {
104107
"methods": ["listEntitlements", "listEntitlementsPagedCallable", "listEntitlementsCallable"]
105108
},

java-channel/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/stub/CloudChannelServiceStub.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListChannelPartnerRepricingConfigsPagedResponse;
2121
import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListCustomerRepricingConfigsPagedResponse;
2222
import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListCustomersPagedResponse;
23+
import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListEntitlementChangesPagedResponse;
2324
import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListEntitlementsPagedResponse;
2425
import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListOffersPagedResponse;
2526
import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListProductsPagedResponse;
@@ -67,6 +68,8 @@
6768
import com.google.cloud.channel.v1.ListCustomerRepricingConfigsResponse;
6869
import com.google.cloud.channel.v1.ListCustomersRequest;
6970
import com.google.cloud.channel.v1.ListCustomersResponse;
71+
import com.google.cloud.channel.v1.ListEntitlementChangesRequest;
72+
import com.google.cloud.channel.v1.ListEntitlementChangesResponse;
7073
import com.google.cloud.channel.v1.ListEntitlementsRequest;
7174
import com.google.cloud.channel.v1.ListEntitlementsResponse;
7275
import com.google.cloud.channel.v1.ListOffersRequest;
@@ -475,6 +478,17 @@ public UnaryCallable<ListSubscribersRequest, ListSubscribersResponse> listSubscr
475478
throw new UnsupportedOperationException("Not implemented: listSubscribersCallable()");
476479
}
477480

481+
public UnaryCallable<ListEntitlementChangesRequest, ListEntitlementChangesPagedResponse>
482+
listEntitlementChangesPagedCallable() {
483+
throw new UnsupportedOperationException(
484+
"Not implemented: listEntitlementChangesPagedCallable()");
485+
}
486+
487+
public UnaryCallable<ListEntitlementChangesRequest, ListEntitlementChangesResponse>
488+
listEntitlementChangesCallable() {
489+
throw new UnsupportedOperationException("Not implemented: listEntitlementChangesCallable()");
490+
}
491+
478492
@Override
479493
public abstract void close();
480494
}

java-channel/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/stub/CloudChannelServiceStubSettings.java

Lines changed: 115 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListChannelPartnerRepricingConfigsPagedResponse;
2121
import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListCustomerRepricingConfigsPagedResponse;
2222
import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListCustomersPagedResponse;
23+
import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListEntitlementChangesPagedResponse;
2324
import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListEntitlementsPagedResponse;
2425
import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListOffersPagedResponse;
2526
import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListProductsPagedResponse;
@@ -79,6 +80,7 @@
7980
import com.google.cloud.channel.v1.DeleteCustomerRepricingConfigRequest;
8081
import com.google.cloud.channel.v1.DeleteCustomerRequest;
8182
import com.google.cloud.channel.v1.Entitlement;
83+
import com.google.cloud.channel.v1.EntitlementChange;
8284
import com.google.cloud.channel.v1.GetChannelPartnerLinkRequest;
8385
import com.google.cloud.channel.v1.GetChannelPartnerRepricingConfigRequest;
8486
import com.google.cloud.channel.v1.GetCustomerRepricingConfigRequest;
@@ -93,6 +95,8 @@
9395
import com.google.cloud.channel.v1.ListCustomerRepricingConfigsResponse;
9496
import com.google.cloud.channel.v1.ListCustomersRequest;
9597
import com.google.cloud.channel.v1.ListCustomersResponse;
98+
import com.google.cloud.channel.v1.ListEntitlementChangesRequest;
99+
import com.google.cloud.channel.v1.ListEntitlementChangesResponse;
96100
import com.google.cloud.channel.v1.ListEntitlementsRequest;
97101
import com.google.cloud.channel.v1.ListEntitlementsResponse;
98102
import com.google.cloud.channel.v1.ListOffersRequest;
@@ -316,6 +320,11 @@ public class CloudChannelServiceStubSettings extends StubSettings<CloudChannelSe
316320
private final PagedCallSettings<
317321
ListSubscribersRequest, ListSubscribersResponse, ListSubscribersPagedResponse>
318322
listSubscribersSettings;
323+
private final PagedCallSettings<
324+
ListEntitlementChangesRequest,
325+
ListEntitlementChangesResponse,
326+
ListEntitlementChangesPagedResponse>
327+
listEntitlementChangesSettings;
319328

320329
private static final PagedListDescriptor<ListCustomersRequest, ListCustomersResponse, Customer>
321330
LIST_CUSTOMERS_PAGE_STR_DESC =
@@ -847,6 +856,49 @@ public Iterable<String> extractResources(ListSubscribersResponse payload) {
847856
}
848857
};
849858

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+
850902
private static final PagedListResponseFactory<
851903
ListCustomersRequest, ListCustomersResponse, ListCustomersPagedResponse>
852904
LIST_CUSTOMERS_PAGE_STR_FACT =
@@ -1139,6 +1191,33 @@ public ApiFuture<ListSubscribersPagedResponse> getFuturePagedResponse(
11391191
}
11401192
};
11411193

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+
11421221
/** Returns the object with the settings used for calls to listCustomers. */
11431222
public PagedCallSettings<ListCustomersRequest, ListCustomersResponse, ListCustomersPagedResponse>
11441223
listCustomersSettings() {
@@ -1485,6 +1564,15 @@ public UnaryCallSettings<LookupOfferRequest, Offer> lookupOfferSettings() {
14851564
return listSubscribersSettings;
14861565
}
14871566

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+
14881576
public CloudChannelServiceStub createStub() throws IOException {
14891577
if (getTransportChannelProvider()
14901578
.getTransportName()
@@ -1667,6 +1755,7 @@ protected CloudChannelServiceStubSettings(Builder settingsBuilder) throws IOExce
16671755
registerSubscriberSettings = settingsBuilder.registerSubscriberSettings().build();
16681756
unregisterSubscriberSettings = settingsBuilder.unregisterSubscriberSettings().build();
16691757
listSubscribersSettings = settingsBuilder.listSubscribersSettings().build();
1758+
listEntitlementChangesSettings = settingsBuilder.listEntitlementChangesSettings().build();
16701759
}
16711760

16721761
/** Builder for CloudChannelServiceStubSettings. */
@@ -1822,6 +1911,11 @@ public static class Builder
18221911
private final PagedCallSettings.Builder<
18231912
ListSubscribersRequest, ListSubscribersResponse, ListSubscribersPagedResponse>
18241913
listSubscribersSettings;
1914+
private final PagedCallSettings.Builder<
1915+
ListEntitlementChangesRequest,
1916+
ListEntitlementChangesResponse,
1917+
ListEntitlementChangesPagedResponse>
1918+
listEntitlementChangesSettings;
18251919
private static final ImmutableMap<String, ImmutableSet<StatusCode.Code>>
18261920
RETRYABLE_CODE_DEFINITIONS;
18271921

@@ -1933,6 +2027,8 @@ protected Builder(ClientContext clientContext) {
19332027
registerSubscriberSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
19342028
unregisterSubscriberSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
19352029
listSubscribersSettings = PagedCallSettings.newBuilder(LIST_SUBSCRIBERS_PAGE_STR_FACT);
2030+
listEntitlementChangesSettings =
2031+
PagedCallSettings.newBuilder(LIST_ENTITLEMENT_CHANGES_PAGE_STR_FACT);
19362032

19372033
unaryMethodSettingsBuilders =
19382034
ImmutableList.<UnaryCallSettings.Builder<?, ?>>of(
@@ -1980,7 +2076,8 @@ protected Builder(ClientContext clientContext) {
19802076
listPurchasableOffersSettings,
19812077
registerSubscriberSettings,
19822078
unregisterSubscriberSettings,
1983-
listSubscribersSettings);
2079+
listSubscribersSettings,
2080+
listEntitlementChangesSettings);
19842081
initDefaults(this);
19852082
}
19862083

@@ -2060,6 +2157,7 @@ protected Builder(CloudChannelServiceStubSettings settings) {
20602157
registerSubscriberSettings = settings.registerSubscriberSettings.toBuilder();
20612158
unregisterSubscriberSettings = settings.unregisterSubscriberSettings.toBuilder();
20622159
listSubscribersSettings = settings.listSubscribersSettings.toBuilder();
2160+
listEntitlementChangesSettings = settings.listEntitlementChangesSettings.toBuilder();
20632161

20642162
unaryMethodSettingsBuilders =
20652163
ImmutableList.<UnaryCallSettings.Builder<?, ?>>of(
@@ -2107,7 +2205,8 @@ protected Builder(CloudChannelServiceStubSettings settings) {
21072205
listPurchasableOffersSettings,
21082206
registerSubscriberSettings,
21092207
unregisterSubscriberSettings,
2110-
listSubscribersSettings);
2208+
listSubscribersSettings,
2209+
listEntitlementChangesSettings);
21112210
}
21122211

21132212
private static Builder createDefault() {
@@ -2362,6 +2461,11 @@ private static Builder initDefaults(Builder builder) {
23622461
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
23632462
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
23642463

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+
23652469
builder
23662470
.provisionCloudIdentityOperationSettings()
23672471
.setInitialCallSettings(
@@ -3035,6 +3139,15 @@ public UnaryCallSettings.Builder<LookupOfferRequest, Offer> lookupOfferSettings(
30353139
return listSubscribersSettings;
30363140
}
30373141

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+
30383151
@Override
30393152
public CloudChannelServiceStubSettings build() throws IOException {
30403153
return new CloudChannelServiceStubSettings(this);

0 commit comments

Comments
 (0)