Skip to content

Commit

Permalink
1.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanqin committed Feb 18, 2025
1 parent 61780f6 commit b861d1e
Show file tree
Hide file tree
Showing 123 changed files with 615 additions and 545 deletions.
4 changes: 2 additions & 2 deletions AppScope/app.json5
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"app": {
"bundleName": "com.tencent.cloud.cos",
"vendor": "example",
"versionCode": 1010104,
"versionName": "1.1.4",
"versionCode": 1010105,
"versionName": "1.1.5",
"icon": "$media:app_icon",
"label": "$string:app_name"
}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
``` bash
"dependencies": {
...
"@tencentcloud/cos":"1.1.4"
"@tencentcloud/cos":"1.1.5"
}
```
2. SDK 需要网络权限,用于与 COS 服务器进行通信,请在应用模块下的 module.json5 中添加如下权限声明:
Expand Down
2 changes: 1 addition & 1 deletion cosSdk/BuildProfile.ets
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Use these variables when you tailor your ArkTS code. They must be of the const type.
*/
export const HAR_VERSION = '1.1.4';
export const HAR_VERSION = '1.1.5';
export const BUILD_MODE_NAME = 'release';
export const DEBUG = false;
export const TARGET_NAME = 'default';
Expand Down
4 changes: 4 additions & 0 deletions cosSdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.1.5
- 完善部分xml序列化
- 修复xml序列化结尾空字符的问题

## 1.1.4
- 优化部分内存管理问题

Expand Down
2 changes: 1 addition & 1 deletion cosSdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
``` bash
"dependencies": {
...
"@tencentcloud/cos":"1.1.4"
"@tencentcloud/cos":"1.1.5"
}
```
2. SDK 需要网络权限,用于与 COS 服务器进行通信,请在应用模块下的 module.json5 中添加如下权限声明:
Expand Down
Binary file removed cosSdk/foundation114.har
Binary file not shown.
Binary file added cosSdk/foundation115.har
Binary file not shown.
4 changes: 2 additions & 2 deletions cosSdk/oh-package-lock.json5

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions cosSdk/oh-package.json5
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tencentcloud/cos",
"version": "1.1.4",
"version": "1.1.5",
"description": "Tencent cloud cos sdk",
"main": "Index.ets",
"keywords": ["对象存储", "COS", "腾讯云"],
Expand All @@ -9,7 +9,7 @@
"author": "Cos",
"license": "Apache-2.0",
"dependencies": {
"@tencentcloud/foundation": "file:./foundation114.har"
"@tencentcloud/foundation": "file:./foundation115.har"
// "@tencentcloud/foundation": "file:../foundation"
}
}
117 changes: 62 additions & 55 deletions cosSdk/src/main/ets/model/bucket/GetBucketObjectVersionsResult.ets
Original file line number Diff line number Diff line change
Expand Up @@ -73,55 +73,58 @@ export class ListVersionsResult {

public static initWithJson(json: object): ListVersionsResult {
let result = new ListVersionsResult();
result.encodingType = json['encodingType']
result.name = json['name']
result.prefix = json['prefix']
result.keyMarker = json['keyMarker']
result.versionIdMarker = json['versionIdMarker']
result.maxKeys = StringUtils.parseInt(json['maxKeys'])
result.isTruncated = StringUtils.parseBool(json['isTruncated'])
result.nextKeyMarker = json['nextKeyMarker']
result.nextVersionIdMarker = json['nextVersionIdMarker']
result.delimiter = json['delimiter']
if (json) {

let cPrefixes: object = json['commonPrefixes'];
let commonPrefixes = new List<CommonPrefixes>()
if (cPrefixes) {
if (Array.isArray(cPrefixes) || (cPrefixes instanceof List)) {
for (const item of cPrefixes as List<object>) {
commonPrefixes.add(CommonPrefixes.initWithJson(item));
result.encodingType = json['encodingType']
result.name = json['name']
result.prefix = json['prefix']
result.keyMarker = json['keyMarker']
result.versionIdMarker = json['versionIdMarker']
result.maxKeys = StringUtils.parseInt(json['maxKeys'])
result.isTruncated = StringUtils.parseBool(json['isTruncated'])
result.nextKeyMarker = json['nextKeyMarker']
result.nextVersionIdMarker = json['nextVersionIdMarker']
result.delimiter = json['delimiter']

let cPrefixes: object = json['commonPrefixes'];
let commonPrefixes = new List<CommonPrefixes>()
if (cPrefixes) {
if (Array.isArray(cPrefixes) || (cPrefixes instanceof List)) {
for (const item of cPrefixes as List<object>) {
commonPrefixes.add(CommonPrefixes.initWithJson(item));
}
} else {
commonPrefixes.add(CommonPrefixes.initWithJson(cPrefixes));
}
} else {
commonPrefixes.add(CommonPrefixes.initWithJson(cPrefixes));
}
}
result.commonPrefixes = commonPrefixes;
result.commonPrefixes = commonPrefixes;

let tVersion: object = json['version'];
let version = new List<Version>()
if (tVersion) {
if (Array.isArray(tVersion) || (tVersion instanceof List)) {
for (const item of tVersion as List<object>) {
version.add(Version.initWithJson(item));
let tVersion: object = json['version'];
let version = new List<Version>()
if (tVersion) {
if (Array.isArray(tVersion) || (tVersion instanceof List)) {
for (const item of tVersion as List<object>) {
version.add(Version.initWithJson(item));
}
} else {
version.add(Version.initWithJson(cPrefixes));
}
} else {
version.add(Version.initWithJson(cPrefixes));
}
}
result.version = version;
result.version = version;

let tDeleteMarker: object = json['deleteMarker'];
let deleteMarker = new List<DeleteMarker>()
if (tDeleteMarker) {
if (Array.isArray(tDeleteMarker) || (tDeleteMarker instanceof List)) {
for (const item of tDeleteMarker as List<object>) {
deleteMarker.add(DeleteMarker.initWithJson(item));
let tDeleteMarker: object = json['deleteMarker'];
let deleteMarker = new List<DeleteMarker>()
if (tDeleteMarker) {
if (Array.isArray(tDeleteMarker) || (tDeleteMarker instanceof List)) {
for (const item of tDeleteMarker as List<object>) {
deleteMarker.add(DeleteMarker.initWithJson(item));
}
} else {
deleteMarker.add(DeleteMarker.initWithJson(tDeleteMarker));
}
} else {
deleteMarker.add(DeleteMarker.initWithJson(tDeleteMarker));
}
result.deleteMarker = deleteMarker;
}
result.deleteMarker = deleteMarker;
return result;
}
}
Expand Down Expand Up @@ -170,16 +173,18 @@ export class Version {

public static initWithJson(json: object): Version {
let result = new Version();
result.key = json['key'];
result.versionId = json['versionId'];
result.isLatest = StringUtils.parseBool(json['isLatest']);
result.lastModified = json['lastModified'];
result.eTag = json['eTag'];
result.size = StringUtils.parseInt(json['size']);
result.storageClass = json['storageClass'];
result.storageTier = json['storageTier'];
if (json['owner']) {
result.owner = Owner.initWithJson(json['owner']);
if (json) {
result.key = json['key'];
result.versionId = json['versionId'];
result.isLatest = StringUtils.parseBool(json['isLatest']);
result.lastModified = json['lastModified'];
result.eTag = json['eTag'];
result.size = StringUtils.parseInt(json['size']);
result.storageClass = json['storageClass'];
result.storageTier = json['storageTier'];
if (json['owner']) {
result.owner = Owner.initWithJson(json['owner']);
}
}
return result;
}
Expand Down Expand Up @@ -209,12 +214,14 @@ export class DeleteMarker {

public static initWithJson(json: object): DeleteMarker {
let result = new DeleteMarker();
result.key = json['key'];
result.versionId = json['versionId'];
result.isLatest = StringUtils.parseBool(json['isLatest']);
result.lastModified = json['lastModified'];
if (json['owner']) {
result.owner = Owner.initWithJson(json['owner']);
if (json) {
result.key = json['key'];
result.versionId = json['versionId'];
result.isLatest = StringUtils.parseBool(json['isLatest']);
result.lastModified = json['lastModified'];
if (json['owner']) {
result.owner = Owner.initWithJson(json['owner']);
}
}
return result;
}
Expand Down
54 changes: 28 additions & 26 deletions cosSdk/src/main/ets/model/bucket/ListBucketsResult.ets
Original file line number Diff line number Diff line change
Expand Up @@ -42,32 +42,32 @@ export class ListBuckets {
public static initWithJson(json: object): ListBuckets {

let result = new ListBuckets();
if (json) {
let owner = Owner.initWithJson(json['owner']);
let buckets: object = json['buckets'];
if (buckets['bucket']) {
buckets = buckets['bucket'];
}
let isTruncated: boolean = StringUtils.parseBool(json['isTruncated']);
let marker: string = json['marker'];
let nextMarker: string = json['nextMarker'];
let listBuckets = new List<Bucket>();

let owner = Owner.initWithJson(json['owner']);
;
let buckets: object = json['buckets'];
if (buckets['bucket']) {
buckets = buckets['bucket'];
}
let isTruncated: boolean = StringUtils.parseBool(json['isTruncated']);
let marker: string = json['marker'];
let nextMarker: string = json['nextMarker'];
let listBuckets = new List<Bucket>();

if (buckets) {
if (Array.isArray(buckets) || (buckets instanceof List)) {
for (const item of buckets as List<object>) {
listBuckets.add(Bucket.initWithJson(item));
if (buckets) {
if (Array.isArray(buckets) || (buckets instanceof List)) {
for (const item of buckets as List<object>) {
listBuckets.add(Bucket.initWithJson(item));
}
} else {
listBuckets.add(Bucket.initWithJson(buckets));
}
} else {
listBuckets.add(Bucket.initWithJson(buckets));
}
result.buckets = listBuckets;
result.owner = owner;
result.marker = marker;
result.isTruncated = isTruncated;
result.nextMarker = nextMarker;
}
result.buckets = listBuckets;
result.owner = owner;
result.marker = marker;
result.isTruncated = isTruncated;
result.nextMarker = nextMarker;
return result;
}
}
Expand All @@ -80,10 +80,12 @@ export class Bucket {

public static initWithJson(json: object): Bucket {
let result = new Bucket();
result.name = json['name'];
result.location = json['location'];
result.creationDate = json['creationDate'];
result.bucketType = json['bucketType'];
if (json) {
result.name = json['name'];
result.location = json['location'];
result.creationDate = json['creationDate'];
result.bucketType = json['bucketType'];
}
return result;
}
}
37 changes: 19 additions & 18 deletions cosSdk/src/main/ets/model/object/CompleteMultiUploadResult.ets
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export class CompleteMultiUploadResult extends CosXmlResult {
super.contentParser(arrayBuffer);
if (arrayBuffer) {
let result = XmlUtils.xml2obj(StringUtils.arrayBuffer2String(arrayBuffer),true);
if (result) {
if (result && result["completeMultipartUploadResult"]) {
this.result = CompleteMultipartUploadResult.initWithJson(result["completeMultipartUploadResult"]);
}
}
Expand Down Expand Up @@ -42,26 +42,27 @@ export class CompleteMultipartUploadResult{

public static initWithJson(json:object):CompleteMultipartUploadResult{
let result = new CompleteMultipartUploadResult();
if (json) {
result.key = json['key'];
result.location = json['location'];
result.eTag = json['eTag'];

result.key = json['key'];
result.location = json['location'];
result.eTag = json['eTag'];

if (json['imageInfo']) {
result.imageInfo = ImageInfo.initWithJson(json['imageInfo']);
}
if (json['processResults']) {
let processResults : List<PicObject> = new List();
if (Array.isArray(json['processResults']) || json['processResults'] instanceof List) {
for (const item of json['processResults'] as List<object>) {
let item1 = PicObject.initWithJson(item);
processResults.add(item1);
if (json['imageInfo']) {
result.imageInfo = ImageInfo.initWithJson(json['imageInfo']);
}
if (json['processResults']) {
let processResults : List<PicObject> = new List();
if (Array.isArray(json['processResults']) || json['processResults'] instanceof List) {
for (const item of json['processResults'] as List<object>) {
let item1 = PicObject.initWithJson(item);
processResults.add(item1);
}
}else{
let picObj = PicObject.initWithJson(json['processResults']);
processResults.add(picObj)
}
}else{
let picObj = PicObject.initWithJson(json['processResults']);
processResults.add(picObj)
result.processResults = processResults;
}
result.processResults = processResults;
}
return result;
}
Expand Down
Loading

0 comments on commit b861d1e

Please sign in to comment.