Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
apply customization changes
  • Loading branch information
samvaity committed Jan 15, 2025
commit fb9338fc9d62753dd0bfe17bf7f827f610ac9cca
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,22 @@ public void customize(LibraryCustomization customization, Logger logger) {
customizeCommunicationIdentifierModelKind(customization);
customizeAcsMessageChannelEventError(customization);
customizeCentralCommuicationEvents(customization);
customizeCommuicationSMSEvents(customization);
}

public void customizeCommuicationSMSEvents(LibraryCustomization customization) {
PackageCustomization packageModels = customization.getPackage("com.azure.messaging.eventgrid.systemevents");
ClassCustomization classCustomization = packageModels.getClass("AcsSmsReceivedEventData");

classCustomization.customizeAst(comp -> {
ClassOrInterfaceDeclaration clazz = comp.getClassByName("AcsSmsReceivedEventData").get();
clazz.getMethodsByName("setSegmentCount").forEach(m -> {
m.getParameter(0).setType(Integer.class);
});
clazz.getMethodsByName("getSegmentCount").forEach(m -> {
m.setType(Integer.class);
});
});
}

public void customizeCentralCommuicationEvents(LibraryCustomization customization) {
Expand Down
Loading