// This file is auto-generated, don't edit it. Thanks.
package com.zcloud.util.ali;

import com.aliyun.tea.*;
import com.aliyun.teaconsole.*;
import com.aliyun.teaopenapi.*;
import com.aliyun.teaopenapi.models.*;
import com.aliyun.teautil.*;
import com.aliyun.vod20170321.*;
import com.aliyun.vod20170321.models.*;
import com.zcloud.util.Const;

public class Sample {

    /**
     * 使用AK&SK初始化账号Client
     * @param accessKeyId
     * @param accessKeySecret
     * @return Client
     * @throws Exception
     */
    public static com.aliyun.vod20170321.Client createClient(String accessKeyId, String accessKeySecret) throws Exception {
        Config config = new Config()
                // 您的AccessKey ID
                .setAccessKeyId(accessKeyId)
                // 您的AccessKey Secret
                .setAccessKeySecret(accessKeySecret);
        // 访问的域名
        config.endpoint = Const.ENDPOINT;
        return new com.aliyun.vod20170321.Client(config);
    }

    public static void main(String[] args_) throws Exception {
        java.util.List<String> args = java.util.Arrays.asList(args_);
        com.aliyun.vod20170321.Client client = Sample.createClient("LTAI5tK134ZzXPEwykAdpVn2", "XCEMY8FG52cXImFMeIiH4tDJ9BIN3N");
        GetVideoPlayAuthRequest getVideoPlayAuthRequest = new GetVideoPlayAuthRequest()
                .setVideoId("d67f559e75c2492da4eaa5b02bff7c2e")
                .setAuthInfoTimeout(3000L);
        GetVideoPlayAuthResponse resp = client.getVideoPlayAuth(getVideoPlayAuthRequest);
        com.aliyun.teaconsole.Client.log(com.aliyun.teautil.Common.toJSONString(TeaModel.buildMap(resp)));
    }
}
