Skip to content

Commit 552558c

Browse files
author
liyan.90210
committed
feat auto update sdk
1 parent f845423 commit 552558c

30 files changed

+694
-105
lines changed

Changelog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
Change log
22

3+
2025-05-08 Bumped to version v1.0.220
4+
- Updated apis for imagex/sms
5+
36
2025-04-28 Bumped to version v1.0.219
47
- Updated apis for livesaas
58

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
package com.volcengine.example.sms;
2+
3+
import com.alibaba.fastjson.JSON;
4+
import com.volcengine.model.imagex.data.App;
5+
import com.volcengine.model.request.ApplySmsSignatureV2Request;
6+
import com.volcengine.model.response.ApplySmsSignatureResponse;
7+
import com.volcengine.model.sms.*;
8+
import com.volcengine.service.sms.SmsService;
9+
import com.volcengine.service.sms.impl.SmsServiceImpl;
10+
import org.checkerframework.checker.units.qual.A;
11+
12+
import java.io.DataInputStream;
13+
import java.io.FileInputStream;
14+
import java.io.FileNotFoundException;
15+
import java.io.IOException;
16+
import java.util.ArrayList;
17+
import java.util.Base64;
18+
import java.util.Collection;
19+
import java.util.Collections;
20+
21+
public class ApplySmsSignatureV2Demo {
22+
public static void main(String[] args) throws IOException {
23+
SmsService smsService = SmsServiceImpl.getInstance();
24+
25+
// call below method if you dont set ak and sk in ~/.vcloud/config
26+
smsService.setAccessKey("ak");
27+
smsService.setSecretKey("sk");
28+
//java读取本地文件,仅供参考
29+
String file = "/Users/user/img_v2_2d3be85c-d52a-4f85-88af-9fa0485d63cg.jpg";
30+
DataInputStream reader = new DataInputStream(new FileInputStream(file));
31+
byte[] bytes = new byte[reader.available()];
32+
reader.read(bytes);
33+
34+
ApplySmsSignatureV2Request req = new ApplySmsSignatureV2Request();
35+
req.setDesc("测试 SDK");
36+
req.setSubAccount("subAccount");
37+
req.setContent("测试");
38+
req.setSource(SignSourceTypeV2.SignSourceTypeApp);
39+
req.setDomain("www.xxx.com");
40+
req.setPurpose(PurposeType.SignPurposeForOwn);
41+
req.setSignatureIdentificationID(1); // 实名资质id
42+
SignAuthFile appIcpFileList = new SignAuthFile(DocType.AppIcpCertificate, Base64.getEncoder().encodeToString(bytes), ImageType.JPG.getImageType());
43+
AppIcp appIcp = new AppIcp();
44+
appIcp.setAppIcpFileList(new ArrayList<>(Collections.singletonList(appIcpFileList)));
45+
appIcp.setAppIcpFilling("appIcp");
46+
req.setAppIcp(appIcp);
47+
Trademark trademark = new Trademark();
48+
trademark.setTrademarkCn("中文商标");
49+
trademark.setTrademarkEn("English trademark");
50+
trademark.setTrademarkNumber("123234");
51+
trademark.setTrademarkFileList(new ArrayList<>(Collections.singletonList(appIcpFileList)));
52+
req.setTrademark(trademark);
53+
req.setScene("通用");// 可选,非必填
54+
try {
55+
ApplySmsSignatureResponse response = smsService.applySmsSignatureV2(req);
56+
System.out.println(JSON.toJSONString(response));
57+
} catch (Exception e) {
58+
System.out.println(e.getMessage());
59+
e.printStackTrace();
60+
}
61+
}
62+
}

volc-sdk-java/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>com.volcengine</groupId>
7-
<version>1.0.219</version>
7+
<version>1.0.220</version>
88
<artifactId>volc-sdk-java</artifactId>
99

1010
<name>volc-sdk-java</name>

volc-sdk-java/src/main/java/com/volcengine/model/imagex/v2/CreateImageAITaskBody.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public final class CreateImageAITaskBody {
3535
private String dataType;
3636

3737
/**
38-
* <p>待进行 AI 处理的图片 URI 或 URL 列表,其中 URI 不需要带 `tos-cn-i-***` 前缀。</p>
38+
* <p>待进行 AI 处理的图片 URI 或 URL 列表,其中 URI 不需要带 `tos-cn-i-***` 前缀。传入图片的短边不小于 256 px,长边不大于 2048 px,大小不超过 10 MB。</p>
3939
*
4040
*
4141
*
@@ -49,7 +49,7 @@ public final class CreateImageAITaskBody {
4949
private List<String> dataList;
5050

5151
/**
52-
* <p>任务回调配置,缺省情况下默认使用队列回调配置。</p>
52+
* <p>任务回调配置。</p>
5353
*/
5454
@com.alibaba.fastjson.annotation.JSONField(name = "CallbackConf")
5555
private CreateImageAITaskBodyCallbackConf callbackConf;

volc-sdk-java/src/main/java/com/volcengine/model/imagex/v2/CreateImageAITaskBodyCallbackConf.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public final class CreateImageAITaskBodyCallbackConf {
2828
private String dataFormat;
2929

3030
/**
31-
* <p>业务自定义回调参数,将在回调消息的 `callback_args` 中透传。具体回调参数请参考[回调内容](https://www.volcengine.com/docs/508/1104726#%E5%9B%9E%E8%B0%83%E5%86%85%E5%AE%B9)。</p>
31+
* <p>业务自定义回调参数,将在回调消息的 `callback_args` 中透传。具体回调参数请参考 [AI 图像处理回调](https://www.volcengine.com/docs/508/1526662)。</p>
3232
*/
3333
@com.alibaba.fastjson.annotation.JSONField(name = "Args")
3434
private String args;

volc-sdk-java/src/main/java/com/volcengine/model/imagex/v2/DescribeImageXBucketRetrievalUsageQuery.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,16 @@ public final class DescribeImageXBucketRetrievalUsageQuery {
6161
@com.alibaba.fastjson.annotation.JSONField(name = "EndTime")
6262
private String endTime;
6363

64+
/**
65+
* <p>是否查询数据取回量。</p>
66+
*
67+
* <p>- `true`:查询取回量。</p>
68+
*
69+
* <p>- `false`:查询存储量。</p>
70+
*/
71+
@com.alibaba.fastjson.annotation.JSONField(name = "IsRetrieval")
72+
private Boolean isRetrieval;
73+
6474
@Override
6575
public String toString() {
6676
return JSON.toJSONString(this);

volc-sdk-java/src/main/java/com/volcengine/model/imagex/v2/DescribeImageXBucketRetrievalUsageResResultStorageDataItem.java

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,35 @@ public final class DescribeImageXBucketRetrievalUsageResResultStorageDataItem {
2323
private String bucketName;
2424

2525
/**
26-
* <p>存储类型,`GroupBy`包含`StorageType`时有返回值。取值:</p>
26+
* <p>存储类型,`GroupBy`包含`StorageType`时有返回值。</p>
2727
*
28-
* <p>- `STANDARD`:标准存储</p>
28+
* <p>当传参`IsRetrieval`=`false`时,表示存储值,取值:</p>
2929
*
30-
* <p>- `IA`:低频存储</p>
30+
* <p>- `STANDARD`:标准存储 </p>
3131
*
32-
* <p>- `ARCHIVE`:归档存储</p>
32+
* <p>- `IA`:低频存储 </p>
33+
*
34+
* <p>- `ARCHIVE`:归档存储 </p>
3335
*
3436
* <p>- `COLD_ARCHIVE`:冷归档存储</p>
37+
*
38+
* <p>- `ARCHIVE_FR`:归档闪回存储</p>
39+
*
40+
*
41+
*
42+
* <p>当传参`IsRetrieval`=`true`时,表示取回值,取值:</p>
43+
*
44+
* <p>- `IA`:低频取回 </p>
45+
*
46+
* <p>- `ARCHIVE`:归档标准取回</p>
47+
*
48+
* <p>- `COLD_ARCHIVE`:冷归档快速取回</p>
49+
*
50+
* <p>- `ARCHIVE_FR`:归档闪回取回</p>
51+
*
52+
* <p>- `COLD_ARCHIVE_STANDARD`:冷归档标准取回</p>
53+
*
54+
* <p>- `COLD_ARCHIVE_BULK`:冷归档批量取回</p>
3555
*/
3656
@com.alibaba.fastjson.annotation.JSONField(name = "StorageType")
3757
private String storageType;
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
package com.volcengine.model.imagex.v2;
2+
3+
4+
import com.alibaba.fastjson.JSON;
5+
6+
/**
7+
* DescribeImageXStorageUsageQuery
8+
*/
9+
@lombok.Data
10+
public final class DescribeImageXStorageUsageQuery {
11+
12+
/**
13+
* <p>服务 ID。为空时表示不筛选,支持查询多个服务,使用逗号分隔不同的服务。</p>
14+
*
15+
*
16+
*
17+
* <p>- 您可以在 veImageX 控制台[服务管理](https://console.volcengine.com/imagex/service_manage/)页面,在创建好的图片服务中获取服务 ID。</p>
18+
*
19+
* <p>- 您也可以通过 OpenAPI 的方式获取服务 ID,具体请参考 [GetAllImageServices](https://www.volcengine.com/docs/508/9360)。</p>
20+
*/
21+
@com.alibaba.fastjson.annotation.JSONField(name = "ServiceIds")
22+
private String serviceIds;
23+
24+
/**
25+
* <p>Bucket 名称。支持同时查询多个 BucketName,不同的 BucketNmae 使用逗号分隔。</p>
26+
*
27+
* <p>您可以通过调用 [GetAllImageServices](https://www.volcengine.com/docs/508/9360) 获取所需的 Bucket 名称。</p>
28+
*/
29+
@com.alibaba.fastjson.annotation.JSONField(name = "BucketNames")
30+
private String bucketNames;
31+
32+
/**
33+
* <p>需要分组查询的参数,多个数据用逗号分隔。支持取值如下:</p>
34+
*
35+
*
36+
*
37+
* <p>- `ServiceId`:服务 ID</p>
38+
*
39+
* <p>- `BucketName`:Bucket 名称</p>
40+
*
41+
* <p>- `StorageType`:存储类型</p>
42+
*/
43+
@com.alibaba.fastjson.annotation.JSONField(name = "GroupBy")
44+
private String groupBy;
45+
46+
/**
47+
* <p>获取数据起始时间点。日期格式按照 ISO8601 表示法,格式为:YYYY-MM-DDThh:mm:ss±hh:mm。例如`2019-06-02T00:00:00+08:00`。</p>
48+
*
49+
* <p>:::tip</p>
50+
*
51+
* <p>由于仅支持查询近一年历史数据,则若此刻时间为`2011-11-21T16:14:00+08:00`,那么您可输入最早的开始时间为`2010-11-21T00:00:00+08:00`。</p>
52+
*
53+
* <p>:::</p>
54+
*/
55+
@com.alibaba.fastjson.annotation.JSONField(name = "StartTime")
56+
private String startTime;
57+
58+
/**
59+
* <p>获取数据结束时间点。日期格式按照 ISO8601 表示法,格式为:YYYY-MM-DDThh:mm:ss±hh:mm。例如`2019-06-02T00:00:00+08:00`。</p>
60+
*/
61+
@com.alibaba.fastjson.annotation.JSONField(name = "EndTime")
62+
private String endTime;
63+
64+
/**
65+
* <p>查询数据的时间粒度。单位为秒,缺省时查询`StartTime`和`EndTime`时间段全部数据,此时单次查询最大时间跨度为 93 天。支持以下取值:</p>
66+
*
67+
*
68+
*
69+
* <p>- `300`:单次查询最大时间跨度为 31 天</p>
70+
*
71+
* <p>- `3600`:单次查询最大时间跨度为 93 天</p>
72+
*
73+
* <p>- `86400`:单次查询最大时间跨度为 93 天</p>
74+
*/
75+
@com.alibaba.fastjson.annotation.JSONField(name = "Interval")
76+
private String interval;
77+
78+
/**
79+
* <p>是否查询数据取回量。</p>
80+
*
81+
* <p>- `true`:查询取回量。</p>
82+
*
83+
* <p>- `false`:查询存储量。</p>
84+
*/
85+
@com.alibaba.fastjson.annotation.JSONField(name = "IsRetrieval")
86+
private Boolean isRetrieval;
87+
88+
@Override
89+
public String toString() {
90+
return JSON.toJSONString(this);
91+
}
92+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package com.volcengine.model.imagex.v2;
2+
3+
4+
import com.alibaba.fastjson.JSON;
5+
6+
/**
7+
* DescribeImageXStorageUsageRes
8+
*/
9+
@lombok.Data
10+
public final class DescribeImageXStorageUsageRes {
11+
12+
/**
13+
* <p>TODO</p>
14+
*/
15+
@com.alibaba.fastjson.annotation.JSONField(name = "ResponseMetadata")
16+
private DescribeImageXStorageUsageResResponseMetadata responseMetadata;
17+
18+
/**
19+
* <p>TODO</p>
20+
*/
21+
@com.alibaba.fastjson.annotation.JSONField(name = "Result")
22+
private DescribeImageXStorageUsageResResult result;
23+
24+
@Override
25+
public String toString() {
26+
return JSON.toJSONString(this);
27+
}
28+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
package com.volcengine.model.imagex.v2;
2+
3+
4+
import com.alibaba.fastjson.JSON;
5+
6+
/**
7+
* DescribeImageXStorageUsageResResponseMetadata
8+
*/
9+
@lombok.Data
10+
public final class DescribeImageXStorageUsageResResponseMetadata {
11+
12+
/**
13+
* <p>RequestID为每次API请求的唯一标识。</p>
14+
*/
15+
@com.alibaba.fastjson.annotation.JSONField(name = "RequestId")
16+
private String requestId;
17+
18+
/**
19+
* <p>请求的接口名,属于请求的公共参数。</p>
20+
*/
21+
@com.alibaba.fastjson.annotation.JSONField(name = "Action")
22+
private String action;
23+
24+
/**
25+
* <p>请求的版本号,属于请求的公共参数。</p>
26+
*/
27+
@com.alibaba.fastjson.annotation.JSONField(name = "Version")
28+
private String version;
29+
30+
/**
31+
* <p>请求的服务,属于请求的公共参数。</p>
32+
*/
33+
@com.alibaba.fastjson.annotation.JSONField(name = "Service")
34+
private String service;
35+
36+
/**
37+
* <p>请求的Region,例如:cn-north-1</p>
38+
*/
39+
@com.alibaba.fastjson.annotation.JSONField(name = "Region")
40+
private String region;
41+
42+
@Override
43+
public String toString() {
44+
return JSON.toJSONString(this);
45+
}
46+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package com.volcengine.model.imagex.v2;
2+
3+
4+
import com.alibaba.fastjson.JSON;
5+
import java.util.List;
6+
7+
/**
8+
* DescribeImageXStorageUsageResResult
9+
*/
10+
@lombok.Data
11+
public final class DescribeImageXStorageUsageResResult {
12+
13+
/**
14+
* <p>计量数据列表</p>
15+
*/
16+
@com.alibaba.fastjson.annotation.JSONField(name = "StorageData")
17+
private List<DescribeImageXStorageUsageResResultStorageDataItem> storageData;
18+
19+
@Override
20+
public String toString() {
21+
return JSON.toJSONString(this);
22+
}
23+
}

0 commit comments

Comments
 (0)