Skip to content

Commit

Permalink
release 3.1.95 source code
Browse files Browse the repository at this point in the history
  • Loading branch information
Huaweicloud-SDK committed Jul 25, 2024
1 parent 355291d commit a73f0a8
Show file tree
Hide file tree
Showing 24 changed files with 1,278 additions and 73 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# 3.1.95 2024-07-25

### HuaweiCloud SDK OCR

- _Features_
- None
- _Bug Fix_
- None
- _Change_
- **RecognizeCambodianIdCard**
- changes of request param
- `+ detect_reproduce`
- changes of response param
- `+ result.detect_reproduce_result`
- `+ result.score_info.reproduce_score`

# 3.1.94 2024-07-18

### HuaweiCloud SDK CTS
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG_CN.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# 3.1.95 2024-07-25

### HuaweiCloud SDK OCR

- _新增特性_
-
- _解决问题_
-
- _特性变更_
- **RecognizeCambodianIdCard**
- 请求参数变更
- `+ detect_reproduce`
- 响应参数变更
- `+ result.detect_reproduce_result`
- `+ result.score_info.reproduce_score`

# 3.1.94 2024-07-18

### HuaweiCloud SDK CTS
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.94
3.1.95
4 changes: 4 additions & 0 deletions cfw/include/huaweicloud/cfw/v1/CfwRegion.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ class HUAWEICLOUD_CFW_V1_EXPORT CfwRegion {
{
"https://cfw.cn-north-11.myhuaweicloud.com"
});
regions["cn-south-2"] = Region("cn-south-2",
{
"https://cfw.cn-south-2.myhuaweicloud.com"
});
return regions;
}
private:
Expand Down
29 changes: 12 additions & 17 deletions live/include/huaweicloud/live/v2/LiveClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
#include <huaweicloud/live/v2/model/ListDomainTrafficSummaryResponse.h>
#include <huaweicloud/live/v2/model/ListHistoryStreamsRequest.h>
#include <huaweicloud/live/v2/model/ListHistoryStreamsResponse.h>
#include <huaweicloud/live/v2/model/ListPlayDomainStreamInfoRequest.h>
#include <huaweicloud/live/v2/model/ListPlayDomainStreamInfoResponse.h>
#include <huaweicloud/live/v2/model/ListQueryHttpCodeRequest.h>
#include <huaweicloud/live/v2/model/ListQueryHttpCodeResponse.h>
#include <huaweicloud/live/v2/model/ListRecordDataRequest.h>
Expand All @@ -36,10 +38,6 @@
#include <huaweicloud/live/v2/model/ShowUpBandwidthResponse.h>
#include <string>

#include <huaweicloud/live/v2/model/ListPlayDomainStreamInfoRequest.h>
#include <huaweicloud/live/v2/model/ListPlayDomainStreamInfoResponse.h>
#include <string>

#include <huaweicloud/live/v2/model/ListSingleStreamBitrateRequest.h>
#include <huaweicloud/live/v2/model/ListSingleStreamBitrateResponse.h>
#include <huaweicloud/live/v2/model/ListSingleStreamDetailRequest.h>
Expand Down Expand Up @@ -158,6 +156,16 @@ class HUAWEICLOUD_LIVE_V2_EXPORT LiveClient : public Client
std::shared_ptr<ListHistoryStreamsResponse> listHistoryStreams(
ListHistoryStreamsRequest &request
);
// 查询播放域名下的流数据
//
// 查询播放域名下的监控数据,根据输入时间点,返回查询该时间点所有流的带宽、在线人数、协议。
// 返回的数据粒度为1分钟。
// 最大查询周期7天,数据延迟5分钟。
//
// Please refer to HUAWEI cloud API Explorer for details.
std::shared_ptr<ListPlayDomainStreamInfoResponse> listPlayDomainStreamInfo(
ListPlayDomainStreamInfoRequest &request
);
// 查询直播拉流HTTP状态码接口
//
// 查询直播拉流HTTP状态码接口。 获取加速域名1分钟粒度的HTTP返回码 最大查询跨度不能超过24小时,最大查询周期7天。
Expand Down Expand Up @@ -224,19 +232,6 @@ class HUAWEICLOUD_LIVE_V2_EXPORT LiveClient : public Client
ShowUpBandwidthRequest &request
);

// 查询播放域名下的流数据
//
// 查询播放域名下的监控数据,根据输入时间点,返回查询该时间点所有流的带宽、在线人数、协议。
//
// 返回的数据粒度为1分钟。
//
// 最大查询周期7天,数据延迟5分钟。
//
// Please refer to HUAWEI cloud API Explorer for details.
std::shared_ptr<ListPlayDomainStreamInfoResponse> listPlayDomainStreamInfo(
ListPlayDomainStreamInfoRequest &request
);

// 查询推流码率数据接口
//
// 查询推流监控码率数据接口。
Expand Down
2 changes: 1 addition & 1 deletion live/include/huaweicloud/live/v2/LiveMeta.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class HUAWEICLOUD_LIVE_V2_EXPORT LiveMeta {
static HttpRequestDef genRequestDefForListDomainTrafficDetail();
static HttpRequestDef genRequestDefForListDomainTrafficSummary();
static HttpRequestDef genRequestDefForListHistoryStreams();
static HttpRequestDef genRequestDefForListPlayDomainStreamInfo();
static HttpRequestDef genRequestDefForListQueryHttpCode();
static HttpRequestDef genRequestDefForListRecordData();
static HttpRequestDef genRequestDefForListSnapshotData();
Expand All @@ -27,7 +28,6 @@ class HUAWEICLOUD_LIVE_V2_EXPORT LiveMeta {
static HttpRequestDef genRequestDefForShowStreamCount();
static HttpRequestDef genRequestDefForShowStreamPortrait();
static HttpRequestDef genRequestDefForShowUpBandwidth();
static HttpRequestDef genRequestDefForListPlayDomainStreamInfo();
static HttpRequestDef genRequestDefForListSingleStreamBitrate();
static HttpRequestDef genRequestDefForListSingleStreamDetail();
static HttpRequestDef genRequestDefForListSingleStreamFramerate();
Expand Down
72 changes: 36 additions & 36 deletions live/src/v2/LiveClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,42 @@ std::shared_ptr<ListHistoryStreamsResponse> LiveClient::listHistoryStreams(ListH

return localVarResult;
}
std::shared_ptr<ListPlayDomainStreamInfoResponse> LiveClient::listPlayDomainStreamInfo(ListPlayDomainStreamInfoRequest &request)
{
std::string localVarPath = "/v2/{project_id}/stats/stream/play-info";

std::map<std::string, std::string> localVarQueryParams;
std::map<std::string, std::string> localVarHeaderParams;
std::map<std::string, std::string> localVarFormParams;
std::map<std::string, std::string> localVarPathParams;

localVarPathParams["project_id"] = parameterToString(request.getProjectId());

bool isJson = false;
bool isMultiPart = false;
bool isBson = false;
std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson);
localVarHeaderParams["Content-Type"] = contentType;

if (request.playDomainsIsSet()) {
localVarQueryParams["play_domains"] = parameterToString(request.getPlayDomains());
}
if (request.timeIsSet()) {
localVarQueryParams["time"] = parameterToString(request.getTime());
}

std::string localVarHttpBody;

std::unique_ptr<HttpResponse> res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams,
localVarHeaderParams, localVarHttpBody, LiveMeta::genRequestDefForListPlayDomainStreamInfo());

std::shared_ptr<ListPlayDomainStreamInfoResponse> localVarResult = std::make_shared<ListPlayDomainStreamInfoResponse>();
localVarResult->setStatusCode(res->getStatusCode());
localVarResult->setHeaderParams(res->getHeaderParams());
localVarResult->setHttpBody(res->getHttpBody());

return localVarResult;
}
std::shared_ptr<ListQueryHttpCodeResponse> LiveClient::listQueryHttpCode(ListQueryHttpCodeRequest &request)
{
std::string localVarPath = "/v2/{project_id}/stats/httpcodes";
Expand Down Expand Up @@ -746,42 +782,6 @@ std::shared_ptr<ShowUpBandwidthResponse> LiveClient::showUpBandwidth(ShowUpBandw

return localVarResult;
}
std::shared_ptr<ListPlayDomainStreamInfoResponse> LiveClient::listPlayDomainStreamInfo(ListPlayDomainStreamInfoRequest &request)
{
std::string localVarPath = "/v2/{project_id}/stats/stream/play-info";

std::map<std::string, std::string> localVarQueryParams;
std::map<std::string, std::string> localVarHeaderParams;
std::map<std::string, std::string> localVarFormParams;
std::map<std::string, std::string> localVarPathParams;

localVarPathParams["project_id"] = parameterToString(request.getProjectId());

bool isJson = false;
bool isMultiPart = false;
bool isBson = false;
std::string contentType = getContentType("application/json", isJson, isMultiPart, isBson);
localVarHeaderParams["Content-Type"] = contentType;

if (request.playDomainsIsSet()) {
localVarQueryParams["play_domains"] = parameterToString(request.getPlayDomains());
}
if (request.timeIsSet()) {
localVarQueryParams["time"] = parameterToString(request.getTime());
}

std::string localVarHttpBody;

std::unique_ptr<HttpResponse> res = callApi("GET", localVarPath, localVarPathParams, localVarQueryParams,
localVarHeaderParams, localVarHttpBody, LiveMeta::genRequestDefForListPlayDomainStreamInfo());

std::shared_ptr<ListPlayDomainStreamInfoResponse> localVarResult = std::make_shared<ListPlayDomainStreamInfoResponse>();
localVarResult->setStatusCode(res->getStatusCode());
localVarResult->setHeaderParams(res->getHeaderParams());
localVarResult->setHttpBody(res->getHttpBody());

return localVarResult;
}
std::shared_ptr<ListSingleStreamBitrateResponse> LiveClient::listSingleStreamBitrate(ListSingleStreamBitrateRequest &request)
{
std::string localVarPath = "/v2/{project_id}/stats/stream/bitrate";
Expand Down
32 changes: 16 additions & 16 deletions live/src/v2/LiveMeta.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,22 @@ HttpRequestDef LiveMeta::genRequestDefForListHistoryStreams() {
return reqDefBuilder;
}

HttpRequestDef LiveMeta::genRequestDefForListPlayDomainStreamInfo() {
HttpRequestDef reqDefBuilder;
reqDefBuilder.withRequestField(FieldDef().withName("PlayDomains")
.withJsonTag("play_domains")
.withLocationType(Query_));
reqDefBuilder.withRequestField(FieldDef().withName("Time")
.withJsonTag("time")
.withLocationType(Query_));
reqDefBuilder.withResponseField(FieldDef().
withName("xRequestId").
withJsonTag("X-Request-Id").
withKindName("std::string").
withLocationType(Header_));
return reqDefBuilder;
}

HttpRequestDef LiveMeta::genRequestDefForListQueryHttpCode() {
HttpRequestDef reqDefBuilder;
reqDefBuilder.withRequestField(FieldDef().withName("PlayDomains")
Expand Down Expand Up @@ -442,22 +458,6 @@ HttpRequestDef LiveMeta::genRequestDefForShowUpBandwidth() {
return reqDefBuilder;
}

HttpRequestDef LiveMeta::genRequestDefForListPlayDomainStreamInfo() {
HttpRequestDef reqDefBuilder;
reqDefBuilder.withRequestField(FieldDef().withName("PlayDomains")
.withJsonTag("play_domains")
.withLocationType(Query_));
reqDefBuilder.withRequestField(FieldDef().withName("Time")
.withJsonTag("time")
.withLocationType(Query_));
reqDefBuilder.withResponseField(FieldDef().
withName("xRequestId").
withJsonTag("X-Request-Id").
withKindName("std::string").
withLocationType(Header_));
return reqDefBuilder;
}

HttpRequestDef LiveMeta::genRequestDefForListSingleStreamBitrate() {
HttpRequestDef reqDefBuilder;
reqDefBuilder.withRequestField(FieldDef().withName("Domain")
Expand Down
11 changes: 11 additions & 0 deletions ocr/include/huaweicloud/ocr/v1/model/CambodianIdCardRequestBody.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,15 @@ class HUAWEICLOUD_OCR_V1_EXPORT CambodianIdCardRequestBody
void unsetdetectTampering();
void setDetectTampering(bool value);

/// <summary>
/// 返回判断身份证图像是否经过翻拍告警的开关,可选值如下所示 - true:打开判断身份证图像是否经过翻拍告警的功能 - false:关闭判断身份证图像是否经过翻拍告警的功能
/// </summary>

bool isDetectReproduce() const;
bool detectReproduceIsSet() const;
void unsetdetectReproduce();
void setDetectReproduce(bool value);


protected:
std::string image_;
Expand All @@ -161,6 +170,8 @@ class HUAWEICLOUD_OCR_V1_EXPORT CambodianIdCardRequestBody
bool returnAdjustedImageIsSet_;
bool detectTampering_;
bool detectTamperingIsSet_;
bool detectReproduce_;
bool detectReproduceIsSet_;

};

Expand Down
11 changes: 11 additions & 0 deletions ocr/include/huaweicloud/ocr/v1/model/CambodianIdCardResult.h
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,15 @@ class HUAWEICLOUD_OCR_V1_EXPORT CambodianIdCardResult
void unsetdetectTamperingResult();
void setDetectTamperingResult(bool value);

/// <summary>
/// 身份证是否经过翻拍的告警结果,“true”表示身份证经过翻拍,“false”表示身份证未经过翻拍。仅在输入参数detect_reproduce为true时,返回该字段。
/// </summary>

bool isDetectReproduceResult() const;
bool detectReproduceResultIsSet() const;
void unsetdetectReproduceResult();
void setDetectReproduceResult(bool value);

/// <summary>
///
/// </summary>
Expand Down Expand Up @@ -314,6 +323,8 @@ class HUAWEICLOUD_OCR_V1_EXPORT CambodianIdCardResult
bool detectGlareResultIsSet_;
bool detectTamperingResult_;
bool detectTamperingResultIsSet_;
bool detectReproduceResult_;
bool detectReproduceResultIsSet_;
CambodianIdCardScoreInformationResult scoreInfo_;
bool scoreInfoIsSet_;
Object confidence_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,15 @@ class HUAWEICLOUD_OCR_V1_EXPORT CambodianIdCardScoreInformationResult
void unsettamperingScore();
void setTamperingScore(int32_t value);

/// <summary>
/// 告警分数,字段取值范围[0, 99]值大于50表示身份证经过翻拍,小于50表示身份证未经过翻拍,值越靠近99,表示身份证图像被翻拍过的可能性越大,值越靠近0,表示身份证图像未被翻拍的可能性越大。 仅在传入参数detect_reproduce为true时,返回该字段。
/// </summary>

int32_t getReproduceScore() const;
bool reproduceScoreIsSet() const;
void unsetreproduceScore();
void setReproduceScore(int32_t value);


protected:
int32_t idcardTypeScore_;
Expand All @@ -105,6 +114,8 @@ class HUAWEICLOUD_OCR_V1_EXPORT CambodianIdCardScoreInformationResult
bool glareScoreIsSet_;
int32_t tamperingScore_;
bool tamperingScoreIsSet_;
int32_t reproduceScore_;
bool reproduceScoreIsSet_;

};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class HUAWEICLOUD_OCR_V1_EXPORT TransportationLicenseResult
void setIssuingAuthority(const std::string& value);

/// <summary>
/// 签发日期(非必有,依赖对应运输证板式)。
/// 发证日期(非必有,依赖对应运输证板式)。
/// </summary>

std::string getIssueDate() const;
Expand Down Expand Up @@ -139,7 +139,7 @@ class HUAWEICLOUD_OCR_V1_EXPORT TransportationLicenseResult
void setBusinessCertificate(const std::string& value);

/// <summary>
/// 道路普通货物运输(非必有,依赖对应运输证板式)。
/// 经营范围(非必有,依赖对应运输证板式)。
/// </summary>

std::string getBusinessScope() const;
Expand Down
Loading

0 comments on commit a73f0a8

Please sign in to comment.