HTTPDNS SDK Auto Released By shenshi,Version:1.34.54

Signed-off-by: haowei.yao <haowei.yao@alibaba-inc.com>
This commit is contained in:
haowei.yao
2019-03-20 13:43:00 +08:00
parent 4165dc1e2c
commit 2561eb446f
35 changed files with 2233 additions and 2 deletions

View File

@@ -1,3 +1,6 @@
2019-03-20 Version: 1.34.54
1, Update the Dependency
2019-03-20 Version: 1.34.53
1, cloudwf: update bool type parameter

View File

@@ -112,4 +112,5 @@ add_subdirectory(imagesearch)
add_subdirectory(cas)
add_subdirectory(bssopenapi)
add_subdirectory(cloudwf)
add_subdirectory(alidns)
add_subdirectory(alidns)
add_subdirectory(httpdns)

View File

@@ -1 +1 @@
1.34.53
1.34.54

110
httpdns/CMakeLists.txt Normal file
View File

@@ -0,0 +1,110 @@
#
# Copyright 2009-2017 Alibaba Cloud All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
set(public_header_dir ${CMAKE_CURRENT_SOURCE_DIR}/../include)
set(httpdns_public_header
include/alibabacloud/httpdns/HttpdnsClient.h
include/alibabacloud/httpdns/HttpdnsExport.h )
set(httpdns_public_header_model
include/alibabacloud/httpdns/model/GetResolveStatisticsRequest.h
include/alibabacloud/httpdns/model/GetResolveStatisticsResult.h
include/alibabacloud/httpdns/model/DeleteDomainRequest.h
include/alibabacloud/httpdns/model/DeleteDomainResult.h
include/alibabacloud/httpdns/model/DescribeDomainsRequest.h
include/alibabacloud/httpdns/model/DescribeDomainsResult.h
include/alibabacloud/httpdns/model/GetResolveCountSummaryRequest.h
include/alibabacloud/httpdns/model/GetResolveCountSummaryResult.h
include/alibabacloud/httpdns/model/AddDomainRequest.h
include/alibabacloud/httpdns/model/AddDomainResult.h
include/alibabacloud/httpdns/model/ListDomainsRequest.h
include/alibabacloud/httpdns/model/ListDomainsResult.h
include/alibabacloud/httpdns/model/GetAccountInfoRequest.h
include/alibabacloud/httpdns/model/GetAccountInfoResult.h )
set(httpdns_src
src/HttpdnsClient.cc
src/model/GetResolveStatisticsRequest.cc
src/model/GetResolveStatisticsResult.cc
src/model/DeleteDomainRequest.cc
src/model/DeleteDomainResult.cc
src/model/DescribeDomainsRequest.cc
src/model/DescribeDomainsResult.cc
src/model/GetResolveCountSummaryRequest.cc
src/model/GetResolveCountSummaryResult.cc
src/model/AddDomainRequest.cc
src/model/AddDomainResult.cc
src/model/ListDomainsRequest.cc
src/model/ListDomainsResult.cc
src/model/GetAccountInfoRequest.cc
src/model/GetAccountInfoResult.cc )
add_library(httpdns ${LIB_TYPE}
${httpdns_public_header}
${httpdns_public_header_model}
${httpdns_src})
set_target_properties(httpdns
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}httpdns
)
if(${LIB_TYPE} STREQUAL "SHARED")
set_target_properties(httpdns
PROPERTIES
DEFINE_SYMBOL ALIBABACLOUD_HTTPDNS_LIBRARY)
endif()
target_include_directories(httpdns
PRIVATE include
${CMAKE_SOURCE_DIR}/core/include
)
target_link_libraries(httpdns
core)
if(CMAKE_HOST_WIN32)
ExternalProject_Get_Property(jsoncpp INSTALL_DIR)
set(jsoncpp_install_dir ${INSTALL_DIR})
add_dependencies(httpdns
jsoncpp)
target_include_directories(httpdns
PRIVATE ${jsoncpp_install_dir}/include)
target_link_libraries(httpdns
${jsoncpp_install_dir}/lib/jsoncpp.lib)
set_target_properties(httpdns
PROPERTIES
COMPILE_OPTIONS "/bigobj")
else()
target_include_directories(httpdns
PRIVATE /usr/include/jsoncpp)
target_link_libraries(httpdns
jsoncpp)
endif()
install(FILES ${httpdns_public_header}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/httpdns)
install(FILES ${httpdns_public_header_model}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/httpdns/model)
install(TARGETS httpdns
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)

View File

@@ -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_HTTPDNS_HTTPDNSCLIENT_H_
#define ALIBABACLOUD_HTTPDNS_HTTPDNSCLIENT_H_
#include <future>
#include <alibabacloud/core/AsyncCallerContext.h>
#include <alibabacloud/core/EndpointProvider.h>
#include <alibabacloud/core/RpcServiceClient.h>
#include "HttpdnsExport.h"
#include "model/GetResolveStatisticsRequest.h"
#include "model/GetResolveStatisticsResult.h"
#include "model/DeleteDomainRequest.h"
#include "model/DeleteDomainResult.h"
#include "model/DescribeDomainsRequest.h"
#include "model/DescribeDomainsResult.h"
#include "model/GetResolveCountSummaryRequest.h"
#include "model/GetResolveCountSummaryResult.h"
#include "model/AddDomainRequest.h"
#include "model/AddDomainResult.h"
#include "model/ListDomainsRequest.h"
#include "model/ListDomainsResult.h"
#include "model/GetAccountInfoRequest.h"
#include "model/GetAccountInfoResult.h"
namespace AlibabaCloud
{
namespace Httpdns
{
class ALIBABACLOUD_HTTPDNS_EXPORT HttpdnsClient : public RpcServiceClient
{
public:
typedef Outcome<Error, Model::GetResolveStatisticsResult> GetResolveStatisticsOutcome;
typedef std::future<GetResolveStatisticsOutcome> GetResolveStatisticsOutcomeCallable;
typedef std::function<void(const HttpdnsClient*, const Model::GetResolveStatisticsRequest&, const GetResolveStatisticsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetResolveStatisticsAsyncHandler;
typedef Outcome<Error, Model::DeleteDomainResult> DeleteDomainOutcome;
typedef std::future<DeleteDomainOutcome> DeleteDomainOutcomeCallable;
typedef std::function<void(const HttpdnsClient*, const Model::DeleteDomainRequest&, const DeleteDomainOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DeleteDomainAsyncHandler;
typedef Outcome<Error, Model::DescribeDomainsResult> DescribeDomainsOutcome;
typedef std::future<DescribeDomainsOutcome> DescribeDomainsOutcomeCallable;
typedef std::function<void(const HttpdnsClient*, const Model::DescribeDomainsRequest&, const DescribeDomainsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeDomainsAsyncHandler;
typedef Outcome<Error, Model::GetResolveCountSummaryResult> GetResolveCountSummaryOutcome;
typedef std::future<GetResolveCountSummaryOutcome> GetResolveCountSummaryOutcomeCallable;
typedef std::function<void(const HttpdnsClient*, const Model::GetResolveCountSummaryRequest&, const GetResolveCountSummaryOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetResolveCountSummaryAsyncHandler;
typedef Outcome<Error, Model::AddDomainResult> AddDomainOutcome;
typedef std::future<AddDomainOutcome> AddDomainOutcomeCallable;
typedef std::function<void(const HttpdnsClient*, const Model::AddDomainRequest&, const AddDomainOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AddDomainAsyncHandler;
typedef Outcome<Error, Model::ListDomainsResult> ListDomainsOutcome;
typedef std::future<ListDomainsOutcome> ListDomainsOutcomeCallable;
typedef std::function<void(const HttpdnsClient*, const Model::ListDomainsRequest&, const ListDomainsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListDomainsAsyncHandler;
typedef Outcome<Error, Model::GetAccountInfoResult> GetAccountInfoOutcome;
typedef std::future<GetAccountInfoOutcome> GetAccountInfoOutcomeCallable;
typedef std::function<void(const HttpdnsClient*, const Model::GetAccountInfoRequest&, const GetAccountInfoOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetAccountInfoAsyncHandler;
HttpdnsClient(const Credentials &credentials, const ClientConfiguration &configuration);
HttpdnsClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
HttpdnsClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
~HttpdnsClient();
GetResolveStatisticsOutcome getResolveStatistics(const Model::GetResolveStatisticsRequest &request)const;
void getResolveStatisticsAsync(const Model::GetResolveStatisticsRequest& request, const GetResolveStatisticsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetResolveStatisticsOutcomeCallable getResolveStatisticsCallable(const Model::GetResolveStatisticsRequest& request) const;
DeleteDomainOutcome deleteDomain(const Model::DeleteDomainRequest &request)const;
void deleteDomainAsync(const Model::DeleteDomainRequest& request, const DeleteDomainAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DeleteDomainOutcomeCallable deleteDomainCallable(const Model::DeleteDomainRequest& request) const;
DescribeDomainsOutcome describeDomains(const Model::DescribeDomainsRequest &request)const;
void describeDomainsAsync(const Model::DescribeDomainsRequest& request, const DescribeDomainsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DescribeDomainsOutcomeCallable describeDomainsCallable(const Model::DescribeDomainsRequest& request) const;
GetResolveCountSummaryOutcome getResolveCountSummary(const Model::GetResolveCountSummaryRequest &request)const;
void getResolveCountSummaryAsync(const Model::GetResolveCountSummaryRequest& request, const GetResolveCountSummaryAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetResolveCountSummaryOutcomeCallable getResolveCountSummaryCallable(const Model::GetResolveCountSummaryRequest& request) const;
AddDomainOutcome addDomain(const Model::AddDomainRequest &request)const;
void addDomainAsync(const Model::AddDomainRequest& request, const AddDomainAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
AddDomainOutcomeCallable addDomainCallable(const Model::AddDomainRequest& request) const;
ListDomainsOutcome listDomains(const Model::ListDomainsRequest &request)const;
void listDomainsAsync(const Model::ListDomainsRequest& request, const ListDomainsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListDomainsOutcomeCallable listDomainsCallable(const Model::ListDomainsRequest& request) const;
GetAccountInfoOutcome getAccountInfo(const Model::GetAccountInfoRequest &request)const;
void getAccountInfoAsync(const Model::GetAccountInfoRequest& request, const GetAccountInfoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetAccountInfoOutcomeCallable getAccountInfoCallable(const Model::GetAccountInfoRequest& request) const;
private:
std::shared_ptr<EndpointProvider> endpointProvider_;
};
}
}
#endif // !ALIBABACLOUD_HTTPDNS_HTTPDNSCLIENT_H_

View File

@@ -0,0 +1,32 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_HTTPDNS_HTTPDNSEXPORT_H_
#define ALIBABACLOUD_HTTPDNS_HTTPDNSEXPORT_H_
#include <alibabacloud/core/Global.h>
#if defined(ALIBABACLOUD_SHARED)
# if defined(ALIBABACLOUD_HTTPDNS_LIBRARY)
# define ALIBABACLOUD_HTTPDNS_EXPORT ALIBABACLOUD_DECL_EXPORT
# else
# define ALIBABACLOUD_HTTPDNS_EXPORT ALIBABACLOUD_DECL_IMPORT
# endif
#else
# define ALIBABACLOUD_HTTPDNS_EXPORT
#endif
#endif // !ALIBABACLOUD_HTTPDNS_HTTPDNSEXPORT_H_

View File

@@ -0,0 +1,54 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_HTTPDNS_MODEL_ADDDOMAINREQUEST_H_
#define ALIBABACLOUD_HTTPDNS_MODEL_ADDDOMAINREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/httpdns/HttpdnsExport.h>
namespace AlibabaCloud
{
namespace Httpdns
{
namespace Model
{
class ALIBABACLOUD_HTTPDNS_EXPORT AddDomainRequest : public RpcServiceRequest
{
public:
AddDomainRequest();
~AddDomainRequest();
std::string getAccountId()const;
void setAccountId(const std::string& accountId);
std::string getDomainName()const;
void setDomainName(const std::string& domainName);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
private:
std::string accountId_;
std::string domainName_;
std::string accessKeyId_;
};
}
}
}
#endif // !ALIBABACLOUD_HTTPDNS_MODEL_ADDDOMAINREQUEST_H_

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_HTTPDNS_MODEL_ADDDOMAINRESULT_H_
#define ALIBABACLOUD_HTTPDNS_MODEL_ADDDOMAINRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/httpdns/HttpdnsExport.h>
namespace AlibabaCloud
{
namespace Httpdns
{
namespace Model
{
class ALIBABACLOUD_HTTPDNS_EXPORT AddDomainResult : public ServiceResult
{
public:
AddDomainResult();
explicit AddDomainResult(const std::string &payload);
~AddDomainResult();
std::string getDomainName()const;
protected:
void parse(const std::string &payload);
private:
std::string domainName_;
};
}
}
}
#endif // !ALIBABACLOUD_HTTPDNS_MODEL_ADDDOMAINRESULT_H_

View File

@@ -0,0 +1,54 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_HTTPDNS_MODEL_DELETEDOMAINREQUEST_H_
#define ALIBABACLOUD_HTTPDNS_MODEL_DELETEDOMAINREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/httpdns/HttpdnsExport.h>
namespace AlibabaCloud
{
namespace Httpdns
{
namespace Model
{
class ALIBABACLOUD_HTTPDNS_EXPORT DeleteDomainRequest : public RpcServiceRequest
{
public:
DeleteDomainRequest();
~DeleteDomainRequest();
std::string getAccountId()const;
void setAccountId(const std::string& accountId);
std::string getDomainName()const;
void setDomainName(const std::string& domainName);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
private:
std::string accountId_;
std::string domainName_;
std::string accessKeyId_;
};
}
}
}
#endif // !ALIBABACLOUD_HTTPDNS_MODEL_DELETEDOMAINREQUEST_H_

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_HTTPDNS_MODEL_DELETEDOMAINRESULT_H_
#define ALIBABACLOUD_HTTPDNS_MODEL_DELETEDOMAINRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/httpdns/HttpdnsExport.h>
namespace AlibabaCloud
{
namespace Httpdns
{
namespace Model
{
class ALIBABACLOUD_HTTPDNS_EXPORT DeleteDomainResult : public ServiceResult
{
public:
DeleteDomainResult();
explicit DeleteDomainResult(const std::string &payload);
~DeleteDomainResult();
std::string getDomainName()const;
protected:
void parse(const std::string &payload);
private:
std::string domainName_;
};
}
}
}
#endif // !ALIBABACLOUD_HTTPDNS_MODEL_DELETEDOMAINRESULT_H_

View File

@@ -0,0 +1,57 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_HTTPDNS_MODEL_DESCRIBEDOMAINSREQUEST_H_
#define ALIBABACLOUD_HTTPDNS_MODEL_DESCRIBEDOMAINSREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/httpdns/HttpdnsExport.h>
namespace AlibabaCloud
{
namespace Httpdns
{
namespace Model
{
class ALIBABACLOUD_HTTPDNS_EXPORT DescribeDomainsRequest : public RpcServiceRequest
{
public:
DescribeDomainsRequest();
~DescribeDomainsRequest();
std::string getAccountId()const;
void setAccountId(const std::string& accountId);
long getPageSize()const;
void setPageSize(long pageSize);
long getPageNumber()const;
void setPageNumber(long pageNumber);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
private:
std::string accountId_;
long pageSize_;
long pageNumber_;
std::string accessKeyId_;
};
}
}
}
#endif // !ALIBABACLOUD_HTTPDNS_MODEL_DESCRIBEDOMAINSREQUEST_H_

View File

@@ -0,0 +1,61 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_HTTPDNS_MODEL_DESCRIBEDOMAINSRESULT_H_
#define ALIBABACLOUD_HTTPDNS_MODEL_DESCRIBEDOMAINSRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/httpdns/HttpdnsExport.h>
namespace AlibabaCloud
{
namespace Httpdns
{
namespace Model
{
class ALIBABACLOUD_HTTPDNS_EXPORT DescribeDomainsResult : public ServiceResult
{
public:
struct Domain
{
std::string domainName;
};
DescribeDomainsResult();
explicit DescribeDomainsResult(const std::string &payload);
~DescribeDomainsResult();
std::vector<Domain> getDomains()const;
long getTotalCount()const;
long getPageSize()const;
long getPageNumber()const;
protected:
void parse(const std::string &payload);
private:
std::vector<Domain> domains_;
long totalCount_;
long pageSize_;
long pageNumber_;
};
}
}
}
#endif // !ALIBABACLOUD_HTTPDNS_MODEL_DESCRIBEDOMAINSRESULT_H_

View File

@@ -0,0 +1,48 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_HTTPDNS_MODEL_GETACCOUNTINFOREQUEST_H_
#define ALIBABACLOUD_HTTPDNS_MODEL_GETACCOUNTINFOREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/httpdns/HttpdnsExport.h>
namespace AlibabaCloud
{
namespace Httpdns
{
namespace Model
{
class ALIBABACLOUD_HTTPDNS_EXPORT GetAccountInfoRequest : public RpcServiceRequest
{
public:
GetAccountInfoRequest();
~GetAccountInfoRequest();
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
private:
std::string accessKeyId_;
};
}
}
}
#endif // !ALIBABACLOUD_HTTPDNS_MODEL_GETACCOUNTINFOREQUEST_H_

View File

@@ -0,0 +1,64 @@
/*
* 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_HTTPDNS_MODEL_GETACCOUNTINFORESULT_H_
#define ALIBABACLOUD_HTTPDNS_MODEL_GETACCOUNTINFORESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/httpdns/HttpdnsExport.h>
namespace AlibabaCloud
{
namespace Httpdns
{
namespace Model
{
class ALIBABACLOUD_HTTPDNS_EXPORT GetAccountInfoResult : public ServiceResult
{
public:
struct AccountInfo
{
long unsignedCount;
int monthFreeCount;
std::string accountId;
int monthResolveCount;
bool unsignedEnabled;
int packageCount;
int monthHttpsResolveCount;
std::string signSecret;
int userStatus;
long signedCount;
};
GetAccountInfoResult();
explicit GetAccountInfoResult(const std::string &payload);
~GetAccountInfoResult();
AccountInfo getAccountInfo()const;
protected:
void parse(const std::string &payload);
private:
AccountInfo accountInfo_;
};
}
}
}
#endif // !ALIBABACLOUD_HTTPDNS_MODEL_GETACCOUNTINFORESULT_H_

View File

@@ -0,0 +1,54 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_HTTPDNS_MODEL_GETRESOLVECOUNTSUMMARYREQUEST_H_
#define ALIBABACLOUD_HTTPDNS_MODEL_GETRESOLVECOUNTSUMMARYREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/httpdns/HttpdnsExport.h>
namespace AlibabaCloud
{
namespace Httpdns
{
namespace Model
{
class ALIBABACLOUD_HTTPDNS_EXPORT GetResolveCountSummaryRequest : public RpcServiceRequest
{
public:
GetResolveCountSummaryRequest();
~GetResolveCountSummaryRequest();
std::string getGranularity()const;
void setGranularity(const std::string& granularity);
int getTimeSpan()const;
void setTimeSpan(int timeSpan);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
private:
std::string granularity_;
int timeSpan_;
std::string accessKeyId_;
};
}
}
}
#endif // !ALIBABACLOUD_HTTPDNS_MODEL_GETRESOLVECOUNTSUMMARYREQUEST_H_

View File

@@ -0,0 +1,58 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_HTTPDNS_MODEL_GETRESOLVECOUNTSUMMARYRESULT_H_
#define ALIBABACLOUD_HTTPDNS_MODEL_GETRESOLVECOUNTSUMMARYRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/httpdns/HttpdnsExport.h>
namespace AlibabaCloud
{
namespace Httpdns
{
namespace Model
{
class ALIBABACLOUD_HTTPDNS_EXPORT GetResolveCountSummaryResult : public ServiceResult
{
public:
struct ResolveSummary
{
long http6;
long https;
long http;
long https6;
};
GetResolveCountSummaryResult();
explicit GetResolveCountSummaryResult(const std::string &payload);
~GetResolveCountSummaryResult();
ResolveSummary getResolveSummary()const;
protected:
void parse(const std::string &payload);
private:
ResolveSummary resolveSummary_;
};
}
}
}
#endif // !ALIBABACLOUD_HTTPDNS_MODEL_GETRESOLVECOUNTSUMMARYRESULT_H_

View File

@@ -0,0 +1,60 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_HTTPDNS_MODEL_GETRESOLVESTATISTICSREQUEST_H_
#define ALIBABACLOUD_HTTPDNS_MODEL_GETRESOLVESTATISTICSREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/httpdns/HttpdnsExport.h>
namespace AlibabaCloud
{
namespace Httpdns
{
namespace Model
{
class ALIBABACLOUD_HTTPDNS_EXPORT GetResolveStatisticsRequest : public RpcServiceRequest
{
public:
GetResolveStatisticsRequest();
~GetResolveStatisticsRequest();
std::string getGranularity()const;
void setGranularity(const std::string& granularity);
std::string getProtocolName()const;
void setProtocolName(const std::string& protocolName);
std::string getDomainName()const;
void setDomainName(const std::string& domainName);
int getTimeSpan()const;
void setTimeSpan(int timeSpan);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
private:
std::string granularity_;
std::string protocolName_;
std::string domainName_;
int timeSpan_;
std::string accessKeyId_;
};
}
}
}
#endif // !ALIBABACLOUD_HTTPDNS_MODEL_GETRESOLVESTATISTICSREQUEST_H_

View File

@@ -0,0 +1,56 @@
/*
* 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_HTTPDNS_MODEL_GETRESOLVESTATISTICSRESULT_H_
#define ALIBABACLOUD_HTTPDNS_MODEL_GETRESOLVESTATISTICSRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/httpdns/HttpdnsExport.h>
namespace AlibabaCloud
{
namespace Httpdns
{
namespace Model
{
class ALIBABACLOUD_HTTPDNS_EXPORT GetResolveStatisticsResult : public ServiceResult
{
public:
struct DataPoint
{
int time;
int count;
};
GetResolveStatisticsResult();
explicit GetResolveStatisticsResult(const std::string &payload);
~GetResolveStatisticsResult();
std::vector<DataPoint> getDataPoints()const;
protected:
void parse(const std::string &payload);
private:
std::vector<DataPoint> dataPoints_;
};
}
}
}
#endif // !ALIBABACLOUD_HTTPDNS_MODEL_GETRESOLVESTATISTICSRESULT_H_

View File

@@ -0,0 +1,54 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_HTTPDNS_MODEL_LISTDOMAINSREQUEST_H_
#define ALIBABACLOUD_HTTPDNS_MODEL_LISTDOMAINSREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/httpdns/HttpdnsExport.h>
namespace AlibabaCloud
{
namespace Httpdns
{
namespace Model
{
class ALIBABACLOUD_HTTPDNS_EXPORT ListDomainsRequest : public RpcServiceRequest
{
public:
ListDomainsRequest();
~ListDomainsRequest();
int getPageSize()const;
void setPageSize(int pageSize);
int getPageNumber()const;
void setPageNumber(int pageNumber);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
private:
int pageSize_;
int pageNumber_;
std::string accessKeyId_;
};
}
}
}
#endif // !ALIBABACLOUD_HTTPDNS_MODEL_LISTDOMAINSREQUEST_H_

View File

@@ -0,0 +1,65 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_HTTPDNS_MODEL_LISTDOMAINSRESULT_H_
#define ALIBABACLOUD_HTTPDNS_MODEL_LISTDOMAINSRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/httpdns/HttpdnsExport.h>
namespace AlibabaCloud
{
namespace Httpdns
{
namespace Model
{
class ALIBABACLOUD_HTTPDNS_EXPORT ListDomainsResult : public ServiceResult
{
public:
struct DomainInfo
{
long resolvedHttps;
std::string domainName;
long resolvedHttps6;
long resolved;
long resolved6;
};
ListDomainsResult();
explicit ListDomainsResult(const std::string &payload);
~ListDomainsResult();
long getTotalCount()const;
long getPageSize()const;
long getPageNumber()const;
std::vector<DomainInfo> getDomainInfos()const;
protected:
void parse(const std::string &payload);
private:
long totalCount_;
long pageSize_;
long pageNumber_;
std::vector<DomainInfo> domainInfos_;
};
}
}
}
#endif // !ALIBABACLOUD_HTTPDNS_MODEL_LISTDOMAINSRESULT_H_

View File

@@ -0,0 +1,305 @@
/*
* 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/httpdns/HttpdnsClient.h>
#include <alibabacloud/core/SimpleCredentialsProvider.h>
using namespace AlibabaCloud;
using namespace AlibabaCloud::Location;
using namespace AlibabaCloud::Httpdns;
using namespace AlibabaCloud::Httpdns::Model;
namespace
{
const std::string SERVICE_NAME = "Httpdns";
}
HttpdnsClient::HttpdnsClient(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, "httpdns");
}
HttpdnsClient::HttpdnsClient(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, "httpdns");
}
HttpdnsClient::HttpdnsClient(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, "httpdns");
}
HttpdnsClient::~HttpdnsClient()
{}
HttpdnsClient::GetResolveStatisticsOutcome HttpdnsClient::getResolveStatistics(const GetResolveStatisticsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetResolveStatisticsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetResolveStatisticsOutcome(GetResolveStatisticsResult(outcome.result()));
else
return GetResolveStatisticsOutcome(outcome.error());
}
void HttpdnsClient::getResolveStatisticsAsync(const GetResolveStatisticsRequest& request, const GetResolveStatisticsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getResolveStatistics(request), context);
};
asyncExecute(new Runnable(fn));
}
HttpdnsClient::GetResolveStatisticsOutcomeCallable HttpdnsClient::getResolveStatisticsCallable(const GetResolveStatisticsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetResolveStatisticsOutcome()>>(
[this, request]()
{
return this->getResolveStatistics(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
HttpdnsClient::DeleteDomainOutcome HttpdnsClient::deleteDomain(const DeleteDomainRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DeleteDomainOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DeleteDomainOutcome(DeleteDomainResult(outcome.result()));
else
return DeleteDomainOutcome(outcome.error());
}
void HttpdnsClient::deleteDomainAsync(const DeleteDomainRequest& request, const DeleteDomainAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, deleteDomain(request), context);
};
asyncExecute(new Runnable(fn));
}
HttpdnsClient::DeleteDomainOutcomeCallable HttpdnsClient::deleteDomainCallable(const DeleteDomainRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DeleteDomainOutcome()>>(
[this, request]()
{
return this->deleteDomain(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
HttpdnsClient::DescribeDomainsOutcome HttpdnsClient::describeDomains(const DescribeDomainsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribeDomainsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeDomainsOutcome(DescribeDomainsResult(outcome.result()));
else
return DescribeDomainsOutcome(outcome.error());
}
void HttpdnsClient::describeDomainsAsync(const DescribeDomainsRequest& request, const DescribeDomainsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeDomains(request), context);
};
asyncExecute(new Runnable(fn));
}
HttpdnsClient::DescribeDomainsOutcomeCallable HttpdnsClient::describeDomainsCallable(const DescribeDomainsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeDomainsOutcome()>>(
[this, request]()
{
return this->describeDomains(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
HttpdnsClient::GetResolveCountSummaryOutcome HttpdnsClient::getResolveCountSummary(const GetResolveCountSummaryRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetResolveCountSummaryOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetResolveCountSummaryOutcome(GetResolveCountSummaryResult(outcome.result()));
else
return GetResolveCountSummaryOutcome(outcome.error());
}
void HttpdnsClient::getResolveCountSummaryAsync(const GetResolveCountSummaryRequest& request, const GetResolveCountSummaryAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getResolveCountSummary(request), context);
};
asyncExecute(new Runnable(fn));
}
HttpdnsClient::GetResolveCountSummaryOutcomeCallable HttpdnsClient::getResolveCountSummaryCallable(const GetResolveCountSummaryRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetResolveCountSummaryOutcome()>>(
[this, request]()
{
return this->getResolveCountSummary(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
HttpdnsClient::AddDomainOutcome HttpdnsClient::addDomain(const AddDomainRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return AddDomainOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return AddDomainOutcome(AddDomainResult(outcome.result()));
else
return AddDomainOutcome(outcome.error());
}
void HttpdnsClient::addDomainAsync(const AddDomainRequest& request, const AddDomainAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, addDomain(request), context);
};
asyncExecute(new Runnable(fn));
}
HttpdnsClient::AddDomainOutcomeCallable HttpdnsClient::addDomainCallable(const AddDomainRequest &request) const
{
auto task = std::make_shared<std::packaged_task<AddDomainOutcome()>>(
[this, request]()
{
return this->addDomain(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
HttpdnsClient::ListDomainsOutcome HttpdnsClient::listDomains(const ListDomainsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListDomainsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListDomainsOutcome(ListDomainsResult(outcome.result()));
else
return ListDomainsOutcome(outcome.error());
}
void HttpdnsClient::listDomainsAsync(const ListDomainsRequest& request, const ListDomainsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listDomains(request), context);
};
asyncExecute(new Runnable(fn));
}
HttpdnsClient::ListDomainsOutcomeCallable HttpdnsClient::listDomainsCallable(const ListDomainsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListDomainsOutcome()>>(
[this, request]()
{
return this->listDomains(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
HttpdnsClient::GetAccountInfoOutcome HttpdnsClient::getAccountInfo(const GetAccountInfoRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetAccountInfoOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetAccountInfoOutcome(GetAccountInfoResult(outcome.result()));
else
return GetAccountInfoOutcome(outcome.error());
}
void HttpdnsClient::getAccountInfoAsync(const GetAccountInfoRequest& request, const GetAccountInfoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getAccountInfo(request), context);
};
asyncExecute(new Runnable(fn));
}
HttpdnsClient::GetAccountInfoOutcomeCallable HttpdnsClient::getAccountInfoCallable(const GetAccountInfoRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetAccountInfoOutcome()>>(
[this, request]()
{
return this->getAccountInfo(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}

View File

@@ -0,0 +1,60 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/httpdns/model/AddDomainRequest.h>
using AlibabaCloud::Httpdns::Model::AddDomainRequest;
AddDomainRequest::AddDomainRequest() :
RpcServiceRequest("httpdns", "2016-02-01", "AddDomain")
{}
AddDomainRequest::~AddDomainRequest()
{}
std::string AddDomainRequest::getAccountId()const
{
return accountId_;
}
void AddDomainRequest::setAccountId(const std::string& accountId)
{
accountId_ = accountId;
setParameter("AccountId", accountId);
}
std::string AddDomainRequest::getDomainName()const
{
return domainName_;
}
void AddDomainRequest::setDomainName(const std::string& domainName)
{
domainName_ = domainName;
setParameter("DomainName", domainName);
}
std::string AddDomainRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void AddDomainRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,52 @@
/*
* 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/httpdns/model/AddDomainResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Httpdns;
using namespace AlibabaCloud::Httpdns::Model;
AddDomainResult::AddDomainResult() :
ServiceResult()
{}
AddDomainResult::AddDomainResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
AddDomainResult::~AddDomainResult()
{}
void AddDomainResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["DomainName"].isNull())
domainName_ = value["DomainName"].asString();
}
std::string AddDomainResult::getDomainName()const
{
return domainName_;
}

View File

@@ -0,0 +1,60 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/httpdns/model/DeleteDomainRequest.h>
using AlibabaCloud::Httpdns::Model::DeleteDomainRequest;
DeleteDomainRequest::DeleteDomainRequest() :
RpcServiceRequest("httpdns", "2016-02-01", "DeleteDomain")
{}
DeleteDomainRequest::~DeleteDomainRequest()
{}
std::string DeleteDomainRequest::getAccountId()const
{
return accountId_;
}
void DeleteDomainRequest::setAccountId(const std::string& accountId)
{
accountId_ = accountId;
setParameter("AccountId", accountId);
}
std::string DeleteDomainRequest::getDomainName()const
{
return domainName_;
}
void DeleteDomainRequest::setDomainName(const std::string& domainName)
{
domainName_ = domainName;
setParameter("DomainName", domainName);
}
std::string DeleteDomainRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void DeleteDomainRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,52 @@
/*
* 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/httpdns/model/DeleteDomainResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Httpdns;
using namespace AlibabaCloud::Httpdns::Model;
DeleteDomainResult::DeleteDomainResult() :
ServiceResult()
{}
DeleteDomainResult::DeleteDomainResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteDomainResult::~DeleteDomainResult()
{}
void DeleteDomainResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["DomainName"].isNull())
domainName_ = value["DomainName"].asString();
}
std::string DeleteDomainResult::getDomainName()const
{
return domainName_;
}

View File

@@ -0,0 +1,71 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/httpdns/model/DescribeDomainsRequest.h>
using AlibabaCloud::Httpdns::Model::DescribeDomainsRequest;
DescribeDomainsRequest::DescribeDomainsRequest() :
RpcServiceRequest("httpdns", "2016-02-01", "DescribeDomains")
{}
DescribeDomainsRequest::~DescribeDomainsRequest()
{}
std::string DescribeDomainsRequest::getAccountId()const
{
return accountId_;
}
void DescribeDomainsRequest::setAccountId(const std::string& accountId)
{
accountId_ = accountId;
setParameter("AccountId", accountId);
}
long DescribeDomainsRequest::getPageSize()const
{
return pageSize_;
}
void DescribeDomainsRequest::setPageSize(long pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
long DescribeDomainsRequest::getPageNumber()const
{
return pageNumber_;
}
void DescribeDomainsRequest::setPageNumber(long pageNumber)
{
pageNumber_ = pageNumber;
setParameter("PageNumber", std::to_string(pageNumber));
}
std::string DescribeDomainsRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void DescribeDomainsRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,79 @@
/*
* 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/httpdns/model/DescribeDomainsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Httpdns;
using namespace AlibabaCloud::Httpdns::Model;
DescribeDomainsResult::DescribeDomainsResult() :
ServiceResult()
{}
DescribeDomainsResult::DescribeDomainsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeDomainsResult::~DescribeDomainsResult()
{}
void DescribeDomainsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allDomains = value["Domains"]["Domain"];
for (auto value : allDomains)
{
Domain domainsObject;
if(!value["DomainName"].isNull())
domainsObject.domainName = value["DomainName"].asString();
domains_.push_back(domainsObject);
}
if(!value["TotalCount"].isNull())
totalCount_ = std::stol(value["TotalCount"].asString());
if(!value["PageNumber"].isNull())
pageNumber_ = std::stol(value["PageNumber"].asString());
if(!value["PageSize"].isNull())
pageSize_ = std::stol(value["PageSize"].asString());
}
std::vector<DescribeDomainsResult::Domain> DescribeDomainsResult::getDomains()const
{
return domains_;
}
long DescribeDomainsResult::getTotalCount()const
{
return totalCount_;
}
long DescribeDomainsResult::getPageSize()const
{
return pageSize_;
}
long DescribeDomainsResult::getPageNumber()const
{
return pageNumber_;
}

View File

@@ -0,0 +1,38 @@
/*
* 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/httpdns/model/GetAccountInfoRequest.h>
using AlibabaCloud::Httpdns::Model::GetAccountInfoRequest;
GetAccountInfoRequest::GetAccountInfoRequest() :
RpcServiceRequest("httpdns", "2016-02-01", "GetAccountInfo")
{}
GetAccountInfoRequest::~GetAccountInfoRequest()
{}
std::string GetAccountInfoRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void GetAccountInfoRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,71 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/httpdns/model/GetAccountInfoResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Httpdns;
using namespace AlibabaCloud::Httpdns::Model;
GetAccountInfoResult::GetAccountInfoResult() :
ServiceResult()
{}
GetAccountInfoResult::GetAccountInfoResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetAccountInfoResult::~GetAccountInfoResult()
{}
void GetAccountInfoResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto accountInfoNode = value["AccountInfo"];
if(!accountInfoNode["AccountId"].isNull())
accountInfo_.accountId = accountInfoNode["AccountId"].asString();
if(!accountInfoNode["MonthFreeCount"].isNull())
accountInfo_.monthFreeCount = std::stoi(accountInfoNode["MonthFreeCount"].asString());
if(!accountInfoNode["MonthHttpsResolveCount"].isNull())
accountInfo_.monthHttpsResolveCount = std::stoi(accountInfoNode["MonthHttpsResolveCount"].asString());
if(!accountInfoNode["MonthResolveCount"].isNull())
accountInfo_.monthResolveCount = std::stoi(accountInfoNode["MonthResolveCount"].asString());
if(!accountInfoNode["PackageCount"].isNull())
accountInfo_.packageCount = std::stoi(accountInfoNode["PackageCount"].asString());
if(!accountInfoNode["UserStatus"].isNull())
accountInfo_.userStatus = std::stoi(accountInfoNode["UserStatus"].asString());
if(!accountInfoNode["SignSecret"].isNull())
accountInfo_.signSecret = accountInfoNode["SignSecret"].asString();
if(!accountInfoNode["UnsignedEnabled"].isNull())
accountInfo_.unsignedEnabled = accountInfoNode["UnsignedEnabled"].asString() == "true";
if(!accountInfoNode["SignedCount"].isNull())
accountInfo_.signedCount = std::stol(accountInfoNode["SignedCount"].asString());
if(!accountInfoNode["UnsignedCount"].isNull())
accountInfo_.unsignedCount = std::stol(accountInfoNode["UnsignedCount"].asString());
}
GetAccountInfoResult::AccountInfo GetAccountInfoResult::getAccountInfo()const
{
return accountInfo_;
}

View File

@@ -0,0 +1,60 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/httpdns/model/GetResolveCountSummaryRequest.h>
using AlibabaCloud::Httpdns::Model::GetResolveCountSummaryRequest;
GetResolveCountSummaryRequest::GetResolveCountSummaryRequest() :
RpcServiceRequest("httpdns", "2016-02-01", "GetResolveCountSummary")
{}
GetResolveCountSummaryRequest::~GetResolveCountSummaryRequest()
{}
std::string GetResolveCountSummaryRequest::getGranularity()const
{
return granularity_;
}
void GetResolveCountSummaryRequest::setGranularity(const std::string& granularity)
{
granularity_ = granularity;
setParameter("Granularity", granularity);
}
int GetResolveCountSummaryRequest::getTimeSpan()const
{
return timeSpan_;
}
void GetResolveCountSummaryRequest::setTimeSpan(int timeSpan)
{
timeSpan_ = timeSpan;
setParameter("TimeSpan", std::to_string(timeSpan));
}
std::string GetResolveCountSummaryRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void GetResolveCountSummaryRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,59 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/httpdns/model/GetResolveCountSummaryResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Httpdns;
using namespace AlibabaCloud::Httpdns::Model;
GetResolveCountSummaryResult::GetResolveCountSummaryResult() :
ServiceResult()
{}
GetResolveCountSummaryResult::GetResolveCountSummaryResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetResolveCountSummaryResult::~GetResolveCountSummaryResult()
{}
void GetResolveCountSummaryResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto resolveSummaryNode = value["ResolveSummary"];
if(!resolveSummaryNode["Http"].isNull())
resolveSummary_.http = std::stol(resolveSummaryNode["Http"].asString());
if(!resolveSummaryNode["Https"].isNull())
resolveSummary_.https = std::stol(resolveSummaryNode["Https"].asString());
if(!resolveSummaryNode["Http6"].isNull())
resolveSummary_.http6 = std::stol(resolveSummaryNode["Http6"].asString());
if(!resolveSummaryNode["Https6"].isNull())
resolveSummary_.https6 = std::stol(resolveSummaryNode["Https6"].asString());
}
GetResolveCountSummaryResult::ResolveSummary GetResolveCountSummaryResult::getResolveSummary()const
{
return resolveSummary_;
}

View File

@@ -0,0 +1,82 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/httpdns/model/GetResolveStatisticsRequest.h>
using AlibabaCloud::Httpdns::Model::GetResolveStatisticsRequest;
GetResolveStatisticsRequest::GetResolveStatisticsRequest() :
RpcServiceRequest("httpdns", "2016-02-01", "GetResolveStatistics")
{}
GetResolveStatisticsRequest::~GetResolveStatisticsRequest()
{}
std::string GetResolveStatisticsRequest::getGranularity()const
{
return granularity_;
}
void GetResolveStatisticsRequest::setGranularity(const std::string& granularity)
{
granularity_ = granularity;
setParameter("Granularity", granularity);
}
std::string GetResolveStatisticsRequest::getProtocolName()const
{
return protocolName_;
}
void GetResolveStatisticsRequest::setProtocolName(const std::string& protocolName)
{
protocolName_ = protocolName;
setParameter("ProtocolName", protocolName);
}
std::string GetResolveStatisticsRequest::getDomainName()const
{
return domainName_;
}
void GetResolveStatisticsRequest::setDomainName(const std::string& domainName)
{
domainName_ = domainName;
setParameter("DomainName", domainName);
}
int GetResolveStatisticsRequest::getTimeSpan()const
{
return timeSpan_;
}
void GetResolveStatisticsRequest::setTimeSpan(int timeSpan)
{
timeSpan_ = timeSpan;
setParameter("TimeSpan", std::to_string(timeSpan));
}
std::string GetResolveStatisticsRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void GetResolveStatisticsRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -0,0 +1,60 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/httpdns/model/GetResolveStatisticsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Httpdns;
using namespace AlibabaCloud::Httpdns::Model;
GetResolveStatisticsResult::GetResolveStatisticsResult() :
ServiceResult()
{}
GetResolveStatisticsResult::GetResolveStatisticsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetResolveStatisticsResult::~GetResolveStatisticsResult()
{}
void GetResolveStatisticsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allDataPoints = value["DataPoints"]["DataPoint"];
for (auto value : allDataPoints)
{
DataPoint dataPointsObject;
if(!value["Time"].isNull())
dataPointsObject.time = std::stoi(value["Time"].asString());
if(!value["Count"].isNull())
dataPointsObject.count = std::stoi(value["Count"].asString());
dataPoints_.push_back(dataPointsObject);
}
}
std::vector<GetResolveStatisticsResult::DataPoint> GetResolveStatisticsResult::getDataPoints()const
{
return dataPoints_;
}

View File

@@ -0,0 +1,60 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/httpdns/model/ListDomainsRequest.h>
using AlibabaCloud::Httpdns::Model::ListDomainsRequest;
ListDomainsRequest::ListDomainsRequest() :
RpcServiceRequest("httpdns", "2016-02-01", "ListDomains")
{}
ListDomainsRequest::~ListDomainsRequest()
{}
int ListDomainsRequest::getPageSize()const
{
return pageSize_;
}
void ListDomainsRequest::setPageSize(int pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
int ListDomainsRequest::getPageNumber()const
{
return pageNumber_;
}
void ListDomainsRequest::setPageNumber(int pageNumber)
{
pageNumber_ = pageNumber;
setParameter("PageNumber", std::to_string(pageNumber));
}
std::string ListDomainsRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void ListDomainsRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setParameter("AccessKeyId", accessKeyId);
}

View File

@@ -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.
*/
#include <alibabacloud/httpdns/model/ListDomainsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Httpdns;
using namespace AlibabaCloud::Httpdns::Model;
ListDomainsResult::ListDomainsResult() :
ServiceResult()
{}
ListDomainsResult::ListDomainsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListDomainsResult::~ListDomainsResult()
{}
void ListDomainsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allDomainInfos = value["DomainInfos"]["DomainInfo"];
for (auto value : allDomainInfos)
{
DomainInfo domainInfosObject;
if(!value["DomainName"].isNull())
domainInfosObject.domainName = value["DomainName"].asString();
if(!value["Resolved"].isNull())
domainInfosObject.resolved = std::stol(value["Resolved"].asString());
if(!value["ResolvedHttps"].isNull())
domainInfosObject.resolvedHttps = std::stol(value["ResolvedHttps"].asString());
if(!value["Resolved6"].isNull())
domainInfosObject.resolved6 = std::stol(value["Resolved6"].asString());
if(!value["ResolvedHttps6"].isNull())
domainInfosObject.resolvedHttps6 = std::stol(value["ResolvedHttps6"].asString());
domainInfos_.push_back(domainInfosObject);
}
if(!value["TotalCount"].isNull())
totalCount_ = std::stol(value["TotalCount"].asString());
if(!value["PageNumber"].isNull())
pageNumber_ = std::stol(value["PageNumber"].asString());
if(!value["PageSize"].isNull())
pageSize_ = std::stol(value["PageSize"].asString());
}
long ListDomainsResult::getTotalCount()const
{
return totalCount_;
}
long ListDomainsResult::getPageSize()const
{
return pageSize_;
}
long ListDomainsResult::getPageNumber()const
{
return pageNumber_;
}
std::vector<ListDomainsResult::DomainInfo> ListDomainsResult::getDomainInfos()const
{
return domainInfos_;
}