public final ListEventsPagedResponse listEvents(String projectName, String groupId) {
    ListEventsRequest request =
        ListEventsRequest.newBuilder().setProjectName(projectName).setGroupId(groupId).build();
    return listEvents(request);
  }
public final ListEventsPagedResponse listEvents ( String projectName , String groupId ) { ListEventsRequest request = ListEventsRequest . newBuilder ( ) . setProjectName ( projectName ) . setGroupId ( groupId ) . build ( ) ; return listEvents ( request ) ; }
Lists the specified events.

<p>Sample code:

<pre><code>
try (ErrorStatsServiceClient errorStatsServiceClient = ErrorStatsServiceClient.create()) {
ProjectName projectName = ProjectName.of("[PROJECT]");
String groupId = "";
for (ErrorEvent element : errorStatsServiceClient.listEvents(projectName.toString(), groupId).iterateAll()) {
// doThingsWith(element);
}
}
</code></pre>

@param projectName [Required] The resource name of the Google Cloud Platform project. Written
as `projects/` plus the [Google Cloud Platform project
ID](https://support.google.com/cloud/answer/6158840). Example: `projects/my-project-123`.
@param groupId [Required] The group for which events shall be returned.
@throws com.google.api.gax.rpc.ApiException if the remote call fails