Support better trace logging for error locating.
This commit is contained in:
@@ -32,20 +32,22 @@ public:
|
||||
~DescribePhoneNumberAnalysisRequest();
|
||||
long getResourceOwnerId() const;
|
||||
void setResourceOwnerId(long resourceOwnerId);
|
||||
std::string getExtendFunction() const;
|
||||
void setExtendFunction(const std::string &extendFunction);
|
||||
std::string getAccessKeyId() const;
|
||||
void setAccessKeyId(const std::string &accessKeyId);
|
||||
long getRate() const;
|
||||
void setRate(long rate);
|
||||
std::string getRouteName() const;
|
||||
void setRouteName(const std::string &routeName);
|
||||
std::string getMask() const;
|
||||
void setMask(const std::string &mask);
|
||||
std::string getOfferType() const;
|
||||
void setOfferType(const std::string &offerType);
|
||||
std::string getResourceOwnerAccount() const;
|
||||
void setResourceOwnerAccount(const std::string &resourceOwnerAccount);
|
||||
long getOwnerId() const;
|
||||
void setOwnerId(long ownerId);
|
||||
int getNumberType() const;
|
||||
void setNumberType(int numberType);
|
||||
long getNumberType() const;
|
||||
void setNumberType(long numberType);
|
||||
std::string getAuthCode() const;
|
||||
void setAuthCode(const std::string &authCode);
|
||||
std::string getInputNumber() const;
|
||||
@@ -53,13 +55,14 @@ public:
|
||||
|
||||
private:
|
||||
long resourceOwnerId_;
|
||||
std::string extendFunction_;
|
||||
std::string accessKeyId_;
|
||||
long rate_;
|
||||
std::string routeName_;
|
||||
std::string mask_;
|
||||
std::string offerType_;
|
||||
std::string resourceOwnerAccount_;
|
||||
long ownerId_;
|
||||
int numberType_;
|
||||
long numberType_;
|
||||
std::string authCode_;
|
||||
std::string inputNumber_;
|
||||
};
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace AlibabaCloud
|
||||
class ALIBABACLOUD_DYTNSAPI_EXPORT DescribePhoneNumberAnalysisResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct DataList
|
||||
struct Data
|
||||
{
|
||||
std::string number;
|
||||
std::string code;
|
||||
@@ -43,14 +43,14 @@ namespace AlibabaCloud
|
||||
explicit DescribePhoneNumberAnalysisResult(const std::string &payload);
|
||||
~DescribePhoneNumberAnalysisResult();
|
||||
std::string getMessage()const;
|
||||
std::vector<DataList> getData()const;
|
||||
Data getData()const;
|
||||
std::string getCode()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
std::vector<DataList> data_;
|
||||
Data data_;
|
||||
std::string code_;
|
||||
|
||||
};
|
||||
|
||||
@@ -34,6 +34,15 @@ void DescribePhoneNumberAnalysisRequest::setResourceOwnerId(long resourceOwnerId
|
||||
setParameter(std::string("ResourceOwnerId"), std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string DescribePhoneNumberAnalysisRequest::getExtendFunction() const {
|
||||
return extendFunction_;
|
||||
}
|
||||
|
||||
void DescribePhoneNumberAnalysisRequest::setExtendFunction(const std::string &extendFunction) {
|
||||
extendFunction_ = extendFunction;
|
||||
setParameter(std::string("ExtendFunction"), extendFunction);
|
||||
}
|
||||
|
||||
std::string DescribePhoneNumberAnalysisRequest::getAccessKeyId() const {
|
||||
return accessKeyId_;
|
||||
}
|
||||
@@ -52,6 +61,15 @@ void DescribePhoneNumberAnalysisRequest::setRate(long rate) {
|
||||
setParameter(std::string("Rate"), std::to_string(rate));
|
||||
}
|
||||
|
||||
std::string DescribePhoneNumberAnalysisRequest::getRouteName() const {
|
||||
return routeName_;
|
||||
}
|
||||
|
||||
void DescribePhoneNumberAnalysisRequest::setRouteName(const std::string &routeName) {
|
||||
routeName_ = routeName;
|
||||
setParameter(std::string("RouteName"), routeName);
|
||||
}
|
||||
|
||||
std::string DescribePhoneNumberAnalysisRequest::getMask() const {
|
||||
return mask_;
|
||||
}
|
||||
@@ -61,15 +79,6 @@ void DescribePhoneNumberAnalysisRequest::setMask(const std::string &mask) {
|
||||
setParameter(std::string("Mask"), mask);
|
||||
}
|
||||
|
||||
std::string DescribePhoneNumberAnalysisRequest::getOfferType() const {
|
||||
return offerType_;
|
||||
}
|
||||
|
||||
void DescribePhoneNumberAnalysisRequest::setOfferType(const std::string &offerType) {
|
||||
offerType_ = offerType;
|
||||
setParameter(std::string("OfferType"), offerType);
|
||||
}
|
||||
|
||||
std::string DescribePhoneNumberAnalysisRequest::getResourceOwnerAccount() const {
|
||||
return resourceOwnerAccount_;
|
||||
}
|
||||
@@ -88,11 +97,11 @@ void DescribePhoneNumberAnalysisRequest::setOwnerId(long ownerId) {
|
||||
setParameter(std::string("OwnerId"), std::to_string(ownerId));
|
||||
}
|
||||
|
||||
int DescribePhoneNumberAnalysisRequest::getNumberType() const {
|
||||
long DescribePhoneNumberAnalysisRequest::getNumberType() const {
|
||||
return numberType_;
|
||||
}
|
||||
|
||||
void DescribePhoneNumberAnalysisRequest::setNumberType(int numberType) {
|
||||
void DescribePhoneNumberAnalysisRequest::setNumberType(long numberType) {
|
||||
numberType_ = numberType;
|
||||
setParameter(std::string("NumberType"), std::to_string(numberType));
|
||||
}
|
||||
|
||||
@@ -39,20 +39,15 @@ void DescribePhoneNumberAnalysisResult::parse(const std::string &payload)
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allDataNode = value["Data"]["DataList"];
|
||||
for (auto valueDataDataList : allDataNode)
|
||||
{
|
||||
DataList dataObject;
|
||||
if(!valueDataDataList["Code"].isNull())
|
||||
dataObject.code = valueDataDataList["Code"].asString();
|
||||
if(!valueDataDataList["Number"].isNull())
|
||||
dataObject.number = valueDataDataList["Number"].asString();
|
||||
data_.push_back(dataObject);
|
||||
}
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["Number"].isNull())
|
||||
data_.number = dataNode["Number"].asString();
|
||||
if(!dataNode["Code"].isNull())
|
||||
data_.code = dataNode["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
|
||||
}
|
||||
|
||||
@@ -61,7 +56,7 @@ std::string DescribePhoneNumberAnalysisResult::getMessage()const
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::vector<DescribePhoneNumberAnalysisResult::DataList> DescribePhoneNumberAnalysisResult::getData()const
|
||||
DescribePhoneNumberAnalysisResult::Data DescribePhoneNumberAnalysisResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user