upgrade sdk core:

supported json param;
change the way of include Utils.h;
This commit is contained in:
wb-hx510875
2019-08-14 11:13:26 +08:00
parent 090cb08688
commit 08faebee0d
17 changed files with 657 additions and 460 deletions

View File

@@ -1,50 +1,49 @@
/*
* Copyright 1999-2019 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
* Copyright 1999-2019 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/core/Utils.h>
#include <alibabacloud/core/sts/model/AssumeRoleResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Sts;
using namespace AlibabaCloud::Sts::Model;
AssumeRoleResult::AssumeRoleResult() :
ServiceResult(),
assumedRoleUser_(),
credentials_() {
}
AssumeRoleResult::AssumeRoleResult()
: ServiceResult(), assumedRoleUser_(), credentials_() {}
AssumeRoleResult::AssumeRoleResult(const std::string & payload) :
ServiceResult(),
assumedRoleUser_(),
credentials_() {
AssumeRoleResult::AssumeRoleResult(const std::string &payload)
: ServiceResult(), assumedRoleUser_(), credentials_()
{
parse(payload);
}
AssumeRoleResult::~AssumeRoleResult() {
}
AssumeRoleResult::~AssumeRoleResult() {}
AssumeRoleResult::AssumedRoleUser AssumeRoleResult::assumedRoleUser() const {
AssumeRoleResult::AssumedRoleUser AssumeRoleResult::assumedRoleUser() const
{
return assumedRoleUser_;
}
AssumeRoleResult::Credentials AssumeRoleResult::credentials() const {
AssumeRoleResult::Credentials AssumeRoleResult::credentials() const
{
return credentials_;
}
void AssumeRoleResult::parse(const std::string & payload) {
void AssumeRoleResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
@@ -53,7 +52,7 @@ void AssumeRoleResult::parse(const std::string & payload) {
auto assumedRoleUserNode = value["AssumedRoleUser"];
assumedRoleUser_.assumedRoleId =
assumedRoleUserNode["AssumedRoleId"].asString();
assumedRoleUserNode["AssumedRoleId"].asString();
assumedRoleUser_.arn = assumedRoleUserNode["Arn"].asString();
auto credentialsNode = value["Credentials"];

View File

@@ -1,19 +1,20 @@
/*
* Copyright 1999-2019 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
* Copyright 1999-2019 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/core/Utils.h>
#include <alibabacloud/core/sts/model/GetCallerIdentityResult.h>
#include <json/json.h>
@@ -21,37 +22,23 @@ using namespace AlibabaCloud;
using namespace AlibabaCloud::Sts;
using namespace AlibabaCloud::Sts::Model;
GetCallerIdentityResult::GetCallerIdentityResult() :
ServiceResult(),
accountId_(),
arn_(),
userId_() {
}
GetCallerIdentityResult::GetCallerIdentityResult()
: ServiceResult(), accountId_(), arn_(), userId_() {}
GetCallerIdentityResult::GetCallerIdentityResult(const std::string & payload) :
ServiceResult(),
accountId_(),
arn_(),
userId_() {
GetCallerIdentityResult::GetCallerIdentityResult(const std::string &payload)
: ServiceResult(), accountId_(), arn_(), userId_() {
parse(payload);
}
GetCallerIdentityResult::~GetCallerIdentityResult() {
}
GetCallerIdentityResult::~GetCallerIdentityResult() {}
std::string GetCallerIdentityResult::accountId() {
return accountId_;
}
std::string GetCallerIdentityResult::accountId() { return accountId_; }
std::string GetCallerIdentityResult::arn() const {
return arn_;
}
std::string GetCallerIdentityResult::arn() const { return arn_; }
std::string GetCallerIdentityResult::userId() const {
return userId_;
}
std::string GetCallerIdentityResult::userId() const { return userId_; }
void GetCallerIdentityResult::parse(const std::string & payload) {
void GetCallerIdentityResult::parse(const std::string &payload) {
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);