class OAuth2ApplicationResolversImpl implements OAuth2ApplicationResolvers {

    @Override
    public DataFetcher<OAuth2Application> updateOAuth2ApplicationDataFetcher() {
        return environment -> {
            long oAuth2ApplicationId = util.getLongArg(environment, "oAuth2ApplicationId");
            List<GrantType> allowedGrantTypesList = environment.getArgument("allowedGrantTypesList");
            String clientId = util.getStringArg(environment, "clientId");
            int clientProfile = util.getIntArg(environment, "clientProfile");
            String clientSecret = util.getStringArg(environment, "clientSecret");
            String description = util.getStringArg(environment, "description");
            String[] featuresList = util.getStringArrayArg(environment, "featuresList");
            String homePageURL = util.getStringArg(environment, "homePageURL");
            long iconFileEntryId = util.getLongArg(environment, "iconFileEntryId");
            String name = util.getStringArg(environment, "name");
            String privacyPolicyURL = util.getStringArg(environment, "privacyPolicyURL");
            String[] redirectURIsList = util.getStringArrayArg(environment, "redirectURIsList");
            long oAuth2ApplicationScopeAliasesId = util.getLongArg(environment, "oAuth2ApplicationScopeAliasesId");
            ServiceContext serviceContext = new ServiceContext();

            return oAuth2ApplicationLocalService.updateOAuth2Application(
                    oAuth2ApplicationId,
                    allowedGrantTypesList,
                    clientId,
                    clientProfile,
                    clientSecret,
                    description,
                    Arrays.asList(featuresList),
                    homePageURL,
                    iconFileEntryId,
                    name,
                    privacyPolicyURL,
                    Arrays.asList(redirectURIsList),
                    oAuth2ApplicationScopeAliasesId,
                    serviceContext);
        };
    }

}