Przeglądaj źródła

Add API QueryEmbeddedStaus.

sdk-team 4 lat temu
rodzic
commit
e18ac68719

+ 3 - 0
CHANGELOG

@@ -1,3 +1,6 @@
+2022-07-04 Version: 1.36.1168
+- Add API QueryEmbeddedStaus.
+
 2022-07-04 Version: 1.36.1167
 - Update API error codes.
 - Adjust parameters verification rules for some APIs.

+ 1 - 1
VERSION

@@ -1 +1 @@
-1.36.1167
+1.36.1168

+ 4 - 0
quickbi-public/CMakeLists.txt

@@ -109,6 +109,8 @@ set(quickbi-public_public_header_model
 	include/alibabacloud/quickbi-public/model/QueryDatasetSwitchInfoResult.h
 	include/alibabacloud/quickbi-public/model/QueryEmbeddedInfoRequest.h
 	include/alibabacloud/quickbi-public/model/QueryEmbeddedInfoResult.h
+	include/alibabacloud/quickbi-public/model/QueryEmbeddedStatusRequest.h
+	include/alibabacloud/quickbi-public/model/QueryEmbeddedStatusResult.h
 	include/alibabacloud/quickbi-public/model/QueryOrganizationWorkspaceListRequest.h
 	include/alibabacloud/quickbi-public/model/QueryOrganizationWorkspaceListResult.h
 	include/alibabacloud/quickbi-public/model/QueryReadableResourcesListByUserIdRequest.h
@@ -266,6 +268,8 @@ set(quickbi-public_src
 	src/model/QueryDatasetSwitchInfoResult.cc
 	src/model/QueryEmbeddedInfoRequest.cc
 	src/model/QueryEmbeddedInfoResult.cc
+	src/model/QueryEmbeddedStatusRequest.cc
+	src/model/QueryEmbeddedStatusResult.cc
 	src/model/QueryOrganizationWorkspaceListRequest.cc
 	src/model/QueryOrganizationWorkspaceListResult.cc
 	src/model/QueryReadableResourcesListByUserIdRequest.cc

+ 8 - 0
quickbi-public/include/alibabacloud/quickbi-public/Quickbi_publicClient.h

@@ -110,6 +110,8 @@
 #include "model/QueryDatasetSwitchInfoResult.h"
 #include "model/QueryEmbeddedInfoRequest.h"
 #include "model/QueryEmbeddedInfoResult.h"
+#include "model/QueryEmbeddedStatusRequest.h"
+#include "model/QueryEmbeddedStatusResult.h"
 #include "model/QueryOrganizationWorkspaceListRequest.h"
 #include "model/QueryOrganizationWorkspaceListResult.h"
 #include "model/QueryReadableResourcesListByUserIdRequest.h"
@@ -317,6 +319,9 @@ namespace AlibabaCloud
 			typedef Outcome<Error, Model::QueryEmbeddedInfoResult> QueryEmbeddedInfoOutcome;
 			typedef std::future<QueryEmbeddedInfoOutcome> QueryEmbeddedInfoOutcomeCallable;
 			typedef std::function<void(const Quickbi_publicClient*, const Model::QueryEmbeddedInfoRequest&, const QueryEmbeddedInfoOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> QueryEmbeddedInfoAsyncHandler;
+			typedef Outcome<Error, Model::QueryEmbeddedStatusResult> QueryEmbeddedStatusOutcome;
+			typedef std::future<QueryEmbeddedStatusOutcome> QueryEmbeddedStatusOutcomeCallable;
+			typedef std::function<void(const Quickbi_publicClient*, const Model::QueryEmbeddedStatusRequest&, const QueryEmbeddedStatusOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> QueryEmbeddedStatusAsyncHandler;
 			typedef Outcome<Error, Model::QueryOrganizationWorkspaceListResult> QueryOrganizationWorkspaceListOutcome;
 			typedef std::future<QueryOrganizationWorkspaceListOutcome> QueryOrganizationWorkspaceListOutcomeCallable;
 			typedef std::function<void(const Quickbi_publicClient*, const Model::QueryOrganizationWorkspaceListRequest&, const QueryOrganizationWorkspaceListOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> QueryOrganizationWorkspaceListAsyncHandler;
@@ -553,6 +558,9 @@ namespace AlibabaCloud
 			QueryEmbeddedInfoOutcome queryEmbeddedInfo(const Model::QueryEmbeddedInfoRequest &request)const;
 			void queryEmbeddedInfoAsync(const Model::QueryEmbeddedInfoRequest& request, const QueryEmbeddedInfoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			QueryEmbeddedInfoOutcomeCallable queryEmbeddedInfoCallable(const Model::QueryEmbeddedInfoRequest& request) const;
+			QueryEmbeddedStatusOutcome queryEmbeddedStatus(const Model::QueryEmbeddedStatusRequest &request)const;
+			void queryEmbeddedStatusAsync(const Model::QueryEmbeddedStatusRequest& request, const QueryEmbeddedStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
+			QueryEmbeddedStatusOutcomeCallable queryEmbeddedStatusCallable(const Model::QueryEmbeddedStatusRequest& request) const;
 			QueryOrganizationWorkspaceListOutcome queryOrganizationWorkspaceList(const Model::QueryOrganizationWorkspaceListRequest &request)const;
 			void queryOrganizationWorkspaceListAsync(const Model::QueryOrganizationWorkspaceListRequest& request, const QueryOrganizationWorkspaceListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			QueryOrganizationWorkspaceListOutcomeCallable queryOrganizationWorkspaceListCallable(const Model::QueryOrganizationWorkspaceListRequest& request) const;

+ 48 - 0
quickbi-public/include/alibabacloud/quickbi-public/model/QueryEmbeddedStatusRequest.h

@@ -0,0 +1,48 @@
+/*
+ * 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_QUICKBI_PUBLIC_MODEL_QUERYEMBEDDEDSTATUSREQUEST_H_
+#define ALIBABACLOUD_QUICKBI_PUBLIC_MODEL_QUERYEMBEDDEDSTATUSREQUEST_H_
+
+#include <alibabacloud/quickbi-public/Quickbi_publicExport.h>
+#include <alibabacloud/core/RpcServiceRequest.h>
+#include <string>
+#include <vector>
+#include <map>
+
+namespace AlibabaCloud {
+namespace Quickbi_public {
+namespace Model {
+class ALIBABACLOUD_QUICKBI_PUBLIC_EXPORT QueryEmbeddedStatusRequest : public RpcServiceRequest {
+public:
+	QueryEmbeddedStatusRequest();
+	~QueryEmbeddedStatusRequest();
+	std::string getWorksId() const;
+	void setWorksId(const std::string &worksId);
+	std::string getAccessPoint() const;
+	void setAccessPoint(const std::string &accessPoint);
+	std::string getSignType() const;
+	void setSignType(const std::string &signType);
+
+private:
+	std::string worksId_;
+	std::string accessPoint_;
+	std::string signType_;
+};
+} // namespace Model
+} // namespace Quickbi_public
+} // namespace AlibabaCloud
+#endif // !ALIBABACLOUD_QUICKBI_PUBLIC_MODEL_QUERYEMBEDDEDSTATUSREQUEST_H_

+ 53 - 0
quickbi-public/include/alibabacloud/quickbi-public/model/QueryEmbeddedStatusResult.h

@@ -0,0 +1,53 @@
+/*
+ * 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_QUICKBI_PUBLIC_MODEL_QUERYEMBEDDEDSTATUSRESULT_H_
+#define ALIBABACLOUD_QUICKBI_PUBLIC_MODEL_QUERYEMBEDDEDSTATUSRESULT_H_
+
+#include <string>
+#include <vector>
+#include <utility>
+#include <alibabacloud/core/ServiceResult.h>
+#include <alibabacloud/quickbi-public/Quickbi_publicExport.h>
+
+namespace AlibabaCloud
+{
+	namespace Quickbi_public
+	{
+		namespace Model
+		{
+			class ALIBABACLOUD_QUICKBI_PUBLIC_EXPORT QueryEmbeddedStatusResult : public ServiceResult
+			{
+			public:
+
+
+				QueryEmbeddedStatusResult();
+				explicit QueryEmbeddedStatusResult(const std::string &payload);
+				~QueryEmbeddedStatusResult();
+				bool getSuccess()const;
+				bool getResult()const;
+
+			protected:
+				void parse(const std::string &payload);
+			private:
+				bool success_;
+				bool result_;
+
+			};
+		}
+	}
+}
+#endif // !ALIBABACLOUD_QUICKBI_PUBLIC_MODEL_QUERYEMBEDDEDSTATUSRESULT_H_

+ 39 - 3
quickbi-public/src/Quickbi-publicClient.cc

@@ -31,21 +31,21 @@ Quickbi_publicClient::Quickbi_publicClient(const Credentials &credentials, const
 	RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
 {
 	auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
-	endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "quick");
+	endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "quickbi");
 }
 
 Quickbi_publicClient::Quickbi_publicClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
 	RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
 {
 	auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
-	endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "quick");
+	endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "quickbi");
 }
 
 Quickbi_publicClient::Quickbi_publicClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
 	RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
 {
 	auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
-	endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "quick");
+	endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "quickbi");
 }
 
 Quickbi_publicClient::~Quickbi_publicClient()
@@ -1635,6 +1635,42 @@ Quickbi_publicClient::QueryEmbeddedInfoOutcomeCallable Quickbi_publicClient::que
 	return task->get_future();
 }
 
+Quickbi_publicClient::QueryEmbeddedStatusOutcome Quickbi_publicClient::queryEmbeddedStatus(const QueryEmbeddedStatusRequest &request) const
+{
+	auto endpointOutcome = endpointProvider_->getEndpoint();
+	if (!endpointOutcome.isSuccess())
+		return QueryEmbeddedStatusOutcome(endpointOutcome.error());
+
+	auto outcome = makeRequest(endpointOutcome.result(), request);
+
+	if (outcome.isSuccess())
+		return QueryEmbeddedStatusOutcome(QueryEmbeddedStatusResult(outcome.result()));
+	else
+		return QueryEmbeddedStatusOutcome(outcome.error());
+}
+
+void Quickbi_publicClient::queryEmbeddedStatusAsync(const QueryEmbeddedStatusRequest& request, const QueryEmbeddedStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
+{
+	auto fn = [this, request, handler, context]()
+	{
+		handler(this, request, queryEmbeddedStatus(request), context);
+	};
+
+	asyncExecute(new Runnable(fn));
+}
+
+Quickbi_publicClient::QueryEmbeddedStatusOutcomeCallable Quickbi_publicClient::queryEmbeddedStatusCallable(const QueryEmbeddedStatusRequest &request) const
+{
+	auto task = std::make_shared<std::packaged_task<QueryEmbeddedStatusOutcome()>>(
+			[this, request]()
+			{
+			return this->queryEmbeddedStatus(request);
+			});
+
+	asyncExecute(new Runnable([task]() { (*task)(); }));
+	return task->get_future();
+}
+
 Quickbi_publicClient::QueryOrganizationWorkspaceListOutcome Quickbi_publicClient::queryOrganizationWorkspaceList(const QueryOrganizationWorkspaceListRequest &request) const
 {
 	auto endpointOutcome = endpointProvider_->getEndpoint();

+ 54 - 0
quickbi-public/src/model/QueryEmbeddedStatusRequest.cc

@@ -0,0 +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.
+ */
+
+#include <alibabacloud/quickbi-public/model/QueryEmbeddedStatusRequest.h>
+
+using AlibabaCloud::Quickbi_public::Model::QueryEmbeddedStatusRequest;
+
+QueryEmbeddedStatusRequest::QueryEmbeddedStatusRequest()
+    : RpcServiceRequest("quickbi-public", "2022-01-01", "QueryEmbeddedStatus") {
+  setMethod(HttpRequest::Method::Post);
+}
+
+QueryEmbeddedStatusRequest::~QueryEmbeddedStatusRequest() {}
+
+std::string QueryEmbeddedStatusRequest::getWorksId() const {
+  return worksId_;
+}
+
+void QueryEmbeddedStatusRequest::setWorksId(const std::string &worksId) {
+  worksId_ = worksId;
+  setParameter(std::string("WorksId"), worksId);
+}
+
+std::string QueryEmbeddedStatusRequest::getAccessPoint() const {
+  return accessPoint_;
+}
+
+void QueryEmbeddedStatusRequest::setAccessPoint(const std::string &accessPoint) {
+  accessPoint_ = accessPoint;
+  setParameter(std::string("AccessPoint"), accessPoint);
+}
+
+std::string QueryEmbeddedStatusRequest::getSignType() const {
+  return signType_;
+}
+
+void QueryEmbeddedStatusRequest::setSignType(const std::string &signType) {
+  signType_ = signType;
+  setParameter(std::string("SignType"), signType);
+}
+

+ 58 - 0
quickbi-public/src/model/QueryEmbeddedStatusResult.cc

@@ -0,0 +1,58 @@
+/*
+ * 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/quickbi-public/model/QueryEmbeddedStatusResult.h>
+#include <json/json.h>
+
+using namespace AlibabaCloud::Quickbi_public;
+using namespace AlibabaCloud::Quickbi_public::Model;
+
+QueryEmbeddedStatusResult::QueryEmbeddedStatusResult() :
+	ServiceResult()
+{}
+
+QueryEmbeddedStatusResult::QueryEmbeddedStatusResult(const std::string &payload) :
+	ServiceResult()
+{
+	parse(payload);
+}
+
+QueryEmbeddedStatusResult::~QueryEmbeddedStatusResult()
+{}
+
+void QueryEmbeddedStatusResult::parse(const std::string &payload)
+{
+	Json::Reader reader;
+	Json::Value value;
+	reader.parse(payload, value);
+	setRequestId(value["RequestId"].asString());
+	if(!value["Result"].isNull())
+		result_ = value["Result"].asString() == "true";
+	if(!value["Success"].isNull())
+		success_ = value["Success"].asString() == "true";
+
+}
+
+bool QueryEmbeddedStatusResult::getSuccess()const
+{
+	return success_;
+}
+
+bool QueryEmbeddedStatusResult::getResult()const
+{
+	return result_;
+}
+