Search in sources :

Example 1 with EventName

use of com.google.cloud.video.livestream.v1.EventName in project java-docs-samples by GoogleCloudPlatform.

the class GetChannelEvent method getChannelEvent.

public static void getChannelEvent(String projectId, String location, String channelId, String eventId) throws IOException {
    // the "close" method on the client to safely clean up any remaining background resources.
    try (LivestreamServiceClient livestreamServiceClient = LivestreamServiceClient.create()) {
        EventName name = EventName.of(projectId, location, channelId, eventId);
        Event response = livestreamServiceClient.getEvent(name);
        System.out.println("Channel event: " + response.getName());
    }
}
Also used : Event(com.google.cloud.video.livestream.v1.Event) EventName(com.google.cloud.video.livestream.v1.EventName) LivestreamServiceClient(com.google.cloud.video.livestream.v1.LivestreamServiceClient)

Aggregations

Event (com.google.cloud.video.livestream.v1.Event)1 EventName (com.google.cloud.video.livestream.v1.EventName)1 LivestreamServiceClient (com.google.cloud.video.livestream.v1.LivestreamServiceClient)1