/
VodSetCallbackEventDemo.java
33 lines (28 loc) · 1.27 KB
/
VodSetCallbackEventDemo.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Code generated by protoc-gen-byteplus-sdk
// source: setCallbackEvent
// DO NOT EDIT!
package com.byteplus.example.vod.callback;
import com.byteplus.service.vod.IVodService;
import com.byteplus.service.vod.impl.VodServiceImpl;
public class VodSetCallbackEventDemo {
public static void main(String[] args) throws Exception {
IVodService vodService = VodServiceImpl.getInstance();
vodService.setAccessKey("your ak");
vodService.setSecretKey("your sk");
try {
com.byteplus.service.vod.model.request.VodSetCallbackEventRequest.Builder reqBuilder = com.byteplus.service.vod.model.request.VodSetCallbackEventRequest.newBuilder();
reqBuilder.setSpaceName("your SpaceName");
reqBuilder.setEvents("your Events");
reqBuilder.setAuthEnabled("your AuthEnabled");
reqBuilder.setPrivateKey("your PrivateKey");
com.byteplus.service.vod.model.response.VodSetCallbackEventResponse resp = vodService.setCallbackEvent(reqBuilder.build());
if (resp.getResponseMetadata().hasError()) {
System.out.println(resp.getResponseMetadata().getError());
System.exit(-1);
}
System.out.println(resp);
} catch (Exception e) {
e.printStackTrace();
}
}
}