InputStream in = AdminSDKAlertCenterQuickstart.class.getResourceAsStream(CREDENTIALS_FILE_PATH);
if (in == null) {
throw new FileNotFoundException("Resource not found: " + CREDENTIALS_FILE_PATH);
}
GoogleCredentials credentials = ServiceAccountCredentials
.fromStream(in)
.createDelegated(delegatedAdminEmail)
.createScoped(SCOPES);
NetHttpTransport transport = GoogleNetHttpTransport.newTrustedTransport();
AlertCenter service = new AlertCenter.Builder(transport, JSON_FACTORY,
new HttpCredentialsAdapter(getCredentials(DELEGATED_ADMIN_EMAIL)))
.setApplicationName(APPLICATION_NAME)
.build();
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2024-11-25。"],[[["This quickstart demonstrates how to use the Alert Center API to access and manage Google Workspace alerts, primarily for administrative purposes."],["Before running the sample code, ensure you have a Google Cloud project, a Google Account, and Java 1.8 or higher installed."],["You'll need to enable the Alert Center API, create a service account with appropriate credentials, and then run the provided Java code snippets."],["The provided code examples cover retrieving alerts, displaying their details, and providing feedback on specific alerts."],["This quickstart utilizes a simplified authentication approach best suited for testing environments; for production, thorough review of authentication and authorization is strongly recommended."]]],[]]