Add API for GetMetadataAmount.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
2020-07-01 Version: 1.36.489
|
||||
- Add API for GetMetadataAmount.
|
||||
|
||||
2020-07-01 Version: 1.36.488
|
||||
- Support Saf For ExecuteExtendService.
|
||||
|
||||
|
||||
@@ -37,6 +37,8 @@ set(amqp-open_public_header_model
|
||||
include/alibabacloud/amqp-open/model/DeleteQueueResult.h
|
||||
include/alibabacloud/amqp-open/model/DeleteVirtualHostRequest.h
|
||||
include/alibabacloud/amqp-open/model/DeleteVirtualHostResult.h
|
||||
include/alibabacloud/amqp-open/model/GetMetadataAmountRequest.h
|
||||
include/alibabacloud/amqp-open/model/GetMetadataAmountResult.h
|
||||
include/alibabacloud/amqp-open/model/ListBindingsRequest.h
|
||||
include/alibabacloud/amqp-open/model/ListBindingsResult.h
|
||||
include/alibabacloud/amqp-open/model/ListDownStreamBindingsRequest.h
|
||||
@@ -47,6 +49,8 @@ set(amqp-open_public_header_model
|
||||
include/alibabacloud/amqp-open/model/ListExchangesResult.h
|
||||
include/alibabacloud/amqp-open/model/ListInstancesRequest.h
|
||||
include/alibabacloud/amqp-open/model/ListInstancesResult.h
|
||||
include/alibabacloud/amqp-open/model/ListQueueConsumersRequest.h
|
||||
include/alibabacloud/amqp-open/model/ListQueueConsumersResult.h
|
||||
include/alibabacloud/amqp-open/model/ListQueueUpStreamBindingsRequest.h
|
||||
include/alibabacloud/amqp-open/model/ListQueueUpStreamBindingsResult.h
|
||||
include/alibabacloud/amqp-open/model/ListQueuesRequest.h
|
||||
@@ -72,6 +76,8 @@ set(amqp-open_src
|
||||
src/model/DeleteQueueResult.cc
|
||||
src/model/DeleteVirtualHostRequest.cc
|
||||
src/model/DeleteVirtualHostResult.cc
|
||||
src/model/GetMetadataAmountRequest.cc
|
||||
src/model/GetMetadataAmountResult.cc
|
||||
src/model/ListBindingsRequest.cc
|
||||
src/model/ListBindingsResult.cc
|
||||
src/model/ListDownStreamBindingsRequest.cc
|
||||
@@ -82,6 +88,8 @@ set(amqp-open_src
|
||||
src/model/ListExchangesResult.cc
|
||||
src/model/ListInstancesRequest.cc
|
||||
src/model/ListInstancesResult.cc
|
||||
src/model/ListQueueConsumersRequest.cc
|
||||
src/model/ListQueueConsumersResult.cc
|
||||
src/model/ListQueueUpStreamBindingsRequest.cc
|
||||
src/model/ListQueueUpStreamBindingsResult.cc
|
||||
src/model/ListQueuesRequest.cc
|
||||
|
||||
@@ -38,6 +38,8 @@
|
||||
#include "model/DeleteQueueResult.h"
|
||||
#include "model/DeleteVirtualHostRequest.h"
|
||||
#include "model/DeleteVirtualHostResult.h"
|
||||
#include "model/GetMetadataAmountRequest.h"
|
||||
#include "model/GetMetadataAmountResult.h"
|
||||
#include "model/ListBindingsRequest.h"
|
||||
#include "model/ListBindingsResult.h"
|
||||
#include "model/ListDownStreamBindingsRequest.h"
|
||||
@@ -48,6 +50,8 @@
|
||||
#include "model/ListExchangesResult.h"
|
||||
#include "model/ListInstancesRequest.h"
|
||||
#include "model/ListInstancesResult.h"
|
||||
#include "model/ListQueueConsumersRequest.h"
|
||||
#include "model/ListQueueConsumersResult.h"
|
||||
#include "model/ListQueueUpStreamBindingsRequest.h"
|
||||
#include "model/ListQueueUpStreamBindingsResult.h"
|
||||
#include "model/ListQueuesRequest.h"
|
||||
@@ -87,6 +91,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::DeleteVirtualHostResult> DeleteVirtualHostOutcome;
|
||||
typedef std::future<DeleteVirtualHostOutcome> DeleteVirtualHostOutcomeCallable;
|
||||
typedef std::function<void(const Amqp_openClient*, const Model::DeleteVirtualHostRequest&, const DeleteVirtualHostOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DeleteVirtualHostAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetMetadataAmountResult> GetMetadataAmountOutcome;
|
||||
typedef std::future<GetMetadataAmountOutcome> GetMetadataAmountOutcomeCallable;
|
||||
typedef std::function<void(const Amqp_openClient*, const Model::GetMetadataAmountRequest&, const GetMetadataAmountOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetMetadataAmountAsyncHandler;
|
||||
typedef Outcome<Error, Model::ListBindingsResult> ListBindingsOutcome;
|
||||
typedef std::future<ListBindingsOutcome> ListBindingsOutcomeCallable;
|
||||
typedef std::function<void(const Amqp_openClient*, const Model::ListBindingsRequest&, const ListBindingsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListBindingsAsyncHandler;
|
||||
@@ -102,6 +109,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::ListInstancesResult> ListInstancesOutcome;
|
||||
typedef std::future<ListInstancesOutcome> ListInstancesOutcomeCallable;
|
||||
typedef std::function<void(const Amqp_openClient*, const Model::ListInstancesRequest&, const ListInstancesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListInstancesAsyncHandler;
|
||||
typedef Outcome<Error, Model::ListQueueConsumersResult> ListQueueConsumersOutcome;
|
||||
typedef std::future<ListQueueConsumersOutcome> ListQueueConsumersOutcomeCallable;
|
||||
typedef std::function<void(const Amqp_openClient*, const Model::ListQueueConsumersRequest&, const ListQueueConsumersOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListQueueConsumersAsyncHandler;
|
||||
typedef Outcome<Error, Model::ListQueueUpStreamBindingsResult> ListQueueUpStreamBindingsOutcome;
|
||||
typedef std::future<ListQueueUpStreamBindingsOutcome> ListQueueUpStreamBindingsOutcomeCallable;
|
||||
typedef std::function<void(const Amqp_openClient*, const Model::ListQueueUpStreamBindingsRequest&, const ListQueueUpStreamBindingsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListQueueUpStreamBindingsAsyncHandler;
|
||||
@@ -140,6 +150,9 @@ namespace AlibabaCloud
|
||||
DeleteVirtualHostOutcome deleteVirtualHost(const Model::DeleteVirtualHostRequest &request)const;
|
||||
void deleteVirtualHostAsync(const Model::DeleteVirtualHostRequest& request, const DeleteVirtualHostAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DeleteVirtualHostOutcomeCallable deleteVirtualHostCallable(const Model::DeleteVirtualHostRequest& request) const;
|
||||
GetMetadataAmountOutcome getMetadataAmount(const Model::GetMetadataAmountRequest &request)const;
|
||||
void getMetadataAmountAsync(const Model::GetMetadataAmountRequest& request, const GetMetadataAmountAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetMetadataAmountOutcomeCallable getMetadataAmountCallable(const Model::GetMetadataAmountRequest& request) const;
|
||||
ListBindingsOutcome listBindings(const Model::ListBindingsRequest &request)const;
|
||||
void listBindingsAsync(const Model::ListBindingsRequest& request, const ListBindingsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListBindingsOutcomeCallable listBindingsCallable(const Model::ListBindingsRequest& request) const;
|
||||
@@ -155,6 +168,9 @@ namespace AlibabaCloud
|
||||
ListInstancesOutcome listInstances(const Model::ListInstancesRequest &request)const;
|
||||
void listInstancesAsync(const Model::ListInstancesRequest& request, const ListInstancesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListInstancesOutcomeCallable listInstancesCallable(const Model::ListInstancesRequest& request) const;
|
||||
ListQueueConsumersOutcome listQueueConsumers(const Model::ListQueueConsumersRequest &request)const;
|
||||
void listQueueConsumersAsync(const Model::ListQueueConsumersRequest& request, const ListQueueConsumersAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListQueueConsumersOutcomeCallable listQueueConsumersCallable(const Model::ListQueueConsumersRequest& request) const;
|
||||
ListQueueUpStreamBindingsOutcome listQueueUpStreamBindings(const Model::ListQueueUpStreamBindingsRequest &request)const;
|
||||
void listQueueUpStreamBindingsAsync(const Model::ListQueueUpStreamBindingsRequest& request, const ListQueueUpStreamBindingsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListQueueUpStreamBindingsOutcomeCallable listQueueUpStreamBindingsCallable(const Model::ListQueueUpStreamBindingsRequest& request) const;
|
||||
|
||||
@@ -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_AMQP_OPEN_MODEL_GETMETADATAAMOUNTREQUEST_H_
|
||||
#define ALIBABACLOUD_AMQP_OPEN_MODEL_GETMETADATAAMOUNTREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/amqp-open/Amqp_openExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Amqp_open
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_AMQP_OPEN_EXPORT GetMetadataAmountRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
GetMetadataAmountRequest();
|
||||
~GetMetadataAmountRequest();
|
||||
|
||||
std::string getInstanceId()const;
|
||||
void setInstanceId(const std::string& instanceId);
|
||||
|
||||
private:
|
||||
std::string instanceId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_AMQP_OPEN_MODEL_GETMETADATAAMOUNTREQUEST_H_
|
||||
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* 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_AMQP_OPEN_MODEL_GETMETADATAAMOUNTRESULT_H_
|
||||
#define ALIBABACLOUD_AMQP_OPEN_MODEL_GETMETADATAAMOUNTRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/amqp-open/Amqp_openExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Amqp_open
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_AMQP_OPEN_EXPORT GetMetadataAmountResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
int maxExchanges;
|
||||
int maxVirtualHosts;
|
||||
int currentExchanges;
|
||||
int maxQueues;
|
||||
int currentVirtualHosts;
|
||||
int currentQueues;
|
||||
};
|
||||
|
||||
|
||||
GetMetadataAmountResult();
|
||||
explicit GetMetadataAmountResult(const std::string &payload);
|
||||
~GetMetadataAmountResult();
|
||||
Data getData()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
Data data_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_AMQP_OPEN_MODEL_GETMETADATAAMOUNTRESULT_H_
|
||||
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* 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_AMQP_OPEN_MODEL_LISTQUEUECONSUMERSREQUEST_H_
|
||||
#define ALIBABACLOUD_AMQP_OPEN_MODEL_LISTQUEUECONSUMERSREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/amqp-open/Amqp_openExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Amqp_open
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_AMQP_OPEN_EXPORT ListQueueConsumersRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
ListQueueConsumersRequest();
|
||||
~ListQueueConsumersRequest();
|
||||
|
||||
std::string getInstanceId()const;
|
||||
void setInstanceId(const std::string& instanceId);
|
||||
std::string getNextToken()const;
|
||||
void setNextToken(const std::string& nextToken);
|
||||
int getQueryCount()const;
|
||||
void setQueryCount(int queryCount);
|
||||
std::string getVirtualHost()const;
|
||||
void setVirtualHost(const std::string& virtualHost);
|
||||
std::string getQueue()const;
|
||||
void setQueue(const std::string& queue);
|
||||
|
||||
private:
|
||||
std::string instanceId_;
|
||||
std::string nextToken_;
|
||||
int queryCount_;
|
||||
std::string virtualHost_;
|
||||
std::string queue_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_AMQP_OPEN_MODEL_LISTQUEUECONSUMERSREQUEST_H_
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* 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_AMQP_OPEN_MODEL_LISTQUEUECONSUMERSRESULT_H_
|
||||
#define ALIBABACLOUD_AMQP_OPEN_MODEL_LISTQUEUECONSUMERSRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/amqp-open/Amqp_openExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Amqp_open
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_AMQP_OPEN_EXPORT ListQueueConsumersResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
struct QueueConsumerVO
|
||||
{
|
||||
std::string consumerTag;
|
||||
};
|
||||
std::string nextToken;
|
||||
std::vector<QueueConsumerVO> consumers;
|
||||
int maxResults;
|
||||
};
|
||||
|
||||
|
||||
ListQueueConsumersResult();
|
||||
explicit ListQueueConsumersResult(const std::string &payload);
|
||||
~ListQueueConsumersResult();
|
||||
Data getData()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
Data data_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_AMQP_OPEN_MODEL_LISTQUEUECONSUMERSRESULT_H_
|
||||
@@ -339,6 +339,42 @@ Amqp_openClient::DeleteVirtualHostOutcomeCallable Amqp_openClient::deleteVirtual
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Amqp_openClient::GetMetadataAmountOutcome Amqp_openClient::getMetadataAmount(const GetMetadataAmountRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetMetadataAmountOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetMetadataAmountOutcome(GetMetadataAmountResult(outcome.result()));
|
||||
else
|
||||
return GetMetadataAmountOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Amqp_openClient::getMetadataAmountAsync(const GetMetadataAmountRequest& request, const GetMetadataAmountAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getMetadataAmount(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Amqp_openClient::GetMetadataAmountOutcomeCallable Amqp_openClient::getMetadataAmountCallable(const GetMetadataAmountRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetMetadataAmountOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getMetadataAmount(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Amqp_openClient::ListBindingsOutcome Amqp_openClient::listBindings(const ListBindingsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -519,6 +555,42 @@ Amqp_openClient::ListInstancesOutcomeCallable Amqp_openClient::listInstancesCall
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Amqp_openClient::ListQueueConsumersOutcome Amqp_openClient::listQueueConsumers(const ListQueueConsumersRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListQueueConsumersOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListQueueConsumersOutcome(ListQueueConsumersResult(outcome.result()));
|
||||
else
|
||||
return ListQueueConsumersOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Amqp_openClient::listQueueConsumersAsync(const ListQueueConsumersRequest& request, const ListQueueConsumersAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listQueueConsumers(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Amqp_openClient::ListQueueConsumersOutcomeCallable Amqp_openClient::listQueueConsumersCallable(const ListQueueConsumersRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListQueueConsumersOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listQueueConsumers(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Amqp_openClient::ListQueueUpStreamBindingsOutcome Amqp_openClient::listQueueUpStreamBindings(const ListQueueUpStreamBindingsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
40
amqp-open/src/model/GetMetadataAmountRequest.cc
Normal file
40
amqp-open/src/model/GetMetadataAmountRequest.cc
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* 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/amqp-open/model/GetMetadataAmountRequest.h>
|
||||
|
||||
using AlibabaCloud::Amqp_open::Model::GetMetadataAmountRequest;
|
||||
|
||||
GetMetadataAmountRequest::GetMetadataAmountRequest() :
|
||||
RpcServiceRequest("amqp-open", "2019-12-12", "GetMetadataAmount")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
GetMetadataAmountRequest::~GetMetadataAmountRequest()
|
||||
{}
|
||||
|
||||
std::string GetMetadataAmountRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void GetMetadataAmountRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
62
amqp-open/src/model/GetMetadataAmountResult.cc
Normal file
62
amqp-open/src/model/GetMetadataAmountResult.cc
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* 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/amqp-open/model/GetMetadataAmountResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Amqp_open;
|
||||
using namespace AlibabaCloud::Amqp_open::Model;
|
||||
|
||||
GetMetadataAmountResult::GetMetadataAmountResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetMetadataAmountResult::GetMetadataAmountResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetMetadataAmountResult::~GetMetadataAmountResult()
|
||||
{}
|
||||
|
||||
void GetMetadataAmountResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["CurrentVirtualHosts"].isNull())
|
||||
data_.currentVirtualHosts = std::stoi(dataNode["CurrentVirtualHosts"].asString());
|
||||
if(!dataNode["MaxVirtualHosts"].isNull())
|
||||
data_.maxVirtualHosts = std::stoi(dataNode["MaxVirtualHosts"].asString());
|
||||
if(!dataNode["CurrentExchanges"].isNull())
|
||||
data_.currentExchanges = std::stoi(dataNode["CurrentExchanges"].asString());
|
||||
if(!dataNode["MaxExchanges"].isNull())
|
||||
data_.maxExchanges = std::stoi(dataNode["MaxExchanges"].asString());
|
||||
if(!dataNode["CurrentQueues"].isNull())
|
||||
data_.currentQueues = std::stoi(dataNode["CurrentQueues"].asString());
|
||||
if(!dataNode["MaxQueues"].isNull())
|
||||
data_.maxQueues = std::stoi(dataNode["MaxQueues"].asString());
|
||||
|
||||
}
|
||||
|
||||
GetMetadataAmountResult::Data GetMetadataAmountResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
84
amqp-open/src/model/ListQueueConsumersRequest.cc
Normal file
84
amqp-open/src/model/ListQueueConsumersRequest.cc
Normal file
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* 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/amqp-open/model/ListQueueConsumersRequest.h>
|
||||
|
||||
using AlibabaCloud::Amqp_open::Model::ListQueueConsumersRequest;
|
||||
|
||||
ListQueueConsumersRequest::ListQueueConsumersRequest() :
|
||||
RpcServiceRequest("amqp-open", "2019-12-12", "ListQueueConsumers")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
ListQueueConsumersRequest::~ListQueueConsumersRequest()
|
||||
{}
|
||||
|
||||
std::string ListQueueConsumersRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void ListQueueConsumersRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string ListQueueConsumersRequest::getNextToken()const
|
||||
{
|
||||
return nextToken_;
|
||||
}
|
||||
|
||||
void ListQueueConsumersRequest::setNextToken(const std::string& nextToken)
|
||||
{
|
||||
nextToken_ = nextToken;
|
||||
setParameter("NextToken", nextToken);
|
||||
}
|
||||
|
||||
int ListQueueConsumersRequest::getQueryCount()const
|
||||
{
|
||||
return queryCount_;
|
||||
}
|
||||
|
||||
void ListQueueConsumersRequest::setQueryCount(int queryCount)
|
||||
{
|
||||
queryCount_ = queryCount;
|
||||
setParameter("QueryCount", std::to_string(queryCount));
|
||||
}
|
||||
|
||||
std::string ListQueueConsumersRequest::getVirtualHost()const
|
||||
{
|
||||
return virtualHost_;
|
||||
}
|
||||
|
||||
void ListQueueConsumersRequest::setVirtualHost(const std::string& virtualHost)
|
||||
{
|
||||
virtualHost_ = virtualHost;
|
||||
setParameter("VirtualHost", virtualHost);
|
||||
}
|
||||
|
||||
std::string ListQueueConsumersRequest::getQueue()const
|
||||
{
|
||||
return queue_;
|
||||
}
|
||||
|
||||
void ListQueueConsumersRequest::setQueue(const std::string& queue)
|
||||
{
|
||||
queue_ = queue;
|
||||
setParameter("Queue", queue);
|
||||
}
|
||||
|
||||
62
amqp-open/src/model/ListQueueConsumersResult.cc
Normal file
62
amqp-open/src/model/ListQueueConsumersResult.cc
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* 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/amqp-open/model/ListQueueConsumersResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Amqp_open;
|
||||
using namespace AlibabaCloud::Amqp_open::Model;
|
||||
|
||||
ListQueueConsumersResult::ListQueueConsumersResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListQueueConsumersResult::ListQueueConsumersResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListQueueConsumersResult::~ListQueueConsumersResult()
|
||||
{}
|
||||
|
||||
void ListQueueConsumersResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
if(!dataNode["NextToken"].isNull())
|
||||
data_.nextToken = dataNode["NextToken"].asString();
|
||||
if(!dataNode["MaxResults"].isNull())
|
||||
data_.maxResults = std::stoi(dataNode["MaxResults"].asString());
|
||||
auto allConsumersNode = dataNode["Consumers"]["QueueConsumerVO"];
|
||||
for (auto dataNodeConsumersQueueConsumerVO : allConsumersNode)
|
||||
{
|
||||
Data::QueueConsumerVO queueConsumerVOObject;
|
||||
if(!dataNodeConsumersQueueConsumerVO["ConsumerTag"].isNull())
|
||||
queueConsumerVOObject.consumerTag = dataNodeConsumersQueueConsumerVO["ConsumerTag"].asString();
|
||||
data_.consumers.push_back(queueConsumerVOObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ListQueueConsumersResult::Data ListQueueConsumersResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user