Browse Source

Publish AssumeRole API With ExternalId Parameter.

sdk-team 3 năm trước cách đây
mục cha
commit
e54d97e987

+ 1 - 1
VERSION

@@ -1 +1 @@
-1.36.1479
+1.36.1480

+ 43 - 46
sts/include/alibabacloud/sts/model/AssumeRoleRequest.h

@@ -1,57 +1,54 @@
 /*
  * Copyright 2009-2017 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.
- */
-
-#ifndef ALIBABACLOUD_STS_MODEL_ASSUMEROLEREQUEST_H_
-#define ALIBABACLOUD_STS_MODEL_ASSUMEROLEREQUEST_H_
-
-#include <string>
-#include <vector>
-#include <alibabacloud/core/RpcServiceRequest.h>
-#include <alibabacloud/sts/StsExport.h>
-
-namespace AlibabaCloud
-{
-	namespace Sts
-	{
-		namespace Model
-		{
-			class ALIBABACLOUD_STS_EXPORT AssumeRoleRequest : public RpcServiceRequest
-			{
-
-			public:
-				AssumeRoleRequest();
-				~AssumeRoleRequest();
-
-				std::string getRoleSessionName()const;
-				void setRoleSessionName(const std::string& roleSessionName);
-				std::string getPolicy()const;
-				void setPolicy(const std::string& policy);
-				std::string getRoleArn()const;
-				void setRoleArn(const std::string& roleArn);
-				long getDurationSeconds()const;
-				void setDurationSeconds(long durationSeconds);
-
-            private:
-				std::string roleSessionName_;
-				std::string policy_;
-				std::string roleArn_;
-				long durationSeconds_;
-
-			};
-		}
-	}
-}
-#endif // !ALIBABACLOUD_STS_MODEL_ASSUMEROLEREQUEST_H_
+ */
+
+#ifndef ALIBABACLOUD_STS_MODEL_ASSUMEROLEREQUEST_H_
+#define ALIBABACLOUD_STS_MODEL_ASSUMEROLEREQUEST_H_
+
+#include <alibabacloud/sts/StsExport.h>
+#include <alibabacloud/core/RpcServiceRequest.h>
+#include <string>
+#include <vector>
+#include <map>
+
+namespace AlibabaCloud {
+namespace Sts {
+namespace Model {
+class ALIBABACLOUD_STS_EXPORT AssumeRoleRequest : public RpcServiceRequest {
+public:
+	AssumeRoleRequest();
+	~AssumeRoleRequest();
+	std::string getExternalId() const;
+	void setExternalId(const std::string &externalId);
+	std::string getRoleSessionName() const;
+	void setRoleSessionName(const std::string &roleSessionName);
+	std::string getPolicy() const;
+	void setPolicy(const std::string &policy);
+	std::string getRoleArn() const;
+	void setRoleArn(const std::string &roleArn);
+	long getDurationSeconds() const;
+	void setDurationSeconds(long durationSeconds);
+
+private:
+	std::string externalId_;
+	std::string roleSessionName_;
+	std::string policy_;
+	std::string roleArn_;
+	long durationSeconds_;
+};
+} // namespace Model
+} // namespace Sts
+} // namespace AlibabaCloud
+#endif // !ALIBABACLOUD_STS_MODEL_ASSUMEROLEREQUEST_H_

+ 46 - 52
sts/include/alibabacloud/sts/model/AssumeRoleWithOIDCRequest.h

@@ -1,63 +1,57 @@
 /*
  * Copyright 2009-2017 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.
- */
-
-#ifndef ALIBABACLOUD_STS_MODEL_ASSUMEROLEWITHOIDCREQUEST_H_
-#define ALIBABACLOUD_STS_MODEL_ASSUMEROLEWITHOIDCREQUEST_H_
-
-#include <string>
-#include <vector>
-#include <alibabacloud/core/RpcServiceRequest.h>
-#include <alibabacloud/sts/StsExport.h>
-
-namespace AlibabaCloud
-{
-	namespace Sts
-	{
-		namespace Model
-		{
-			class ALIBABACLOUD_STS_EXPORT AssumeRoleWithOIDCRequest : public RpcServiceRequest
-			{
-
-			public:
-				AssumeRoleWithOIDCRequest();
-				~AssumeRoleWithOIDCRequest();
-
-				std::string getRoleArn()const;
-				void setRoleArn(const std::string& roleArn);
-				std::string getRoleSessionName()const;
-				void setRoleSessionName(const std::string& roleSessionName);
-				std::string getOIDCToken()const;
-				void setOIDCToken(const std::string& oIDCToken);
-				long getDurationSeconds()const;
-				void setDurationSeconds(long durationSeconds);
-				std::string getOIDCProviderArn()const;
-				void setOIDCProviderArn(const std::string& oIDCProviderArn);
-				std::string getPolicy()const;
-				void setPolicy(const std::string& policy);
-
-            private:
-				std::string roleArn_;
-				std::string roleSessionName_;
-				std::string oIDCToken_;
-				long durationSeconds_;
-				std::string oIDCProviderArn_;
-				std::string policy_;
-
-			};
-		}
-	}
-}
-#endif // !ALIBABACLOUD_STS_MODEL_ASSUMEROLEWITHOIDCREQUEST_H_
+ */
+
+#ifndef ALIBABACLOUD_STS_MODEL_ASSUMEROLEWITHOIDCREQUEST_H_
+#define ALIBABACLOUD_STS_MODEL_ASSUMEROLEWITHOIDCREQUEST_H_
+
+#include <alibabacloud/sts/StsExport.h>
+#include <alibabacloud/core/RpcServiceRequest.h>
+#include <string>
+#include <vector>
+#include <map>
+
+namespace AlibabaCloud {
+namespace Sts {
+namespace Model {
+class ALIBABACLOUD_STS_EXPORT AssumeRoleWithOIDCRequest : public RpcServiceRequest {
+public:
+	AssumeRoleWithOIDCRequest();
+	~AssumeRoleWithOIDCRequest();
+	std::string getRoleArn() const;
+	void setRoleArn(const std::string &roleArn);
+	std::string getRoleSessionName() const;
+	void setRoleSessionName(const std::string &roleSessionName);
+	std::string getOIDCToken() const;
+	void setOIDCToken(const std::string &oIDCToken);
+	long getDurationSeconds() const;
+	void setDurationSeconds(long durationSeconds);
+	std::string getOIDCProviderArn() const;
+	void setOIDCProviderArn(const std::string &oIDCProviderArn);
+	std::string getPolicy() const;
+	void setPolicy(const std::string &policy);
+
+private:
+	std::string roleArn_;
+	std::string roleSessionName_;
+	std::string oIDCToken_;
+	long durationSeconds_;
+	std::string oIDCProviderArn_;
+	std::string policy_;
+};
+} // namespace Model
+} // namespace Sts
+} // namespace AlibabaCloud
+#endif // !ALIBABACLOUD_STS_MODEL_ASSUMEROLEWITHOIDCREQUEST_H_

+ 43 - 49
sts/include/alibabacloud/sts/model/AssumeRoleWithSAMLRequest.h

@@ -1,60 +1,54 @@
 /*
  * Copyright 2009-2017 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.
- */
-
-#ifndef ALIBABACLOUD_STS_MODEL_ASSUMEROLEWITHSAMLREQUEST_H_
-#define ALIBABACLOUD_STS_MODEL_ASSUMEROLEWITHSAMLREQUEST_H_
-
-#include <string>
-#include <vector>
-#include <alibabacloud/core/RpcServiceRequest.h>
-#include <alibabacloud/sts/StsExport.h>
-
-namespace AlibabaCloud
-{
-	namespace Sts
-	{
-		namespace Model
-		{
-			class ALIBABACLOUD_STS_EXPORT AssumeRoleWithSAMLRequest : public RpcServiceRequest
-			{
-
-			public:
-				AssumeRoleWithSAMLRequest();
-				~AssumeRoleWithSAMLRequest();
-
-				std::string getSAMLAssertion()const;
-				void setSAMLAssertion(const std::string& sAMLAssertion);
-				std::string getRoleArn()const;
-				void setRoleArn(const std::string& roleArn);
-				std::string getSAMLProviderArn()const;
-				void setSAMLProviderArn(const std::string& sAMLProviderArn);
-				long getDurationSeconds()const;
-				void setDurationSeconds(long durationSeconds);
-				std::string getPolicy()const;
-				void setPolicy(const std::string& policy);
-
-            private:
-				std::string sAMLAssertion_;
-				std::string roleArn_;
-				std::string sAMLProviderArn_;
-				long durationSeconds_;
-				std::string policy_;
-
-			};
-		}
-	}
-}
-#endif // !ALIBABACLOUD_STS_MODEL_ASSUMEROLEWITHSAMLREQUEST_H_
+ */
+
+#ifndef ALIBABACLOUD_STS_MODEL_ASSUMEROLEWITHSAMLREQUEST_H_
+#define ALIBABACLOUD_STS_MODEL_ASSUMEROLEWITHSAMLREQUEST_H_
+
+#include <alibabacloud/sts/StsExport.h>
+#include <alibabacloud/core/RpcServiceRequest.h>
+#include <string>
+#include <vector>
+#include <map>
+
+namespace AlibabaCloud {
+namespace Sts {
+namespace Model {
+class ALIBABACLOUD_STS_EXPORT AssumeRoleWithSAMLRequest : public RpcServiceRequest {
+public:
+	AssumeRoleWithSAMLRequest();
+	~AssumeRoleWithSAMLRequest();
+	std::string getSAMLAssertion() const;
+	void setSAMLAssertion(const std::string &sAMLAssertion);
+	std::string getRoleArn() const;
+	void setRoleArn(const std::string &roleArn);
+	std::string getSAMLProviderArn() const;
+	void setSAMLProviderArn(const std::string &sAMLProviderArn);
+	long getDurationSeconds() const;
+	void setDurationSeconds(long durationSeconds);
+	std::string getPolicy() const;
+	void setPolicy(const std::string &policy);
+
+private:
+	std::string sAMLAssertion_;
+	std::string roleArn_;
+	std::string sAMLProviderArn_;
+	long durationSeconds_;
+	std::string policy_;
+};
+} // namespace Model
+} // namespace Sts
+} // namespace AlibabaCloud
+#endif // !ALIBABACLOUD_STS_MODEL_ASSUMEROLEWITHSAMLREQUEST_H_

+ 28 - 34
sts/include/alibabacloud/sts/model/GetCallerIdentityRequest.h

@@ -1,45 +1,39 @@
 /*
  * Copyright 2009-2017 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.
- */
-
-#ifndef ALIBABACLOUD_STS_MODEL_GETCALLERIDENTITYREQUEST_H_
-#define ALIBABACLOUD_STS_MODEL_GETCALLERIDENTITYREQUEST_H_
-
-#include <string>
-#include <vector>
-#include <alibabacloud/core/RpcServiceRequest.h>
-#include <alibabacloud/sts/StsExport.h>
-
-namespace AlibabaCloud
-{
-	namespace Sts
-	{
-		namespace Model
-		{
-			class ALIBABACLOUD_STS_EXPORT GetCallerIdentityRequest : public RpcServiceRequest
-			{
-
-			public:
-				GetCallerIdentityRequest();
-				~GetCallerIdentityRequest();
-
-
-            private:
-
-			};
-		}
-	}
-}
-#endif // !ALIBABACLOUD_STS_MODEL_GETCALLERIDENTITYREQUEST_H_
+ */
+
+#ifndef ALIBABACLOUD_STS_MODEL_GETCALLERIDENTITYREQUEST_H_
+#define ALIBABACLOUD_STS_MODEL_GETCALLERIDENTITYREQUEST_H_
+
+#include <alibabacloud/sts/StsExport.h>
+#include <alibabacloud/core/RpcServiceRequest.h>
+#include <string>
+#include <vector>
+#include <map>
+
+namespace AlibabaCloud {
+namespace Sts {
+namespace Model {
+class ALIBABACLOUD_STS_EXPORT GetCallerIdentityRequest : public RpcServiceRequest {
+public:
+	GetCallerIdentityRequest();
+	~GetCallerIdentityRequest();
+
+private:
+};
+} // namespace Model
+} // namespace Sts
+} // namespace AlibabaCloud
+#endif // !ALIBABACLOUD_STS_MODEL_GETCALLERIDENTITYREQUEST_H_

+ 45 - 46
sts/src/model/AssumeRoleRequest.cc

@@ -1,73 +1,72 @@
 /*
  * Copyright 2009-2017 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/sts/model/AssumeRoleRequest.h>
-
-using AlibabaCloud::Sts::Model::AssumeRoleRequest;
-
-AssumeRoleRequest::AssumeRoleRequest() :
-	RpcServiceRequest("sts", "2015-04-01", "AssumeRole")
-{
-	setMethod(HttpRequest::Method::Post);
-}
-
-AssumeRoleRequest::~AssumeRoleRequest()
-{}
-
-std::string AssumeRoleRequest::getRoleSessionName()const
-{
-	return roleSessionName_;
+ */
+
+#include <alibabacloud/sts/model/AssumeRoleRequest.h>
+
+using AlibabaCloud::Sts::Model::AssumeRoleRequest;
+
+AssumeRoleRequest::AssumeRoleRequest()
+    : RpcServiceRequest("sts", "2015-04-01", "AssumeRole") {
+  setMethod(HttpRequest::Method::Post);
+}
+
+AssumeRoleRequest::~AssumeRoleRequest() {}
+
+std::string AssumeRoleRequest::getExternalId() const {
+  return externalId_;
+}
+
+void AssumeRoleRequest::setExternalId(const std::string &externalId) {
+  externalId_ = externalId;
+  setParameter(std::string("ExternalId"), externalId);
+}
+
+std::string AssumeRoleRequest::getRoleSessionName() const {
+  return roleSessionName_;
 }
 
-void AssumeRoleRequest::setRoleSessionName(const std::string& roleSessionName)
-{
-	roleSessionName_ = roleSessionName;
-	setParameter("RoleSessionName", roleSessionName);
+void AssumeRoleRequest::setRoleSessionName(const std::string &roleSessionName) {
+  roleSessionName_ = roleSessionName;
+  setParameter(std::string("RoleSessionName"), roleSessionName);
 }
 
-std::string AssumeRoleRequest::getPolicy()const
-{
-	return policy_;
+std::string AssumeRoleRequest::getPolicy() const {
+  return policy_;
 }
 
-void AssumeRoleRequest::setPolicy(const std::string& policy)
-{
-	policy_ = policy;
-	setParameter("Policy", policy);
+void AssumeRoleRequest::setPolicy(const std::string &policy) {
+  policy_ = policy;
+  setParameter(std::string("Policy"), policy);
 }
 
-std::string AssumeRoleRequest::getRoleArn()const
-{
-	return roleArn_;
+std::string AssumeRoleRequest::getRoleArn() const {
+  return roleArn_;
 }
 
-void AssumeRoleRequest::setRoleArn(const std::string& roleArn)
-{
-	roleArn_ = roleArn;
-	setParameter("RoleArn", roleArn);
+void AssumeRoleRequest::setRoleArn(const std::string &roleArn) {
+  roleArn_ = roleArn;
+  setParameter(std::string("RoleArn"), roleArn);
 }
 
-long AssumeRoleRequest::getDurationSeconds()const
-{
-	return durationSeconds_;
+long AssumeRoleRequest::getDurationSeconds() const {
+  return durationSeconds_;
 }
 
-void AssumeRoleRequest::setDurationSeconds(long durationSeconds)
-{
-	durationSeconds_ = durationSeconds;
-	setParameter("DurationSeconds", std::to_string(durationSeconds));
+void AssumeRoleRequest::setDurationSeconds(long durationSeconds) {
+  durationSeconds_ = durationSeconds;
+  setParameter(std::string("DurationSeconds"), std::to_string(durationSeconds));
 }
 

+ 46 - 60
sts/src/model/AssumeRoleWithOIDCRequest.cc

@@ -1,95 +1,81 @@
 /*
  * Copyright 2009-2017 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/sts/model/AssumeRoleWithOIDCRequest.h>
-
-using AlibabaCloud::Sts::Model::AssumeRoleWithOIDCRequest;
-
-AssumeRoleWithOIDCRequest::AssumeRoleWithOIDCRequest() :
-	RpcServiceRequest("sts", "2015-04-01", "AssumeRoleWithOIDC")
-{
-	setMethod(HttpRequest::Method::Post);
-}
-
-AssumeRoleWithOIDCRequest::~AssumeRoleWithOIDCRequest()
-{}
-
-std::string AssumeRoleWithOIDCRequest::getRoleArn()const
-{
-	return roleArn_;
+ */
+
+#include <alibabacloud/sts/model/AssumeRoleWithOIDCRequest.h>
+
+using AlibabaCloud::Sts::Model::AssumeRoleWithOIDCRequest;
+
+AssumeRoleWithOIDCRequest::AssumeRoleWithOIDCRequest()
+    : RpcServiceRequest("sts", "2015-04-01", "AssumeRoleWithOIDC") {
+  setMethod(HttpRequest::Method::Post);
+}
+
+AssumeRoleWithOIDCRequest::~AssumeRoleWithOIDCRequest() {}
+
+std::string AssumeRoleWithOIDCRequest::getRoleArn() const {
+  return roleArn_;
 }
 
-void AssumeRoleWithOIDCRequest::setRoleArn(const std::string& roleArn)
-{
-	roleArn_ = roleArn;
-	setParameter("RoleArn", roleArn);
+void AssumeRoleWithOIDCRequest::setRoleArn(const std::string &roleArn) {
+  roleArn_ = roleArn;
+  setParameter(std::string("RoleArn"), roleArn);
 }
 
-std::string AssumeRoleWithOIDCRequest::getRoleSessionName()const
-{
-	return roleSessionName_;
+std::string AssumeRoleWithOIDCRequest::getRoleSessionName() const {
+  return roleSessionName_;
 }
 
-void AssumeRoleWithOIDCRequest::setRoleSessionName(const std::string& roleSessionName)
-{
-	roleSessionName_ = roleSessionName;
-	setParameter("RoleSessionName", roleSessionName);
+void AssumeRoleWithOIDCRequest::setRoleSessionName(const std::string &roleSessionName) {
+  roleSessionName_ = roleSessionName;
+  setParameter(std::string("RoleSessionName"), roleSessionName);
 }
 
-std::string AssumeRoleWithOIDCRequest::getOIDCToken()const
-{
-	return oIDCToken_;
+std::string AssumeRoleWithOIDCRequest::getOIDCToken() const {
+  return oIDCToken_;
 }
 
-void AssumeRoleWithOIDCRequest::setOIDCToken(const std::string& oIDCToken)
-{
-	oIDCToken_ = oIDCToken;
-	setParameter("OIDCToken", oIDCToken);
+void AssumeRoleWithOIDCRequest::setOIDCToken(const std::string &oIDCToken) {
+  oIDCToken_ = oIDCToken;
+  setParameter(std::string("OIDCToken"), oIDCToken);
 }
 
-long AssumeRoleWithOIDCRequest::getDurationSeconds()const
-{
-	return durationSeconds_;
+long AssumeRoleWithOIDCRequest::getDurationSeconds() const {
+  return durationSeconds_;
 }
 
-void AssumeRoleWithOIDCRequest::setDurationSeconds(long durationSeconds)
-{
-	durationSeconds_ = durationSeconds;
-	setParameter("DurationSeconds", std::to_string(durationSeconds));
+void AssumeRoleWithOIDCRequest::setDurationSeconds(long durationSeconds) {
+  durationSeconds_ = durationSeconds;
+  setParameter(std::string("DurationSeconds"), std::to_string(durationSeconds));
 }
 
-std::string AssumeRoleWithOIDCRequest::getOIDCProviderArn()const
-{
-	return oIDCProviderArn_;
+std::string AssumeRoleWithOIDCRequest::getOIDCProviderArn() const {
+  return oIDCProviderArn_;
 }
 
-void AssumeRoleWithOIDCRequest::setOIDCProviderArn(const std::string& oIDCProviderArn)
-{
-	oIDCProviderArn_ = oIDCProviderArn;
-	setParameter("OIDCProviderArn", oIDCProviderArn);
+void AssumeRoleWithOIDCRequest::setOIDCProviderArn(const std::string &oIDCProviderArn) {
+  oIDCProviderArn_ = oIDCProviderArn;
+  setParameter(std::string("OIDCProviderArn"), oIDCProviderArn);
 }
 
-std::string AssumeRoleWithOIDCRequest::getPolicy()const
-{
-	return policy_;
+std::string AssumeRoleWithOIDCRequest::getPolicy() const {
+  return policy_;
 }
 
-void AssumeRoleWithOIDCRequest::setPolicy(const std::string& policy)
-{
-	policy_ = policy;
-	setParameter("Policy", policy);
+void AssumeRoleWithOIDCRequest::setPolicy(const std::string &policy) {
+  policy_ = policy;
+  setParameter(std::string("Policy"), policy);
 }
 

+ 41 - 53
sts/src/model/AssumeRoleWithSAMLRequest.cc

@@ -1,84 +1,72 @@
 /*
  * Copyright 2009-2017 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/sts/model/AssumeRoleWithSAMLRequest.h>
-
-using AlibabaCloud::Sts::Model::AssumeRoleWithSAMLRequest;
-
-AssumeRoleWithSAMLRequest::AssumeRoleWithSAMLRequest() :
-	RpcServiceRequest("sts", "2015-04-01", "AssumeRoleWithSAML")
-{
-	setMethod(HttpRequest::Method::Post);
-}
-
-AssumeRoleWithSAMLRequest::~AssumeRoleWithSAMLRequest()
-{}
-
-std::string AssumeRoleWithSAMLRequest::getSAMLAssertion()const
-{
-	return sAMLAssertion_;
+ */
+
+#include <alibabacloud/sts/model/AssumeRoleWithSAMLRequest.h>
+
+using AlibabaCloud::Sts::Model::AssumeRoleWithSAMLRequest;
+
+AssumeRoleWithSAMLRequest::AssumeRoleWithSAMLRequest()
+    : RpcServiceRequest("sts", "2015-04-01", "AssumeRoleWithSAML") {
+  setMethod(HttpRequest::Method::Post);
+}
+
+AssumeRoleWithSAMLRequest::~AssumeRoleWithSAMLRequest() {}
+
+std::string AssumeRoleWithSAMLRequest::getSAMLAssertion() const {
+  return sAMLAssertion_;
 }
 
-void AssumeRoleWithSAMLRequest::setSAMLAssertion(const std::string& sAMLAssertion)
-{
-	sAMLAssertion_ = sAMLAssertion;
-	setParameter("SAMLAssertion", sAMLAssertion);
+void AssumeRoleWithSAMLRequest::setSAMLAssertion(const std::string &sAMLAssertion) {
+  sAMLAssertion_ = sAMLAssertion;
+  setParameter(std::string("SAMLAssertion"), sAMLAssertion);
 }
 
-std::string AssumeRoleWithSAMLRequest::getRoleArn()const
-{
-	return roleArn_;
+std::string AssumeRoleWithSAMLRequest::getRoleArn() const {
+  return roleArn_;
 }
 
-void AssumeRoleWithSAMLRequest::setRoleArn(const std::string& roleArn)
-{
-	roleArn_ = roleArn;
-	setParameter("RoleArn", roleArn);
+void AssumeRoleWithSAMLRequest::setRoleArn(const std::string &roleArn) {
+  roleArn_ = roleArn;
+  setParameter(std::string("RoleArn"), roleArn);
 }
 
-std::string AssumeRoleWithSAMLRequest::getSAMLProviderArn()const
-{
-	return sAMLProviderArn_;
+std::string AssumeRoleWithSAMLRequest::getSAMLProviderArn() const {
+  return sAMLProviderArn_;
 }
 
-void AssumeRoleWithSAMLRequest::setSAMLProviderArn(const std::string& sAMLProviderArn)
-{
-	sAMLProviderArn_ = sAMLProviderArn;
-	setParameter("SAMLProviderArn", sAMLProviderArn);
+void AssumeRoleWithSAMLRequest::setSAMLProviderArn(const std::string &sAMLProviderArn) {
+  sAMLProviderArn_ = sAMLProviderArn;
+  setParameter(std::string("SAMLProviderArn"), sAMLProviderArn);
 }
 
-long AssumeRoleWithSAMLRequest::getDurationSeconds()const
-{
-	return durationSeconds_;
+long AssumeRoleWithSAMLRequest::getDurationSeconds() const {
+  return durationSeconds_;
 }
 
-void AssumeRoleWithSAMLRequest::setDurationSeconds(long durationSeconds)
-{
-	durationSeconds_ = durationSeconds;
-	setParameter("DurationSeconds", std::to_string(durationSeconds));
+void AssumeRoleWithSAMLRequest::setDurationSeconds(long durationSeconds) {
+  durationSeconds_ = durationSeconds;
+  setParameter(std::string("DurationSeconds"), std::to_string(durationSeconds));
 }
 
-std::string AssumeRoleWithSAMLRequest::getPolicy()const
-{
-	return policy_;
+std::string AssumeRoleWithSAMLRequest::getPolicy() const {
+  return policy_;
 }
 
-void AssumeRoleWithSAMLRequest::setPolicy(const std::string& policy)
-{
-	policy_ = policy;
-	setParameter("Policy", policy);
+void AssumeRoleWithSAMLRequest::setPolicy(const std::string &policy) {
+  policy_ = policy;
+  setParameter(std::string("Policy"), policy);
 }
 

+ 8 - 8
sts/src/model/AssumeRoleWithSAMLResult.cc

@@ -42,26 +42,26 @@ void AssumeRoleWithSAMLResult::parse(const std::string &payload)
 	auto sAMLAssertionInfoNode = value["SAMLAssertionInfo"];
 	if(!sAMLAssertionInfoNode["SubjectType"].isNull())
 		sAMLAssertionInfo_.subjectType = sAMLAssertionInfoNode["SubjectType"].asString();
+	if(!sAMLAssertionInfoNode["Subject"].isNull())
+		sAMLAssertionInfo_.subject = sAMLAssertionInfoNode["Subject"].asString();
 	if(!sAMLAssertionInfoNode["Issuer"].isNull())
 		sAMLAssertionInfo_.issuer = sAMLAssertionInfoNode["Issuer"].asString();
 	if(!sAMLAssertionInfoNode["Recipient"].isNull())
 		sAMLAssertionInfo_.recipient = sAMLAssertionInfoNode["Recipient"].asString();
-	if(!sAMLAssertionInfoNode["Subject"].isNull())
-		sAMLAssertionInfo_.subject = sAMLAssertionInfoNode["Subject"].asString();
 	auto assumedRoleUserNode = value["AssumedRoleUser"];
-	if(!assumedRoleUserNode["Arn"].isNull())
-		assumedRoleUser_.arn = assumedRoleUserNode["Arn"].asString();
 	if(!assumedRoleUserNode["AssumedRoleId"].isNull())
 		assumedRoleUser_.assumedRoleId = assumedRoleUserNode["AssumedRoleId"].asString();
+	if(!assumedRoleUserNode["Arn"].isNull())
+		assumedRoleUser_.arn = assumedRoleUserNode["Arn"].asString();
 	auto credentialsNode = value["Credentials"];
 	if(!credentialsNode["SecurityToken"].isNull())
 		credentials_.securityToken = credentialsNode["SecurityToken"].asString();
-	if(!credentialsNode["AccessKeyId"].isNull())
-		credentials_.accessKeyId = credentialsNode["AccessKeyId"].asString();
-	if(!credentialsNode["AccessKeySecret"].isNull())
-		credentials_.accessKeySecret = credentialsNode["AccessKeySecret"].asString();
 	if(!credentialsNode["Expiration"].isNull())
 		credentials_.expiration = credentialsNode["Expiration"].asString();
+	if(!credentialsNode["AccessKeySecret"].isNull())
+		credentials_.accessKeySecret = credentialsNode["AccessKeySecret"].asString();
+	if(!credentialsNode["AccessKeyId"].isNull())
+		credentials_.accessKeyId = credentialsNode["AccessKeyId"].asString();
 
 }
 

+ 16 - 18
sts/src/model/GetCallerIdentityRequest.cc

@@ -1,29 +1,27 @@
 /*
  * Copyright 2009-2017 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/sts/model/GetCallerIdentityRequest.h>
-
-using AlibabaCloud::Sts::Model::GetCallerIdentityRequest;
-
-GetCallerIdentityRequest::GetCallerIdentityRequest() :
-	RpcServiceRequest("sts", "2015-04-01", "GetCallerIdentity")
-{
-	setMethod(HttpRequest::Method::Post);
-}
-
-GetCallerIdentityRequest::~GetCallerIdentityRequest()
-{}
-
+ */
+
+#include <alibabacloud/sts/model/GetCallerIdentityRequest.h>
+
+using AlibabaCloud::Sts::Model::GetCallerIdentityRequest;
+
+GetCallerIdentityRequest::GetCallerIdentityRequest()
+    : RpcServiceRequest("sts", "2015-04-01", "GetCallerIdentity") {
+  setMethod(HttpRequest::Method::Post);
+}
+
+GetCallerIdentityRequest::~GetCallerIdentityRequest() {}
+