OTS SDK Auto Released By wanhong.chenwh,Version:1.21.5

Signed-off-by: yixiong.jxy <yixiong.jxy@alibaba-inc.com>
This commit is contained in:
yixiong.jxy
2018-08-08 16:46:40 +08:00
parent 3cb89d84bd
commit e16ab91844
59 changed files with 4257 additions and 2 deletions

View File

@@ -1,3 +1,6 @@
2018-08-08 Version: 1.21.5
1, The official release 4.0.0
2018-08-08 Version: 1.21.4
1, Update FC apis.

View File

@@ -84,4 +84,5 @@ add_subdirectory(teslastream)
add_subdirectory(mopen)
add_subdirectory(mts)
add_subdirectory(iot)
add_subdirectory(linkface)
add_subdirectory(linkface)
add_subdirectory(ots)

View File

@@ -1 +1 @@
1.21.4
1.21.5

134
ots/CMakeLists.txt Normal file
View File

@@ -0,0 +1,134 @@
#
# 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.
#
set(public_header_dir ${CMAKE_CURRENT_SOURCE_DIR}/../include)
set(ots_public_header
include/alibabacloud/ots/OtsClient.h
include/alibabacloud/ots/OtsExport.h )
set(ots_public_header_model
include/alibabacloud/ots/model/UnbindInstance2VpcRequest.h
include/alibabacloud/ots/model/UnbindInstance2VpcResult.h
include/alibabacloud/ots/model/ListClusterTypeRequest.h
include/alibabacloud/ots/model/ListClusterTypeResult.h
include/alibabacloud/ots/model/UpdateInstanceRequest.h
include/alibabacloud/ots/model/UpdateInstanceResult.h
include/alibabacloud/ots/model/ListInstanceRequest.h
include/alibabacloud/ots/model/ListInstanceResult.h
include/alibabacloud/ots/model/ListVpcInfoByVpcRequest.h
include/alibabacloud/ots/model/ListVpcInfoByVpcResult.h
include/alibabacloud/ots/model/GetInstanceRequest.h
include/alibabacloud/ots/model/GetInstanceResult.h
include/alibabacloud/ots/model/BindInstance2VpcRequest.h
include/alibabacloud/ots/model/BindInstance2VpcResult.h
include/alibabacloud/ots/model/InsertInstanceRequest.h
include/alibabacloud/ots/model/InsertInstanceResult.h
include/alibabacloud/ots/model/ListTagsRequest.h
include/alibabacloud/ots/model/ListTagsResult.h
include/alibabacloud/ots/model/ListVpcInfoByInstanceRequest.h
include/alibabacloud/ots/model/ListVpcInfoByInstanceResult.h
include/alibabacloud/ots/model/InsertTagsRequest.h
include/alibabacloud/ots/model/InsertTagsResult.h
include/alibabacloud/ots/model/DeleteTagsRequest.h
include/alibabacloud/ots/model/DeleteTagsResult.h
include/alibabacloud/ots/model/DeleteInstanceRequest.h
include/alibabacloud/ots/model/DeleteInstanceResult.h )
set(ots_src
src/OtsClient.cc
src/model/UnbindInstance2VpcRequest.cc
src/model/UnbindInstance2VpcResult.cc
src/model/ListClusterTypeRequest.cc
src/model/ListClusterTypeResult.cc
src/model/UpdateInstanceRequest.cc
src/model/UpdateInstanceResult.cc
src/model/ListInstanceRequest.cc
src/model/ListInstanceResult.cc
src/model/ListVpcInfoByVpcRequest.cc
src/model/ListVpcInfoByVpcResult.cc
src/model/GetInstanceRequest.cc
src/model/GetInstanceResult.cc
src/model/BindInstance2VpcRequest.cc
src/model/BindInstance2VpcResult.cc
src/model/InsertInstanceRequest.cc
src/model/InsertInstanceResult.cc
src/model/ListTagsRequest.cc
src/model/ListTagsResult.cc
src/model/ListVpcInfoByInstanceRequest.cc
src/model/ListVpcInfoByInstanceResult.cc
src/model/InsertTagsRequest.cc
src/model/InsertTagsResult.cc
src/model/DeleteTagsRequest.cc
src/model/DeleteTagsResult.cc
src/model/DeleteInstanceRequest.cc
src/model/DeleteInstanceResult.cc )
add_library(ots ${LIB_TYPE}
${ots_public_header}
${ots_public_header_model}
${ots_src})
set_target_properties(ots
PROPERTIES
LINKER_LANGUAGE CXX
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
OUTPUT_NAME ${TARGET_OUTPUT_NAME_PREFIX}ots
)
if(${LIB_TYPE} STREQUAL "SHARED")
set_target_properties(ots
PROPERTIES
DEFINE_SYMBOL ALIBABACLOUD_OTS_LIBRARY)
endif()
target_include_directories(ots
PRIVATE include
${CMAKE_SOURCE_DIR}/core/include
)
target_link_libraries(ots
core)
if(CMAKE_HOST_WIN32)
ExternalProject_Get_Property(jsoncpp INSTALL_DIR)
set(jsoncpp_install_dir ${INSTALL_DIR})
add_dependencies(ots
jsoncpp)
target_include_directories(ots
PRIVATE ${jsoncpp_install_dir}/include)
target_link_libraries(ots
${jsoncpp_install_dir}/lib/jsoncpp.lib)
set_target_properties(ots
PROPERTIES
COMPILE_OPTIONS "/bigobj")
else()
target_include_directories(ots
PRIVATE /usr/include/jsoncpp)
target_link_libraries(ots
jsoncpp)
endif()
install(FILES ${ots_public_header}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/ots)
install(FILES ${ots_public_header_model}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/ots/model)
install(TARGETS ots
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)

View File

@@ -0,0 +1,150 @@
/*
* 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_OTS_OTSCLIENT_H_
#define ALIBABACLOUD_OTS_OTSCLIENT_H_
#include <future>
#include <alibabacloud/core/AsyncCallerContext.h>
#include <alibabacloud/core/EndpointProvider.h>
#include <alibabacloud/core/RpcServiceClient.h>
#include "OtsExport.h"
#include "model/UnbindInstance2VpcRequest.h"
#include "model/UnbindInstance2VpcResult.h"
#include "model/ListClusterTypeRequest.h"
#include "model/ListClusterTypeResult.h"
#include "model/UpdateInstanceRequest.h"
#include "model/UpdateInstanceResult.h"
#include "model/ListInstanceRequest.h"
#include "model/ListInstanceResult.h"
#include "model/ListVpcInfoByVpcRequest.h"
#include "model/ListVpcInfoByVpcResult.h"
#include "model/GetInstanceRequest.h"
#include "model/GetInstanceResult.h"
#include "model/BindInstance2VpcRequest.h"
#include "model/BindInstance2VpcResult.h"
#include "model/InsertInstanceRequest.h"
#include "model/InsertInstanceResult.h"
#include "model/ListTagsRequest.h"
#include "model/ListTagsResult.h"
#include "model/ListVpcInfoByInstanceRequest.h"
#include "model/ListVpcInfoByInstanceResult.h"
#include "model/InsertTagsRequest.h"
#include "model/InsertTagsResult.h"
#include "model/DeleteTagsRequest.h"
#include "model/DeleteTagsResult.h"
#include "model/DeleteInstanceRequest.h"
#include "model/DeleteInstanceResult.h"
namespace AlibabaCloud
{
namespace Ots
{
class ALIBABACLOUD_OTS_EXPORT OtsClient : public RpcServiceClient
{
public:
typedef Outcome<Error, Model::UnbindInstance2VpcResult> UnbindInstance2VpcOutcome;
typedef std::future<UnbindInstance2VpcOutcome> UnbindInstance2VpcOutcomeCallable;
typedef std::function<void(const OtsClient*, const Model::UnbindInstance2VpcRequest&, const UnbindInstance2VpcOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UnbindInstance2VpcAsyncHandler;
typedef Outcome<Error, Model::ListClusterTypeResult> ListClusterTypeOutcome;
typedef std::future<ListClusterTypeOutcome> ListClusterTypeOutcomeCallable;
typedef std::function<void(const OtsClient*, const Model::ListClusterTypeRequest&, const ListClusterTypeOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListClusterTypeAsyncHandler;
typedef Outcome<Error, Model::UpdateInstanceResult> UpdateInstanceOutcome;
typedef std::future<UpdateInstanceOutcome> UpdateInstanceOutcomeCallable;
typedef std::function<void(const OtsClient*, const Model::UpdateInstanceRequest&, const UpdateInstanceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UpdateInstanceAsyncHandler;
typedef Outcome<Error, Model::ListInstanceResult> ListInstanceOutcome;
typedef std::future<ListInstanceOutcome> ListInstanceOutcomeCallable;
typedef std::function<void(const OtsClient*, const Model::ListInstanceRequest&, const ListInstanceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListInstanceAsyncHandler;
typedef Outcome<Error, Model::ListVpcInfoByVpcResult> ListVpcInfoByVpcOutcome;
typedef std::future<ListVpcInfoByVpcOutcome> ListVpcInfoByVpcOutcomeCallable;
typedef std::function<void(const OtsClient*, const Model::ListVpcInfoByVpcRequest&, const ListVpcInfoByVpcOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListVpcInfoByVpcAsyncHandler;
typedef Outcome<Error, Model::GetInstanceResult> GetInstanceOutcome;
typedef std::future<GetInstanceOutcome> GetInstanceOutcomeCallable;
typedef std::function<void(const OtsClient*, const Model::GetInstanceRequest&, const GetInstanceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetInstanceAsyncHandler;
typedef Outcome<Error, Model::BindInstance2VpcResult> BindInstance2VpcOutcome;
typedef std::future<BindInstance2VpcOutcome> BindInstance2VpcOutcomeCallable;
typedef std::function<void(const OtsClient*, const Model::BindInstance2VpcRequest&, const BindInstance2VpcOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> BindInstance2VpcAsyncHandler;
typedef Outcome<Error, Model::InsertInstanceResult> InsertInstanceOutcome;
typedef std::future<InsertInstanceOutcome> InsertInstanceOutcomeCallable;
typedef std::function<void(const OtsClient*, const Model::InsertInstanceRequest&, const InsertInstanceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> InsertInstanceAsyncHandler;
typedef Outcome<Error, Model::ListTagsResult> ListTagsOutcome;
typedef std::future<ListTagsOutcome> ListTagsOutcomeCallable;
typedef std::function<void(const OtsClient*, const Model::ListTagsRequest&, const ListTagsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListTagsAsyncHandler;
typedef Outcome<Error, Model::ListVpcInfoByInstanceResult> ListVpcInfoByInstanceOutcome;
typedef std::future<ListVpcInfoByInstanceOutcome> ListVpcInfoByInstanceOutcomeCallable;
typedef std::function<void(const OtsClient*, const Model::ListVpcInfoByInstanceRequest&, const ListVpcInfoByInstanceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListVpcInfoByInstanceAsyncHandler;
typedef Outcome<Error, Model::InsertTagsResult> InsertTagsOutcome;
typedef std::future<InsertTagsOutcome> InsertTagsOutcomeCallable;
typedef std::function<void(const OtsClient*, const Model::InsertTagsRequest&, const InsertTagsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> InsertTagsAsyncHandler;
typedef Outcome<Error, Model::DeleteTagsResult> DeleteTagsOutcome;
typedef std::future<DeleteTagsOutcome> DeleteTagsOutcomeCallable;
typedef std::function<void(const OtsClient*, const Model::DeleteTagsRequest&, const DeleteTagsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DeleteTagsAsyncHandler;
typedef Outcome<Error, Model::DeleteInstanceResult> DeleteInstanceOutcome;
typedef std::future<DeleteInstanceOutcome> DeleteInstanceOutcomeCallable;
typedef std::function<void(const OtsClient*, const Model::DeleteInstanceRequest&, const DeleteInstanceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DeleteInstanceAsyncHandler;
OtsClient(const Credentials &credentials, const ClientConfiguration &configuration);
OtsClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
OtsClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
~OtsClient();
UnbindInstance2VpcOutcome unbindInstance2Vpc(const Model::UnbindInstance2VpcRequest &request)const;
void unbindInstance2VpcAsync(const Model::UnbindInstance2VpcRequest& request, const UnbindInstance2VpcAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
UnbindInstance2VpcOutcomeCallable unbindInstance2VpcCallable(const Model::UnbindInstance2VpcRequest& request) const;
ListClusterTypeOutcome listClusterType(const Model::ListClusterTypeRequest &request)const;
void listClusterTypeAsync(const Model::ListClusterTypeRequest& request, const ListClusterTypeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListClusterTypeOutcomeCallable listClusterTypeCallable(const Model::ListClusterTypeRequest& request) const;
UpdateInstanceOutcome updateInstance(const Model::UpdateInstanceRequest &request)const;
void updateInstanceAsync(const Model::UpdateInstanceRequest& request, const UpdateInstanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
UpdateInstanceOutcomeCallable updateInstanceCallable(const Model::UpdateInstanceRequest& request) const;
ListInstanceOutcome listInstance(const Model::ListInstanceRequest &request)const;
void listInstanceAsync(const Model::ListInstanceRequest& request, const ListInstanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListInstanceOutcomeCallable listInstanceCallable(const Model::ListInstanceRequest& request) const;
ListVpcInfoByVpcOutcome listVpcInfoByVpc(const Model::ListVpcInfoByVpcRequest &request)const;
void listVpcInfoByVpcAsync(const Model::ListVpcInfoByVpcRequest& request, const ListVpcInfoByVpcAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListVpcInfoByVpcOutcomeCallable listVpcInfoByVpcCallable(const Model::ListVpcInfoByVpcRequest& request) const;
GetInstanceOutcome getInstance(const Model::GetInstanceRequest &request)const;
void getInstanceAsync(const Model::GetInstanceRequest& request, const GetInstanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetInstanceOutcomeCallable getInstanceCallable(const Model::GetInstanceRequest& request) const;
BindInstance2VpcOutcome bindInstance2Vpc(const Model::BindInstance2VpcRequest &request)const;
void bindInstance2VpcAsync(const Model::BindInstance2VpcRequest& request, const BindInstance2VpcAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
BindInstance2VpcOutcomeCallable bindInstance2VpcCallable(const Model::BindInstance2VpcRequest& request) const;
InsertInstanceOutcome insertInstance(const Model::InsertInstanceRequest &request)const;
void insertInstanceAsync(const Model::InsertInstanceRequest& request, const InsertInstanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
InsertInstanceOutcomeCallable insertInstanceCallable(const Model::InsertInstanceRequest& request) const;
ListTagsOutcome listTags(const Model::ListTagsRequest &request)const;
void listTagsAsync(const Model::ListTagsRequest& request, const ListTagsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListTagsOutcomeCallable listTagsCallable(const Model::ListTagsRequest& request) const;
ListVpcInfoByInstanceOutcome listVpcInfoByInstance(const Model::ListVpcInfoByInstanceRequest &request)const;
void listVpcInfoByInstanceAsync(const Model::ListVpcInfoByInstanceRequest& request, const ListVpcInfoByInstanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListVpcInfoByInstanceOutcomeCallable listVpcInfoByInstanceCallable(const Model::ListVpcInfoByInstanceRequest& request) const;
InsertTagsOutcome insertTags(const Model::InsertTagsRequest &request)const;
void insertTagsAsync(const Model::InsertTagsRequest& request, const InsertTagsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
InsertTagsOutcomeCallable insertTagsCallable(const Model::InsertTagsRequest& request) const;
DeleteTagsOutcome deleteTags(const Model::DeleteTagsRequest &request)const;
void deleteTagsAsync(const Model::DeleteTagsRequest& request, const DeleteTagsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DeleteTagsOutcomeCallable deleteTagsCallable(const Model::DeleteTagsRequest& request) const;
DeleteInstanceOutcome deleteInstance(const Model::DeleteInstanceRequest &request)const;
void deleteInstanceAsync(const Model::DeleteInstanceRequest& request, const DeleteInstanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DeleteInstanceOutcomeCallable deleteInstanceCallable(const Model::DeleteInstanceRequest& request) const;
private:
std::shared_ptr<EndpointProvider> endpointProvider_;
};
}
}
#endif // !ALIBABACLOUD_OTS_OTSCLIENT_H_

View File

@@ -0,0 +1,32 @@
/*
* 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_OTS_OTSEXPORT_H_
#define ALIBABACLOUD_OTS_OTSEXPORT_H_
#include <alibabacloud/core/Global.h>
#if defined(ALIBABACLOUD_SHARED)
# if defined(ALIBABACLOUD_OTS_LIBRARY)
# define ALIBABACLOUD_OTS_EXPORT ALIBABACLOUD_DECL_EXPORT
# else
# define ALIBABACLOUD_OTS_EXPORT ALIBABACLOUD_DECL_IMPORT
# endif
#else
# define ALIBABACLOUD_OTS_EXPORT
#endif
#endif // !ALIBABACLOUD_OTS_OTSEXPORT_H_

View File

@@ -0,0 +1,69 @@
/*
* 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_OTS_MODEL_BINDINSTANCE2VPCREQUEST_H_
#define ALIBABACLOUD_OTS_MODEL_BINDINSTANCE2VPCREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/ots/OtsExport.h>
namespace AlibabaCloud
{
namespace Ots
{
namespace Model
{
class ALIBABACLOUD_OTS_EXPORT BindInstance2VpcRequest : public RpcServiceRequest
{
public:
BindInstance2VpcRequest();
~BindInstance2VpcRequest();
std::string getAccess_key_id()const;
void setAccess_key_id(const std::string& access_key_id);
std::string getInstanceVpcName()const;
void setInstanceVpcName(const std::string& instanceVpcName);
long getResourceOwnerId()const;
void setResourceOwnerId(long resourceOwnerId);
std::string getInstanceName()const;
void setInstanceName(const std::string& instanceName);
std::string getVpcId()const;
void setVpcId(const std::string& vpcId);
std::string getVirtualSwitchId()const;
void setVirtualSwitchId(const std::string& virtualSwitchId);
std::string getRegionNo()const;
void setRegionNo(const std::string& regionNo);
std::string getNetwork()const;
void setNetwork(const std::string& network);
private:
std::string access_key_id_;
std::string instanceVpcName_;
long resourceOwnerId_;
std::string instanceName_;
std::string vpcId_;
std::string virtualSwitchId_;
std::string regionNo_;
std::string network_;
};
}
}
}
#endif // !ALIBABACLOUD_OTS_MODEL_BINDINSTANCE2VPCREQUEST_H_

View File

@@ -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_OTS_MODEL_BINDINSTANCE2VPCRESULT_H_
#define ALIBABACLOUD_OTS_MODEL_BINDINSTANCE2VPCRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ots/OtsExport.h>
namespace AlibabaCloud
{
namespace Ots
{
namespace Model
{
class ALIBABACLOUD_OTS_EXPORT BindInstance2VpcResult : public ServiceResult
{
public:
BindInstance2VpcResult();
explicit BindInstance2VpcResult(const std::string &payload);
~BindInstance2VpcResult();
std::string getEndpoint()const;
std::string getDomain()const;
protected:
void parse(const std::string &payload);
private:
std::string endpoint_;
std::string domain_;
};
}
}
}
#endif // !ALIBABACLOUD_OTS_MODEL_BINDINSTANCE2VPCRESULT_H_

View File

@@ -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.
*/
#ifndef ALIBABACLOUD_OTS_MODEL_DELETEINSTANCEREQUEST_H_
#define ALIBABACLOUD_OTS_MODEL_DELETEINSTANCEREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/ots/OtsExport.h>
namespace AlibabaCloud
{
namespace Ots
{
namespace Model
{
class ALIBABACLOUD_OTS_EXPORT DeleteInstanceRequest : public RpcServiceRequest
{
public:
DeleteInstanceRequest();
~DeleteInstanceRequest();
std::string getAccess_key_id()const;
void setAccess_key_id(const std::string& access_key_id);
long getResourceOwnerId()const;
void setResourceOwnerId(long resourceOwnerId);
std::string getInstanceName()const;
void setInstanceName(const std::string& instanceName);
private:
std::string access_key_id_;
long resourceOwnerId_;
std::string instanceName_;
};
}
}
}
#endif // !ALIBABACLOUD_OTS_MODEL_DELETEINSTANCEREQUEST_H_

View File

@@ -0,0 +1,49 @@
/*
* 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_OTS_MODEL_DELETEINSTANCERESULT_H_
#define ALIBABACLOUD_OTS_MODEL_DELETEINSTANCERESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ots/OtsExport.h>
namespace AlibabaCloud
{
namespace Ots
{
namespace Model
{
class ALIBABACLOUD_OTS_EXPORT DeleteInstanceResult : public ServiceResult
{
public:
DeleteInstanceResult();
explicit DeleteInstanceResult(const std::string &payload);
~DeleteInstanceResult();
protected:
void parse(const std::string &payload);
private:
};
}
}
}
#endif // !ALIBABACLOUD_OTS_MODEL_DELETEINSTANCERESULT_H_

View 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.
*/
#ifndef ALIBABACLOUD_OTS_MODEL_DELETETAGSREQUEST_H_
#define ALIBABACLOUD_OTS_MODEL_DELETETAGSREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/ots/OtsExport.h>
namespace AlibabaCloud
{
namespace Ots
{
namespace Model
{
class ALIBABACLOUD_OTS_EXPORT DeleteTagsRequest : public RpcServiceRequest
{
struct TagInfo
{
std::string tagKey;
std::string tagValue;
};
public:
DeleteTagsRequest();
~DeleteTagsRequest();
std::string getAccess_key_id()const;
void setAccess_key_id(const std::string& access_key_id);
long getResourceOwnerId()const;
void setResourceOwnerId(long resourceOwnerId);
std::string getInstanceName()const;
void setInstanceName(const std::string& instanceName);
std::vector<TagInfo> getTagInfo()const;
void setTagInfo(const std::vector<TagInfo>& tagInfo);
private:
std::string access_key_id_;
long resourceOwnerId_;
std::string instanceName_;
std::vector<TagInfo> tagInfo_;
};
}
}
}
#endif // !ALIBABACLOUD_OTS_MODEL_DELETETAGSREQUEST_H_

View File

@@ -0,0 +1,49 @@
/*
* 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_OTS_MODEL_DELETETAGSRESULT_H_
#define ALIBABACLOUD_OTS_MODEL_DELETETAGSRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ots/OtsExport.h>
namespace AlibabaCloud
{
namespace Ots
{
namespace Model
{
class ALIBABACLOUD_OTS_EXPORT DeleteTagsResult : public ServiceResult
{
public:
DeleteTagsResult();
explicit DeleteTagsResult(const std::string &payload);
~DeleteTagsResult();
protected:
void parse(const std::string &payload);
private:
};
}
}
}
#endif // !ALIBABACLOUD_OTS_MODEL_DELETETAGSRESULT_H_

View File

@@ -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.
*/
#ifndef ALIBABACLOUD_OTS_MODEL_GETINSTANCEREQUEST_H_
#define ALIBABACLOUD_OTS_MODEL_GETINSTANCEREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/ots/OtsExport.h>
namespace AlibabaCloud
{
namespace Ots
{
namespace Model
{
class ALIBABACLOUD_OTS_EXPORT GetInstanceRequest : public RpcServiceRequest
{
public:
GetInstanceRequest();
~GetInstanceRequest();
std::string getAccess_key_id()const;
void setAccess_key_id(const std::string& access_key_id);
long getResourceOwnerId()const;
void setResourceOwnerId(long resourceOwnerId);
std::string getInstanceName()const;
void setInstanceName(const std::string& instanceName);
private:
std::string access_key_id_;
long resourceOwnerId_;
std::string instanceName_;
};
}
}
}
#endif // !ALIBABACLOUD_OTS_MODEL_GETINSTANCEREQUEST_H_

View File

@@ -0,0 +1,74 @@
/*
* 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_OTS_MODEL_GETINSTANCERESULT_H_
#define ALIBABACLOUD_OTS_MODEL_GETINSTANCERESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ots/OtsExport.h>
namespace AlibabaCloud
{
namespace Ots
{
namespace Model
{
class ALIBABACLOUD_OTS_EXPORT GetInstanceResult : public ServiceResult
{
public:
struct InstanceInfo
{
struct Quota
{
int entityQuota;
};
struct TagInfo
{
std::string tagKey;
std::string tagValue;
};
std::string instanceName;
int status;
int readCapacity;
std::vector<TagInfo> tagInfos;
std::string description;
Quota quota;
std::string userId;
std::string network;
std::string createTime;
std::string clusterType;
int writeCapacity;
};
GetInstanceResult();
explicit GetInstanceResult(const std::string &payload);
~GetInstanceResult();
InstanceInfo getInstanceInfo()const;
protected:
void parse(const std::string &payload);
private:
InstanceInfo instanceInfo_;
};
}
}
}
#endif // !ALIBABACLOUD_OTS_MODEL_GETINSTANCERESULT_H_

View File

@@ -0,0 +1,71 @@
/*
* 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_OTS_MODEL_INSERTINSTANCEREQUEST_H_
#define ALIBABACLOUD_OTS_MODEL_INSERTINSTANCEREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/ots/OtsExport.h>
namespace AlibabaCloud
{
namespace Ots
{
namespace Model
{
class ALIBABACLOUD_OTS_EXPORT InsertInstanceRequest : public RpcServiceRequest
{
struct TagInfo
{
std::string tagKey;
std::string tagValue;
};
public:
InsertInstanceRequest();
~InsertInstanceRequest();
std::string getAccess_key_id()const;
void setAccess_key_id(const std::string& access_key_id);
std::string getClusterType()const;
void setClusterType(const std::string& clusterType);
long getResourceOwnerId()const;
void setResourceOwnerId(long resourceOwnerId);
std::string getInstanceName()const;
void setInstanceName(const std::string& instanceName);
std::string getDescription()const;
void setDescription(const std::string& description);
std::vector<TagInfo> getTagInfo()const;
void setTagInfo(const std::vector<TagInfo>& tagInfo);
std::string getNetwork()const;
void setNetwork(const std::string& network);
private:
std::string access_key_id_;
std::string clusterType_;
long resourceOwnerId_;
std::string instanceName_;
std::string description_;
std::vector<TagInfo> tagInfo_;
std::string network_;
};
}
}
}
#endif // !ALIBABACLOUD_OTS_MODEL_INSERTINSTANCEREQUEST_H_

View File

@@ -0,0 +1,49 @@
/*
* 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_OTS_MODEL_INSERTINSTANCERESULT_H_
#define ALIBABACLOUD_OTS_MODEL_INSERTINSTANCERESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ots/OtsExport.h>
namespace AlibabaCloud
{
namespace Ots
{
namespace Model
{
class ALIBABACLOUD_OTS_EXPORT InsertInstanceResult : public ServiceResult
{
public:
InsertInstanceResult();
explicit InsertInstanceResult(const std::string &payload);
~InsertInstanceResult();
protected:
void parse(const std::string &payload);
private:
};
}
}
}
#endif // !ALIBABACLOUD_OTS_MODEL_INSERTINSTANCERESULT_H_

View 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.
*/
#ifndef ALIBABACLOUD_OTS_MODEL_INSERTTAGSREQUEST_H_
#define ALIBABACLOUD_OTS_MODEL_INSERTTAGSREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/ots/OtsExport.h>
namespace AlibabaCloud
{
namespace Ots
{
namespace Model
{
class ALIBABACLOUD_OTS_EXPORT InsertTagsRequest : public RpcServiceRequest
{
struct TagInfo
{
std::string tagKey;
std::string tagValue;
};
public:
InsertTagsRequest();
~InsertTagsRequest();
std::string getAccess_key_id()const;
void setAccess_key_id(const std::string& access_key_id);
long getResourceOwnerId()const;
void setResourceOwnerId(long resourceOwnerId);
std::string getInstanceName()const;
void setInstanceName(const std::string& instanceName);
std::vector<TagInfo> getTagInfo()const;
void setTagInfo(const std::vector<TagInfo>& tagInfo);
private:
std::string access_key_id_;
long resourceOwnerId_;
std::string instanceName_;
std::vector<TagInfo> tagInfo_;
};
}
}
}
#endif // !ALIBABACLOUD_OTS_MODEL_INSERTTAGSREQUEST_H_

View File

@@ -0,0 +1,49 @@
/*
* 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_OTS_MODEL_INSERTTAGSRESULT_H_
#define ALIBABACLOUD_OTS_MODEL_INSERTTAGSRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ots/OtsExport.h>
namespace AlibabaCloud
{
namespace Ots
{
namespace Model
{
class ALIBABACLOUD_OTS_EXPORT InsertTagsResult : public ServiceResult
{
public:
InsertTagsResult();
explicit InsertTagsResult(const std::string &payload);
~InsertTagsResult();
protected:
void parse(const std::string &payload);
private:
};
}
}
}
#endif // !ALIBABACLOUD_OTS_MODEL_INSERTTAGSRESULT_H_

View File

@@ -0,0 +1,51 @@
/*
* 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_OTS_MODEL_LISTCLUSTERTYPEREQUEST_H_
#define ALIBABACLOUD_OTS_MODEL_LISTCLUSTERTYPEREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/ots/OtsExport.h>
namespace AlibabaCloud
{
namespace Ots
{
namespace Model
{
class ALIBABACLOUD_OTS_EXPORT ListClusterTypeRequest : public RpcServiceRequest
{
public:
ListClusterTypeRequest();
~ListClusterTypeRequest();
std::string getAccess_key_id()const;
void setAccess_key_id(const std::string& access_key_id);
long getResourceOwnerId()const;
void setResourceOwnerId(long resourceOwnerId);
private:
std::string access_key_id_;
long resourceOwnerId_;
};
}
}
}
#endif // !ALIBABACLOUD_OTS_MODEL_LISTCLUSTERTYPEREQUEST_H_

View File

@@ -0,0 +1,51 @@
/*
* 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_OTS_MODEL_LISTCLUSTERTYPERESULT_H_
#define ALIBABACLOUD_OTS_MODEL_LISTCLUSTERTYPERESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ots/OtsExport.h>
namespace AlibabaCloud
{
namespace Ots
{
namespace Model
{
class ALIBABACLOUD_OTS_EXPORT ListClusterTypeResult : public ServiceResult
{
public:
ListClusterTypeResult();
explicit ListClusterTypeResult(const std::string &payload);
~ListClusterTypeResult();
std::vector<std::string> getClusterTypeInfos()const;
protected:
void parse(const std::string &payload);
private:
std::vector<std::string> clusterTypeInfos_;
};
}
}
}
#endif // !ALIBABACLOUD_OTS_MODEL_LISTCLUSTERTYPERESULT_H_

View File

@@ -0,0 +1,65 @@
/*
* 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_OTS_MODEL_LISTINSTANCEREQUEST_H_
#define ALIBABACLOUD_OTS_MODEL_LISTINSTANCEREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/ots/OtsExport.h>
namespace AlibabaCloud
{
namespace Ots
{
namespace Model
{
class ALIBABACLOUD_OTS_EXPORT ListInstanceRequest : public RpcServiceRequest
{
struct TagInfo
{
std::string tagKey;
std::string tagValue;
};
public:
ListInstanceRequest();
~ListInstanceRequest();
std::string getAccess_key_id()const;
void setAccess_key_id(const std::string& access_key_id);
long getResourceOwnerId()const;
void setResourceOwnerId(long resourceOwnerId);
long getPageSize()const;
void setPageSize(long pageSize);
long getPageNum()const;
void setPageNum(long pageNum);
std::vector<TagInfo> getTagInfo()const;
void setTagInfo(const std::vector<TagInfo>& tagInfo);
private:
std::string access_key_id_;
long resourceOwnerId_;
long pageSize_;
long pageNum_;
std::vector<TagInfo> tagInfo_;
};
}
}
}
#endif // !ALIBABACLOUD_OTS_MODEL_LISTINSTANCEREQUEST_H_

View 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.
*/
#ifndef ALIBABACLOUD_OTS_MODEL_LISTINSTANCERESULT_H_
#define ALIBABACLOUD_OTS_MODEL_LISTINSTANCERESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ots/OtsExport.h>
namespace AlibabaCloud
{
namespace Ots
{
namespace Model
{
class ALIBABACLOUD_OTS_EXPORT ListInstanceResult : public ServiceResult
{
public:
struct InstanceInfo
{
std::string instanceName;
std::string timestamp;
};
ListInstanceResult();
explicit ListInstanceResult(const std::string &payload);
~ListInstanceResult();
long getTotalCount()const;
long getPageNum()const;
long getPageSize()const;
std::vector<InstanceInfo> getInstanceInfos()const;
protected:
void parse(const std::string &payload);
private:
long totalCount_;
long pageNum_;
long pageSize_;
std::vector<InstanceInfo> instanceInfos_;
};
}
}
}
#endif // !ALIBABACLOUD_OTS_MODEL_LISTINSTANCERESULT_H_

View File

@@ -0,0 +1,68 @@
/*
* 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_OTS_MODEL_LISTTAGSREQUEST_H_
#define ALIBABACLOUD_OTS_MODEL_LISTTAGSREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/ots/OtsExport.h>
namespace AlibabaCloud
{
namespace Ots
{
namespace Model
{
class ALIBABACLOUD_OTS_EXPORT ListTagsRequest : public RpcServiceRequest
{
struct TagInfo
{
std::string tagKey;
std::string tagValue;
};
public:
ListTagsRequest();
~ListTagsRequest();
std::string getAccess_key_id()const;
void setAccess_key_id(const std::string& access_key_id);
long getResourceOwnerId()const;
void setResourceOwnerId(long resourceOwnerId);
std::string getInstanceName()const;
void setInstanceName(const std::string& instanceName);
long getPageSize()const;
void setPageSize(long pageSize);
long getPageNum()const;
void setPageNum(long pageNum);
std::vector<TagInfo> getTagInfo()const;
void setTagInfo(const std::vector<TagInfo>& tagInfo);
private:
std::string access_key_id_;
long resourceOwnerId_;
std::string instanceName_;
long pageSize_;
long pageNum_;
std::vector<TagInfo> tagInfo_;
};
}
}
}
#endif // !ALIBABACLOUD_OTS_MODEL_LISTTAGSREQUEST_H_

View 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.
*/
#ifndef ALIBABACLOUD_OTS_MODEL_LISTTAGSRESULT_H_
#define ALIBABACLOUD_OTS_MODEL_LISTTAGSRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ots/OtsExport.h>
namespace AlibabaCloud
{
namespace Ots
{
namespace Model
{
class ALIBABACLOUD_OTS_EXPORT ListTagsResult : public ServiceResult
{
public:
struct TagInfo
{
std::string tagKey;
std::string tagValue;
};
ListTagsResult();
explicit ListTagsResult(const std::string &payload);
~ListTagsResult();
std::vector<TagInfo> getTagInfos()const;
long getTotalCount()const;
long getPageNum()const;
long getPageSize()const;
protected:
void parse(const std::string &payload);
private:
std::vector<TagInfo> tagInfos_;
long totalCount_;
long pageNum_;
long pageSize_;
};
}
}
}
#endif // !ALIBABACLOUD_OTS_MODEL_LISTTAGSRESULT_H_

View File

@@ -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_OTS_MODEL_LISTVPCINFOBYINSTANCEREQUEST_H_
#define ALIBABACLOUD_OTS_MODEL_LISTVPCINFOBYINSTANCEREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/ots/OtsExport.h>
namespace AlibabaCloud
{
namespace Ots
{
namespace Model
{
class ALIBABACLOUD_OTS_EXPORT ListVpcInfoByInstanceRequest : public RpcServiceRequest
{
public:
ListVpcInfoByInstanceRequest();
~ListVpcInfoByInstanceRequest();
std::string getAccess_key_id()const;
void setAccess_key_id(const std::string& access_key_id);
long getResourceOwnerId()const;
void setResourceOwnerId(long resourceOwnerId);
std::string getInstanceName()const;
void setInstanceName(const std::string& instanceName);
long getPageSize()const;
void setPageSize(long pageSize);
long getPageNum()const;
void setPageNum(long pageNum);
private:
std::string access_key_id_;
long resourceOwnerId_;
std::string instanceName_;
long pageSize_;
long pageNum_;
};
}
}
}
#endif // !ALIBABACLOUD_OTS_MODEL_LISTVPCINFOBYINSTANCEREQUEST_H_

View File

@@ -0,0 +1,67 @@
/*
* 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_OTS_MODEL_LISTVPCINFOBYINSTANCERESULT_H_
#define ALIBABACLOUD_OTS_MODEL_LISTVPCINFOBYINSTANCERESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ots/OtsExport.h>
namespace AlibabaCloud
{
namespace Ots
{
namespace Model
{
class ALIBABACLOUD_OTS_EXPORT ListVpcInfoByInstanceResult : public ServiceResult
{
public:
struct VpcInfo
{
std::string regionNo;
std::string instanceVpcName;
std::string vpcId;
std::string endpoint;
std::string domain;
};
ListVpcInfoByInstanceResult();
explicit ListVpcInfoByInstanceResult(const std::string &payload);
~ListVpcInfoByInstanceResult();
std::string getInstanceName()const;
long getTotalCount()const;
long getPageNum()const;
long getPageSize()const;
std::vector<VpcInfo> getVpcInfos()const;
protected:
void parse(const std::string &payload);
private:
std::string instanceName_;
long totalCount_;
long pageNum_;
long pageSize_;
std::vector<VpcInfo> vpcInfos_;
};
}
}
}
#endif // !ALIBABACLOUD_OTS_MODEL_LISTVPCINFOBYINSTANCERESULT_H_

View File

@@ -0,0 +1,68 @@
/*
* 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_OTS_MODEL_LISTVPCINFOBYVPCREQUEST_H_
#define ALIBABACLOUD_OTS_MODEL_LISTVPCINFOBYVPCREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/ots/OtsExport.h>
namespace AlibabaCloud
{
namespace Ots
{
namespace Model
{
class ALIBABACLOUD_OTS_EXPORT ListVpcInfoByVpcRequest : public RpcServiceRequest
{
struct TagInfo
{
std::string tagKey;
std::string tagValue;
};
public:
ListVpcInfoByVpcRequest();
~ListVpcInfoByVpcRequest();
std::string getAccess_key_id()const;
void setAccess_key_id(const std::string& access_key_id);
long getResourceOwnerId()const;
void setResourceOwnerId(long resourceOwnerId);
std::string getVpcId()const;
void setVpcId(const std::string& vpcId);
long getPageSize()const;
void setPageSize(long pageSize);
long getPageNum()const;
void setPageNum(long pageNum);
std::vector<TagInfo> getTagInfo()const;
void setTagInfo(const std::vector<TagInfo>& tagInfo);
private:
std::string access_key_id_;
long resourceOwnerId_;
std::string vpcId_;
long pageSize_;
long pageNum_;
std::vector<TagInfo> tagInfo_;
};
}
}
}
#endif // !ALIBABACLOUD_OTS_MODEL_LISTVPCINFOBYVPCREQUEST_H_

View File

@@ -0,0 +1,67 @@
/*
* 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_OTS_MODEL_LISTVPCINFOBYVPCRESULT_H_
#define ALIBABACLOUD_OTS_MODEL_LISTVPCINFOBYVPCRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ots/OtsExport.h>
namespace AlibabaCloud
{
namespace Ots
{
namespace Model
{
class ALIBABACLOUD_OTS_EXPORT ListVpcInfoByVpcResult : public ServiceResult
{
public:
struct VpcInfo
{
std::string instanceName;
std::string regionNo;
std::string instanceVpcName;
std::string endpoint;
std::string domain;
};
ListVpcInfoByVpcResult();
explicit ListVpcInfoByVpcResult(const std::string &payload);
~ListVpcInfoByVpcResult();
long getTotalCount()const;
long getPageNum()const;
long getPageSize()const;
std::string getVpcId()const;
std::vector<VpcInfo> getVpcInfos()const;
protected:
void parse(const std::string &payload);
private:
long totalCount_;
long pageNum_;
long pageSize_;
std::string vpcId_;
std::vector<VpcInfo> vpcInfos_;
};
}
}
}
#endif // !ALIBABACLOUD_OTS_MODEL_LISTVPCINFOBYVPCRESULT_H_

View File

@@ -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_OTS_MODEL_UNBINDINSTANCE2VPCREQUEST_H_
#define ALIBABACLOUD_OTS_MODEL_UNBINDINSTANCE2VPCREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/ots/OtsExport.h>
namespace AlibabaCloud
{
namespace Ots
{
namespace Model
{
class ALIBABACLOUD_OTS_EXPORT UnbindInstance2VpcRequest : public RpcServiceRequest
{
public:
UnbindInstance2VpcRequest();
~UnbindInstance2VpcRequest();
std::string getAccess_key_id()const;
void setAccess_key_id(const std::string& access_key_id);
std::string getInstanceVpcName()const;
void setInstanceVpcName(const std::string& instanceVpcName);
long getResourceOwnerId()const;
void setResourceOwnerId(long resourceOwnerId);
std::string getInstanceName()const;
void setInstanceName(const std::string& instanceName);
std::string getRegionNo()const;
void setRegionNo(const std::string& regionNo);
private:
std::string access_key_id_;
std::string instanceVpcName_;
long resourceOwnerId_;
std::string instanceName_;
std::string regionNo_;
};
}
}
}
#endif // !ALIBABACLOUD_OTS_MODEL_UNBINDINSTANCE2VPCREQUEST_H_

View File

@@ -0,0 +1,49 @@
/*
* 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_OTS_MODEL_UNBINDINSTANCE2VPCRESULT_H_
#define ALIBABACLOUD_OTS_MODEL_UNBINDINSTANCE2VPCRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ots/OtsExport.h>
namespace AlibabaCloud
{
namespace Ots
{
namespace Model
{
class ALIBABACLOUD_OTS_EXPORT UnbindInstance2VpcResult : public ServiceResult
{
public:
UnbindInstance2VpcResult();
explicit UnbindInstance2VpcResult(const std::string &payload);
~UnbindInstance2VpcResult();
protected:
void parse(const std::string &payload);
private:
};
}
}
}
#endif // !ALIBABACLOUD_OTS_MODEL_UNBINDINSTANCE2VPCRESULT_H_

View File

@@ -0,0 +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_OTS_MODEL_UPDATEINSTANCEREQUEST_H_
#define ALIBABACLOUD_OTS_MODEL_UPDATEINSTANCEREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/ots/OtsExport.h>
namespace AlibabaCloud
{
namespace Ots
{
namespace Model
{
class ALIBABACLOUD_OTS_EXPORT UpdateInstanceRequest : public RpcServiceRequest
{
public:
UpdateInstanceRequest();
~UpdateInstanceRequest();
std::string getAccess_key_id()const;
void setAccess_key_id(const std::string& access_key_id);
long getResourceOwnerId()const;
void setResourceOwnerId(long resourceOwnerId);
std::string getInstanceName()const;
void setInstanceName(const std::string& instanceName);
std::string getNetwork()const;
void setNetwork(const std::string& network);
private:
std::string access_key_id_;
long resourceOwnerId_;
std::string instanceName_;
std::string network_;
};
}
}
}
#endif // !ALIBABACLOUD_OTS_MODEL_UPDATEINSTANCEREQUEST_H_

View File

@@ -0,0 +1,49 @@
/*
* 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_OTS_MODEL_UPDATEINSTANCERESULT_H_
#define ALIBABACLOUD_OTS_MODEL_UPDATEINSTANCERESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/ots/OtsExport.h>
namespace AlibabaCloud
{
namespace Ots
{
namespace Model
{
class ALIBABACLOUD_OTS_EXPORT UpdateInstanceResult : public ServiceResult
{
public:
UpdateInstanceResult();
explicit UpdateInstanceResult(const std::string &payload);
~UpdateInstanceResult();
protected:
void parse(const std::string &payload);
private:
};
}
}
}
#endif // !ALIBABACLOUD_OTS_MODEL_UPDATEINSTANCERESULT_H_

521
ots/src/OtsClient.cc Normal file
View File

@@ -0,0 +1,521 @@
/*
* 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/ots/OtsClient.h>
#include <alibabacloud/core/SimpleCredentialsProvider.h>
using namespace AlibabaCloud;
using namespace AlibabaCloud::Location;
using namespace AlibabaCloud::Ots;
using namespace AlibabaCloud::Ots::Model;
namespace
{
const std::string SERVICE_NAME = "Ots";
}
OtsClient::OtsClient(const Credentials &credentials, const ClientConfiguration &configuration) :
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, "ots");
}
OtsClient::OtsClient(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, "ots");
}
OtsClient::OtsClient(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, "ots");
}
OtsClient::~OtsClient()
{}
OtsClient::UnbindInstance2VpcOutcome OtsClient::unbindInstance2Vpc(const UnbindInstance2VpcRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return UnbindInstance2VpcOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return UnbindInstance2VpcOutcome(UnbindInstance2VpcResult(outcome.result()));
else
return UnbindInstance2VpcOutcome(outcome.error());
}
void OtsClient::unbindInstance2VpcAsync(const UnbindInstance2VpcRequest& request, const UnbindInstance2VpcAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, unbindInstance2Vpc(request), context);
};
asyncExecute(new Runnable(fn));
}
OtsClient::UnbindInstance2VpcOutcomeCallable OtsClient::unbindInstance2VpcCallable(const UnbindInstance2VpcRequest &request) const
{
auto task = std::make_shared<std::packaged_task<UnbindInstance2VpcOutcome()>>(
[this, request]()
{
return this->unbindInstance2Vpc(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OtsClient::ListClusterTypeOutcome OtsClient::listClusterType(const ListClusterTypeRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListClusterTypeOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListClusterTypeOutcome(ListClusterTypeResult(outcome.result()));
else
return ListClusterTypeOutcome(outcome.error());
}
void OtsClient::listClusterTypeAsync(const ListClusterTypeRequest& request, const ListClusterTypeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listClusterType(request), context);
};
asyncExecute(new Runnable(fn));
}
OtsClient::ListClusterTypeOutcomeCallable OtsClient::listClusterTypeCallable(const ListClusterTypeRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListClusterTypeOutcome()>>(
[this, request]()
{
return this->listClusterType(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OtsClient::UpdateInstanceOutcome OtsClient::updateInstance(const UpdateInstanceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return UpdateInstanceOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return UpdateInstanceOutcome(UpdateInstanceResult(outcome.result()));
else
return UpdateInstanceOutcome(outcome.error());
}
void OtsClient::updateInstanceAsync(const UpdateInstanceRequest& request, const UpdateInstanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, updateInstance(request), context);
};
asyncExecute(new Runnable(fn));
}
OtsClient::UpdateInstanceOutcomeCallable OtsClient::updateInstanceCallable(const UpdateInstanceRequest &request) const
{
auto task = std::make_shared<std::packaged_task<UpdateInstanceOutcome()>>(
[this, request]()
{
return this->updateInstance(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OtsClient::ListInstanceOutcome OtsClient::listInstance(const ListInstanceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListInstanceOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListInstanceOutcome(ListInstanceResult(outcome.result()));
else
return ListInstanceOutcome(outcome.error());
}
void OtsClient::listInstanceAsync(const ListInstanceRequest& request, const ListInstanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listInstance(request), context);
};
asyncExecute(new Runnable(fn));
}
OtsClient::ListInstanceOutcomeCallable OtsClient::listInstanceCallable(const ListInstanceRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListInstanceOutcome()>>(
[this, request]()
{
return this->listInstance(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OtsClient::ListVpcInfoByVpcOutcome OtsClient::listVpcInfoByVpc(const ListVpcInfoByVpcRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListVpcInfoByVpcOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListVpcInfoByVpcOutcome(ListVpcInfoByVpcResult(outcome.result()));
else
return ListVpcInfoByVpcOutcome(outcome.error());
}
void OtsClient::listVpcInfoByVpcAsync(const ListVpcInfoByVpcRequest& request, const ListVpcInfoByVpcAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listVpcInfoByVpc(request), context);
};
asyncExecute(new Runnable(fn));
}
OtsClient::ListVpcInfoByVpcOutcomeCallable OtsClient::listVpcInfoByVpcCallable(const ListVpcInfoByVpcRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListVpcInfoByVpcOutcome()>>(
[this, request]()
{
return this->listVpcInfoByVpc(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OtsClient::GetInstanceOutcome OtsClient::getInstance(const GetInstanceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetInstanceOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetInstanceOutcome(GetInstanceResult(outcome.result()));
else
return GetInstanceOutcome(outcome.error());
}
void OtsClient::getInstanceAsync(const GetInstanceRequest& request, const GetInstanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getInstance(request), context);
};
asyncExecute(new Runnable(fn));
}
OtsClient::GetInstanceOutcomeCallable OtsClient::getInstanceCallable(const GetInstanceRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetInstanceOutcome()>>(
[this, request]()
{
return this->getInstance(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OtsClient::BindInstance2VpcOutcome OtsClient::bindInstance2Vpc(const BindInstance2VpcRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return BindInstance2VpcOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return BindInstance2VpcOutcome(BindInstance2VpcResult(outcome.result()));
else
return BindInstance2VpcOutcome(outcome.error());
}
void OtsClient::bindInstance2VpcAsync(const BindInstance2VpcRequest& request, const BindInstance2VpcAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, bindInstance2Vpc(request), context);
};
asyncExecute(new Runnable(fn));
}
OtsClient::BindInstance2VpcOutcomeCallable OtsClient::bindInstance2VpcCallable(const BindInstance2VpcRequest &request) const
{
auto task = std::make_shared<std::packaged_task<BindInstance2VpcOutcome()>>(
[this, request]()
{
return this->bindInstance2Vpc(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OtsClient::InsertInstanceOutcome OtsClient::insertInstance(const InsertInstanceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return InsertInstanceOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return InsertInstanceOutcome(InsertInstanceResult(outcome.result()));
else
return InsertInstanceOutcome(outcome.error());
}
void OtsClient::insertInstanceAsync(const InsertInstanceRequest& request, const InsertInstanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, insertInstance(request), context);
};
asyncExecute(new Runnable(fn));
}
OtsClient::InsertInstanceOutcomeCallable OtsClient::insertInstanceCallable(const InsertInstanceRequest &request) const
{
auto task = std::make_shared<std::packaged_task<InsertInstanceOutcome()>>(
[this, request]()
{
return this->insertInstance(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OtsClient::ListTagsOutcome OtsClient::listTags(const ListTagsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListTagsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListTagsOutcome(ListTagsResult(outcome.result()));
else
return ListTagsOutcome(outcome.error());
}
void OtsClient::listTagsAsync(const ListTagsRequest& request, const ListTagsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listTags(request), context);
};
asyncExecute(new Runnable(fn));
}
OtsClient::ListTagsOutcomeCallable OtsClient::listTagsCallable(const ListTagsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListTagsOutcome()>>(
[this, request]()
{
return this->listTags(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OtsClient::ListVpcInfoByInstanceOutcome OtsClient::listVpcInfoByInstance(const ListVpcInfoByInstanceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListVpcInfoByInstanceOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListVpcInfoByInstanceOutcome(ListVpcInfoByInstanceResult(outcome.result()));
else
return ListVpcInfoByInstanceOutcome(outcome.error());
}
void OtsClient::listVpcInfoByInstanceAsync(const ListVpcInfoByInstanceRequest& request, const ListVpcInfoByInstanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listVpcInfoByInstance(request), context);
};
asyncExecute(new Runnable(fn));
}
OtsClient::ListVpcInfoByInstanceOutcomeCallable OtsClient::listVpcInfoByInstanceCallable(const ListVpcInfoByInstanceRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListVpcInfoByInstanceOutcome()>>(
[this, request]()
{
return this->listVpcInfoByInstance(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OtsClient::InsertTagsOutcome OtsClient::insertTags(const InsertTagsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return InsertTagsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return InsertTagsOutcome(InsertTagsResult(outcome.result()));
else
return InsertTagsOutcome(outcome.error());
}
void OtsClient::insertTagsAsync(const InsertTagsRequest& request, const InsertTagsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, insertTags(request), context);
};
asyncExecute(new Runnable(fn));
}
OtsClient::InsertTagsOutcomeCallable OtsClient::insertTagsCallable(const InsertTagsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<InsertTagsOutcome()>>(
[this, request]()
{
return this->insertTags(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OtsClient::DeleteTagsOutcome OtsClient::deleteTags(const DeleteTagsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DeleteTagsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DeleteTagsOutcome(DeleteTagsResult(outcome.result()));
else
return DeleteTagsOutcome(outcome.error());
}
void OtsClient::deleteTagsAsync(const DeleteTagsRequest& request, const DeleteTagsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, deleteTags(request), context);
};
asyncExecute(new Runnable(fn));
}
OtsClient::DeleteTagsOutcomeCallable OtsClient::deleteTagsCallable(const DeleteTagsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DeleteTagsOutcome()>>(
[this, request]()
{
return this->deleteTags(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OtsClient::DeleteInstanceOutcome OtsClient::deleteInstance(const DeleteInstanceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DeleteInstanceOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DeleteInstanceOutcome(DeleteInstanceResult(outcome.result()));
else
return DeleteInstanceOutcome(outcome.error());
}
void OtsClient::deleteInstanceAsync(const DeleteInstanceRequest& request, const DeleteInstanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, deleteInstance(request), context);
};
asyncExecute(new Runnable(fn));
}
OtsClient::DeleteInstanceOutcomeCallable OtsClient::deleteInstanceCallable(const DeleteInstanceRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DeleteInstanceOutcome()>>(
[this, request]()
{
return this->deleteInstance(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}

View File

@@ -0,0 +1,115 @@
/*
* 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/ots/model/BindInstance2VpcRequest.h>
using AlibabaCloud::Ots::Model::BindInstance2VpcRequest;
BindInstance2VpcRequest::BindInstance2VpcRequest() :
RpcServiceRequest("ots", "2016-06-20", "BindInstance2Vpc")
{}
BindInstance2VpcRequest::~BindInstance2VpcRequest()
{}
std::string BindInstance2VpcRequest::getAccess_key_id()const
{
return access_key_id_;
}
void BindInstance2VpcRequest::setAccess_key_id(const std::string& access_key_id)
{
access_key_id_ = access_key_id;
setParameter("Access_key_id", access_key_id);
}
std::string BindInstance2VpcRequest::getInstanceVpcName()const
{
return instanceVpcName_;
}
void BindInstance2VpcRequest::setInstanceVpcName(const std::string& instanceVpcName)
{
instanceVpcName_ = instanceVpcName;
setParameter("InstanceVpcName", instanceVpcName);
}
long BindInstance2VpcRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void BindInstance2VpcRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string BindInstance2VpcRequest::getInstanceName()const
{
return instanceName_;
}
void BindInstance2VpcRequest::setInstanceName(const std::string& instanceName)
{
instanceName_ = instanceName;
setParameter("InstanceName", instanceName);
}
std::string BindInstance2VpcRequest::getVpcId()const
{
return vpcId_;
}
void BindInstance2VpcRequest::setVpcId(const std::string& vpcId)
{
vpcId_ = vpcId;
setParameter("VpcId", vpcId);
}
std::string BindInstance2VpcRequest::getVirtualSwitchId()const
{
return virtualSwitchId_;
}
void BindInstance2VpcRequest::setVirtualSwitchId(const std::string& virtualSwitchId)
{
virtualSwitchId_ = virtualSwitchId;
setParameter("VirtualSwitchId", virtualSwitchId);
}
std::string BindInstance2VpcRequest::getRegionNo()const
{
return regionNo_;
}
void BindInstance2VpcRequest::setRegionNo(const std::string& regionNo)
{
regionNo_ = regionNo;
setParameter("RegionNo", regionNo);
}
std::string BindInstance2VpcRequest::getNetwork()const
{
return network_;
}
void BindInstance2VpcRequest::setNetwork(const std::string& network)
{
network_ = network;
setParameter("Network", network);
}

View File

@@ -0,0 +1,59 @@
/*
* 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/ots/model/BindInstance2VpcResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Ots;
using namespace AlibabaCloud::Ots::Model;
BindInstance2VpcResult::BindInstance2VpcResult() :
ServiceResult()
{}
BindInstance2VpcResult::BindInstance2VpcResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
BindInstance2VpcResult::~BindInstance2VpcResult()
{}
void BindInstance2VpcResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Endpoint"].isNull())
endpoint_ = value["Endpoint"].asString();
if(!value["Domain"].isNull())
domain_ = value["Domain"].asString();
}
std::string BindInstance2VpcResult::getEndpoint()const
{
return endpoint_;
}
std::string BindInstance2VpcResult::getDomain()const
{
return domain_;
}

View File

@@ -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.
*/
#include <alibabacloud/ots/model/DeleteInstanceRequest.h>
using AlibabaCloud::Ots::Model::DeleteInstanceRequest;
DeleteInstanceRequest::DeleteInstanceRequest() :
RpcServiceRequest("ots", "2016-06-20", "DeleteInstance")
{}
DeleteInstanceRequest::~DeleteInstanceRequest()
{}
std::string DeleteInstanceRequest::getAccess_key_id()const
{
return access_key_id_;
}
void DeleteInstanceRequest::setAccess_key_id(const std::string& access_key_id)
{
access_key_id_ = access_key_id;
setParameter("Access_key_id", access_key_id);
}
long DeleteInstanceRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void DeleteInstanceRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string DeleteInstanceRequest::getInstanceName()const
{
return instanceName_;
}
void DeleteInstanceRequest::setInstanceName(const std::string& instanceName)
{
instanceName_ = instanceName;
setParameter("InstanceName", instanceName);
}

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.
*/
#include <alibabacloud/ots/model/DeleteInstanceResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Ots;
using namespace AlibabaCloud::Ots::Model;
DeleteInstanceResult::DeleteInstanceResult() :
ServiceResult()
{}
DeleteInstanceResult::DeleteInstanceResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteInstanceResult::~DeleteInstanceResult()
{}
void DeleteInstanceResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}

View File

@@ -0,0 +1,77 @@
/*
* 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/ots/model/DeleteTagsRequest.h>
using AlibabaCloud::Ots::Model::DeleteTagsRequest;
DeleteTagsRequest::DeleteTagsRequest() :
RpcServiceRequest("ots", "2016-06-20", "DeleteTags")
{}
DeleteTagsRequest::~DeleteTagsRequest()
{}
std::string DeleteTagsRequest::getAccess_key_id()const
{
return access_key_id_;
}
void DeleteTagsRequest::setAccess_key_id(const std::string& access_key_id)
{
access_key_id_ = access_key_id;
setParameter("Access_key_id", access_key_id);
}
long DeleteTagsRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void DeleteTagsRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string DeleteTagsRequest::getInstanceName()const
{
return instanceName_;
}
void DeleteTagsRequest::setInstanceName(const std::string& instanceName)
{
instanceName_ = instanceName;
setParameter("InstanceName", instanceName);
}
std::vector<DeleteTagsRequest::TagInfo> DeleteTagsRequest::getTagInfo()const
{
return tagInfo_;
}
void DeleteTagsRequest::setTagInfo(const std::vector<TagInfo>& tagInfo)
{
tagInfo_ = tagInfo;
int i = 0;
for(int i = 0; i!= tagInfo.size(); i++) {
auto obj = tagInfo.at(i);
std::string str ="TagInfo."+ std::to_string(i);
setParameter(str + ".TagKey", obj.tagKey);
setParameter(str + ".TagValue", obj.tagValue);
}
}

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.
*/
#include <alibabacloud/ots/model/DeleteTagsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Ots;
using namespace AlibabaCloud::Ots::Model;
DeleteTagsResult::DeleteTagsResult() :
ServiceResult()
{}
DeleteTagsResult::DeleteTagsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteTagsResult::~DeleteTagsResult()
{}
void DeleteTagsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}

View File

@@ -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.
*/
#include <alibabacloud/ots/model/GetInstanceRequest.h>
using AlibabaCloud::Ots::Model::GetInstanceRequest;
GetInstanceRequest::GetInstanceRequest() :
RpcServiceRequest("ots", "2016-06-20", "GetInstance")
{}
GetInstanceRequest::~GetInstanceRequest()
{}
std::string GetInstanceRequest::getAccess_key_id()const
{
return access_key_id_;
}
void GetInstanceRequest::setAccess_key_id(const std::string& access_key_id)
{
access_key_id_ = access_key_id;
setParameter("Access_key_id", access_key_id);
}
long GetInstanceRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void GetInstanceRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string GetInstanceRequest::getInstanceName()const
{
return instanceName_;
}
void GetInstanceRequest::setInstanceName(const std::string& instanceName)
{
instanceName_ = instanceName;
setParameter("InstanceName", instanceName);
}

View File

@@ -0,0 +1,82 @@
/*
* 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/ots/model/GetInstanceResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Ots;
using namespace AlibabaCloud::Ots::Model;
GetInstanceResult::GetInstanceResult() :
ServiceResult()
{}
GetInstanceResult::GetInstanceResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetInstanceResult::~GetInstanceResult()
{}
void GetInstanceResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto instanceInfoNode = value["InstanceInfo"];
if(!instanceInfoNode["InstanceName"].isNull())
instanceInfo_.instanceName = instanceInfoNode["InstanceName"].asString();
if(!instanceInfoNode["UserId"].isNull())
instanceInfo_.userId = instanceInfoNode["UserId"].asString();
if(!instanceInfoNode["Network"].isNull())
instanceInfo_.network = instanceInfoNode["Network"].asString();
if(!instanceInfoNode["Status"].isNull())
instanceInfo_.status = std::stoi(instanceInfoNode["Status"].asString());
if(!instanceInfoNode["WriteCapacity"].isNull())
instanceInfo_.writeCapacity = std::stoi(instanceInfoNode["WriteCapacity"].asString());
if(!instanceInfoNode["ReadCapacity"].isNull())
instanceInfo_.readCapacity = std::stoi(instanceInfoNode["ReadCapacity"].asString());
if(!instanceInfoNode["Description"].isNull())
instanceInfo_.description = instanceInfoNode["Description"].asString();
if(!instanceInfoNode["CreateTime"].isNull())
instanceInfo_.createTime = instanceInfoNode["CreateTime"].asString();
if(!instanceInfoNode["ClusterType"].isNull())
instanceInfo_.clusterType = instanceInfoNode["ClusterType"].asString();
auto allTagInfos = value["TagInfos"]["TagInfo"];
for (auto value : allTagInfos)
{
InstanceInfo::TagInfo tagInfoObject;
if(!value["TagKey"].isNull())
tagInfoObject.tagKey = value["TagKey"].asString();
if(!value["TagValue"].isNull())
tagInfoObject.tagValue = value["TagValue"].asString();
instanceInfo_.tagInfos.push_back(tagInfoObject);
}
auto quotaNode = instanceInfoNode["Quota"];
if(!quotaNode["EntityQuota"].isNull())
instanceInfo_.quota.entityQuota = std::stoi(quotaNode["EntityQuota"].asString());
}
GetInstanceResult::InstanceInfo GetInstanceResult::getInstanceInfo()const
{
return instanceInfo_;
}

View File

@@ -0,0 +1,110 @@
/*
* 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/ots/model/InsertInstanceRequest.h>
using AlibabaCloud::Ots::Model::InsertInstanceRequest;
InsertInstanceRequest::InsertInstanceRequest() :
RpcServiceRequest("ots", "2016-06-20", "InsertInstance")
{}
InsertInstanceRequest::~InsertInstanceRequest()
{}
std::string InsertInstanceRequest::getAccess_key_id()const
{
return access_key_id_;
}
void InsertInstanceRequest::setAccess_key_id(const std::string& access_key_id)
{
access_key_id_ = access_key_id;
setParameter("Access_key_id", access_key_id);
}
std::string InsertInstanceRequest::getClusterType()const
{
return clusterType_;
}
void InsertInstanceRequest::setClusterType(const std::string& clusterType)
{
clusterType_ = clusterType;
setParameter("ClusterType", clusterType);
}
long InsertInstanceRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void InsertInstanceRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string InsertInstanceRequest::getInstanceName()const
{
return instanceName_;
}
void InsertInstanceRequest::setInstanceName(const std::string& instanceName)
{
instanceName_ = instanceName;
setParameter("InstanceName", instanceName);
}
std::string InsertInstanceRequest::getDescription()const
{
return description_;
}
void InsertInstanceRequest::setDescription(const std::string& description)
{
description_ = description;
setParameter("Description", description);
}
std::vector<InsertInstanceRequest::TagInfo> InsertInstanceRequest::getTagInfo()const
{
return tagInfo_;
}
void InsertInstanceRequest::setTagInfo(const std::vector<TagInfo>& tagInfo)
{
tagInfo_ = tagInfo;
int i = 0;
for(int i = 0; i!= tagInfo.size(); i++) {
auto obj = tagInfo.at(i);
std::string str ="TagInfo."+ std::to_string(i);
setParameter(str + ".TagKey", obj.tagKey);
setParameter(str + ".TagValue", obj.tagValue);
}
}
std::string InsertInstanceRequest::getNetwork()const
{
return network_;
}
void InsertInstanceRequest::setNetwork(const std::string& network)
{
network_ = network;
setParameter("Network", network);
}

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.
*/
#include <alibabacloud/ots/model/InsertInstanceResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Ots;
using namespace AlibabaCloud::Ots::Model;
InsertInstanceResult::InsertInstanceResult() :
ServiceResult()
{}
InsertInstanceResult::InsertInstanceResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
InsertInstanceResult::~InsertInstanceResult()
{}
void InsertInstanceResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}

View File

@@ -0,0 +1,77 @@
/*
* 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/ots/model/InsertTagsRequest.h>
using AlibabaCloud::Ots::Model::InsertTagsRequest;
InsertTagsRequest::InsertTagsRequest() :
RpcServiceRequest("ots", "2016-06-20", "InsertTags")
{}
InsertTagsRequest::~InsertTagsRequest()
{}
std::string InsertTagsRequest::getAccess_key_id()const
{
return access_key_id_;
}
void InsertTagsRequest::setAccess_key_id(const std::string& access_key_id)
{
access_key_id_ = access_key_id;
setParameter("Access_key_id", access_key_id);
}
long InsertTagsRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void InsertTagsRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string InsertTagsRequest::getInstanceName()const
{
return instanceName_;
}
void InsertTagsRequest::setInstanceName(const std::string& instanceName)
{
instanceName_ = instanceName;
setParameter("InstanceName", instanceName);
}
std::vector<InsertTagsRequest::TagInfo> InsertTagsRequest::getTagInfo()const
{
return tagInfo_;
}
void InsertTagsRequest::setTagInfo(const std::vector<TagInfo>& tagInfo)
{
tagInfo_ = tagInfo;
int i = 0;
for(int i = 0; i!= tagInfo.size(); i++) {
auto obj = tagInfo.at(i);
std::string str ="TagInfo."+ std::to_string(i);
setParameter(str + ".TagKey", obj.tagKey);
setParameter(str + ".TagValue", obj.tagValue);
}
}

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.
*/
#include <alibabacloud/ots/model/InsertTagsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Ots;
using namespace AlibabaCloud::Ots::Model;
InsertTagsResult::InsertTagsResult() :
ServiceResult()
{}
InsertTagsResult::InsertTagsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
InsertTagsResult::~InsertTagsResult()
{}
void InsertTagsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}

View File

@@ -0,0 +1,49 @@
/*
* 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/ots/model/ListClusterTypeRequest.h>
using AlibabaCloud::Ots::Model::ListClusterTypeRequest;
ListClusterTypeRequest::ListClusterTypeRequest() :
RpcServiceRequest("ots", "2016-06-20", "ListClusterType")
{}
ListClusterTypeRequest::~ListClusterTypeRequest()
{}
std::string ListClusterTypeRequest::getAccess_key_id()const
{
return access_key_id_;
}
void ListClusterTypeRequest::setAccess_key_id(const std::string& access_key_id)
{
access_key_id_ = access_key_id;
setParameter("Access_key_id", access_key_id);
}
long ListClusterTypeRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void ListClusterTypeRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}

View File

@@ -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.
*/
#include <alibabacloud/ots/model/ListClusterTypeResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Ots;
using namespace AlibabaCloud::Ots::Model;
ListClusterTypeResult::ListClusterTypeResult() :
ServiceResult()
{}
ListClusterTypeResult::ListClusterTypeResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListClusterTypeResult::~ListClusterTypeResult()
{}
void ListClusterTypeResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allClusterTypeInfos = value["ClusterTypeInfos"]["ClusterType"];
for (const auto &item : allClusterTypeInfos)
clusterTypeInfos_.push_back(item.asString());
}
std::vector<std::string> ListClusterTypeResult::getClusterTypeInfos()const
{
return clusterTypeInfos_;
}

View File

@@ -0,0 +1,88 @@
/*
* 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/ots/model/ListInstanceRequest.h>
using AlibabaCloud::Ots::Model::ListInstanceRequest;
ListInstanceRequest::ListInstanceRequest() :
RpcServiceRequest("ots", "2016-06-20", "ListInstance")
{}
ListInstanceRequest::~ListInstanceRequest()
{}
std::string ListInstanceRequest::getAccess_key_id()const
{
return access_key_id_;
}
void ListInstanceRequest::setAccess_key_id(const std::string& access_key_id)
{
access_key_id_ = access_key_id;
setParameter("Access_key_id", access_key_id);
}
long ListInstanceRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void ListInstanceRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
long ListInstanceRequest::getPageSize()const
{
return pageSize_;
}
void ListInstanceRequest::setPageSize(long pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
long ListInstanceRequest::getPageNum()const
{
return pageNum_;
}
void ListInstanceRequest::setPageNum(long pageNum)
{
pageNum_ = pageNum;
setParameter("PageNum", std::to_string(pageNum));
}
std::vector<ListInstanceRequest::TagInfo> ListInstanceRequest::getTagInfo()const
{
return tagInfo_;
}
void ListInstanceRequest::setTagInfo(const std::vector<TagInfo>& tagInfo)
{
tagInfo_ = tagInfo;
int i = 0;
for(int i = 0; i!= tagInfo.size(); i++) {
auto obj = tagInfo.at(i);
std::string str ="TagInfo."+ std::to_string(i);
setParameter(str + ".TagKey", obj.tagKey);
setParameter(str + ".TagValue", obj.tagValue);
}
}

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.
*/
#include <alibabacloud/ots/model/ListInstanceResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Ots;
using namespace AlibabaCloud::Ots::Model;
ListInstanceResult::ListInstanceResult() :
ServiceResult()
{}
ListInstanceResult::ListInstanceResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListInstanceResult::~ListInstanceResult()
{}
void ListInstanceResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allInstanceInfos = value["InstanceInfos"]["InstanceInfo"];
for (auto value : allInstanceInfos)
{
InstanceInfo instanceInfosObject;
if(!value["InstanceName"].isNull())
instanceInfosObject.instanceName = value["InstanceName"].asString();
if(!value["Timestamp"].isNull())
instanceInfosObject.timestamp = value["Timestamp"].asString();
instanceInfos_.push_back(instanceInfosObject);
}
if(!value["TotalCount"].isNull())
totalCount_ = std::stol(value["TotalCount"].asString());
if(!value["PageNum"].isNull())
pageNum_ = std::stol(value["PageNum"].asString());
if(!value["PageSize"].isNull())
pageSize_ = std::stol(value["PageSize"].asString());
}
long ListInstanceResult::getTotalCount()const
{
return totalCount_;
}
long ListInstanceResult::getPageNum()const
{
return pageNum_;
}
long ListInstanceResult::getPageSize()const
{
return pageSize_;
}
std::vector<ListInstanceResult::InstanceInfo> ListInstanceResult::getInstanceInfos()const
{
return instanceInfos_;
}

View File

@@ -0,0 +1,99 @@
/*
* 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/ots/model/ListTagsRequest.h>
using AlibabaCloud::Ots::Model::ListTagsRequest;
ListTagsRequest::ListTagsRequest() :
RpcServiceRequest("ots", "2016-06-20", "ListTags")
{}
ListTagsRequest::~ListTagsRequest()
{}
std::string ListTagsRequest::getAccess_key_id()const
{
return access_key_id_;
}
void ListTagsRequest::setAccess_key_id(const std::string& access_key_id)
{
access_key_id_ = access_key_id;
setParameter("Access_key_id", access_key_id);
}
long ListTagsRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void ListTagsRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string ListTagsRequest::getInstanceName()const
{
return instanceName_;
}
void ListTagsRequest::setInstanceName(const std::string& instanceName)
{
instanceName_ = instanceName;
setParameter("InstanceName", instanceName);
}
long ListTagsRequest::getPageSize()const
{
return pageSize_;
}
void ListTagsRequest::setPageSize(long pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
long ListTagsRequest::getPageNum()const
{
return pageNum_;
}
void ListTagsRequest::setPageNum(long pageNum)
{
pageNum_ = pageNum;
setParameter("PageNum", std::to_string(pageNum));
}
std::vector<ListTagsRequest::TagInfo> ListTagsRequest::getTagInfo()const
{
return tagInfo_;
}
void ListTagsRequest::setTagInfo(const std::vector<TagInfo>& tagInfo)
{
tagInfo_ = tagInfo;
int i = 0;
for(int i = 0; i!= tagInfo.size(); i++) {
auto obj = tagInfo.at(i);
std::string str ="TagInfo."+ std::to_string(i);
setParameter(str + ".TagKey", obj.tagKey);
setParameter(str + ".TagValue", obj.tagValue);
}
}

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.
*/
#include <alibabacloud/ots/model/ListTagsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Ots;
using namespace AlibabaCloud::Ots::Model;
ListTagsResult::ListTagsResult() :
ServiceResult()
{}
ListTagsResult::ListTagsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListTagsResult::~ListTagsResult()
{}
void ListTagsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allTagInfos = value["TagInfos"]["TagInfo"];
for (auto value : allTagInfos)
{
TagInfo tagInfosObject;
if(!value["TagKey"].isNull())
tagInfosObject.tagKey = value["TagKey"].asString();
if(!value["TagValue"].isNull())
tagInfosObject.tagValue = value["TagValue"].asString();
tagInfos_.push_back(tagInfosObject);
}
if(!value["TotalCount"].isNull())
totalCount_ = std::stol(value["TotalCount"].asString());
if(!value["PageNum"].isNull())
pageNum_ = std::stol(value["PageNum"].asString());
if(!value["PageSize"].isNull())
pageSize_ = std::stol(value["PageSize"].asString());
}
std::vector<ListTagsResult::TagInfo> ListTagsResult::getTagInfos()const
{
return tagInfos_;
}
long ListTagsResult::getTotalCount()const
{
return totalCount_;
}
long ListTagsResult::getPageNum()const
{
return pageNum_;
}
long ListTagsResult::getPageSize()const
{
return pageSize_;
}

View File

@@ -0,0 +1,82 @@
/*
* 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/ots/model/ListVpcInfoByInstanceRequest.h>
using AlibabaCloud::Ots::Model::ListVpcInfoByInstanceRequest;
ListVpcInfoByInstanceRequest::ListVpcInfoByInstanceRequest() :
RpcServiceRequest("ots", "2016-06-20", "ListVpcInfoByInstance")
{}
ListVpcInfoByInstanceRequest::~ListVpcInfoByInstanceRequest()
{}
std::string ListVpcInfoByInstanceRequest::getAccess_key_id()const
{
return access_key_id_;
}
void ListVpcInfoByInstanceRequest::setAccess_key_id(const std::string& access_key_id)
{
access_key_id_ = access_key_id;
setParameter("Access_key_id", access_key_id);
}
long ListVpcInfoByInstanceRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void ListVpcInfoByInstanceRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string ListVpcInfoByInstanceRequest::getInstanceName()const
{
return instanceName_;
}
void ListVpcInfoByInstanceRequest::setInstanceName(const std::string& instanceName)
{
instanceName_ = instanceName;
setParameter("InstanceName", instanceName);
}
long ListVpcInfoByInstanceRequest::getPageSize()const
{
return pageSize_;
}
void ListVpcInfoByInstanceRequest::setPageSize(long pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
long ListVpcInfoByInstanceRequest::getPageNum()const
{
return pageNum_;
}
void ListVpcInfoByInstanceRequest::setPageNum(long pageNum)
{
pageNum_ = pageNum;
setParameter("PageNum", std::to_string(pageNum));
}

View File

@@ -0,0 +1,94 @@
/*
* 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/ots/model/ListVpcInfoByInstanceResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Ots;
using namespace AlibabaCloud::Ots::Model;
ListVpcInfoByInstanceResult::ListVpcInfoByInstanceResult() :
ServiceResult()
{}
ListVpcInfoByInstanceResult::ListVpcInfoByInstanceResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListVpcInfoByInstanceResult::~ListVpcInfoByInstanceResult()
{}
void ListVpcInfoByInstanceResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allVpcInfos = value["VpcInfos"]["VpcInfo"];
for (auto value : allVpcInfos)
{
VpcInfo vpcInfosObject;
if(!value["InstanceVpcName"].isNull())
vpcInfosObject.instanceVpcName = value["InstanceVpcName"].asString();
if(!value["VpcId"].isNull())
vpcInfosObject.vpcId = value["VpcId"].asString();
if(!value["Endpoint"].isNull())
vpcInfosObject.endpoint = value["Endpoint"].asString();
if(!value["Domain"].isNull())
vpcInfosObject.domain = value["Domain"].asString();
if(!value["RegionNo"].isNull())
vpcInfosObject.regionNo = value["RegionNo"].asString();
vpcInfos_.push_back(vpcInfosObject);
}
if(!value["InstanceName"].isNull())
instanceName_ = value["InstanceName"].asString();
if(!value["TotalCount"].isNull())
totalCount_ = std::stol(value["TotalCount"].asString());
if(!value["PageNum"].isNull())
pageNum_ = std::stol(value["PageNum"].asString());
if(!value["PageSize"].isNull())
pageSize_ = std::stol(value["PageSize"].asString());
}
std::string ListVpcInfoByInstanceResult::getInstanceName()const
{
return instanceName_;
}
long ListVpcInfoByInstanceResult::getTotalCount()const
{
return totalCount_;
}
long ListVpcInfoByInstanceResult::getPageNum()const
{
return pageNum_;
}
long ListVpcInfoByInstanceResult::getPageSize()const
{
return pageSize_;
}
std::vector<ListVpcInfoByInstanceResult::VpcInfo> ListVpcInfoByInstanceResult::getVpcInfos()const
{
return vpcInfos_;
}

View File

@@ -0,0 +1,99 @@
/*
* 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/ots/model/ListVpcInfoByVpcRequest.h>
using AlibabaCloud::Ots::Model::ListVpcInfoByVpcRequest;
ListVpcInfoByVpcRequest::ListVpcInfoByVpcRequest() :
RpcServiceRequest("ots", "2016-06-20", "ListVpcInfoByVpc")
{}
ListVpcInfoByVpcRequest::~ListVpcInfoByVpcRequest()
{}
std::string ListVpcInfoByVpcRequest::getAccess_key_id()const
{
return access_key_id_;
}
void ListVpcInfoByVpcRequest::setAccess_key_id(const std::string& access_key_id)
{
access_key_id_ = access_key_id;
setParameter("Access_key_id", access_key_id);
}
long ListVpcInfoByVpcRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void ListVpcInfoByVpcRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string ListVpcInfoByVpcRequest::getVpcId()const
{
return vpcId_;
}
void ListVpcInfoByVpcRequest::setVpcId(const std::string& vpcId)
{
vpcId_ = vpcId;
setParameter("VpcId", vpcId);
}
long ListVpcInfoByVpcRequest::getPageSize()const
{
return pageSize_;
}
void ListVpcInfoByVpcRequest::setPageSize(long pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
long ListVpcInfoByVpcRequest::getPageNum()const
{
return pageNum_;
}
void ListVpcInfoByVpcRequest::setPageNum(long pageNum)
{
pageNum_ = pageNum;
setParameter("PageNum", std::to_string(pageNum));
}
std::vector<ListVpcInfoByVpcRequest::TagInfo> ListVpcInfoByVpcRequest::getTagInfo()const
{
return tagInfo_;
}
void ListVpcInfoByVpcRequest::setTagInfo(const std::vector<TagInfo>& tagInfo)
{
tagInfo_ = tagInfo;
int i = 0;
for(int i = 0; i!= tagInfo.size(); i++) {
auto obj = tagInfo.at(i);
std::string str ="TagInfo."+ std::to_string(i);
setParameter(str + ".TagKey", obj.tagKey);
setParameter(str + ".TagValue", obj.tagValue);
}
}

View File

@@ -0,0 +1,94 @@
/*
* 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/ots/model/ListVpcInfoByVpcResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Ots;
using namespace AlibabaCloud::Ots::Model;
ListVpcInfoByVpcResult::ListVpcInfoByVpcResult() :
ServiceResult()
{}
ListVpcInfoByVpcResult::ListVpcInfoByVpcResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListVpcInfoByVpcResult::~ListVpcInfoByVpcResult()
{}
void ListVpcInfoByVpcResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allVpcInfos = value["VpcInfos"]["VpcInfo"];
for (auto value : allVpcInfos)
{
VpcInfo vpcInfosObject;
if(!value["InstanceName"].isNull())
vpcInfosObject.instanceName = value["InstanceName"].asString();
if(!value["InstanceVpcName"].isNull())
vpcInfosObject.instanceVpcName = value["InstanceVpcName"].asString();
if(!value["Endpoint"].isNull())
vpcInfosObject.endpoint = value["Endpoint"].asString();
if(!value["Domain"].isNull())
vpcInfosObject.domain = value["Domain"].asString();
if(!value["RegionNo"].isNull())
vpcInfosObject.regionNo = value["RegionNo"].asString();
vpcInfos_.push_back(vpcInfosObject);
}
if(!value["TotalCount"].isNull())
totalCount_ = std::stol(value["TotalCount"].asString());
if(!value["PageNum"].isNull())
pageNum_ = std::stol(value["PageNum"].asString());
if(!value["PageSize"].isNull())
pageSize_ = std::stol(value["PageSize"].asString());
if(!value["VpcId"].isNull())
vpcId_ = value["VpcId"].asString();
}
long ListVpcInfoByVpcResult::getTotalCount()const
{
return totalCount_;
}
long ListVpcInfoByVpcResult::getPageNum()const
{
return pageNum_;
}
long ListVpcInfoByVpcResult::getPageSize()const
{
return pageSize_;
}
std::string ListVpcInfoByVpcResult::getVpcId()const
{
return vpcId_;
}
std::vector<ListVpcInfoByVpcResult::VpcInfo> ListVpcInfoByVpcResult::getVpcInfos()const
{
return vpcInfos_;
}

View File

@@ -0,0 +1,82 @@
/*
* 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/ots/model/UnbindInstance2VpcRequest.h>
using AlibabaCloud::Ots::Model::UnbindInstance2VpcRequest;
UnbindInstance2VpcRequest::UnbindInstance2VpcRequest() :
RpcServiceRequest("ots", "2016-06-20", "UnbindInstance2Vpc")
{}
UnbindInstance2VpcRequest::~UnbindInstance2VpcRequest()
{}
std::string UnbindInstance2VpcRequest::getAccess_key_id()const
{
return access_key_id_;
}
void UnbindInstance2VpcRequest::setAccess_key_id(const std::string& access_key_id)
{
access_key_id_ = access_key_id;
setParameter("Access_key_id", access_key_id);
}
std::string UnbindInstance2VpcRequest::getInstanceVpcName()const
{
return instanceVpcName_;
}
void UnbindInstance2VpcRequest::setInstanceVpcName(const std::string& instanceVpcName)
{
instanceVpcName_ = instanceVpcName;
setParameter("InstanceVpcName", instanceVpcName);
}
long UnbindInstance2VpcRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void UnbindInstance2VpcRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string UnbindInstance2VpcRequest::getInstanceName()const
{
return instanceName_;
}
void UnbindInstance2VpcRequest::setInstanceName(const std::string& instanceName)
{
instanceName_ = instanceName;
setParameter("InstanceName", instanceName);
}
std::string UnbindInstance2VpcRequest::getRegionNo()const
{
return regionNo_;
}
void UnbindInstance2VpcRequest::setRegionNo(const std::string& regionNo)
{
regionNo_ = regionNo;
setParameter("RegionNo", regionNo);
}

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.
*/
#include <alibabacloud/ots/model/UnbindInstance2VpcResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Ots;
using namespace AlibabaCloud::Ots::Model;
UnbindInstance2VpcResult::UnbindInstance2VpcResult() :
ServiceResult()
{}
UnbindInstance2VpcResult::UnbindInstance2VpcResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
UnbindInstance2VpcResult::~UnbindInstance2VpcResult()
{}
void UnbindInstance2VpcResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}

View File

@@ -0,0 +1,71 @@
/*
* 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/ots/model/UpdateInstanceRequest.h>
using AlibabaCloud::Ots::Model::UpdateInstanceRequest;
UpdateInstanceRequest::UpdateInstanceRequest() :
RpcServiceRequest("ots", "2016-06-20", "UpdateInstance")
{}
UpdateInstanceRequest::~UpdateInstanceRequest()
{}
std::string UpdateInstanceRequest::getAccess_key_id()const
{
return access_key_id_;
}
void UpdateInstanceRequest::setAccess_key_id(const std::string& access_key_id)
{
access_key_id_ = access_key_id;
setParameter("Access_key_id", access_key_id);
}
long UpdateInstanceRequest::getResourceOwnerId()const
{
return resourceOwnerId_;
}
void UpdateInstanceRequest::setResourceOwnerId(long resourceOwnerId)
{
resourceOwnerId_ = resourceOwnerId;
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
}
std::string UpdateInstanceRequest::getInstanceName()const
{
return instanceName_;
}
void UpdateInstanceRequest::setInstanceName(const std::string& instanceName)
{
instanceName_ = instanceName;
setParameter("InstanceName", instanceName);
}
std::string UpdateInstanceRequest::getNetwork()const
{
return network_;
}
void UpdateInstanceRequest::setNetwork(const std::string& network)
{
network_ = network;
setParameter("Network", network);
}

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.
*/
#include <alibabacloud/ots/model/UpdateInstanceResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Ots;
using namespace AlibabaCloud::Ots::Model;
UpdateInstanceResult::UpdateInstanceResult() :
ServiceResult()
{}
UpdateInstanceResult::UpdateInstanceResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
UpdateInstanceResult::~UpdateInstanceResult()
{}
void UpdateInstanceResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}