由荣旸发起的TESLAMAXCOMPUTE SDK自动发布, BUILD_ID=314, 版本号:1.2.4

Signed-off-by: haowei.yao <haowei.yao@alibaba-inc.com>
This commit is contained in:
haowei.yao
2018-02-28 11:38:05 +08:00
parent 96d9eb7efd
commit 78ee1b30bd
11 changed files with 330 additions and 15 deletions

View File

@@ -26,6 +26,8 @@
#include "model/GetUserInstanceResult.h"
#include "model/GetProjectInstanceRequest.h"
#include "model/GetProjectInstanceResult.h"
#include "model/QueryResourceInventoryRequest.h"
#include "model/QueryResourceInventoryResult.h"
#include "model/QueryTopologyRequest.h"
#include "model/QueryTopologyResult.h"
#include "model/GetInstancesStatusCountRequest.h"
@@ -51,6 +53,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::GetProjectInstanceResult> GetProjectInstanceOutcome;
typedef std::future<GetProjectInstanceOutcome> GetProjectInstanceOutcomeCallable;
typedef std::function<void(const TeslaMaxComputeClient*, const Model::GetProjectInstanceRequest&, const GetProjectInstanceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetProjectInstanceAsyncHandler;
typedef Outcome<Error, Model::QueryResourceInventoryResult> QueryResourceInventoryOutcome;
typedef std::future<QueryResourceInventoryOutcome> QueryResourceInventoryOutcomeCallable;
typedef std::function<void(const TeslaMaxComputeClient*, const Model::QueryResourceInventoryRequest&, const QueryResourceInventoryOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> QueryResourceInventoryAsyncHandler;
typedef Outcome<Error, Model::QueryTopologyResult> QueryTopologyOutcome;
typedef std::future<QueryTopologyOutcome> QueryTopologyOutcomeCallable;
typedef std::function<void(const TeslaMaxComputeClient*, const Model::QueryTopologyRequest&, const QueryTopologyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> QueryTopologyAsyncHandler;
@@ -77,6 +82,9 @@ namespace AlibabaCloud
GetProjectInstanceOutcome getProjectInstance(const Model::GetProjectInstanceRequest &request)const;
void getProjectInstanceAsync(const Model::GetProjectInstanceRequest& request, const GetProjectInstanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetProjectInstanceOutcomeCallable getProjectInstanceCallable(const Model::GetProjectInstanceRequest& request) const;
QueryResourceInventoryOutcome queryResourceInventory(const Model::QueryResourceInventoryRequest &request)const;
void queryResourceInventoryAsync(const Model::QueryResourceInventoryRequest& request, const QueryResourceInventoryAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
QueryResourceInventoryOutcomeCallable queryResourceInventoryCallable(const Model::QueryResourceInventoryRequest& request) const;
QueryTopologyOutcome queryTopology(const Model::QueryTopologyRequest &request)const;
void queryTopologyAsync(const Model::QueryTopologyRequest& request, const QueryTopologyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
QueryTopologyOutcomeCallable queryTopologyCallable(const Model::QueryTopologyRequest& request) const;

View File

@@ -0,0 +1,45 @@
/*
* 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_TESLAMAXCOMPUTE_MODEL_QUERYRESOURCEINVENTORYREQUEST_H_
#define ALIBABACLOUD_TESLAMAXCOMPUTE_MODEL_QUERYRESOURCEINVENTORYREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/teslamaxcompute/TeslaMaxComputeExport.h>
namespace AlibabaCloud
{
namespace TeslaMaxCompute
{
namespace Model
{
class ALIBABACLOUD_TESLAMAXCOMPUTE_EXPORT QueryResourceInventoryRequest : public RpcServiceRequest
{
public:
QueryResourceInventoryRequest();
~QueryResourceInventoryRequest();
private:
};
}
}
}
#endif // !ALIBABACLOUD_TESLAMAXCOMPUTE_MODEL_QUERYRESOURCEINVENTORYREQUEST_H_

View File

@@ -0,0 +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.
*/
#ifndef ALIBABACLOUD_TESLAMAXCOMPUTE_MODEL_QUERYRESOURCEINVENTORYRESULT_H_
#define ALIBABACLOUD_TESLAMAXCOMPUTE_MODEL_QUERYRESOURCEINVENTORYRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/teslamaxcompute/TeslaMaxComputeExport.h>
namespace AlibabaCloud
{
namespace TeslaMaxCompute
{
namespace Model
{
class ALIBABACLOUD_TESLAMAXCOMPUTE_EXPORT QueryResourceInventoryResult : public ServiceResult
{
public:
struct Data
{
struct Cluster
{
struct ResourceParameter
{
std::string paraName;
std::string paraValue;
};
struct ResourceInventory
{
long used;
long total;
long available;
std::string resourceType;
};
std::string status;
std::vector<Cluster::ResourceInventory> resourceInventories;
std::string cluster;
std::string region;
std::string machineRoom;
std::vector<Cluster::ResourceParameter> resourceParameters;
};
std::string lastUpdate;
std::vector<Cluster> clusters;
};
QueryResourceInventoryResult();
explicit QueryResourceInventoryResult(const std::string &payload);
~QueryResourceInventoryResult();
std::string getMessage()const;
std::vector<Data> getData()const;
int getCode()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
std::vector<Data> data_;
int code_;
};
}
}
}
#endif // !ALIBABACLOUD_TESLAMAXCOMPUTE_MODEL_QUERYRESOURCEINVENTORYRESULT_H_

View File

@@ -32,11 +32,11 @@ namespace AlibabaCloud
class ALIBABACLOUD_TESLAMAXCOMPUTE_EXPORT QueryTopologyResult : public ServiceResult
{
public:
struct Result
struct ResultItem
{
struct Regions
struct RegionItem
{
struct Clusters
struct ClusterItem
{
std::string netArch;
std::string netCode;
@@ -46,13 +46,13 @@ namespace AlibabaCloud
std::string productLine;
std::string business;
};
std::vector<Clusters> clusters;
std::vector<RegionItem::ClusterItem> clusters;
std::string regionEnName;
std::string region;
std::string regionCnName;
};
std::string lastUpdate;
std::vector<Regions> regions;
std::vector<ResultItem::RegionItem> regions;
};
@@ -61,14 +61,14 @@ namespace AlibabaCloud
~QueryTopologyResult();
std::string getMessage()const;
int getCode()const;
std::vector<Result> getResult()const;
std::vector<ResultItem> getResult()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
int code_;
std::vector<Result> result_;
std::vector<ResultItem> result_;
};
}