Generated 2020-08-01 for SmartHosting.
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
|
2020-08-19 Version: 1.36.599
|
||||||
|
- Generated 2020-08-01 for `SmartHosting`.
|
||||||
|
|
||||||
2020-08-18 Version: 1.36.598
|
2020-08-18 Version: 1.36.598
|
||||||
- Support for describe hbaseue multi-zone model.
|
- Support for describe hbaseue multi-zone model.
|
||||||
|
|
||||||
|
|||||||
98
smarthosting/CMakeLists.txt
Normal file
98
smarthosting/CMakeLists.txt
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
#
|
||||||
|
# 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(smarthosting_public_header
|
||||||
|
include/alibabacloud/smarthosting/SmartHostingClient.h
|
||||||
|
include/alibabacloud/smarthosting/SmartHostingExport.h )
|
||||||
|
|
||||||
|
set(smarthosting_public_header_model
|
||||||
|
include/alibabacloud/smarthosting/model/ListManagedHostsRequest.h
|
||||||
|
include/alibabacloud/smarthosting/model/ListManagedHostsResult.h
|
||||||
|
include/alibabacloud/smarthosting/model/ListManagedPrivateSpacesRequest.h
|
||||||
|
include/alibabacloud/smarthosting/model/ListManagedPrivateSpacesResult.h
|
||||||
|
include/alibabacloud/smarthosting/model/ListManagedRacksRequest.h
|
||||||
|
include/alibabacloud/smarthosting/model/ListManagedRacksResult.h
|
||||||
|
include/alibabacloud/smarthosting/model/UpdateManagedHostAttributesRequest.h
|
||||||
|
include/alibabacloud/smarthosting/model/UpdateManagedHostAttributesResult.h )
|
||||||
|
|
||||||
|
set(smarthosting_src
|
||||||
|
src/SmartHostingClient.cc
|
||||||
|
src/model/ListManagedHostsRequest.cc
|
||||||
|
src/model/ListManagedHostsResult.cc
|
||||||
|
src/model/ListManagedPrivateSpacesRequest.cc
|
||||||
|
src/model/ListManagedPrivateSpacesResult.cc
|
||||||
|
src/model/ListManagedRacksRequest.cc
|
||||||
|
src/model/ListManagedRacksResult.cc
|
||||||
|
src/model/UpdateManagedHostAttributesRequest.cc
|
||||||
|
src/model/UpdateManagedHostAttributesResult.cc )
|
||||||
|
|
||||||
|
add_library(smarthosting ${LIB_TYPE}
|
||||||
|
${smarthosting_public_header}
|
||||||
|
${smarthosting_public_header_model}
|
||||||
|
${smarthosting_src})
|
||||||
|
|
||||||
|
set_target_properties(smarthosting
|
||||||
|
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}smarthosting
|
||||||
|
)
|
||||||
|
|
||||||
|
if(${LIB_TYPE} STREQUAL "SHARED")
|
||||||
|
set_target_properties(smarthosting
|
||||||
|
PROPERTIES
|
||||||
|
DEFINE_SYMBOL ALIBABACLOUD_SMARTHOSTING_LIBRARY)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_include_directories(smarthosting
|
||||||
|
PRIVATE include
|
||||||
|
${CMAKE_SOURCE_DIR}/core/include
|
||||||
|
)
|
||||||
|
target_link_libraries(smarthosting
|
||||||
|
core)
|
||||||
|
|
||||||
|
if(CMAKE_HOST_WIN32)
|
||||||
|
ExternalProject_Get_Property(jsoncpp INSTALL_DIR)
|
||||||
|
set(jsoncpp_install_dir ${INSTALL_DIR})
|
||||||
|
add_dependencies(smarthosting
|
||||||
|
jsoncpp)
|
||||||
|
target_include_directories(smarthosting
|
||||||
|
PRIVATE ${jsoncpp_install_dir}/include)
|
||||||
|
target_link_libraries(smarthosting
|
||||||
|
${jsoncpp_install_dir}/lib/jsoncpp.lib)
|
||||||
|
set_target_properties(smarthosting
|
||||||
|
PROPERTIES
|
||||||
|
COMPILE_OPTIONS "/bigobj")
|
||||||
|
else()
|
||||||
|
target_include_directories(smarthosting
|
||||||
|
PRIVATE /usr/include/jsoncpp)
|
||||||
|
target_link_libraries(smarthosting
|
||||||
|
jsoncpp)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
install(FILES ${smarthosting_public_header}
|
||||||
|
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/smarthosting)
|
||||||
|
install(FILES ${smarthosting_public_header_model}
|
||||||
|
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/smarthosting/model)
|
||||||
|
install(TARGETS smarthosting
|
||||||
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
|
)
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
/*
|
||||||
|
* 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_SMARTHOSTING_SMARTHOSTINGCLIENT_H_
|
||||||
|
#define ALIBABACLOUD_SMARTHOSTING_SMARTHOSTINGCLIENT_H_
|
||||||
|
|
||||||
|
#include <future>
|
||||||
|
#include <alibabacloud/core/AsyncCallerContext.h>
|
||||||
|
#include <alibabacloud/core/EndpointProvider.h>
|
||||||
|
#include <alibabacloud/core/RpcServiceClient.h>
|
||||||
|
#include "SmartHostingExport.h"
|
||||||
|
#include "model/ListManagedHostsRequest.h"
|
||||||
|
#include "model/ListManagedHostsResult.h"
|
||||||
|
#include "model/ListManagedPrivateSpacesRequest.h"
|
||||||
|
#include "model/ListManagedPrivateSpacesResult.h"
|
||||||
|
#include "model/ListManagedRacksRequest.h"
|
||||||
|
#include "model/ListManagedRacksResult.h"
|
||||||
|
#include "model/UpdateManagedHostAttributesRequest.h"
|
||||||
|
#include "model/UpdateManagedHostAttributesResult.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace SmartHosting
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_SMARTHOSTING_EXPORT SmartHostingClient : public RpcServiceClient
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
typedef Outcome<Error, Model::ListManagedHostsResult> ListManagedHostsOutcome;
|
||||||
|
typedef std::future<ListManagedHostsOutcome> ListManagedHostsOutcomeCallable;
|
||||||
|
typedef std::function<void(const SmartHostingClient*, const Model::ListManagedHostsRequest&, const ListManagedHostsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListManagedHostsAsyncHandler;
|
||||||
|
typedef Outcome<Error, Model::ListManagedPrivateSpacesResult> ListManagedPrivateSpacesOutcome;
|
||||||
|
typedef std::future<ListManagedPrivateSpacesOutcome> ListManagedPrivateSpacesOutcomeCallable;
|
||||||
|
typedef std::function<void(const SmartHostingClient*, const Model::ListManagedPrivateSpacesRequest&, const ListManagedPrivateSpacesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListManagedPrivateSpacesAsyncHandler;
|
||||||
|
typedef Outcome<Error, Model::ListManagedRacksResult> ListManagedRacksOutcome;
|
||||||
|
typedef std::future<ListManagedRacksOutcome> ListManagedRacksOutcomeCallable;
|
||||||
|
typedef std::function<void(const SmartHostingClient*, const Model::ListManagedRacksRequest&, const ListManagedRacksOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListManagedRacksAsyncHandler;
|
||||||
|
typedef Outcome<Error, Model::UpdateManagedHostAttributesResult> UpdateManagedHostAttributesOutcome;
|
||||||
|
typedef std::future<UpdateManagedHostAttributesOutcome> UpdateManagedHostAttributesOutcomeCallable;
|
||||||
|
typedef std::function<void(const SmartHostingClient*, const Model::UpdateManagedHostAttributesRequest&, const UpdateManagedHostAttributesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UpdateManagedHostAttributesAsyncHandler;
|
||||||
|
|
||||||
|
SmartHostingClient(const Credentials &credentials, const ClientConfiguration &configuration);
|
||||||
|
SmartHostingClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
|
||||||
|
SmartHostingClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
|
||||||
|
~SmartHostingClient();
|
||||||
|
ListManagedHostsOutcome listManagedHosts(const Model::ListManagedHostsRequest &request)const;
|
||||||
|
void listManagedHostsAsync(const Model::ListManagedHostsRequest& request, const ListManagedHostsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
|
ListManagedHostsOutcomeCallable listManagedHostsCallable(const Model::ListManagedHostsRequest& request) const;
|
||||||
|
ListManagedPrivateSpacesOutcome listManagedPrivateSpaces(const Model::ListManagedPrivateSpacesRequest &request)const;
|
||||||
|
void listManagedPrivateSpacesAsync(const Model::ListManagedPrivateSpacesRequest& request, const ListManagedPrivateSpacesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
|
ListManagedPrivateSpacesOutcomeCallable listManagedPrivateSpacesCallable(const Model::ListManagedPrivateSpacesRequest& request) const;
|
||||||
|
ListManagedRacksOutcome listManagedRacks(const Model::ListManagedRacksRequest &request)const;
|
||||||
|
void listManagedRacksAsync(const Model::ListManagedRacksRequest& request, const ListManagedRacksAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
|
ListManagedRacksOutcomeCallable listManagedRacksCallable(const Model::ListManagedRacksRequest& request) const;
|
||||||
|
UpdateManagedHostAttributesOutcome updateManagedHostAttributes(const Model::UpdateManagedHostAttributesRequest &request)const;
|
||||||
|
void updateManagedHostAttributesAsync(const Model::UpdateManagedHostAttributesRequest& request, const UpdateManagedHostAttributesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
|
UpdateManagedHostAttributesOutcomeCallable updateManagedHostAttributesCallable(const Model::UpdateManagedHostAttributesRequest& request) const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::shared_ptr<EndpointProvider> endpointProvider_;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // !ALIBABACLOUD_SMARTHOSTING_SMARTHOSTINGCLIENT_H_
|
||||||
@@ -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_SMARTHOSTING_SMARTHOSTINGEXPORT_H_
|
||||||
|
#define ALIBABACLOUD_SMARTHOSTING_SMARTHOSTINGEXPORT_H_
|
||||||
|
|
||||||
|
#include <alibabacloud/core/Global.h>
|
||||||
|
|
||||||
|
#if defined(ALIBABACLOUD_SHARED)
|
||||||
|
# if defined(ALIBABACLOUD_SMARTHOSTING_LIBRARY)
|
||||||
|
# define ALIBABACLOUD_SMARTHOSTING_EXPORT ALIBABACLOUD_DECL_EXPORT
|
||||||
|
# else
|
||||||
|
# define ALIBABACLOUD_SMARTHOSTING_EXPORT ALIBABACLOUD_DECL_IMPORT
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
# define ALIBABACLOUD_SMARTHOSTING_EXPORT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // !ALIBABACLOUD_SMARTHOSTING_SMARTHOSTINGEXPORT_H_
|
||||||
@@ -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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ALIBABACLOUD_SMARTHOSTING_MODEL_LISTMANAGEDHOSTSREQUEST_H_
|
||||||
|
#define ALIBABACLOUD_SMARTHOSTING_MODEL_LISTMANAGEDHOSTSREQUEST_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||||
|
#include <alibabacloud/smarthosting/SmartHostingExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace SmartHosting
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_SMARTHOSTING_EXPORT ListManagedHostsRequest : public RpcServiceRequest
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
struct Tag
|
||||||
|
{
|
||||||
|
std::string key;
|
||||||
|
std::string value;
|
||||||
|
};
|
||||||
|
|
||||||
|
public:
|
||||||
|
ListManagedHostsRequest();
|
||||||
|
~ListManagedHostsRequest();
|
||||||
|
|
||||||
|
long getResourceOwnerId()const;
|
||||||
|
void setResourceOwnerId(long resourceOwnerId);
|
||||||
|
std::string getHostType()const;
|
||||||
|
void setHostType(const std::string& hostType);
|
||||||
|
std::string getMode()const;
|
||||||
|
void setMode(const std::string& mode);
|
||||||
|
std::string getResourceGroupId()const;
|
||||||
|
void setResourceGroupId(const std::string& resourceGroupId);
|
||||||
|
std::string getRegionId()const;
|
||||||
|
void setRegionId(const std::string& regionId);
|
||||||
|
std::string getNextToken()const;
|
||||||
|
void setNextToken(const std::string& nextToken);
|
||||||
|
std::vector<Tag> getTag()const;
|
||||||
|
void setTag(const std::vector<Tag>& tag);
|
||||||
|
std::string getResourceOwnerAccount()const;
|
||||||
|
void setResourceOwnerAccount(const std::string& resourceOwnerAccount);
|
||||||
|
std::string getOwnerAccount()const;
|
||||||
|
void setOwnerAccount(const std::string& ownerAccount);
|
||||||
|
std::vector<std::string> getManagedHostId()const;
|
||||||
|
void setManagedHostId(const std::vector<std::string>& managedHostId);
|
||||||
|
long getOwnerId()const;
|
||||||
|
void setOwnerId(long ownerId);
|
||||||
|
std::string getManagedPrivateSpaceId()const;
|
||||||
|
void setManagedPrivateSpaceId(const std::string& managedPrivateSpaceId);
|
||||||
|
std::string getZoneId()const;
|
||||||
|
void setZoneId(const std::string& zoneId);
|
||||||
|
int getMaxResults()const;
|
||||||
|
void setMaxResults(int maxResults);
|
||||||
|
std::string getManagedHostName()const;
|
||||||
|
void setManagedHostName(const std::string& managedHostName);
|
||||||
|
std::string getStatus()const;
|
||||||
|
void setStatus(const std::string& status);
|
||||||
|
|
||||||
|
private:
|
||||||
|
long resourceOwnerId_;
|
||||||
|
std::string hostType_;
|
||||||
|
std::string mode_;
|
||||||
|
std::string resourceGroupId_;
|
||||||
|
std::string regionId_;
|
||||||
|
std::string nextToken_;
|
||||||
|
std::vector<Tag> tag_;
|
||||||
|
std::string resourceOwnerAccount_;
|
||||||
|
std::string ownerAccount_;
|
||||||
|
std::vector<std::string> managedHostId_;
|
||||||
|
long ownerId_;
|
||||||
|
std::string managedPrivateSpaceId_;
|
||||||
|
std::string zoneId_;
|
||||||
|
int maxResults_;
|
||||||
|
std::string managedHostName_;
|
||||||
|
std::string status_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_SMARTHOSTING_MODEL_LISTMANAGEDHOSTSREQUEST_H_
|
||||||
@@ -0,0 +1,102 @@
|
|||||||
|
/*
|
||||||
|
* 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_SMARTHOSTING_MODEL_LISTMANAGEDHOSTSRESULT_H_
|
||||||
|
#define ALIBABACLOUD_SMARTHOSTING_MODEL_LISTMANAGEDHOSTSRESULT_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <alibabacloud/core/ServiceResult.h>
|
||||||
|
#include <alibabacloud/smarthosting/SmartHostingExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace SmartHosting
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_SMARTHOSTING_EXPORT ListManagedHostsResult : public ServiceResult
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
struct ManagedHostSet
|
||||||
|
{
|
||||||
|
struct CapacityAttribute
|
||||||
|
{
|
||||||
|
int availableMemories;
|
||||||
|
int totalMemories;
|
||||||
|
int availableVcpus;
|
||||||
|
int totalVcpus;
|
||||||
|
};
|
||||||
|
struct HostAttribute
|
||||||
|
{
|
||||||
|
std::string hostType;
|
||||||
|
std::string cpuModelName;
|
||||||
|
};
|
||||||
|
struct NetworkAssociation
|
||||||
|
{
|
||||||
|
struct SwitchSet
|
||||||
|
{
|
||||||
|
std::string switchId;
|
||||||
|
};
|
||||||
|
std::vector<SwitchSet> switchSets;
|
||||||
|
};
|
||||||
|
struct InstanceSet
|
||||||
|
{
|
||||||
|
std::string instanceId;
|
||||||
|
};
|
||||||
|
struct Tag
|
||||||
|
{
|
||||||
|
std::string value;
|
||||||
|
std::string key;
|
||||||
|
};
|
||||||
|
std::string status;
|
||||||
|
std::string resourceGroupId;
|
||||||
|
std::string mode;
|
||||||
|
HostAttribute hostAttribute;
|
||||||
|
std::string managedHostId;
|
||||||
|
std::vector<std::string> supportedCustomInstanceTypeFamilies;
|
||||||
|
std::vector<ManagedHostSet::InstanceSet> instanceSets;
|
||||||
|
NetworkAssociation networkAssociation;
|
||||||
|
std::vector<std::string> supportedInstanceTypeFamilies;
|
||||||
|
std::string managedHostName;
|
||||||
|
CapacityAttribute capacityAttribute;
|
||||||
|
std::vector<std::string> supportedInstanceTypes;
|
||||||
|
std::vector<ManagedHostSet::Tag> tags;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
ListManagedHostsResult();
|
||||||
|
explicit ListManagedHostsResult(const std::string &payload);
|
||||||
|
~ListManagedHostsResult();
|
||||||
|
int getTotalCount()const;
|
||||||
|
std::string getNextToken()const;
|
||||||
|
int getPageSize()const;
|
||||||
|
std::vector<ManagedHostSet> getManagedHostSets()const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void parse(const std::string &payload);
|
||||||
|
private:
|
||||||
|
int totalCount_;
|
||||||
|
std::string nextToken_;
|
||||||
|
int pageSize_;
|
||||||
|
std::vector<ManagedHostSet> managedHostSets_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_SMARTHOSTING_MODEL_LISTMANAGEDHOSTSRESULT_H_
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
/*
|
||||||
|
* 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_SMARTHOSTING_MODEL_LISTMANAGEDPRIVATESPACESREQUEST_H_
|
||||||
|
#define ALIBABACLOUD_SMARTHOSTING_MODEL_LISTMANAGEDPRIVATESPACESREQUEST_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||||
|
#include <alibabacloud/smarthosting/SmartHostingExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace SmartHosting
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_SMARTHOSTING_EXPORT ListManagedPrivateSpacesRequest : public RpcServiceRequest
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
struct Tag
|
||||||
|
{
|
||||||
|
std::string key;
|
||||||
|
std::string value;
|
||||||
|
};
|
||||||
|
|
||||||
|
public:
|
||||||
|
ListManagedPrivateSpacesRequest();
|
||||||
|
~ListManagedPrivateSpacesRequest();
|
||||||
|
|
||||||
|
long getResourceOwnerId()const;
|
||||||
|
void setResourceOwnerId(long resourceOwnerId);
|
||||||
|
std::string getManagedPrivateSpaceName()const;
|
||||||
|
void setManagedPrivateSpaceName(const std::string& managedPrivateSpaceName);
|
||||||
|
std::string getResourceGroupId()const;
|
||||||
|
void setResourceGroupId(const std::string& resourceGroupId);
|
||||||
|
std::string getRegionId()const;
|
||||||
|
void setRegionId(const std::string& regionId);
|
||||||
|
std::string getNextToken()const;
|
||||||
|
void setNextToken(const std::string& nextToken);
|
||||||
|
std::vector<Tag> getTag()const;
|
||||||
|
void setTag(const std::vector<Tag>& tag);
|
||||||
|
std::string getResourceOwnerAccount()const;
|
||||||
|
void setResourceOwnerAccount(const std::string& resourceOwnerAccount);
|
||||||
|
std::string getOwnerAccount()const;
|
||||||
|
void setOwnerAccount(const std::string& ownerAccount);
|
||||||
|
long getOwnerId()const;
|
||||||
|
void setOwnerId(long ownerId);
|
||||||
|
std::vector<std::string> getManagedPrivateSpaceId()const;
|
||||||
|
void setManagedPrivateSpaceId(const std::vector<std::string>& managedPrivateSpaceId);
|
||||||
|
std::string getZoneId()const;
|
||||||
|
void setZoneId(const std::string& zoneId);
|
||||||
|
int getMaxResults()const;
|
||||||
|
void setMaxResults(int maxResults);
|
||||||
|
|
||||||
|
private:
|
||||||
|
long resourceOwnerId_;
|
||||||
|
std::string managedPrivateSpaceName_;
|
||||||
|
std::string resourceGroupId_;
|
||||||
|
std::string regionId_;
|
||||||
|
std::string nextToken_;
|
||||||
|
std::vector<Tag> tag_;
|
||||||
|
std::string resourceOwnerAccount_;
|
||||||
|
std::string ownerAccount_;
|
||||||
|
long ownerId_;
|
||||||
|
std::vector<std::string> managedPrivateSpaceId_;
|
||||||
|
std::string zoneId_;
|
||||||
|
int maxResults_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_SMARTHOSTING_MODEL_LISTMANAGEDPRIVATESPACESREQUEST_H_
|
||||||
@@ -0,0 +1,117 @@
|
|||||||
|
/*
|
||||||
|
* 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_SMARTHOSTING_MODEL_LISTMANAGEDPRIVATESPACESRESULT_H_
|
||||||
|
#define ALIBABACLOUD_SMARTHOSTING_MODEL_LISTMANAGEDPRIVATESPACESRESULT_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <alibabacloud/core/ServiceResult.h>
|
||||||
|
#include <alibabacloud/smarthosting/SmartHostingExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace SmartHosting
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_SMARTHOSTING_EXPORT ListManagedPrivateSpacesResult : public ServiceResult
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
struct ManagedPrivateSpaceSet
|
||||||
|
{
|
||||||
|
struct CapacityAttribute
|
||||||
|
{
|
||||||
|
int availableMemories;
|
||||||
|
int availableHostCount;
|
||||||
|
int reservedVcpus;
|
||||||
|
int totalMemories;
|
||||||
|
int availableVcpus;
|
||||||
|
int totalVcpus;
|
||||||
|
int reservedHostCount;
|
||||||
|
int reservedMemories;
|
||||||
|
int totalHostCount;
|
||||||
|
};
|
||||||
|
struct LifecycleAttribute
|
||||||
|
{
|
||||||
|
std::string deliveryTime;
|
||||||
|
std::string expirationTime;
|
||||||
|
std::string receptionTime;
|
||||||
|
};
|
||||||
|
struct LocationAttribute
|
||||||
|
{
|
||||||
|
std::string address;
|
||||||
|
};
|
||||||
|
struct DeploymentAttribute
|
||||||
|
{
|
||||||
|
struct DeploymentStep
|
||||||
|
{
|
||||||
|
std::string status;
|
||||||
|
std::string expectTime;
|
||||||
|
std::string actualTime;
|
||||||
|
bool currentStep;
|
||||||
|
};
|
||||||
|
std::string description;
|
||||||
|
std::string createTime;
|
||||||
|
std::string contractId;
|
||||||
|
std::vector<DeploymentAttribute::DeploymentStep> deploymentSteps;
|
||||||
|
};
|
||||||
|
struct ManagedHostSet
|
||||||
|
{
|
||||||
|
std::string managedHostStatus;
|
||||||
|
std::string managedHostId;
|
||||||
|
};
|
||||||
|
struct Tag
|
||||||
|
{
|
||||||
|
std::string value;
|
||||||
|
std::string key;
|
||||||
|
};
|
||||||
|
std::vector<ManagedPrivateSpaceSet::DeploymentAttribute> deploymentAttributes;
|
||||||
|
std::string description;
|
||||||
|
std::string resourceGroupId;
|
||||||
|
std::string zoneId;
|
||||||
|
LifecycleAttribute lifecycleAttribute;
|
||||||
|
std::string managedPrivateSpaceId;
|
||||||
|
std::string managedPrivateSpaceName;
|
||||||
|
std::vector<ManagedPrivateSpaceSet::ManagedHostSet> managedHostSets;
|
||||||
|
std::string saleMode;
|
||||||
|
std::string creationTime;
|
||||||
|
CapacityAttribute capacityAttribute;
|
||||||
|
LocationAttribute locationAttribute;
|
||||||
|
std::vector<ManagedPrivateSpaceSet::Tag> tags;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
ListManagedPrivateSpacesResult();
|
||||||
|
explicit ListManagedPrivateSpacesResult(const std::string &payload);
|
||||||
|
~ListManagedPrivateSpacesResult();
|
||||||
|
int getTotalCount()const;
|
||||||
|
std::vector<ManagedPrivateSpaceSet> getManagedPrivateSpaceSets()const;
|
||||||
|
std::string getNextToken()const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void parse(const std::string &payload);
|
||||||
|
private:
|
||||||
|
int totalCount_;
|
||||||
|
std::vector<ManagedPrivateSpaceSet> managedPrivateSpaceSets_;
|
||||||
|
std::string nextToken_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_SMARTHOSTING_MODEL_LISTMANAGEDPRIVATESPACESRESULT_H_
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
/*
|
||||||
|
* 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_SMARTHOSTING_MODEL_LISTMANAGEDRACKSREQUEST_H_
|
||||||
|
#define ALIBABACLOUD_SMARTHOSTING_MODEL_LISTMANAGEDRACKSREQUEST_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||||
|
#include <alibabacloud/smarthosting/SmartHostingExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace SmartHosting
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_SMARTHOSTING_EXPORT ListManagedRacksRequest : public RpcServiceRequest
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
ListManagedRacksRequest();
|
||||||
|
~ListManagedRacksRequest();
|
||||||
|
|
||||||
|
long getResourceOwnerId()const;
|
||||||
|
void setResourceOwnerId(long resourceOwnerId);
|
||||||
|
std::string getHostType()const;
|
||||||
|
void setHostType(const std::string& hostType);
|
||||||
|
std::string getRegionId()const;
|
||||||
|
void setRegionId(const std::string& regionId);
|
||||||
|
std::string getNextToken()const;
|
||||||
|
void setNextToken(const std::string& nextToken);
|
||||||
|
std::vector<std::string> getManagedRackId()const;
|
||||||
|
void setManagedRackId(const std::vector<std::string>& managedRackId);
|
||||||
|
std::string getResourceOwnerAccount()const;
|
||||||
|
void setResourceOwnerAccount(const std::string& resourceOwnerAccount);
|
||||||
|
std::string getOwnerAccount()const;
|
||||||
|
void setOwnerAccount(const std::string& ownerAccount);
|
||||||
|
long getOwnerId()const;
|
||||||
|
void setOwnerId(long ownerId);
|
||||||
|
std::string getManagedPrivateSpaceId()const;
|
||||||
|
void setManagedPrivateSpaceId(const std::string& managedPrivateSpaceId);
|
||||||
|
std::string getZoneId()const;
|
||||||
|
void setZoneId(const std::string& zoneId);
|
||||||
|
int getMaxResults()const;
|
||||||
|
void setMaxResults(int maxResults);
|
||||||
|
|
||||||
|
private:
|
||||||
|
long resourceOwnerId_;
|
||||||
|
std::string hostType_;
|
||||||
|
std::string regionId_;
|
||||||
|
std::string nextToken_;
|
||||||
|
std::vector<std::string> managedRackId_;
|
||||||
|
std::string resourceOwnerAccount_;
|
||||||
|
std::string ownerAccount_;
|
||||||
|
long ownerId_;
|
||||||
|
std::string managedPrivateSpaceId_;
|
||||||
|
std::string zoneId_;
|
||||||
|
int maxResults_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_SMARTHOSTING_MODEL_LISTMANAGEDRACKSREQUEST_H_
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
/*
|
||||||
|
* 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_SMARTHOSTING_MODEL_LISTMANAGEDRACKSRESULT_H_
|
||||||
|
#define ALIBABACLOUD_SMARTHOSTING_MODEL_LISTMANAGEDRACKSRESULT_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <alibabacloud/core/ServiceResult.h>
|
||||||
|
#include <alibabacloud/smarthosting/SmartHostingExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace SmartHosting
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_SMARTHOSTING_EXPORT ListManagedRacksResult : public ServiceResult
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
struct ManagedRacksSet
|
||||||
|
{
|
||||||
|
struct ManagedHostSet
|
||||||
|
{
|
||||||
|
struct HostAttribute
|
||||||
|
{
|
||||||
|
std::string hostType;
|
||||||
|
std::string cpuModelName;
|
||||||
|
};
|
||||||
|
std::string status;
|
||||||
|
std::string description;
|
||||||
|
HostAttribute hostAttribute;
|
||||||
|
std::string managedHostId;
|
||||||
|
};
|
||||||
|
std::string managedRackId;
|
||||||
|
std::string zoneId;
|
||||||
|
std::vector<ManagedRacksSet::ManagedHostSet> managedHostSets;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
ListManagedRacksResult();
|
||||||
|
explicit ListManagedRacksResult(const std::string &payload);
|
||||||
|
~ListManagedRacksResult();
|
||||||
|
int getTotalCount()const;
|
||||||
|
std::string getNextToken()const;
|
||||||
|
int getPageSize()const;
|
||||||
|
std::vector<ManagedRacksSet> getManagedRacksSets()const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void parse(const std::string &payload);
|
||||||
|
private:
|
||||||
|
int totalCount_;
|
||||||
|
std::string nextToken_;
|
||||||
|
int pageSize_;
|
||||||
|
std::vector<ManagedRacksSet> managedRacksSets_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_SMARTHOSTING_MODEL_LISTMANAGEDRACKSRESULT_H_
|
||||||
@@ -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_SMARTHOSTING_MODEL_UPDATEMANAGEDHOSTATTRIBUTESREQUEST_H_
|
||||||
|
#define ALIBABACLOUD_SMARTHOSTING_MODEL_UPDATEMANAGEDHOSTATTRIBUTESREQUEST_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||||
|
#include <alibabacloud/smarthosting/SmartHostingExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace SmartHosting
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_SMARTHOSTING_EXPORT UpdateManagedHostAttributesRequest : public RpcServiceRequest
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
UpdateManagedHostAttributesRequest();
|
||||||
|
~UpdateManagedHostAttributesRequest();
|
||||||
|
|
||||||
|
long getResourceOwnerId()const;
|
||||||
|
void setResourceOwnerId(long resourceOwnerId);
|
||||||
|
std::string getMode()const;
|
||||||
|
void setMode(const std::string& mode);
|
||||||
|
std::string getRegionId()const;
|
||||||
|
void setRegionId(const std::string& regionId);
|
||||||
|
std::string getResourceOwnerAccount()const;
|
||||||
|
void setResourceOwnerAccount(const std::string& resourceOwnerAccount);
|
||||||
|
std::string getOwnerAccount()const;
|
||||||
|
void setOwnerAccount(const std::string& ownerAccount);
|
||||||
|
std::string getManagedHostId()const;
|
||||||
|
void setManagedHostId(const std::string& managedHostId);
|
||||||
|
long getOwnerId()const;
|
||||||
|
void setOwnerId(long ownerId);
|
||||||
|
std::string getManagedHostName()const;
|
||||||
|
void setManagedHostName(const std::string& managedHostName);
|
||||||
|
|
||||||
|
private:
|
||||||
|
long resourceOwnerId_;
|
||||||
|
std::string mode_;
|
||||||
|
std::string regionId_;
|
||||||
|
std::string resourceOwnerAccount_;
|
||||||
|
std::string ownerAccount_;
|
||||||
|
std::string managedHostId_;
|
||||||
|
long ownerId_;
|
||||||
|
std::string managedHostName_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_SMARTHOSTING_MODEL_UPDATEMANAGEDHOSTATTRIBUTESREQUEST_H_
|
||||||
@@ -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_SMARTHOSTING_MODEL_UPDATEMANAGEDHOSTATTRIBUTESRESULT_H_
|
||||||
|
#define ALIBABACLOUD_SMARTHOSTING_MODEL_UPDATEMANAGEDHOSTATTRIBUTESRESULT_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <alibabacloud/core/ServiceResult.h>
|
||||||
|
#include <alibabacloud/smarthosting/SmartHostingExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace SmartHosting
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_SMARTHOSTING_EXPORT UpdateManagedHostAttributesResult : public ServiceResult
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
|
||||||
|
UpdateManagedHostAttributesResult();
|
||||||
|
explicit UpdateManagedHostAttributesResult(const std::string &payload);
|
||||||
|
~UpdateManagedHostAttributesResult();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void parse(const std::string &payload);
|
||||||
|
private:
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_SMARTHOSTING_MODEL_UPDATEMANAGEDHOSTATTRIBUTESRESULT_H_
|
||||||
197
smarthosting/src/SmartHostingClient.cc
Normal file
197
smarthosting/src/SmartHostingClient.cc
Normal file
@@ -0,0 +1,197 @@
|
|||||||
|
/*
|
||||||
|
* 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/smarthosting/SmartHostingClient.h>
|
||||||
|
#include <alibabacloud/core/SimpleCredentialsProvider.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud;
|
||||||
|
using namespace AlibabaCloud::Location;
|
||||||
|
using namespace AlibabaCloud::SmartHosting;
|
||||||
|
using namespace AlibabaCloud::SmartHosting::Model;
|
||||||
|
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
const std::string SERVICE_NAME = "SmartHosting";
|
||||||
|
}
|
||||||
|
|
||||||
|
SmartHostingClient::SmartHostingClient(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, "SmartHosting");
|
||||||
|
}
|
||||||
|
|
||||||
|
SmartHostingClient::SmartHostingClient(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, "SmartHosting");
|
||||||
|
}
|
||||||
|
|
||||||
|
SmartHostingClient::SmartHostingClient(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, "SmartHosting");
|
||||||
|
}
|
||||||
|
|
||||||
|
SmartHostingClient::~SmartHostingClient()
|
||||||
|
{}
|
||||||
|
|
||||||
|
SmartHostingClient::ListManagedHostsOutcome SmartHostingClient::listManagedHosts(const ListManagedHostsRequest &request) const
|
||||||
|
{
|
||||||
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
if (!endpointOutcome.isSuccess())
|
||||||
|
return ListManagedHostsOutcome(endpointOutcome.error());
|
||||||
|
|
||||||
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||||
|
|
||||||
|
if (outcome.isSuccess())
|
||||||
|
return ListManagedHostsOutcome(ListManagedHostsResult(outcome.result()));
|
||||||
|
else
|
||||||
|
return ListManagedHostsOutcome(outcome.error());
|
||||||
|
}
|
||||||
|
|
||||||
|
void SmartHostingClient::listManagedHostsAsync(const ListManagedHostsRequest& request, const ListManagedHostsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||||
|
{
|
||||||
|
auto fn = [this, request, handler, context]()
|
||||||
|
{
|
||||||
|
handler(this, request, listManagedHosts(request), context);
|
||||||
|
};
|
||||||
|
|
||||||
|
asyncExecute(new Runnable(fn));
|
||||||
|
}
|
||||||
|
|
||||||
|
SmartHostingClient::ListManagedHostsOutcomeCallable SmartHostingClient::listManagedHostsCallable(const ListManagedHostsRequest &request) const
|
||||||
|
{
|
||||||
|
auto task = std::make_shared<std::packaged_task<ListManagedHostsOutcome()>>(
|
||||||
|
[this, request]()
|
||||||
|
{
|
||||||
|
return this->listManagedHosts(request);
|
||||||
|
});
|
||||||
|
|
||||||
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||||
|
return task->get_future();
|
||||||
|
}
|
||||||
|
|
||||||
|
SmartHostingClient::ListManagedPrivateSpacesOutcome SmartHostingClient::listManagedPrivateSpaces(const ListManagedPrivateSpacesRequest &request) const
|
||||||
|
{
|
||||||
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
if (!endpointOutcome.isSuccess())
|
||||||
|
return ListManagedPrivateSpacesOutcome(endpointOutcome.error());
|
||||||
|
|
||||||
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||||
|
|
||||||
|
if (outcome.isSuccess())
|
||||||
|
return ListManagedPrivateSpacesOutcome(ListManagedPrivateSpacesResult(outcome.result()));
|
||||||
|
else
|
||||||
|
return ListManagedPrivateSpacesOutcome(outcome.error());
|
||||||
|
}
|
||||||
|
|
||||||
|
void SmartHostingClient::listManagedPrivateSpacesAsync(const ListManagedPrivateSpacesRequest& request, const ListManagedPrivateSpacesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||||
|
{
|
||||||
|
auto fn = [this, request, handler, context]()
|
||||||
|
{
|
||||||
|
handler(this, request, listManagedPrivateSpaces(request), context);
|
||||||
|
};
|
||||||
|
|
||||||
|
asyncExecute(new Runnable(fn));
|
||||||
|
}
|
||||||
|
|
||||||
|
SmartHostingClient::ListManagedPrivateSpacesOutcomeCallable SmartHostingClient::listManagedPrivateSpacesCallable(const ListManagedPrivateSpacesRequest &request) const
|
||||||
|
{
|
||||||
|
auto task = std::make_shared<std::packaged_task<ListManagedPrivateSpacesOutcome()>>(
|
||||||
|
[this, request]()
|
||||||
|
{
|
||||||
|
return this->listManagedPrivateSpaces(request);
|
||||||
|
});
|
||||||
|
|
||||||
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||||
|
return task->get_future();
|
||||||
|
}
|
||||||
|
|
||||||
|
SmartHostingClient::ListManagedRacksOutcome SmartHostingClient::listManagedRacks(const ListManagedRacksRequest &request) const
|
||||||
|
{
|
||||||
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
if (!endpointOutcome.isSuccess())
|
||||||
|
return ListManagedRacksOutcome(endpointOutcome.error());
|
||||||
|
|
||||||
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||||
|
|
||||||
|
if (outcome.isSuccess())
|
||||||
|
return ListManagedRacksOutcome(ListManagedRacksResult(outcome.result()));
|
||||||
|
else
|
||||||
|
return ListManagedRacksOutcome(outcome.error());
|
||||||
|
}
|
||||||
|
|
||||||
|
void SmartHostingClient::listManagedRacksAsync(const ListManagedRacksRequest& request, const ListManagedRacksAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||||
|
{
|
||||||
|
auto fn = [this, request, handler, context]()
|
||||||
|
{
|
||||||
|
handler(this, request, listManagedRacks(request), context);
|
||||||
|
};
|
||||||
|
|
||||||
|
asyncExecute(new Runnable(fn));
|
||||||
|
}
|
||||||
|
|
||||||
|
SmartHostingClient::ListManagedRacksOutcomeCallable SmartHostingClient::listManagedRacksCallable(const ListManagedRacksRequest &request) const
|
||||||
|
{
|
||||||
|
auto task = std::make_shared<std::packaged_task<ListManagedRacksOutcome()>>(
|
||||||
|
[this, request]()
|
||||||
|
{
|
||||||
|
return this->listManagedRacks(request);
|
||||||
|
});
|
||||||
|
|
||||||
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||||
|
return task->get_future();
|
||||||
|
}
|
||||||
|
|
||||||
|
SmartHostingClient::UpdateManagedHostAttributesOutcome SmartHostingClient::updateManagedHostAttributes(const UpdateManagedHostAttributesRequest &request) const
|
||||||
|
{
|
||||||
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
if (!endpointOutcome.isSuccess())
|
||||||
|
return UpdateManagedHostAttributesOutcome(endpointOutcome.error());
|
||||||
|
|
||||||
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||||
|
|
||||||
|
if (outcome.isSuccess())
|
||||||
|
return UpdateManagedHostAttributesOutcome(UpdateManagedHostAttributesResult(outcome.result()));
|
||||||
|
else
|
||||||
|
return UpdateManagedHostAttributesOutcome(outcome.error());
|
||||||
|
}
|
||||||
|
|
||||||
|
void SmartHostingClient::updateManagedHostAttributesAsync(const UpdateManagedHostAttributesRequest& request, const UpdateManagedHostAttributesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||||
|
{
|
||||||
|
auto fn = [this, request, handler, context]()
|
||||||
|
{
|
||||||
|
handler(this, request, updateManagedHostAttributes(request), context);
|
||||||
|
};
|
||||||
|
|
||||||
|
asyncExecute(new Runnable(fn));
|
||||||
|
}
|
||||||
|
|
||||||
|
SmartHostingClient::UpdateManagedHostAttributesOutcomeCallable SmartHostingClient::updateManagedHostAttributesCallable(const UpdateManagedHostAttributesRequest &request) const
|
||||||
|
{
|
||||||
|
auto task = std::make_shared<std::packaged_task<UpdateManagedHostAttributesOutcome()>>(
|
||||||
|
[this, request]()
|
||||||
|
{
|
||||||
|
return this->updateManagedHostAttributes(request);
|
||||||
|
});
|
||||||
|
|
||||||
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||||
|
return task->get_future();
|
||||||
|
}
|
||||||
|
|
||||||
212
smarthosting/src/model/ListManagedHostsRequest.cc
Normal file
212
smarthosting/src/model/ListManagedHostsRequest.cc
Normal file
@@ -0,0 +1,212 @@
|
|||||||
|
/*
|
||||||
|
* 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/smarthosting/model/ListManagedHostsRequest.h>
|
||||||
|
|
||||||
|
using AlibabaCloud::SmartHosting::Model::ListManagedHostsRequest;
|
||||||
|
|
||||||
|
ListManagedHostsRequest::ListManagedHostsRequest() :
|
||||||
|
RpcServiceRequest("smarthosting", "2020-08-01", "ListManagedHosts")
|
||||||
|
{
|
||||||
|
setMethod(HttpRequest::Method::Post);
|
||||||
|
}
|
||||||
|
|
||||||
|
ListManagedHostsRequest::~ListManagedHostsRequest()
|
||||||
|
{}
|
||||||
|
|
||||||
|
long ListManagedHostsRequest::getResourceOwnerId()const
|
||||||
|
{
|
||||||
|
return resourceOwnerId_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListManagedHostsRequest::setResourceOwnerId(long resourceOwnerId)
|
||||||
|
{
|
||||||
|
resourceOwnerId_ = resourceOwnerId;
|
||||||
|
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ListManagedHostsRequest::getHostType()const
|
||||||
|
{
|
||||||
|
return hostType_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListManagedHostsRequest::setHostType(const std::string& hostType)
|
||||||
|
{
|
||||||
|
hostType_ = hostType;
|
||||||
|
setParameter("HostType", hostType);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ListManagedHostsRequest::getMode()const
|
||||||
|
{
|
||||||
|
return mode_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListManagedHostsRequest::setMode(const std::string& mode)
|
||||||
|
{
|
||||||
|
mode_ = mode;
|
||||||
|
setParameter("Mode", mode);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ListManagedHostsRequest::getResourceGroupId()const
|
||||||
|
{
|
||||||
|
return resourceGroupId_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListManagedHostsRequest::setResourceGroupId(const std::string& resourceGroupId)
|
||||||
|
{
|
||||||
|
resourceGroupId_ = resourceGroupId;
|
||||||
|
setParameter("ResourceGroupId", resourceGroupId);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ListManagedHostsRequest::getRegionId()const
|
||||||
|
{
|
||||||
|
return regionId_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListManagedHostsRequest::setRegionId(const std::string& regionId)
|
||||||
|
{
|
||||||
|
regionId_ = regionId;
|
||||||
|
setParameter("RegionId", regionId);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ListManagedHostsRequest::getNextToken()const
|
||||||
|
{
|
||||||
|
return nextToken_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListManagedHostsRequest::setNextToken(const std::string& nextToken)
|
||||||
|
{
|
||||||
|
nextToken_ = nextToken;
|
||||||
|
setParameter("NextToken", nextToken);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<ListManagedHostsRequest::Tag> ListManagedHostsRequest::getTag()const
|
||||||
|
{
|
||||||
|
return tag_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListManagedHostsRequest::setTag(const std::vector<Tag>& tag)
|
||||||
|
{
|
||||||
|
tag_ = tag;
|
||||||
|
for(int dep1 = 0; dep1!= tag.size(); dep1++) {
|
||||||
|
auto tagObj = tag.at(dep1);
|
||||||
|
std::string tagObjStr = "Tag." + std::to_string(dep1 + 1);
|
||||||
|
setParameter(tagObjStr + ".Key", tagObj.key);
|
||||||
|
setParameter(tagObjStr + ".Value", tagObj.value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ListManagedHostsRequest::getResourceOwnerAccount()const
|
||||||
|
{
|
||||||
|
return resourceOwnerAccount_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListManagedHostsRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
|
||||||
|
{
|
||||||
|
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||||
|
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ListManagedHostsRequest::getOwnerAccount()const
|
||||||
|
{
|
||||||
|
return ownerAccount_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListManagedHostsRequest::setOwnerAccount(const std::string& ownerAccount)
|
||||||
|
{
|
||||||
|
ownerAccount_ = ownerAccount;
|
||||||
|
setParameter("OwnerAccount", ownerAccount);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<std::string> ListManagedHostsRequest::getManagedHostId()const
|
||||||
|
{
|
||||||
|
return managedHostId_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListManagedHostsRequest::setManagedHostId(const std::vector<std::string>& managedHostId)
|
||||||
|
{
|
||||||
|
managedHostId_ = managedHostId;
|
||||||
|
for(int dep1 = 0; dep1!= managedHostId.size(); dep1++) {
|
||||||
|
setParameter("ManagedHostId."+ std::to_string(dep1), managedHostId.at(dep1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
long ListManagedHostsRequest::getOwnerId()const
|
||||||
|
{
|
||||||
|
return ownerId_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListManagedHostsRequest::setOwnerId(long ownerId)
|
||||||
|
{
|
||||||
|
ownerId_ = ownerId;
|
||||||
|
setParameter("OwnerId", std::to_string(ownerId));
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ListManagedHostsRequest::getManagedPrivateSpaceId()const
|
||||||
|
{
|
||||||
|
return managedPrivateSpaceId_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListManagedHostsRequest::setManagedPrivateSpaceId(const std::string& managedPrivateSpaceId)
|
||||||
|
{
|
||||||
|
managedPrivateSpaceId_ = managedPrivateSpaceId;
|
||||||
|
setParameter("ManagedPrivateSpaceId", managedPrivateSpaceId);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ListManagedHostsRequest::getZoneId()const
|
||||||
|
{
|
||||||
|
return zoneId_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListManagedHostsRequest::setZoneId(const std::string& zoneId)
|
||||||
|
{
|
||||||
|
zoneId_ = zoneId;
|
||||||
|
setParameter("ZoneId", zoneId);
|
||||||
|
}
|
||||||
|
|
||||||
|
int ListManagedHostsRequest::getMaxResults()const
|
||||||
|
{
|
||||||
|
return maxResults_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListManagedHostsRequest::setMaxResults(int maxResults)
|
||||||
|
{
|
||||||
|
maxResults_ = maxResults;
|
||||||
|
setParameter("MaxResults", std::to_string(maxResults));
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ListManagedHostsRequest::getManagedHostName()const
|
||||||
|
{
|
||||||
|
return managedHostName_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListManagedHostsRequest::setManagedHostName(const std::string& managedHostName)
|
||||||
|
{
|
||||||
|
managedHostName_ = managedHostName;
|
||||||
|
setParameter("ManagedHostName", managedHostName);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ListManagedHostsRequest::getStatus()const
|
||||||
|
{
|
||||||
|
return status_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListManagedHostsRequest::setStatus(const std::string& status)
|
||||||
|
{
|
||||||
|
status_ = status;
|
||||||
|
setParameter("Status", status);
|
||||||
|
}
|
||||||
|
|
||||||
136
smarthosting/src/model/ListManagedHostsResult.cc
Normal file
136
smarthosting/src/model/ListManagedHostsResult.cc
Normal file
@@ -0,0 +1,136 @@
|
|||||||
|
/*
|
||||||
|
* 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/smarthosting/model/ListManagedHostsResult.h>
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud::SmartHosting;
|
||||||
|
using namespace AlibabaCloud::SmartHosting::Model;
|
||||||
|
|
||||||
|
ListManagedHostsResult::ListManagedHostsResult() :
|
||||||
|
ServiceResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
ListManagedHostsResult::ListManagedHostsResult(const std::string &payload) :
|
||||||
|
ServiceResult()
|
||||||
|
{
|
||||||
|
parse(payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
ListManagedHostsResult::~ListManagedHostsResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void ListManagedHostsResult::parse(const std::string &payload)
|
||||||
|
{
|
||||||
|
Json::Reader reader;
|
||||||
|
Json::Value value;
|
||||||
|
reader.parse(payload, value);
|
||||||
|
setRequestId(value["RequestId"].asString());
|
||||||
|
auto allManagedHostSetsNode = value["ManagedHostSets"]["ManagedHostSet"];
|
||||||
|
for (auto valueManagedHostSetsManagedHostSet : allManagedHostSetsNode)
|
||||||
|
{
|
||||||
|
ManagedHostSet managedHostSetsObject;
|
||||||
|
if(!valueManagedHostSetsManagedHostSet["ManagedHostId"].isNull())
|
||||||
|
managedHostSetsObject.managedHostId = valueManagedHostSetsManagedHostSet["ManagedHostId"].asString();
|
||||||
|
if(!valueManagedHostSetsManagedHostSet["ManagedHostName"].isNull())
|
||||||
|
managedHostSetsObject.managedHostName = valueManagedHostSetsManagedHostSet["ManagedHostName"].asString();
|
||||||
|
if(!valueManagedHostSetsManagedHostSet["Mode"].isNull())
|
||||||
|
managedHostSetsObject.mode = valueManagedHostSetsManagedHostSet["Mode"].asString();
|
||||||
|
if(!valueManagedHostSetsManagedHostSet["ResourceGroupId"].isNull())
|
||||||
|
managedHostSetsObject.resourceGroupId = valueManagedHostSetsManagedHostSet["ResourceGroupId"].asString();
|
||||||
|
if(!valueManagedHostSetsManagedHostSet["Status"].isNull())
|
||||||
|
managedHostSetsObject.status = valueManagedHostSetsManagedHostSet["Status"].asString();
|
||||||
|
auto allInstanceSetsNode = allManagedHostSetsNode["InstanceSets"]["InstanceSet"];
|
||||||
|
for (auto allManagedHostSetsNodeInstanceSetsInstanceSet : allInstanceSetsNode)
|
||||||
|
{
|
||||||
|
ManagedHostSet::InstanceSet instanceSetsObject;
|
||||||
|
if(!allManagedHostSetsNodeInstanceSetsInstanceSet["InstanceId"].isNull())
|
||||||
|
instanceSetsObject.instanceId = allManagedHostSetsNodeInstanceSetsInstanceSet["InstanceId"].asString();
|
||||||
|
managedHostSetsObject.instanceSets.push_back(instanceSetsObject);
|
||||||
|
}
|
||||||
|
auto allTagsNode = allManagedHostSetsNode["Tags"]["Tag"];
|
||||||
|
for (auto allManagedHostSetsNodeTagsTag : allTagsNode)
|
||||||
|
{
|
||||||
|
ManagedHostSet::Tag tagsObject;
|
||||||
|
if(!allManagedHostSetsNodeTagsTag["Key"].isNull())
|
||||||
|
tagsObject.key = allManagedHostSetsNodeTagsTag["Key"].asString();
|
||||||
|
if(!allManagedHostSetsNodeTagsTag["Value"].isNull())
|
||||||
|
tagsObject.value = allManagedHostSetsNodeTagsTag["Value"].asString();
|
||||||
|
managedHostSetsObject.tags.push_back(tagsObject);
|
||||||
|
}
|
||||||
|
auto capacityAttributeNode = value["CapacityAttribute"];
|
||||||
|
if(!capacityAttributeNode["AvailableMemories"].isNull())
|
||||||
|
managedHostSetsObject.capacityAttribute.availableMemories = std::stoi(capacityAttributeNode["AvailableMemories"].asString());
|
||||||
|
if(!capacityAttributeNode["AvailableVcpus"].isNull())
|
||||||
|
managedHostSetsObject.capacityAttribute.availableVcpus = std::stoi(capacityAttributeNode["AvailableVcpus"].asString());
|
||||||
|
if(!capacityAttributeNode["TotalMemories"].isNull())
|
||||||
|
managedHostSetsObject.capacityAttribute.totalMemories = std::stoi(capacityAttributeNode["TotalMemories"].asString());
|
||||||
|
if(!capacityAttributeNode["TotalVcpus"].isNull())
|
||||||
|
managedHostSetsObject.capacityAttribute.totalVcpus = std::stoi(capacityAttributeNode["TotalVcpus"].asString());
|
||||||
|
auto hostAttributeNode = value["HostAttribute"];
|
||||||
|
if(!hostAttributeNode["CpuModelName"].isNull())
|
||||||
|
managedHostSetsObject.hostAttribute.cpuModelName = hostAttributeNode["CpuModelName"].asString();
|
||||||
|
if(!hostAttributeNode["HostType"].isNull())
|
||||||
|
managedHostSetsObject.hostAttribute.hostType = hostAttributeNode["HostType"].asString();
|
||||||
|
auto networkAssociationNode = value["NetworkAssociation"];
|
||||||
|
auto allSwitchSetsNode = networkAssociationNode["SwitchSets"]["SwitchSet"];
|
||||||
|
for (auto networkAssociationNodeSwitchSetsSwitchSet : allSwitchSetsNode)
|
||||||
|
{
|
||||||
|
ManagedHostSet::NetworkAssociation::SwitchSet switchSetObject;
|
||||||
|
if(!networkAssociationNodeSwitchSetsSwitchSet["SwitchId"].isNull())
|
||||||
|
switchSetObject.switchId = networkAssociationNodeSwitchSetsSwitchSet["SwitchId"].asString();
|
||||||
|
managedHostSetsObject.networkAssociation.switchSets.push_back(switchSetObject);
|
||||||
|
}
|
||||||
|
auto allSupportedCustomInstanceTypeFamilies = value["SupportedCustomInstanceTypeFamilies"]["SupportedCustomInstanceTypeFamily"];
|
||||||
|
for (auto value : allSupportedCustomInstanceTypeFamilies)
|
||||||
|
managedHostSetsObject.supportedCustomInstanceTypeFamilies.push_back(value.asString());
|
||||||
|
auto allSupportedInstanceTypeFamilies = value["SupportedInstanceTypeFamilies"]["SupportedInstanceTypeFamily"];
|
||||||
|
for (auto value : allSupportedInstanceTypeFamilies)
|
||||||
|
managedHostSetsObject.supportedInstanceTypeFamilies.push_back(value.asString());
|
||||||
|
auto allSupportedInstanceTypes = value["SupportedInstanceTypes"]["SupportedInstanceType"];
|
||||||
|
for (auto value : allSupportedInstanceTypes)
|
||||||
|
managedHostSetsObject.supportedInstanceTypes.push_back(value.asString());
|
||||||
|
managedHostSets_.push_back(managedHostSetsObject);
|
||||||
|
}
|
||||||
|
if(!value["NextToken"].isNull())
|
||||||
|
nextToken_ = value["NextToken"].asString();
|
||||||
|
if(!value["PageSize"].isNull())
|
||||||
|
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||||
|
if(!value["TotalCount"].isNull())
|
||||||
|
totalCount_ = std::stoi(value["TotalCount"].asString());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
int ListManagedHostsResult::getTotalCount()const
|
||||||
|
{
|
||||||
|
return totalCount_;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ListManagedHostsResult::getNextToken()const
|
||||||
|
{
|
||||||
|
return nextToken_;
|
||||||
|
}
|
||||||
|
|
||||||
|
int ListManagedHostsResult::getPageSize()const
|
||||||
|
{
|
||||||
|
return pageSize_;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<ListManagedHostsResult::ManagedHostSet> ListManagedHostsResult::getManagedHostSets()const
|
||||||
|
{
|
||||||
|
return managedHostSets_;
|
||||||
|
}
|
||||||
|
|
||||||
168
smarthosting/src/model/ListManagedPrivateSpacesRequest.cc
Normal file
168
smarthosting/src/model/ListManagedPrivateSpacesRequest.cc
Normal file
@@ -0,0 +1,168 @@
|
|||||||
|
/*
|
||||||
|
* 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/smarthosting/model/ListManagedPrivateSpacesRequest.h>
|
||||||
|
|
||||||
|
using AlibabaCloud::SmartHosting::Model::ListManagedPrivateSpacesRequest;
|
||||||
|
|
||||||
|
ListManagedPrivateSpacesRequest::ListManagedPrivateSpacesRequest() :
|
||||||
|
RpcServiceRequest("smarthosting", "2020-08-01", "ListManagedPrivateSpaces")
|
||||||
|
{
|
||||||
|
setMethod(HttpRequest::Method::Post);
|
||||||
|
}
|
||||||
|
|
||||||
|
ListManagedPrivateSpacesRequest::~ListManagedPrivateSpacesRequest()
|
||||||
|
{}
|
||||||
|
|
||||||
|
long ListManagedPrivateSpacesRequest::getResourceOwnerId()const
|
||||||
|
{
|
||||||
|
return resourceOwnerId_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListManagedPrivateSpacesRequest::setResourceOwnerId(long resourceOwnerId)
|
||||||
|
{
|
||||||
|
resourceOwnerId_ = resourceOwnerId;
|
||||||
|
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ListManagedPrivateSpacesRequest::getManagedPrivateSpaceName()const
|
||||||
|
{
|
||||||
|
return managedPrivateSpaceName_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListManagedPrivateSpacesRequest::setManagedPrivateSpaceName(const std::string& managedPrivateSpaceName)
|
||||||
|
{
|
||||||
|
managedPrivateSpaceName_ = managedPrivateSpaceName;
|
||||||
|
setParameter("ManagedPrivateSpaceName", managedPrivateSpaceName);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ListManagedPrivateSpacesRequest::getResourceGroupId()const
|
||||||
|
{
|
||||||
|
return resourceGroupId_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListManagedPrivateSpacesRequest::setResourceGroupId(const std::string& resourceGroupId)
|
||||||
|
{
|
||||||
|
resourceGroupId_ = resourceGroupId;
|
||||||
|
setParameter("ResourceGroupId", resourceGroupId);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ListManagedPrivateSpacesRequest::getRegionId()const
|
||||||
|
{
|
||||||
|
return regionId_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListManagedPrivateSpacesRequest::setRegionId(const std::string& regionId)
|
||||||
|
{
|
||||||
|
regionId_ = regionId;
|
||||||
|
setParameter("RegionId", regionId);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ListManagedPrivateSpacesRequest::getNextToken()const
|
||||||
|
{
|
||||||
|
return nextToken_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListManagedPrivateSpacesRequest::setNextToken(const std::string& nextToken)
|
||||||
|
{
|
||||||
|
nextToken_ = nextToken;
|
||||||
|
setParameter("NextToken", nextToken);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<ListManagedPrivateSpacesRequest::Tag> ListManagedPrivateSpacesRequest::getTag()const
|
||||||
|
{
|
||||||
|
return tag_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListManagedPrivateSpacesRequest::setTag(const std::vector<Tag>& tag)
|
||||||
|
{
|
||||||
|
tag_ = tag;
|
||||||
|
for(int dep1 = 0; dep1!= tag.size(); dep1++) {
|
||||||
|
auto tagObj = tag.at(dep1);
|
||||||
|
std::string tagObjStr = "Tag." + std::to_string(dep1 + 1);
|
||||||
|
setParameter(tagObjStr + ".Key", tagObj.key);
|
||||||
|
setParameter(tagObjStr + ".Value", tagObj.value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ListManagedPrivateSpacesRequest::getResourceOwnerAccount()const
|
||||||
|
{
|
||||||
|
return resourceOwnerAccount_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListManagedPrivateSpacesRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
|
||||||
|
{
|
||||||
|
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||||
|
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ListManagedPrivateSpacesRequest::getOwnerAccount()const
|
||||||
|
{
|
||||||
|
return ownerAccount_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListManagedPrivateSpacesRequest::setOwnerAccount(const std::string& ownerAccount)
|
||||||
|
{
|
||||||
|
ownerAccount_ = ownerAccount;
|
||||||
|
setParameter("OwnerAccount", ownerAccount);
|
||||||
|
}
|
||||||
|
|
||||||
|
long ListManagedPrivateSpacesRequest::getOwnerId()const
|
||||||
|
{
|
||||||
|
return ownerId_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListManagedPrivateSpacesRequest::setOwnerId(long ownerId)
|
||||||
|
{
|
||||||
|
ownerId_ = ownerId;
|
||||||
|
setParameter("OwnerId", std::to_string(ownerId));
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<std::string> ListManagedPrivateSpacesRequest::getManagedPrivateSpaceId()const
|
||||||
|
{
|
||||||
|
return managedPrivateSpaceId_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListManagedPrivateSpacesRequest::setManagedPrivateSpaceId(const std::vector<std::string>& managedPrivateSpaceId)
|
||||||
|
{
|
||||||
|
managedPrivateSpaceId_ = managedPrivateSpaceId;
|
||||||
|
for(int dep1 = 0; dep1!= managedPrivateSpaceId.size(); dep1++) {
|
||||||
|
setParameter("ManagedPrivateSpaceId."+ std::to_string(dep1), managedPrivateSpaceId.at(dep1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ListManagedPrivateSpacesRequest::getZoneId()const
|
||||||
|
{
|
||||||
|
return zoneId_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListManagedPrivateSpacesRequest::setZoneId(const std::string& zoneId)
|
||||||
|
{
|
||||||
|
zoneId_ = zoneId;
|
||||||
|
setParameter("ZoneId", zoneId);
|
||||||
|
}
|
||||||
|
|
||||||
|
int ListManagedPrivateSpacesRequest::getMaxResults()const
|
||||||
|
{
|
||||||
|
return maxResults_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListManagedPrivateSpacesRequest::setMaxResults(int maxResults)
|
||||||
|
{
|
||||||
|
maxResults_ = maxResults;
|
||||||
|
setParameter("MaxResults", std::to_string(maxResults));
|
||||||
|
}
|
||||||
|
|
||||||
158
smarthosting/src/model/ListManagedPrivateSpacesResult.cc
Normal file
158
smarthosting/src/model/ListManagedPrivateSpacesResult.cc
Normal file
@@ -0,0 +1,158 @@
|
|||||||
|
/*
|
||||||
|
* 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/smarthosting/model/ListManagedPrivateSpacesResult.h>
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud::SmartHosting;
|
||||||
|
using namespace AlibabaCloud::SmartHosting::Model;
|
||||||
|
|
||||||
|
ListManagedPrivateSpacesResult::ListManagedPrivateSpacesResult() :
|
||||||
|
ServiceResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
ListManagedPrivateSpacesResult::ListManagedPrivateSpacesResult(const std::string &payload) :
|
||||||
|
ServiceResult()
|
||||||
|
{
|
||||||
|
parse(payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
ListManagedPrivateSpacesResult::~ListManagedPrivateSpacesResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void ListManagedPrivateSpacesResult::parse(const std::string &payload)
|
||||||
|
{
|
||||||
|
Json::Reader reader;
|
||||||
|
Json::Value value;
|
||||||
|
reader.parse(payload, value);
|
||||||
|
setRequestId(value["RequestId"].asString());
|
||||||
|
auto allManagedPrivateSpaceSetsNode = value["ManagedPrivateSpaceSets"]["ManagedPrivateSpaceSet"];
|
||||||
|
for (auto valueManagedPrivateSpaceSetsManagedPrivateSpaceSet : allManagedPrivateSpaceSetsNode)
|
||||||
|
{
|
||||||
|
ManagedPrivateSpaceSet managedPrivateSpaceSetsObject;
|
||||||
|
if(!valueManagedPrivateSpaceSetsManagedPrivateSpaceSet["CreationTime"].isNull())
|
||||||
|
managedPrivateSpaceSetsObject.creationTime = valueManagedPrivateSpaceSetsManagedPrivateSpaceSet["CreationTime"].asString();
|
||||||
|
if(!valueManagedPrivateSpaceSetsManagedPrivateSpaceSet["Description"].isNull())
|
||||||
|
managedPrivateSpaceSetsObject.description = valueManagedPrivateSpaceSetsManagedPrivateSpaceSet["Description"].asString();
|
||||||
|
if(!valueManagedPrivateSpaceSetsManagedPrivateSpaceSet["ManagedPrivateSpaceId"].isNull())
|
||||||
|
managedPrivateSpaceSetsObject.managedPrivateSpaceId = valueManagedPrivateSpaceSetsManagedPrivateSpaceSet["ManagedPrivateSpaceId"].asString();
|
||||||
|
if(!valueManagedPrivateSpaceSetsManagedPrivateSpaceSet["ManagedPrivateSpaceName"].isNull())
|
||||||
|
managedPrivateSpaceSetsObject.managedPrivateSpaceName = valueManagedPrivateSpaceSetsManagedPrivateSpaceSet["ManagedPrivateSpaceName"].asString();
|
||||||
|
if(!valueManagedPrivateSpaceSetsManagedPrivateSpaceSet["ResourceGroupId"].isNull())
|
||||||
|
managedPrivateSpaceSetsObject.resourceGroupId = valueManagedPrivateSpaceSetsManagedPrivateSpaceSet["ResourceGroupId"].asString();
|
||||||
|
if(!valueManagedPrivateSpaceSetsManagedPrivateSpaceSet["SaleMode"].isNull())
|
||||||
|
managedPrivateSpaceSetsObject.saleMode = valueManagedPrivateSpaceSetsManagedPrivateSpaceSet["SaleMode"].asString();
|
||||||
|
if(!valueManagedPrivateSpaceSetsManagedPrivateSpaceSet["ZoneId"].isNull())
|
||||||
|
managedPrivateSpaceSetsObject.zoneId = valueManagedPrivateSpaceSetsManagedPrivateSpaceSet["ZoneId"].asString();
|
||||||
|
auto allDeploymentAttributesNode = allManagedPrivateSpaceSetsNode["DeploymentAttributes"]["DeploymentAttribute"];
|
||||||
|
for (auto allManagedPrivateSpaceSetsNodeDeploymentAttributesDeploymentAttribute : allDeploymentAttributesNode)
|
||||||
|
{
|
||||||
|
ManagedPrivateSpaceSet::DeploymentAttribute deploymentAttributesObject;
|
||||||
|
if(!allManagedPrivateSpaceSetsNodeDeploymentAttributesDeploymentAttribute["ContractId"].isNull())
|
||||||
|
deploymentAttributesObject.contractId = allManagedPrivateSpaceSetsNodeDeploymentAttributesDeploymentAttribute["ContractId"].asString();
|
||||||
|
if(!allManagedPrivateSpaceSetsNodeDeploymentAttributesDeploymentAttribute["CreateTime"].isNull())
|
||||||
|
deploymentAttributesObject.createTime = allManagedPrivateSpaceSetsNodeDeploymentAttributesDeploymentAttribute["CreateTime"].asString();
|
||||||
|
if(!allManagedPrivateSpaceSetsNodeDeploymentAttributesDeploymentAttribute["Description"].isNull())
|
||||||
|
deploymentAttributesObject.description = allManagedPrivateSpaceSetsNodeDeploymentAttributesDeploymentAttribute["Description"].asString();
|
||||||
|
auto allDeploymentStepsNode = allDeploymentAttributesNode["DeploymentSteps"]["DeploymentStep"];
|
||||||
|
for (auto allDeploymentAttributesNodeDeploymentStepsDeploymentStep : allDeploymentStepsNode)
|
||||||
|
{
|
||||||
|
ManagedPrivateSpaceSet::DeploymentAttribute::DeploymentStep deploymentStepsObject;
|
||||||
|
if(!allDeploymentAttributesNodeDeploymentStepsDeploymentStep["ActualTime"].isNull())
|
||||||
|
deploymentStepsObject.actualTime = allDeploymentAttributesNodeDeploymentStepsDeploymentStep["ActualTime"].asString();
|
||||||
|
if(!allDeploymentAttributesNodeDeploymentStepsDeploymentStep["CurrentStep"].isNull())
|
||||||
|
deploymentStepsObject.currentStep = allDeploymentAttributesNodeDeploymentStepsDeploymentStep["CurrentStep"].asString() == "true";
|
||||||
|
if(!allDeploymentAttributesNodeDeploymentStepsDeploymentStep["ExpectTime"].isNull())
|
||||||
|
deploymentStepsObject.expectTime = allDeploymentAttributesNodeDeploymentStepsDeploymentStep["ExpectTime"].asString();
|
||||||
|
if(!allDeploymentAttributesNodeDeploymentStepsDeploymentStep["Status"].isNull())
|
||||||
|
deploymentStepsObject.status = allDeploymentAttributesNodeDeploymentStepsDeploymentStep["Status"].asString();
|
||||||
|
deploymentAttributesObject.deploymentSteps.push_back(deploymentStepsObject);
|
||||||
|
}
|
||||||
|
managedPrivateSpaceSetsObject.deploymentAttributes.push_back(deploymentAttributesObject);
|
||||||
|
}
|
||||||
|
auto allManagedHostSetsNode = allManagedPrivateSpaceSetsNode["ManagedHostSets"]["ManagedHostSet"];
|
||||||
|
for (auto allManagedPrivateSpaceSetsNodeManagedHostSetsManagedHostSet : allManagedHostSetsNode)
|
||||||
|
{
|
||||||
|
ManagedPrivateSpaceSet::ManagedHostSet managedHostSetsObject;
|
||||||
|
if(!allManagedPrivateSpaceSetsNodeManagedHostSetsManagedHostSet["ManagedHostId"].isNull())
|
||||||
|
managedHostSetsObject.managedHostId = allManagedPrivateSpaceSetsNodeManagedHostSetsManagedHostSet["ManagedHostId"].asString();
|
||||||
|
if(!allManagedPrivateSpaceSetsNodeManagedHostSetsManagedHostSet["ManagedHostStatus"].isNull())
|
||||||
|
managedHostSetsObject.managedHostStatus = allManagedPrivateSpaceSetsNodeManagedHostSetsManagedHostSet["ManagedHostStatus"].asString();
|
||||||
|
managedPrivateSpaceSetsObject.managedHostSets.push_back(managedHostSetsObject);
|
||||||
|
}
|
||||||
|
auto allTagsNode = allManagedPrivateSpaceSetsNode["Tags"]["Tag"];
|
||||||
|
for (auto allManagedPrivateSpaceSetsNodeTagsTag : allTagsNode)
|
||||||
|
{
|
||||||
|
ManagedPrivateSpaceSet::Tag tagsObject;
|
||||||
|
if(!allManagedPrivateSpaceSetsNodeTagsTag["Key"].isNull())
|
||||||
|
tagsObject.key = allManagedPrivateSpaceSetsNodeTagsTag["Key"].asString();
|
||||||
|
if(!allManagedPrivateSpaceSetsNodeTagsTag["Value"].isNull())
|
||||||
|
tagsObject.value = allManagedPrivateSpaceSetsNodeTagsTag["Value"].asString();
|
||||||
|
managedPrivateSpaceSetsObject.tags.push_back(tagsObject);
|
||||||
|
}
|
||||||
|
auto capacityAttributeNode = value["CapacityAttribute"];
|
||||||
|
if(!capacityAttributeNode["AvailableHostCount"].isNull())
|
||||||
|
managedPrivateSpaceSetsObject.capacityAttribute.availableHostCount = std::stoi(capacityAttributeNode["AvailableHostCount"].asString());
|
||||||
|
if(!capacityAttributeNode["AvailableMemories"].isNull())
|
||||||
|
managedPrivateSpaceSetsObject.capacityAttribute.availableMemories = std::stoi(capacityAttributeNode["AvailableMemories"].asString());
|
||||||
|
if(!capacityAttributeNode["AvailableVcpus"].isNull())
|
||||||
|
managedPrivateSpaceSetsObject.capacityAttribute.availableVcpus = std::stoi(capacityAttributeNode["AvailableVcpus"].asString());
|
||||||
|
if(!capacityAttributeNode["ReservedHostCount"].isNull())
|
||||||
|
managedPrivateSpaceSetsObject.capacityAttribute.reservedHostCount = std::stoi(capacityAttributeNode["ReservedHostCount"].asString());
|
||||||
|
if(!capacityAttributeNode["ReservedMemories"].isNull())
|
||||||
|
managedPrivateSpaceSetsObject.capacityAttribute.reservedMemories = std::stoi(capacityAttributeNode["ReservedMemories"].asString());
|
||||||
|
if(!capacityAttributeNode["ReservedVcpus"].isNull())
|
||||||
|
managedPrivateSpaceSetsObject.capacityAttribute.reservedVcpus = std::stoi(capacityAttributeNode["ReservedVcpus"].asString());
|
||||||
|
if(!capacityAttributeNode["TotalHostCount"].isNull())
|
||||||
|
managedPrivateSpaceSetsObject.capacityAttribute.totalHostCount = std::stoi(capacityAttributeNode["TotalHostCount"].asString());
|
||||||
|
if(!capacityAttributeNode["TotalMemories"].isNull())
|
||||||
|
managedPrivateSpaceSetsObject.capacityAttribute.totalMemories = std::stoi(capacityAttributeNode["TotalMemories"].asString());
|
||||||
|
if(!capacityAttributeNode["TotalVcpus"].isNull())
|
||||||
|
managedPrivateSpaceSetsObject.capacityAttribute.totalVcpus = std::stoi(capacityAttributeNode["TotalVcpus"].asString());
|
||||||
|
auto lifecycleAttributeNode = value["LifecycleAttribute"];
|
||||||
|
if(!lifecycleAttributeNode["DeliveryTime"].isNull())
|
||||||
|
managedPrivateSpaceSetsObject.lifecycleAttribute.deliveryTime = lifecycleAttributeNode["DeliveryTime"].asString();
|
||||||
|
if(!lifecycleAttributeNode["ExpirationTime"].isNull())
|
||||||
|
managedPrivateSpaceSetsObject.lifecycleAttribute.expirationTime = lifecycleAttributeNode["ExpirationTime"].asString();
|
||||||
|
if(!lifecycleAttributeNode["ReceptionTime"].isNull())
|
||||||
|
managedPrivateSpaceSetsObject.lifecycleAttribute.receptionTime = lifecycleAttributeNode["ReceptionTime"].asString();
|
||||||
|
auto locationAttributeNode = value["LocationAttribute"];
|
||||||
|
if(!locationAttributeNode["Address"].isNull())
|
||||||
|
managedPrivateSpaceSetsObject.locationAttribute.address = locationAttributeNode["Address"].asString();
|
||||||
|
managedPrivateSpaceSets_.push_back(managedPrivateSpaceSetsObject);
|
||||||
|
}
|
||||||
|
if(!value["NextToken"].isNull())
|
||||||
|
nextToken_ = value["NextToken"].asString();
|
||||||
|
if(!value["TotalCount"].isNull())
|
||||||
|
totalCount_ = std::stoi(value["TotalCount"].asString());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
int ListManagedPrivateSpacesResult::getTotalCount()const
|
||||||
|
{
|
||||||
|
return totalCount_;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<ListManagedPrivateSpacesResult::ManagedPrivateSpaceSet> ListManagedPrivateSpacesResult::getManagedPrivateSpaceSets()const
|
||||||
|
{
|
||||||
|
return managedPrivateSpaceSets_;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ListManagedPrivateSpacesResult::getNextToken()const
|
||||||
|
{
|
||||||
|
return nextToken_;
|
||||||
|
}
|
||||||
|
|
||||||
152
smarthosting/src/model/ListManagedRacksRequest.cc
Normal file
152
smarthosting/src/model/ListManagedRacksRequest.cc
Normal file
@@ -0,0 +1,152 @@
|
|||||||
|
/*
|
||||||
|
* 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/smarthosting/model/ListManagedRacksRequest.h>
|
||||||
|
|
||||||
|
using AlibabaCloud::SmartHosting::Model::ListManagedRacksRequest;
|
||||||
|
|
||||||
|
ListManagedRacksRequest::ListManagedRacksRequest() :
|
||||||
|
RpcServiceRequest("smarthosting", "2020-08-01", "ListManagedRacks")
|
||||||
|
{
|
||||||
|
setMethod(HttpRequest::Method::Post);
|
||||||
|
}
|
||||||
|
|
||||||
|
ListManagedRacksRequest::~ListManagedRacksRequest()
|
||||||
|
{}
|
||||||
|
|
||||||
|
long ListManagedRacksRequest::getResourceOwnerId()const
|
||||||
|
{
|
||||||
|
return resourceOwnerId_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListManagedRacksRequest::setResourceOwnerId(long resourceOwnerId)
|
||||||
|
{
|
||||||
|
resourceOwnerId_ = resourceOwnerId;
|
||||||
|
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ListManagedRacksRequest::getHostType()const
|
||||||
|
{
|
||||||
|
return hostType_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListManagedRacksRequest::setHostType(const std::string& hostType)
|
||||||
|
{
|
||||||
|
hostType_ = hostType;
|
||||||
|
setParameter("HostType", hostType);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ListManagedRacksRequest::getRegionId()const
|
||||||
|
{
|
||||||
|
return regionId_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListManagedRacksRequest::setRegionId(const std::string& regionId)
|
||||||
|
{
|
||||||
|
regionId_ = regionId;
|
||||||
|
setParameter("RegionId", regionId);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ListManagedRacksRequest::getNextToken()const
|
||||||
|
{
|
||||||
|
return nextToken_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListManagedRacksRequest::setNextToken(const std::string& nextToken)
|
||||||
|
{
|
||||||
|
nextToken_ = nextToken;
|
||||||
|
setParameter("NextToken", nextToken);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<std::string> ListManagedRacksRequest::getManagedRackId()const
|
||||||
|
{
|
||||||
|
return managedRackId_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListManagedRacksRequest::setManagedRackId(const std::vector<std::string>& managedRackId)
|
||||||
|
{
|
||||||
|
managedRackId_ = managedRackId;
|
||||||
|
for(int dep1 = 0; dep1!= managedRackId.size(); dep1++) {
|
||||||
|
setParameter("ManagedRackId."+ std::to_string(dep1), managedRackId.at(dep1));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ListManagedRacksRequest::getResourceOwnerAccount()const
|
||||||
|
{
|
||||||
|
return resourceOwnerAccount_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListManagedRacksRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
|
||||||
|
{
|
||||||
|
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||||
|
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ListManagedRacksRequest::getOwnerAccount()const
|
||||||
|
{
|
||||||
|
return ownerAccount_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListManagedRacksRequest::setOwnerAccount(const std::string& ownerAccount)
|
||||||
|
{
|
||||||
|
ownerAccount_ = ownerAccount;
|
||||||
|
setParameter("OwnerAccount", ownerAccount);
|
||||||
|
}
|
||||||
|
|
||||||
|
long ListManagedRacksRequest::getOwnerId()const
|
||||||
|
{
|
||||||
|
return ownerId_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListManagedRacksRequest::setOwnerId(long ownerId)
|
||||||
|
{
|
||||||
|
ownerId_ = ownerId;
|
||||||
|
setParameter("OwnerId", std::to_string(ownerId));
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ListManagedRacksRequest::getManagedPrivateSpaceId()const
|
||||||
|
{
|
||||||
|
return managedPrivateSpaceId_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListManagedRacksRequest::setManagedPrivateSpaceId(const std::string& managedPrivateSpaceId)
|
||||||
|
{
|
||||||
|
managedPrivateSpaceId_ = managedPrivateSpaceId;
|
||||||
|
setParameter("ManagedPrivateSpaceId", managedPrivateSpaceId);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ListManagedRacksRequest::getZoneId()const
|
||||||
|
{
|
||||||
|
return zoneId_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListManagedRacksRequest::setZoneId(const std::string& zoneId)
|
||||||
|
{
|
||||||
|
zoneId_ = zoneId;
|
||||||
|
setParameter("ZoneId", zoneId);
|
||||||
|
}
|
||||||
|
|
||||||
|
int ListManagedRacksRequest::getMaxResults()const
|
||||||
|
{
|
||||||
|
return maxResults_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListManagedRacksRequest::setMaxResults(int maxResults)
|
||||||
|
{
|
||||||
|
maxResults_ = maxResults;
|
||||||
|
setParameter("MaxResults", std::to_string(maxResults));
|
||||||
|
}
|
||||||
|
|
||||||
97
smarthosting/src/model/ListManagedRacksResult.cc
Normal file
97
smarthosting/src/model/ListManagedRacksResult.cc
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
/*
|
||||||
|
* 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/smarthosting/model/ListManagedRacksResult.h>
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud::SmartHosting;
|
||||||
|
using namespace AlibabaCloud::SmartHosting::Model;
|
||||||
|
|
||||||
|
ListManagedRacksResult::ListManagedRacksResult() :
|
||||||
|
ServiceResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
ListManagedRacksResult::ListManagedRacksResult(const std::string &payload) :
|
||||||
|
ServiceResult()
|
||||||
|
{
|
||||||
|
parse(payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
ListManagedRacksResult::~ListManagedRacksResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void ListManagedRacksResult::parse(const std::string &payload)
|
||||||
|
{
|
||||||
|
Json::Reader reader;
|
||||||
|
Json::Value value;
|
||||||
|
reader.parse(payload, value);
|
||||||
|
setRequestId(value["RequestId"].asString());
|
||||||
|
auto allManagedRacksSetsNode = value["ManagedRacksSets"]["ManagedRacksSet"];
|
||||||
|
for (auto valueManagedRacksSetsManagedRacksSet : allManagedRacksSetsNode)
|
||||||
|
{
|
||||||
|
ManagedRacksSet managedRacksSetsObject;
|
||||||
|
if(!valueManagedRacksSetsManagedRacksSet["ManagedRackId"].isNull())
|
||||||
|
managedRacksSetsObject.managedRackId = valueManagedRacksSetsManagedRacksSet["ManagedRackId"].asString();
|
||||||
|
if(!valueManagedRacksSetsManagedRacksSet["ZoneId"].isNull())
|
||||||
|
managedRacksSetsObject.zoneId = valueManagedRacksSetsManagedRacksSet["ZoneId"].asString();
|
||||||
|
auto allManagedHostSetsNode = allManagedRacksSetsNode["ManagedHostSets"]["ManagedHostSet"];
|
||||||
|
for (auto allManagedRacksSetsNodeManagedHostSetsManagedHostSet : allManagedHostSetsNode)
|
||||||
|
{
|
||||||
|
ManagedRacksSet::ManagedHostSet managedHostSetsObject;
|
||||||
|
if(!allManagedRacksSetsNodeManagedHostSetsManagedHostSet["Description"].isNull())
|
||||||
|
managedHostSetsObject.description = allManagedRacksSetsNodeManagedHostSetsManagedHostSet["Description"].asString();
|
||||||
|
if(!allManagedRacksSetsNodeManagedHostSetsManagedHostSet["ManagedHostId"].isNull())
|
||||||
|
managedHostSetsObject.managedHostId = allManagedRacksSetsNodeManagedHostSetsManagedHostSet["ManagedHostId"].asString();
|
||||||
|
if(!allManagedRacksSetsNodeManagedHostSetsManagedHostSet["Status"].isNull())
|
||||||
|
managedHostSetsObject.status = allManagedRacksSetsNodeManagedHostSetsManagedHostSet["Status"].asString();
|
||||||
|
auto hostAttributeNode = value["HostAttribute"];
|
||||||
|
if(!hostAttributeNode["CpuModelName"].isNull())
|
||||||
|
managedHostSetsObject.hostAttribute.cpuModelName = hostAttributeNode["CpuModelName"].asString();
|
||||||
|
if(!hostAttributeNode["HostType"].isNull())
|
||||||
|
managedHostSetsObject.hostAttribute.hostType = hostAttributeNode["HostType"].asString();
|
||||||
|
managedRacksSetsObject.managedHostSets.push_back(managedHostSetsObject);
|
||||||
|
}
|
||||||
|
managedRacksSets_.push_back(managedRacksSetsObject);
|
||||||
|
}
|
||||||
|
if(!value["NextToken"].isNull())
|
||||||
|
nextToken_ = value["NextToken"].asString();
|
||||||
|
if(!value["PageSize"].isNull())
|
||||||
|
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||||
|
if(!value["TotalCount"].isNull())
|
||||||
|
totalCount_ = std::stoi(value["TotalCount"].asString());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
int ListManagedRacksResult::getTotalCount()const
|
||||||
|
{
|
||||||
|
return totalCount_;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ListManagedRacksResult::getNextToken()const
|
||||||
|
{
|
||||||
|
return nextToken_;
|
||||||
|
}
|
||||||
|
|
||||||
|
int ListManagedRacksResult::getPageSize()const
|
||||||
|
{
|
||||||
|
return pageSize_;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<ListManagedRacksResult::ManagedRacksSet> ListManagedRacksResult::getManagedRacksSets()const
|
||||||
|
{
|
||||||
|
return managedRacksSets_;
|
||||||
|
}
|
||||||
|
|
||||||
117
smarthosting/src/model/UpdateManagedHostAttributesRequest.cc
Normal file
117
smarthosting/src/model/UpdateManagedHostAttributesRequest.cc
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
/*
|
||||||
|
* 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/smarthosting/model/UpdateManagedHostAttributesRequest.h>
|
||||||
|
|
||||||
|
using AlibabaCloud::SmartHosting::Model::UpdateManagedHostAttributesRequest;
|
||||||
|
|
||||||
|
UpdateManagedHostAttributesRequest::UpdateManagedHostAttributesRequest() :
|
||||||
|
RpcServiceRequest("smarthosting", "2020-08-01", "UpdateManagedHostAttributes")
|
||||||
|
{
|
||||||
|
setMethod(HttpRequest::Method::Post);
|
||||||
|
}
|
||||||
|
|
||||||
|
UpdateManagedHostAttributesRequest::~UpdateManagedHostAttributesRequest()
|
||||||
|
{}
|
||||||
|
|
||||||
|
long UpdateManagedHostAttributesRequest::getResourceOwnerId()const
|
||||||
|
{
|
||||||
|
return resourceOwnerId_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void UpdateManagedHostAttributesRequest::setResourceOwnerId(long resourceOwnerId)
|
||||||
|
{
|
||||||
|
resourceOwnerId_ = resourceOwnerId;
|
||||||
|
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string UpdateManagedHostAttributesRequest::getMode()const
|
||||||
|
{
|
||||||
|
return mode_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void UpdateManagedHostAttributesRequest::setMode(const std::string& mode)
|
||||||
|
{
|
||||||
|
mode_ = mode;
|
||||||
|
setParameter("Mode", mode);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string UpdateManagedHostAttributesRequest::getRegionId()const
|
||||||
|
{
|
||||||
|
return regionId_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void UpdateManagedHostAttributesRequest::setRegionId(const std::string& regionId)
|
||||||
|
{
|
||||||
|
regionId_ = regionId;
|
||||||
|
setParameter("RegionId", regionId);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string UpdateManagedHostAttributesRequest::getResourceOwnerAccount()const
|
||||||
|
{
|
||||||
|
return resourceOwnerAccount_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void UpdateManagedHostAttributesRequest::setResourceOwnerAccount(const std::string& resourceOwnerAccount)
|
||||||
|
{
|
||||||
|
resourceOwnerAccount_ = resourceOwnerAccount;
|
||||||
|
setParameter("ResourceOwnerAccount", resourceOwnerAccount);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string UpdateManagedHostAttributesRequest::getOwnerAccount()const
|
||||||
|
{
|
||||||
|
return ownerAccount_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void UpdateManagedHostAttributesRequest::setOwnerAccount(const std::string& ownerAccount)
|
||||||
|
{
|
||||||
|
ownerAccount_ = ownerAccount;
|
||||||
|
setParameter("OwnerAccount", ownerAccount);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string UpdateManagedHostAttributesRequest::getManagedHostId()const
|
||||||
|
{
|
||||||
|
return managedHostId_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void UpdateManagedHostAttributesRequest::setManagedHostId(const std::string& managedHostId)
|
||||||
|
{
|
||||||
|
managedHostId_ = managedHostId;
|
||||||
|
setParameter("ManagedHostId", managedHostId);
|
||||||
|
}
|
||||||
|
|
||||||
|
long UpdateManagedHostAttributesRequest::getOwnerId()const
|
||||||
|
{
|
||||||
|
return ownerId_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void UpdateManagedHostAttributesRequest::setOwnerId(long ownerId)
|
||||||
|
{
|
||||||
|
ownerId_ = ownerId;
|
||||||
|
setParameter("OwnerId", std::to_string(ownerId));
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string UpdateManagedHostAttributesRequest::getManagedHostName()const
|
||||||
|
{
|
||||||
|
return managedHostName_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void UpdateManagedHostAttributesRequest::setManagedHostName(const std::string& managedHostName)
|
||||||
|
{
|
||||||
|
managedHostName_ = managedHostName;
|
||||||
|
setParameter("ManagedHostName", managedHostName);
|
||||||
|
}
|
||||||
|
|
||||||
44
smarthosting/src/model/UpdateManagedHostAttributesResult.cc
Normal file
44
smarthosting/src/model/UpdateManagedHostAttributesResult.cc
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
/*
|
||||||
|
* 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/smarthosting/model/UpdateManagedHostAttributesResult.h>
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud::SmartHosting;
|
||||||
|
using namespace AlibabaCloud::SmartHosting::Model;
|
||||||
|
|
||||||
|
UpdateManagedHostAttributesResult::UpdateManagedHostAttributesResult() :
|
||||||
|
ServiceResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
UpdateManagedHostAttributesResult::UpdateManagedHostAttributesResult(const std::string &payload) :
|
||||||
|
ServiceResult()
|
||||||
|
{
|
||||||
|
parse(payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
UpdateManagedHostAttributesResult::~UpdateManagedHostAttributesResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void UpdateManagedHostAttributesResult::parse(const std::string &payload)
|
||||||
|
{
|
||||||
|
Json::Reader reader;
|
||||||
|
Json::Value value;
|
||||||
|
reader.parse(payload, value);
|
||||||
|
setRequestId(value["RequestId"].asString());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user