Generated 2020-03-15 for AccountLabel.
This commit is contained in:
102
accountlabel/CMakeLists.txt
Normal file
102
accountlabel/CMakeLists.txt
Normal 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
set(public_header_dir ${CMAKE_CURRENT_SOURCE_DIR}/../include)
|
||||||
|
|
||||||
|
set(accountlabel_public_header
|
||||||
|
include/alibabacloud/accountlabel/AccountLabelClient.h
|
||||||
|
include/alibabacloud/accountlabel/AccountLabelExport.h )
|
||||||
|
|
||||||
|
set(accountlabel_public_header_model
|
||||||
|
include/alibabacloud/accountlabel/model/AddCustomerLabelRequest.h
|
||||||
|
include/alibabacloud/accountlabel/model/AddCustomerLabelResult.h
|
||||||
|
include/alibabacloud/accountlabel/model/BatchFetchAccountLabelRequest.h
|
||||||
|
include/alibabacloud/accountlabel/model/BatchFetchAccountLabelResult.h
|
||||||
|
include/alibabacloud/accountlabel/model/DeleteCustomerLabelRequest.h
|
||||||
|
include/alibabacloud/accountlabel/model/DeleteCustomerLabelResult.h
|
||||||
|
include/alibabacloud/accountlabel/model/QueryCustomerLabelRequest.h
|
||||||
|
include/alibabacloud/accountlabel/model/QueryCustomerLabelResult.h
|
||||||
|
include/alibabacloud/accountlabel/model/QueryCustomerLabelByConfigGroupRequest.h
|
||||||
|
include/alibabacloud/accountlabel/model/QueryCustomerLabelByConfigGroupResult.h )
|
||||||
|
|
||||||
|
set(accountlabel_src
|
||||||
|
src/AccountLabelClient.cc
|
||||||
|
src/model/AddCustomerLabelRequest.cc
|
||||||
|
src/model/AddCustomerLabelResult.cc
|
||||||
|
src/model/BatchFetchAccountLabelRequest.cc
|
||||||
|
src/model/BatchFetchAccountLabelResult.cc
|
||||||
|
src/model/DeleteCustomerLabelRequest.cc
|
||||||
|
src/model/DeleteCustomerLabelResult.cc
|
||||||
|
src/model/QueryCustomerLabelRequest.cc
|
||||||
|
src/model/QueryCustomerLabelResult.cc
|
||||||
|
src/model/QueryCustomerLabelByConfigGroupRequest.cc
|
||||||
|
src/model/QueryCustomerLabelByConfigGroupResult.cc )
|
||||||
|
|
||||||
|
add_library(accountlabel ${LIB_TYPE}
|
||||||
|
${accountlabel_public_header}
|
||||||
|
${accountlabel_public_header_model}
|
||||||
|
${accountlabel_src})
|
||||||
|
|
||||||
|
set_target_properties(accountlabel
|
||||||
|
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}accountlabel
|
||||||
|
)
|
||||||
|
|
||||||
|
if(${LIB_TYPE} STREQUAL "SHARED")
|
||||||
|
set_target_properties(accountlabel
|
||||||
|
PROPERTIES
|
||||||
|
DEFINE_SYMBOL ALIBABACLOUD_ACCOUNTLABEL_LIBRARY)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_include_directories(accountlabel
|
||||||
|
PRIVATE include
|
||||||
|
${CMAKE_SOURCE_DIR}/core/include
|
||||||
|
)
|
||||||
|
target_link_libraries(accountlabel
|
||||||
|
core)
|
||||||
|
|
||||||
|
if(CMAKE_HOST_WIN32)
|
||||||
|
ExternalProject_Get_Property(jsoncpp INSTALL_DIR)
|
||||||
|
set(jsoncpp_install_dir ${INSTALL_DIR})
|
||||||
|
add_dependencies(accountlabel
|
||||||
|
jsoncpp)
|
||||||
|
target_include_directories(accountlabel
|
||||||
|
PRIVATE ${jsoncpp_install_dir}/include)
|
||||||
|
target_link_libraries(accountlabel
|
||||||
|
${jsoncpp_install_dir}/lib/jsoncpp.lib)
|
||||||
|
set_target_properties(accountlabel
|
||||||
|
PROPERTIES
|
||||||
|
COMPILE_OPTIONS "/bigobj")
|
||||||
|
else()
|
||||||
|
target_include_directories(accountlabel
|
||||||
|
PRIVATE /usr/include/jsoncpp)
|
||||||
|
target_link_libraries(accountlabel
|
||||||
|
jsoncpp)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
install(FILES ${accountlabel_public_header}
|
||||||
|
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/accountlabel)
|
||||||
|
install(FILES ${accountlabel_public_header_model}
|
||||||
|
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/accountlabel/model)
|
||||||
|
install(TARGETS accountlabel
|
||||||
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
|
)
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
/*
|
||||||
|
* 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_ACCOUNTLABEL_ACCOUNTLABELCLIENT_H_
|
||||||
|
#define ALIBABACLOUD_ACCOUNTLABEL_ACCOUNTLABELCLIENT_H_
|
||||||
|
|
||||||
|
#include <future>
|
||||||
|
#include <alibabacloud/core/AsyncCallerContext.h>
|
||||||
|
#include <alibabacloud/core/EndpointProvider.h>
|
||||||
|
#include <alibabacloud/core/RpcServiceClient.h>
|
||||||
|
#include "AccountLabelExport.h"
|
||||||
|
#include "model/AddCustomerLabelRequest.h"
|
||||||
|
#include "model/AddCustomerLabelResult.h"
|
||||||
|
#include "model/BatchFetchAccountLabelRequest.h"
|
||||||
|
#include "model/BatchFetchAccountLabelResult.h"
|
||||||
|
#include "model/DeleteCustomerLabelRequest.h"
|
||||||
|
#include "model/DeleteCustomerLabelResult.h"
|
||||||
|
#include "model/QueryCustomerLabelRequest.h"
|
||||||
|
#include "model/QueryCustomerLabelResult.h"
|
||||||
|
#include "model/QueryCustomerLabelByConfigGroupRequest.h"
|
||||||
|
#include "model/QueryCustomerLabelByConfigGroupResult.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace AccountLabel
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_ACCOUNTLABEL_EXPORT AccountLabelClient : public RpcServiceClient
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
typedef Outcome<Error, Model::AddCustomerLabelResult> AddCustomerLabelOutcome;
|
||||||
|
typedef std::future<AddCustomerLabelOutcome> AddCustomerLabelOutcomeCallable;
|
||||||
|
typedef std::function<void(const AccountLabelClient*, const Model::AddCustomerLabelRequest&, const AddCustomerLabelOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AddCustomerLabelAsyncHandler;
|
||||||
|
typedef Outcome<Error, Model::BatchFetchAccountLabelResult> BatchFetchAccountLabelOutcome;
|
||||||
|
typedef std::future<BatchFetchAccountLabelOutcome> BatchFetchAccountLabelOutcomeCallable;
|
||||||
|
typedef std::function<void(const AccountLabelClient*, const Model::BatchFetchAccountLabelRequest&, const BatchFetchAccountLabelOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> BatchFetchAccountLabelAsyncHandler;
|
||||||
|
typedef Outcome<Error, Model::DeleteCustomerLabelResult> DeleteCustomerLabelOutcome;
|
||||||
|
typedef std::future<DeleteCustomerLabelOutcome> DeleteCustomerLabelOutcomeCallable;
|
||||||
|
typedef std::function<void(const AccountLabelClient*, const Model::DeleteCustomerLabelRequest&, const DeleteCustomerLabelOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DeleteCustomerLabelAsyncHandler;
|
||||||
|
typedef Outcome<Error, Model::QueryCustomerLabelResult> QueryCustomerLabelOutcome;
|
||||||
|
typedef std::future<QueryCustomerLabelOutcome> QueryCustomerLabelOutcomeCallable;
|
||||||
|
typedef std::function<void(const AccountLabelClient*, const Model::QueryCustomerLabelRequest&, const QueryCustomerLabelOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> QueryCustomerLabelAsyncHandler;
|
||||||
|
typedef Outcome<Error, Model::QueryCustomerLabelByConfigGroupResult> QueryCustomerLabelByConfigGroupOutcome;
|
||||||
|
typedef std::future<QueryCustomerLabelByConfigGroupOutcome> QueryCustomerLabelByConfigGroupOutcomeCallable;
|
||||||
|
typedef std::function<void(const AccountLabelClient*, const Model::QueryCustomerLabelByConfigGroupRequest&, const QueryCustomerLabelByConfigGroupOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> QueryCustomerLabelByConfigGroupAsyncHandler;
|
||||||
|
|
||||||
|
AccountLabelClient(const Credentials &credentials, const ClientConfiguration &configuration);
|
||||||
|
AccountLabelClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
|
||||||
|
AccountLabelClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
|
||||||
|
~AccountLabelClient();
|
||||||
|
AddCustomerLabelOutcome addCustomerLabel(const Model::AddCustomerLabelRequest &request)const;
|
||||||
|
void addCustomerLabelAsync(const Model::AddCustomerLabelRequest& request, const AddCustomerLabelAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
|
AddCustomerLabelOutcomeCallable addCustomerLabelCallable(const Model::AddCustomerLabelRequest& request) const;
|
||||||
|
BatchFetchAccountLabelOutcome batchFetchAccountLabel(const Model::BatchFetchAccountLabelRequest &request)const;
|
||||||
|
void batchFetchAccountLabelAsync(const Model::BatchFetchAccountLabelRequest& request, const BatchFetchAccountLabelAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
|
BatchFetchAccountLabelOutcomeCallable batchFetchAccountLabelCallable(const Model::BatchFetchAccountLabelRequest& request) const;
|
||||||
|
DeleteCustomerLabelOutcome deleteCustomerLabel(const Model::DeleteCustomerLabelRequest &request)const;
|
||||||
|
void deleteCustomerLabelAsync(const Model::DeleteCustomerLabelRequest& request, const DeleteCustomerLabelAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
|
DeleteCustomerLabelOutcomeCallable deleteCustomerLabelCallable(const Model::DeleteCustomerLabelRequest& request) const;
|
||||||
|
QueryCustomerLabelOutcome queryCustomerLabel(const Model::QueryCustomerLabelRequest &request)const;
|
||||||
|
void queryCustomerLabelAsync(const Model::QueryCustomerLabelRequest& request, const QueryCustomerLabelAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
|
QueryCustomerLabelOutcomeCallable queryCustomerLabelCallable(const Model::QueryCustomerLabelRequest& request) const;
|
||||||
|
QueryCustomerLabelByConfigGroupOutcome queryCustomerLabelByConfigGroup(const Model::QueryCustomerLabelByConfigGroupRequest &request)const;
|
||||||
|
void queryCustomerLabelByConfigGroupAsync(const Model::QueryCustomerLabelByConfigGroupRequest& request, const QueryCustomerLabelByConfigGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||||
|
QueryCustomerLabelByConfigGroupOutcomeCallable queryCustomerLabelByConfigGroupCallable(const Model::QueryCustomerLabelByConfigGroupRequest& request) const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::shared_ptr<EndpointProvider> endpointProvider_;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // !ALIBABACLOUD_ACCOUNTLABEL_ACCOUNTLABELCLIENT_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_ACCOUNTLABEL_ACCOUNTLABELEXPORT_H_
|
||||||
|
#define ALIBABACLOUD_ACCOUNTLABEL_ACCOUNTLABELEXPORT_H_
|
||||||
|
|
||||||
|
#include <alibabacloud/core/Global.h>
|
||||||
|
|
||||||
|
#if defined(ALIBABACLOUD_SHARED)
|
||||||
|
# if defined(ALIBABACLOUD_ACCOUNTLABEL_LIBRARY)
|
||||||
|
# define ALIBABACLOUD_ACCOUNTLABEL_EXPORT ALIBABACLOUD_DECL_EXPORT
|
||||||
|
# else
|
||||||
|
# define ALIBABACLOUD_ACCOUNTLABEL_EXPORT ALIBABACLOUD_DECL_IMPORT
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
# define ALIBABACLOUD_ACCOUNTLABEL_EXPORT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // !ALIBABACLOUD_ACCOUNTLABEL_ACCOUNTLABELEXPORT_H_
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
/*
|
||||||
|
* 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_ACCOUNTLABEL_MODEL_ADDCUSTOMERLABELREQUEST_H_
|
||||||
|
#define ALIBABACLOUD_ACCOUNTLABEL_MODEL_ADDCUSTOMERLABELREQUEST_H_
|
||||||
|
|
||||||
|
#include <alibabacloud/accountlabel/AccountLabelExport.h>
|
||||||
|
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <map>
|
||||||
|
|
||||||
|
namespace AlibabaCloud {
|
||||||
|
namespace AccountLabel {
|
||||||
|
namespace Model {
|
||||||
|
class ALIBABACLOUD_ACCOUNTLABEL_EXPORT AddCustomerLabelRequest : public RpcServiceRequest {
|
||||||
|
public:
|
||||||
|
AddCustomerLabelRequest();
|
||||||
|
~AddCustomerLabelRequest();
|
||||||
|
std::string getLabelSeries() const;
|
||||||
|
void setLabelSeries(const std::string &labelSeries);
|
||||||
|
std::string getOrganization() const;
|
||||||
|
void setOrganization(const std::string &organization);
|
||||||
|
std::string getEndtime() const;
|
||||||
|
void setEndtime(const std::string &endtime);
|
||||||
|
long getPK() const;
|
||||||
|
void setPK(long pK);
|
||||||
|
std::string getStartTime() const;
|
||||||
|
void setStartTime(const std::string &startTime);
|
||||||
|
std::vector<std::string> getLabelTypes() const;
|
||||||
|
void setLabelTypes(const std::vector<std::string> &labelTypes);
|
||||||
|
std::string getUserName() const;
|
||||||
|
void setUserName(const std::string &userName);
|
||||||
|
std::string getToken() const;
|
||||||
|
void setToken(const std::string &token);
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::string labelSeries_;
|
||||||
|
std::string organization_;
|
||||||
|
std::string endtime_;
|
||||||
|
long pK_;
|
||||||
|
std::string startTime_;
|
||||||
|
std::vector<std::string> labelTypes_;
|
||||||
|
std::string userName_;
|
||||||
|
std::string token_;
|
||||||
|
};
|
||||||
|
} // namespace Model
|
||||||
|
} // namespace AccountLabel
|
||||||
|
} // namespace AlibabaCloud
|
||||||
|
#endif // !ALIBABACLOUD_ACCOUNTLABEL_MODEL_ADDCUSTOMERLABELREQUEST_H_
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
/*
|
||||||
|
* 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_ACCOUNTLABEL_MODEL_ADDCUSTOMERLABELRESULT_H_
|
||||||
|
#define ALIBABACLOUD_ACCOUNTLABEL_MODEL_ADDCUSTOMERLABELRESULT_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <alibabacloud/core/ServiceResult.h>
|
||||||
|
#include <alibabacloud/accountlabel/AccountLabelExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace AccountLabel
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_ACCOUNTLABEL_EXPORT AddCustomerLabelResult : public ServiceResult
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
|
||||||
|
AddCustomerLabelResult();
|
||||||
|
explicit AddCustomerLabelResult(const std::string &payload);
|
||||||
|
~AddCustomerLabelResult();
|
||||||
|
std::string getMessage()const;
|
||||||
|
std::string getCode()const;
|
||||||
|
bool getSuccess()const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void parse(const std::string &payload);
|
||||||
|
private:
|
||||||
|
std::string message_;
|
||||||
|
std::string code_;
|
||||||
|
bool success_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_ACCOUNTLABEL_MODEL_ADDCUSTOMERLABELRESULT_H_
|
||||||
@@ -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_ACCOUNTLABEL_MODEL_BATCHFETCHACCOUNTLABELREQUEST_H_
|
||||||
|
#define ALIBABACLOUD_ACCOUNTLABEL_MODEL_BATCHFETCHACCOUNTLABELREQUEST_H_
|
||||||
|
|
||||||
|
#include <alibabacloud/accountlabel/AccountLabelExport.h>
|
||||||
|
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <map>
|
||||||
|
|
||||||
|
namespace AlibabaCloud {
|
||||||
|
namespace AccountLabel {
|
||||||
|
namespace Model {
|
||||||
|
class ALIBABACLOUD_ACCOUNTLABEL_EXPORT BatchFetchAccountLabelRequest : public RpcServiceRequest {
|
||||||
|
public:
|
||||||
|
BatchFetchAccountLabelRequest();
|
||||||
|
~BatchFetchAccountLabelRequest();
|
||||||
|
std::string getOrganization() const;
|
||||||
|
void setOrganization(const std::string &organization);
|
||||||
|
long getPk() const;
|
||||||
|
void setPk(long pk);
|
||||||
|
std::string getUserName() const;
|
||||||
|
void setUserName(const std::string &userName);
|
||||||
|
bool getInstant() const;
|
||||||
|
void setInstant(bool instant);
|
||||||
|
std::string getToken() const;
|
||||||
|
void setToken(const std::string &token);
|
||||||
|
std::vector<std::string> getLabelSeriesList() const;
|
||||||
|
void setLabelSeriesList(const std::vector<std::string> &labelSeriesList);
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::string organization_;
|
||||||
|
long pk_;
|
||||||
|
std::string userName_;
|
||||||
|
bool instant_;
|
||||||
|
std::string token_;
|
||||||
|
std::vector<std::string> labelSeriesList_;
|
||||||
|
};
|
||||||
|
} // namespace Model
|
||||||
|
} // namespace AccountLabel
|
||||||
|
} // namespace AlibabaCloud
|
||||||
|
#endif // !ALIBABACLOUD_ACCOUNTLABEL_MODEL_BATCHFETCHACCOUNTLABELREQUEST_H_
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
/*
|
||||||
|
* 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_ACCOUNTLABEL_MODEL_BATCHFETCHACCOUNTLABELRESULT_H_
|
||||||
|
#define ALIBABACLOUD_ACCOUNTLABEL_MODEL_BATCHFETCHACCOUNTLABELRESULT_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <alibabacloud/core/ServiceResult.h>
|
||||||
|
#include <alibabacloud/accountlabel/AccountLabelExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace AccountLabel
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_ACCOUNTLABEL_EXPORT BatchFetchAccountLabelResult : public ServiceResult
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
struct AccountLabelInfoDto
|
||||||
|
{
|
||||||
|
std::string labelSeries;
|
||||||
|
long endTime;
|
||||||
|
long kp;
|
||||||
|
long gmtModified;
|
||||||
|
std::string label;
|
||||||
|
long startTime;
|
||||||
|
std::string creator;
|
||||||
|
long gmtCreated;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
BatchFetchAccountLabelResult();
|
||||||
|
explicit BatchFetchAccountLabelResult(const std::string &payload);
|
||||||
|
~BatchFetchAccountLabelResult();
|
||||||
|
std::string getMessage()const;
|
||||||
|
std::vector<AccountLabelInfoDto> getData()const;
|
||||||
|
long getCount()const;
|
||||||
|
std::string getCode()const;
|
||||||
|
bool getSuccess()const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void parse(const std::string &payload);
|
||||||
|
private:
|
||||||
|
std::string message_;
|
||||||
|
std::vector<AccountLabelInfoDto> data_;
|
||||||
|
long count_;
|
||||||
|
std::string code_;
|
||||||
|
bool success_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_ACCOUNTLABEL_MODEL_BATCHFETCHACCOUNTLABELRESULT_H_
|
||||||
@@ -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_ACCOUNTLABEL_MODEL_DELETECUSTOMERLABELREQUEST_H_
|
||||||
|
#define ALIBABACLOUD_ACCOUNTLABEL_MODEL_DELETECUSTOMERLABELREQUEST_H_
|
||||||
|
|
||||||
|
#include <alibabacloud/accountlabel/AccountLabelExport.h>
|
||||||
|
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <map>
|
||||||
|
|
||||||
|
namespace AlibabaCloud {
|
||||||
|
namespace AccountLabel {
|
||||||
|
namespace Model {
|
||||||
|
class ALIBABACLOUD_ACCOUNTLABEL_EXPORT DeleteCustomerLabelRequest : public RpcServiceRequest {
|
||||||
|
public:
|
||||||
|
DeleteCustomerLabelRequest();
|
||||||
|
~DeleteCustomerLabelRequest();
|
||||||
|
std::string getLabelSeries() const;
|
||||||
|
void setLabelSeries(const std::string &labelSeries);
|
||||||
|
std::string getOrganization() const;
|
||||||
|
void setOrganization(const std::string &organization);
|
||||||
|
long getPK() const;
|
||||||
|
void setPK(long pK);
|
||||||
|
std::vector<std::string> getLabelTypes() const;
|
||||||
|
void setLabelTypes(const std::vector<std::string> &labelTypes);
|
||||||
|
std::string getUserName() const;
|
||||||
|
void setUserName(const std::string &userName);
|
||||||
|
std::string getToken() const;
|
||||||
|
void setToken(const std::string &token);
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::string labelSeries_;
|
||||||
|
std::string organization_;
|
||||||
|
long pK_;
|
||||||
|
std::vector<std::string> labelTypes_;
|
||||||
|
std::string userName_;
|
||||||
|
std::string token_;
|
||||||
|
};
|
||||||
|
} // namespace Model
|
||||||
|
} // namespace AccountLabel
|
||||||
|
} // namespace AlibabaCloud
|
||||||
|
#endif // !ALIBABACLOUD_ACCOUNTLABEL_MODEL_DELETECUSTOMERLABELREQUEST_H_
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
/*
|
||||||
|
* 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_ACCOUNTLABEL_MODEL_DELETECUSTOMERLABELRESULT_H_
|
||||||
|
#define ALIBABACLOUD_ACCOUNTLABEL_MODEL_DELETECUSTOMERLABELRESULT_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <alibabacloud/core/ServiceResult.h>
|
||||||
|
#include <alibabacloud/accountlabel/AccountLabelExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace AccountLabel
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_ACCOUNTLABEL_EXPORT DeleteCustomerLabelResult : public ServiceResult
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
|
||||||
|
DeleteCustomerLabelResult();
|
||||||
|
explicit DeleteCustomerLabelResult(const std::string &payload);
|
||||||
|
~DeleteCustomerLabelResult();
|
||||||
|
std::string getMessage()const;
|
||||||
|
std::string getCode()const;
|
||||||
|
bool getSuccess()const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void parse(const std::string &payload);
|
||||||
|
private:
|
||||||
|
std::string message_;
|
||||||
|
std::string code_;
|
||||||
|
bool success_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_ACCOUNTLABEL_MODEL_DELETECUSTOMERLABELRESULT_H_
|
||||||
@@ -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_ACCOUNTLABEL_MODEL_QUERYCUSTOMERLABELBYCONFIGGROUPREQUEST_H_
|
||||||
|
#define ALIBABACLOUD_ACCOUNTLABEL_MODEL_QUERYCUSTOMERLABELBYCONFIGGROUPREQUEST_H_
|
||||||
|
|
||||||
|
#include <alibabacloud/accountlabel/AccountLabelExport.h>
|
||||||
|
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <map>
|
||||||
|
|
||||||
|
namespace AlibabaCloud {
|
||||||
|
namespace AccountLabel {
|
||||||
|
namespace Model {
|
||||||
|
class ALIBABACLOUD_ACCOUNTLABEL_EXPORT QueryCustomerLabelByConfigGroupRequest : public RpcServiceRequest {
|
||||||
|
public:
|
||||||
|
QueryCustomerLabelByConfigGroupRequest();
|
||||||
|
~QueryCustomerLabelByConfigGroupRequest();
|
||||||
|
std::string getGroupType() const;
|
||||||
|
void setGroupType(const std::string &groupType);
|
||||||
|
long getPK() const;
|
||||||
|
void setPK(long pK);
|
||||||
|
std::string getToken() const;
|
||||||
|
void setToken(const std::string &token);
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::string groupType_;
|
||||||
|
long pK_;
|
||||||
|
std::string token_;
|
||||||
|
};
|
||||||
|
} // namespace Model
|
||||||
|
} // namespace AccountLabel
|
||||||
|
} // namespace AlibabaCloud
|
||||||
|
#endif // !ALIBABACLOUD_ACCOUNTLABEL_MODEL_QUERYCUSTOMERLABELBYCONFIGGROUPREQUEST_H_
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ALIBABACLOUD_ACCOUNTLABEL_MODEL_QUERYCUSTOMERLABELBYCONFIGGROUPRESULT_H_
|
||||||
|
#define ALIBABACLOUD_ACCOUNTLABEL_MODEL_QUERYCUSTOMERLABELBYCONFIGGROUPRESULT_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <alibabacloud/core/ServiceResult.h>
|
||||||
|
#include <alibabacloud/accountlabel/AccountLabelExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace AccountLabel
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_ACCOUNTLABEL_EXPORT QueryCustomerLabelByConfigGroupResult : public ServiceResult
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
struct CustomerLabel
|
||||||
|
{
|
||||||
|
std::string labelSeries;
|
||||||
|
std::string label;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
QueryCustomerLabelByConfigGroupResult();
|
||||||
|
explicit QueryCustomerLabelByConfigGroupResult(const std::string &payload);
|
||||||
|
~QueryCustomerLabelByConfigGroupResult();
|
||||||
|
std::string getMessage()const;
|
||||||
|
std::vector<CustomerLabel> getData()const;
|
||||||
|
std::string getCode()const;
|
||||||
|
bool getSuccess()const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void parse(const std::string &payload);
|
||||||
|
private:
|
||||||
|
std::string message_;
|
||||||
|
std::vector<CustomerLabel> data_;
|
||||||
|
std::string code_;
|
||||||
|
bool success_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_ACCOUNTLABEL_MODEL_QUERYCUSTOMERLABELBYCONFIGGROUPRESULT_H_
|
||||||
@@ -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_ACCOUNTLABEL_MODEL_QUERYCUSTOMERLABELREQUEST_H_
|
||||||
|
#define ALIBABACLOUD_ACCOUNTLABEL_MODEL_QUERYCUSTOMERLABELREQUEST_H_
|
||||||
|
|
||||||
|
#include <alibabacloud/accountlabel/AccountLabelExport.h>
|
||||||
|
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <map>
|
||||||
|
|
||||||
|
namespace AlibabaCloud {
|
||||||
|
namespace AccountLabel {
|
||||||
|
namespace Model {
|
||||||
|
class ALIBABACLOUD_ACCOUNTLABEL_EXPORT QueryCustomerLabelRequest : public RpcServiceRequest {
|
||||||
|
public:
|
||||||
|
QueryCustomerLabelRequest();
|
||||||
|
~QueryCustomerLabelRequest();
|
||||||
|
std::string getLabelSeries() const;
|
||||||
|
void setLabelSeries(const std::string &labelSeries);
|
||||||
|
long getPK() const;
|
||||||
|
void setPK(long pK);
|
||||||
|
std::string getToken() const;
|
||||||
|
void setToken(const std::string &token);
|
||||||
|
bool getInstant() const;
|
||||||
|
void setInstant(bool instant);
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::string labelSeries_;
|
||||||
|
long pK_;
|
||||||
|
std::string token_;
|
||||||
|
bool instant_;
|
||||||
|
};
|
||||||
|
} // namespace Model
|
||||||
|
} // namespace AccountLabel
|
||||||
|
} // namespace AlibabaCloud
|
||||||
|
#endif // !ALIBABACLOUD_ACCOUNTLABEL_MODEL_QUERYCUSTOMERLABELREQUEST_H_
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ALIBABACLOUD_ACCOUNTLABEL_MODEL_QUERYCUSTOMERLABELRESULT_H_
|
||||||
|
#define ALIBABACLOUD_ACCOUNTLABEL_MODEL_QUERYCUSTOMERLABELRESULT_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <utility>
|
||||||
|
#include <alibabacloud/core/ServiceResult.h>
|
||||||
|
#include <alibabacloud/accountlabel/AccountLabelExport.h>
|
||||||
|
|
||||||
|
namespace AlibabaCloud
|
||||||
|
{
|
||||||
|
namespace AccountLabel
|
||||||
|
{
|
||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
class ALIBABACLOUD_ACCOUNTLABEL_EXPORT QueryCustomerLabelResult : public ServiceResult
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
struct CustomerLabel
|
||||||
|
{
|
||||||
|
std::string labelSeries;
|
||||||
|
std::string label;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
QueryCustomerLabelResult();
|
||||||
|
explicit QueryCustomerLabelResult(const std::string &payload);
|
||||||
|
~QueryCustomerLabelResult();
|
||||||
|
std::string getMessage()const;
|
||||||
|
std::vector<CustomerLabel> getData()const;
|
||||||
|
std::string getCode()const;
|
||||||
|
bool getSuccess()const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void parse(const std::string &payload);
|
||||||
|
private:
|
||||||
|
std::string message_;
|
||||||
|
std::vector<CustomerLabel> data_;
|
||||||
|
std::string code_;
|
||||||
|
bool success_;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // !ALIBABACLOUD_ACCOUNTLABEL_MODEL_QUERYCUSTOMERLABELRESULT_H_
|
||||||
233
accountlabel/src/AccountLabelClient.cc
Normal file
233
accountlabel/src/AccountLabelClient.cc
Normal file
@@ -0,0 +1,233 @@
|
|||||||
|
/*
|
||||||
|
* 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/accountlabel/AccountLabelClient.h>
|
||||||
|
#include <alibabacloud/core/SimpleCredentialsProvider.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud;
|
||||||
|
using namespace AlibabaCloud::Location;
|
||||||
|
using namespace AlibabaCloud::AccountLabel;
|
||||||
|
using namespace AlibabaCloud::AccountLabel::Model;
|
||||||
|
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
const std::string SERVICE_NAME = "AccountLabel";
|
||||||
|
}
|
||||||
|
|
||||||
|
AccountLabelClient::AccountLabelClient(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, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
AccountLabelClient::AccountLabelClient(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, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
AccountLabelClient::AccountLabelClient(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, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
AccountLabelClient::~AccountLabelClient()
|
||||||
|
{}
|
||||||
|
|
||||||
|
AccountLabelClient::AddCustomerLabelOutcome AccountLabelClient::addCustomerLabel(const AddCustomerLabelRequest &request) const
|
||||||
|
{
|
||||||
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
if (!endpointOutcome.isSuccess())
|
||||||
|
return AddCustomerLabelOutcome(endpointOutcome.error());
|
||||||
|
|
||||||
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||||
|
|
||||||
|
if (outcome.isSuccess())
|
||||||
|
return AddCustomerLabelOutcome(AddCustomerLabelResult(outcome.result()));
|
||||||
|
else
|
||||||
|
return AddCustomerLabelOutcome(outcome.error());
|
||||||
|
}
|
||||||
|
|
||||||
|
void AccountLabelClient::addCustomerLabelAsync(const AddCustomerLabelRequest& request, const AddCustomerLabelAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||||
|
{
|
||||||
|
auto fn = [this, request, handler, context]()
|
||||||
|
{
|
||||||
|
handler(this, request, addCustomerLabel(request), context);
|
||||||
|
};
|
||||||
|
|
||||||
|
asyncExecute(new Runnable(fn));
|
||||||
|
}
|
||||||
|
|
||||||
|
AccountLabelClient::AddCustomerLabelOutcomeCallable AccountLabelClient::addCustomerLabelCallable(const AddCustomerLabelRequest &request) const
|
||||||
|
{
|
||||||
|
auto task = std::make_shared<std::packaged_task<AddCustomerLabelOutcome()>>(
|
||||||
|
[this, request]()
|
||||||
|
{
|
||||||
|
return this->addCustomerLabel(request);
|
||||||
|
});
|
||||||
|
|
||||||
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||||
|
return task->get_future();
|
||||||
|
}
|
||||||
|
|
||||||
|
AccountLabelClient::BatchFetchAccountLabelOutcome AccountLabelClient::batchFetchAccountLabel(const BatchFetchAccountLabelRequest &request) const
|
||||||
|
{
|
||||||
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
if (!endpointOutcome.isSuccess())
|
||||||
|
return BatchFetchAccountLabelOutcome(endpointOutcome.error());
|
||||||
|
|
||||||
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||||
|
|
||||||
|
if (outcome.isSuccess())
|
||||||
|
return BatchFetchAccountLabelOutcome(BatchFetchAccountLabelResult(outcome.result()));
|
||||||
|
else
|
||||||
|
return BatchFetchAccountLabelOutcome(outcome.error());
|
||||||
|
}
|
||||||
|
|
||||||
|
void AccountLabelClient::batchFetchAccountLabelAsync(const BatchFetchAccountLabelRequest& request, const BatchFetchAccountLabelAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||||
|
{
|
||||||
|
auto fn = [this, request, handler, context]()
|
||||||
|
{
|
||||||
|
handler(this, request, batchFetchAccountLabel(request), context);
|
||||||
|
};
|
||||||
|
|
||||||
|
asyncExecute(new Runnable(fn));
|
||||||
|
}
|
||||||
|
|
||||||
|
AccountLabelClient::BatchFetchAccountLabelOutcomeCallable AccountLabelClient::batchFetchAccountLabelCallable(const BatchFetchAccountLabelRequest &request) const
|
||||||
|
{
|
||||||
|
auto task = std::make_shared<std::packaged_task<BatchFetchAccountLabelOutcome()>>(
|
||||||
|
[this, request]()
|
||||||
|
{
|
||||||
|
return this->batchFetchAccountLabel(request);
|
||||||
|
});
|
||||||
|
|
||||||
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||||
|
return task->get_future();
|
||||||
|
}
|
||||||
|
|
||||||
|
AccountLabelClient::DeleteCustomerLabelOutcome AccountLabelClient::deleteCustomerLabel(const DeleteCustomerLabelRequest &request) const
|
||||||
|
{
|
||||||
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
if (!endpointOutcome.isSuccess())
|
||||||
|
return DeleteCustomerLabelOutcome(endpointOutcome.error());
|
||||||
|
|
||||||
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||||
|
|
||||||
|
if (outcome.isSuccess())
|
||||||
|
return DeleteCustomerLabelOutcome(DeleteCustomerLabelResult(outcome.result()));
|
||||||
|
else
|
||||||
|
return DeleteCustomerLabelOutcome(outcome.error());
|
||||||
|
}
|
||||||
|
|
||||||
|
void AccountLabelClient::deleteCustomerLabelAsync(const DeleteCustomerLabelRequest& request, const DeleteCustomerLabelAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||||
|
{
|
||||||
|
auto fn = [this, request, handler, context]()
|
||||||
|
{
|
||||||
|
handler(this, request, deleteCustomerLabel(request), context);
|
||||||
|
};
|
||||||
|
|
||||||
|
asyncExecute(new Runnable(fn));
|
||||||
|
}
|
||||||
|
|
||||||
|
AccountLabelClient::DeleteCustomerLabelOutcomeCallable AccountLabelClient::deleteCustomerLabelCallable(const DeleteCustomerLabelRequest &request) const
|
||||||
|
{
|
||||||
|
auto task = std::make_shared<std::packaged_task<DeleteCustomerLabelOutcome()>>(
|
||||||
|
[this, request]()
|
||||||
|
{
|
||||||
|
return this->deleteCustomerLabel(request);
|
||||||
|
});
|
||||||
|
|
||||||
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||||
|
return task->get_future();
|
||||||
|
}
|
||||||
|
|
||||||
|
AccountLabelClient::QueryCustomerLabelOutcome AccountLabelClient::queryCustomerLabel(const QueryCustomerLabelRequest &request) const
|
||||||
|
{
|
||||||
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
if (!endpointOutcome.isSuccess())
|
||||||
|
return QueryCustomerLabelOutcome(endpointOutcome.error());
|
||||||
|
|
||||||
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||||
|
|
||||||
|
if (outcome.isSuccess())
|
||||||
|
return QueryCustomerLabelOutcome(QueryCustomerLabelResult(outcome.result()));
|
||||||
|
else
|
||||||
|
return QueryCustomerLabelOutcome(outcome.error());
|
||||||
|
}
|
||||||
|
|
||||||
|
void AccountLabelClient::queryCustomerLabelAsync(const QueryCustomerLabelRequest& request, const QueryCustomerLabelAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||||
|
{
|
||||||
|
auto fn = [this, request, handler, context]()
|
||||||
|
{
|
||||||
|
handler(this, request, queryCustomerLabel(request), context);
|
||||||
|
};
|
||||||
|
|
||||||
|
asyncExecute(new Runnable(fn));
|
||||||
|
}
|
||||||
|
|
||||||
|
AccountLabelClient::QueryCustomerLabelOutcomeCallable AccountLabelClient::queryCustomerLabelCallable(const QueryCustomerLabelRequest &request) const
|
||||||
|
{
|
||||||
|
auto task = std::make_shared<std::packaged_task<QueryCustomerLabelOutcome()>>(
|
||||||
|
[this, request]()
|
||||||
|
{
|
||||||
|
return this->queryCustomerLabel(request);
|
||||||
|
});
|
||||||
|
|
||||||
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||||
|
return task->get_future();
|
||||||
|
}
|
||||||
|
|
||||||
|
AccountLabelClient::QueryCustomerLabelByConfigGroupOutcome AccountLabelClient::queryCustomerLabelByConfigGroup(const QueryCustomerLabelByConfigGroupRequest &request) const
|
||||||
|
{
|
||||||
|
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||||
|
if (!endpointOutcome.isSuccess())
|
||||||
|
return QueryCustomerLabelByConfigGroupOutcome(endpointOutcome.error());
|
||||||
|
|
||||||
|
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||||
|
|
||||||
|
if (outcome.isSuccess())
|
||||||
|
return QueryCustomerLabelByConfigGroupOutcome(QueryCustomerLabelByConfigGroupResult(outcome.result()));
|
||||||
|
else
|
||||||
|
return QueryCustomerLabelByConfigGroupOutcome(outcome.error());
|
||||||
|
}
|
||||||
|
|
||||||
|
void AccountLabelClient::queryCustomerLabelByConfigGroupAsync(const QueryCustomerLabelByConfigGroupRequest& request, const QueryCustomerLabelByConfigGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||||
|
{
|
||||||
|
auto fn = [this, request, handler, context]()
|
||||||
|
{
|
||||||
|
handler(this, request, queryCustomerLabelByConfigGroup(request), context);
|
||||||
|
};
|
||||||
|
|
||||||
|
asyncExecute(new Runnable(fn));
|
||||||
|
}
|
||||||
|
|
||||||
|
AccountLabelClient::QueryCustomerLabelByConfigGroupOutcomeCallable AccountLabelClient::queryCustomerLabelByConfigGroupCallable(const QueryCustomerLabelByConfigGroupRequest &request) const
|
||||||
|
{
|
||||||
|
auto task = std::make_shared<std::packaged_task<QueryCustomerLabelByConfigGroupOutcome()>>(
|
||||||
|
[this, request]()
|
||||||
|
{
|
||||||
|
return this->queryCustomerLabelByConfigGroup(request);
|
||||||
|
});
|
||||||
|
|
||||||
|
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||||
|
return task->get_future();
|
||||||
|
}
|
||||||
|
|
||||||
98
accountlabel/src/model/AddCustomerLabelRequest.cc
Normal file
98
accountlabel/src/model/AddCustomerLabelRequest.cc
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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <alibabacloud/accountlabel/model/AddCustomerLabelRequest.h>
|
||||||
|
|
||||||
|
using AlibabaCloud::AccountLabel::Model::AddCustomerLabelRequest;
|
||||||
|
|
||||||
|
AddCustomerLabelRequest::AddCustomerLabelRequest()
|
||||||
|
: RpcServiceRequest("accountlabel", "2020-03-15", "AddCustomerLabel") {
|
||||||
|
setMethod(HttpRequest::Method::Post);
|
||||||
|
}
|
||||||
|
|
||||||
|
AddCustomerLabelRequest::~AddCustomerLabelRequest() {}
|
||||||
|
|
||||||
|
std::string AddCustomerLabelRequest::getLabelSeries() const {
|
||||||
|
return labelSeries_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void AddCustomerLabelRequest::setLabelSeries(const std::string &labelSeries) {
|
||||||
|
labelSeries_ = labelSeries;
|
||||||
|
setParameter(std::string("LabelSeries"), labelSeries);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string AddCustomerLabelRequest::getOrganization() const {
|
||||||
|
return organization_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void AddCustomerLabelRequest::setOrganization(const std::string &organization) {
|
||||||
|
organization_ = organization;
|
||||||
|
setParameter(std::string("Organization"), organization);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string AddCustomerLabelRequest::getEndtime() const {
|
||||||
|
return endtime_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void AddCustomerLabelRequest::setEndtime(const std::string &endtime) {
|
||||||
|
endtime_ = endtime;
|
||||||
|
setParameter(std::string("Endtime"), endtime);
|
||||||
|
}
|
||||||
|
|
||||||
|
long AddCustomerLabelRequest::getPK() const {
|
||||||
|
return pK_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void AddCustomerLabelRequest::setPK(long pK) {
|
||||||
|
pK_ = pK;
|
||||||
|
setParameter(std::string("PK"), std::to_string(pK));
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string AddCustomerLabelRequest::getStartTime() const {
|
||||||
|
return startTime_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void AddCustomerLabelRequest::setStartTime(const std::string &startTime) {
|
||||||
|
startTime_ = startTime;
|
||||||
|
setParameter(std::string("StartTime"), startTime);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<std::string> AddCustomerLabelRequest::getLabelTypes() const {
|
||||||
|
return labelTypes_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void AddCustomerLabelRequest::setLabelTypes(const std::vector<std::string> &labelTypes) {
|
||||||
|
labelTypes_ = labelTypes;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string AddCustomerLabelRequest::getUserName() const {
|
||||||
|
return userName_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void AddCustomerLabelRequest::setUserName(const std::string &userName) {
|
||||||
|
userName_ = userName;
|
||||||
|
setParameter(std::string("UserName"), userName);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string AddCustomerLabelRequest::getToken() const {
|
||||||
|
return token_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void AddCustomerLabelRequest::setToken(const std::string &token) {
|
||||||
|
token_ = token;
|
||||||
|
setParameter(std::string("Token"), token);
|
||||||
|
}
|
||||||
|
|
||||||
65
accountlabel/src/model/AddCustomerLabelResult.cc
Normal file
65
accountlabel/src/model/AddCustomerLabelResult.cc
Normal 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <alibabacloud/accountlabel/model/AddCustomerLabelResult.h>
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud::AccountLabel;
|
||||||
|
using namespace AlibabaCloud::AccountLabel::Model;
|
||||||
|
|
||||||
|
AddCustomerLabelResult::AddCustomerLabelResult() :
|
||||||
|
ServiceResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
AddCustomerLabelResult::AddCustomerLabelResult(const std::string &payload) :
|
||||||
|
ServiceResult()
|
||||||
|
{
|
||||||
|
parse(payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
AddCustomerLabelResult::~AddCustomerLabelResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void AddCustomerLabelResult::parse(const std::string &payload)
|
||||||
|
{
|
||||||
|
Json::Reader reader;
|
||||||
|
Json::Value value;
|
||||||
|
reader.parse(payload, value);
|
||||||
|
setRequestId(value["RequestId"].asString());
|
||||||
|
if(!value["Code"].isNull())
|
||||||
|
code_ = value["Code"].asString();
|
||||||
|
if(!value["Message"].isNull())
|
||||||
|
message_ = value["Message"].asString();
|
||||||
|
if(!value["Success"].isNull())
|
||||||
|
success_ = value["Success"].asString() == "true";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string AddCustomerLabelResult::getMessage()const
|
||||||
|
{
|
||||||
|
return message_;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string AddCustomerLabelResult::getCode()const
|
||||||
|
{
|
||||||
|
return code_;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool AddCustomerLabelResult::getSuccess()const
|
||||||
|
{
|
||||||
|
return success_;
|
||||||
|
}
|
||||||
|
|
||||||
83
accountlabel/src/model/BatchFetchAccountLabelRequest.cc
Normal file
83
accountlabel/src/model/BatchFetchAccountLabelRequest.cc
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
/*
|
||||||
|
* 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/accountlabel/model/BatchFetchAccountLabelRequest.h>
|
||||||
|
|
||||||
|
using AlibabaCloud::AccountLabel::Model::BatchFetchAccountLabelRequest;
|
||||||
|
|
||||||
|
BatchFetchAccountLabelRequest::BatchFetchAccountLabelRequest()
|
||||||
|
: RpcServiceRequest("accountlabel", "2020-03-15", "BatchFetchAccountLabel") {
|
||||||
|
setMethod(HttpRequest::Method::Post);
|
||||||
|
}
|
||||||
|
|
||||||
|
BatchFetchAccountLabelRequest::~BatchFetchAccountLabelRequest() {}
|
||||||
|
|
||||||
|
std::string BatchFetchAccountLabelRequest::getOrganization() const {
|
||||||
|
return organization_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void BatchFetchAccountLabelRequest::setOrganization(const std::string &organization) {
|
||||||
|
organization_ = organization;
|
||||||
|
setParameter(std::string("Organization"), organization);
|
||||||
|
}
|
||||||
|
|
||||||
|
long BatchFetchAccountLabelRequest::getPk() const {
|
||||||
|
return pk_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void BatchFetchAccountLabelRequest::setPk(long pk) {
|
||||||
|
pk_ = pk;
|
||||||
|
setParameter(std::string("Pk"), std::to_string(pk));
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string BatchFetchAccountLabelRequest::getUserName() const {
|
||||||
|
return userName_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void BatchFetchAccountLabelRequest::setUserName(const std::string &userName) {
|
||||||
|
userName_ = userName;
|
||||||
|
setParameter(std::string("UserName"), userName);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool BatchFetchAccountLabelRequest::getInstant() const {
|
||||||
|
return instant_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void BatchFetchAccountLabelRequest::setInstant(bool instant) {
|
||||||
|
instant_ = instant;
|
||||||
|
setParameter(std::string("Instant"), instant ? "true" : "false");
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string BatchFetchAccountLabelRequest::getToken() const {
|
||||||
|
return token_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void BatchFetchAccountLabelRequest::setToken(const std::string &token) {
|
||||||
|
token_ = token;
|
||||||
|
setParameter(std::string("Token"), token);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<BatchFetchAccountLabelRequest::std::string> BatchFetchAccountLabelRequest::getLabelSeriesList() const {
|
||||||
|
return labelSeriesList_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void BatchFetchAccountLabelRequest::setLabelSeriesList(const std::vector<BatchFetchAccountLabelRequest::std::string> &labelSeriesList) {
|
||||||
|
labelSeriesList_ = labelSeriesList;
|
||||||
|
for(int dep1 = 0; dep1 != labelSeriesList.size(); dep1++) {
|
||||||
|
setParameter(std::string("LabelSeriesList") + "." + std::to_string(dep1 + 1), labelSeriesList[dep1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
99
accountlabel/src/model/BatchFetchAccountLabelResult.cc
Normal file
99
accountlabel/src/model/BatchFetchAccountLabelResult.cc
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <alibabacloud/accountlabel/model/BatchFetchAccountLabelResult.h>
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud::AccountLabel;
|
||||||
|
using namespace AlibabaCloud::AccountLabel::Model;
|
||||||
|
|
||||||
|
BatchFetchAccountLabelResult::BatchFetchAccountLabelResult() :
|
||||||
|
ServiceResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
BatchFetchAccountLabelResult::BatchFetchAccountLabelResult(const std::string &payload) :
|
||||||
|
ServiceResult()
|
||||||
|
{
|
||||||
|
parse(payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
BatchFetchAccountLabelResult::~BatchFetchAccountLabelResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void BatchFetchAccountLabelResult::parse(const std::string &payload)
|
||||||
|
{
|
||||||
|
Json::Reader reader;
|
||||||
|
Json::Value value;
|
||||||
|
reader.parse(payload, value);
|
||||||
|
setRequestId(value["RequestId"].asString());
|
||||||
|
auto allDataNode = value["Data"]["AccountLabelInfoDto"];
|
||||||
|
for (auto valueDataAccountLabelInfoDto : allDataNode)
|
||||||
|
{
|
||||||
|
AccountLabelInfoDto dataObject;
|
||||||
|
if(!valueDataAccountLabelInfoDto["Creator"].isNull())
|
||||||
|
dataObject.creator = valueDataAccountLabelInfoDto["Creator"].asString();
|
||||||
|
if(!valueDataAccountLabelInfoDto["EndTime"].isNull())
|
||||||
|
dataObject.endTime = std::stol(valueDataAccountLabelInfoDto["EndTime"].asString());
|
||||||
|
if(!valueDataAccountLabelInfoDto["GmtCreated"].isNull())
|
||||||
|
dataObject.gmtCreated = std::stol(valueDataAccountLabelInfoDto["GmtCreated"].asString());
|
||||||
|
if(!valueDataAccountLabelInfoDto["GmtModified"].isNull())
|
||||||
|
dataObject.gmtModified = std::stol(valueDataAccountLabelInfoDto["GmtModified"].asString());
|
||||||
|
if(!valueDataAccountLabelInfoDto["Kp"].isNull())
|
||||||
|
dataObject.kp = std::stol(valueDataAccountLabelInfoDto["Kp"].asString());
|
||||||
|
if(!valueDataAccountLabelInfoDto["Label"].isNull())
|
||||||
|
dataObject.label = valueDataAccountLabelInfoDto["Label"].asString();
|
||||||
|
if(!valueDataAccountLabelInfoDto["LabelSeries"].isNull())
|
||||||
|
dataObject.labelSeries = valueDataAccountLabelInfoDto["LabelSeries"].asString();
|
||||||
|
if(!valueDataAccountLabelInfoDto["StartTime"].isNull())
|
||||||
|
dataObject.startTime = std::stol(valueDataAccountLabelInfoDto["StartTime"].asString());
|
||||||
|
data_.push_back(dataObject);
|
||||||
|
}
|
||||||
|
if(!value["Message"].isNull())
|
||||||
|
message_ = value["Message"].asString();
|
||||||
|
if(!value["Count"].isNull())
|
||||||
|
count_ = std::stol(value["Count"].asString());
|
||||||
|
if(!value["Code"].isNull())
|
||||||
|
code_ = value["Code"].asString();
|
||||||
|
if(!value["Success"].isNull())
|
||||||
|
success_ = value["Success"].asString() == "true";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string BatchFetchAccountLabelResult::getMessage()const
|
||||||
|
{
|
||||||
|
return message_;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<BatchFetchAccountLabelResult::AccountLabelInfoDto> BatchFetchAccountLabelResult::getData()const
|
||||||
|
{
|
||||||
|
return data_;
|
||||||
|
}
|
||||||
|
|
||||||
|
long BatchFetchAccountLabelResult::getCount()const
|
||||||
|
{
|
||||||
|
return count_;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string BatchFetchAccountLabelResult::getCode()const
|
||||||
|
{
|
||||||
|
return code_;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool BatchFetchAccountLabelResult::getSuccess()const
|
||||||
|
{
|
||||||
|
return success_;
|
||||||
|
}
|
||||||
|
|
||||||
80
accountlabel/src/model/DeleteCustomerLabelRequest.cc
Normal file
80
accountlabel/src/model/DeleteCustomerLabelRequest.cc
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
/*
|
||||||
|
* 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/accountlabel/model/DeleteCustomerLabelRequest.h>
|
||||||
|
|
||||||
|
using AlibabaCloud::AccountLabel::Model::DeleteCustomerLabelRequest;
|
||||||
|
|
||||||
|
DeleteCustomerLabelRequest::DeleteCustomerLabelRequest()
|
||||||
|
: RpcServiceRequest("accountlabel", "2020-03-15", "DeleteCustomerLabel") {
|
||||||
|
setMethod(HttpRequest::Method::Post);
|
||||||
|
}
|
||||||
|
|
||||||
|
DeleteCustomerLabelRequest::~DeleteCustomerLabelRequest() {}
|
||||||
|
|
||||||
|
std::string DeleteCustomerLabelRequest::getLabelSeries() const {
|
||||||
|
return labelSeries_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DeleteCustomerLabelRequest::setLabelSeries(const std::string &labelSeries) {
|
||||||
|
labelSeries_ = labelSeries;
|
||||||
|
setParameter(std::string("LabelSeries"), labelSeries);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string DeleteCustomerLabelRequest::getOrganization() const {
|
||||||
|
return organization_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DeleteCustomerLabelRequest::setOrganization(const std::string &organization) {
|
||||||
|
organization_ = organization;
|
||||||
|
setParameter(std::string("Organization"), organization);
|
||||||
|
}
|
||||||
|
|
||||||
|
long DeleteCustomerLabelRequest::getPK() const {
|
||||||
|
return pK_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DeleteCustomerLabelRequest::setPK(long pK) {
|
||||||
|
pK_ = pK;
|
||||||
|
setParameter(std::string("PK"), std::to_string(pK));
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<std::string> DeleteCustomerLabelRequest::getLabelTypes() const {
|
||||||
|
return labelTypes_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DeleteCustomerLabelRequest::setLabelTypes(const std::vector<std::string> &labelTypes) {
|
||||||
|
labelTypes_ = labelTypes;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string DeleteCustomerLabelRequest::getUserName() const {
|
||||||
|
return userName_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DeleteCustomerLabelRequest::setUserName(const std::string &userName) {
|
||||||
|
userName_ = userName;
|
||||||
|
setParameter(std::string("UserName"), userName);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string DeleteCustomerLabelRequest::getToken() const {
|
||||||
|
return token_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DeleteCustomerLabelRequest::setToken(const std::string &token) {
|
||||||
|
token_ = token;
|
||||||
|
setParameter(std::string("Token"), token);
|
||||||
|
}
|
||||||
|
|
||||||
65
accountlabel/src/model/DeleteCustomerLabelResult.cc
Normal file
65
accountlabel/src/model/DeleteCustomerLabelResult.cc
Normal 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <alibabacloud/accountlabel/model/DeleteCustomerLabelResult.h>
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud::AccountLabel;
|
||||||
|
using namespace AlibabaCloud::AccountLabel::Model;
|
||||||
|
|
||||||
|
DeleteCustomerLabelResult::DeleteCustomerLabelResult() :
|
||||||
|
ServiceResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
DeleteCustomerLabelResult::DeleteCustomerLabelResult(const std::string &payload) :
|
||||||
|
ServiceResult()
|
||||||
|
{
|
||||||
|
parse(payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
DeleteCustomerLabelResult::~DeleteCustomerLabelResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void DeleteCustomerLabelResult::parse(const std::string &payload)
|
||||||
|
{
|
||||||
|
Json::Reader reader;
|
||||||
|
Json::Value value;
|
||||||
|
reader.parse(payload, value);
|
||||||
|
setRequestId(value["RequestId"].asString());
|
||||||
|
if(!value["Code"].isNull())
|
||||||
|
code_ = value["Code"].asString();
|
||||||
|
if(!value["Message"].isNull())
|
||||||
|
message_ = value["Message"].asString();
|
||||||
|
if(!value["Success"].isNull())
|
||||||
|
success_ = value["Success"].asString() == "true";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string DeleteCustomerLabelResult::getMessage()const
|
||||||
|
{
|
||||||
|
return message_;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string DeleteCustomerLabelResult::getCode()const
|
||||||
|
{
|
||||||
|
return code_;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool DeleteCustomerLabelResult::getSuccess()const
|
||||||
|
{
|
||||||
|
return success_;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <alibabacloud/accountlabel/model/QueryCustomerLabelByConfigGroupRequest.h>
|
||||||
|
|
||||||
|
using AlibabaCloud::AccountLabel::Model::QueryCustomerLabelByConfigGroupRequest;
|
||||||
|
|
||||||
|
QueryCustomerLabelByConfigGroupRequest::QueryCustomerLabelByConfigGroupRequest()
|
||||||
|
: RpcServiceRequest("accountlabel", "2020-03-15", "QueryCustomerLabelByConfigGroup") {
|
||||||
|
setMethod(HttpRequest::Method::Post);
|
||||||
|
}
|
||||||
|
|
||||||
|
QueryCustomerLabelByConfigGroupRequest::~QueryCustomerLabelByConfigGroupRequest() {}
|
||||||
|
|
||||||
|
std::string QueryCustomerLabelByConfigGroupRequest::getGroupType() const {
|
||||||
|
return groupType_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void QueryCustomerLabelByConfigGroupRequest::setGroupType(const std::string &groupType) {
|
||||||
|
groupType_ = groupType;
|
||||||
|
setParameter(std::string("GroupType"), groupType);
|
||||||
|
}
|
||||||
|
|
||||||
|
long QueryCustomerLabelByConfigGroupRequest::getPK() const {
|
||||||
|
return pK_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void QueryCustomerLabelByConfigGroupRequest::setPK(long pK) {
|
||||||
|
pK_ = pK;
|
||||||
|
setParameter(std::string("PK"), std::to_string(pK));
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string QueryCustomerLabelByConfigGroupRequest::getToken() const {
|
||||||
|
return token_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void QueryCustomerLabelByConfigGroupRequest::setToken(const std::string &token) {
|
||||||
|
token_ = token;
|
||||||
|
setParameter(std::string("Token"), token);
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
/*
|
||||||
|
* 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/accountlabel/model/QueryCustomerLabelByConfigGroupResult.h>
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud::AccountLabel;
|
||||||
|
using namespace AlibabaCloud::AccountLabel::Model;
|
||||||
|
|
||||||
|
QueryCustomerLabelByConfigGroupResult::QueryCustomerLabelByConfigGroupResult() :
|
||||||
|
ServiceResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
QueryCustomerLabelByConfigGroupResult::QueryCustomerLabelByConfigGroupResult(const std::string &payload) :
|
||||||
|
ServiceResult()
|
||||||
|
{
|
||||||
|
parse(payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
QueryCustomerLabelByConfigGroupResult::~QueryCustomerLabelByConfigGroupResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void QueryCustomerLabelByConfigGroupResult::parse(const std::string &payload)
|
||||||
|
{
|
||||||
|
Json::Reader reader;
|
||||||
|
Json::Value value;
|
||||||
|
reader.parse(payload, value);
|
||||||
|
setRequestId(value["RequestId"].asString());
|
||||||
|
auto allDataNode = value["Data"]["CustomerLabel"];
|
||||||
|
for (auto valueDataCustomerLabel : allDataNode)
|
||||||
|
{
|
||||||
|
CustomerLabel dataObject;
|
||||||
|
if(!valueDataCustomerLabel["Label"].isNull())
|
||||||
|
dataObject.label = valueDataCustomerLabel["Label"].asString();
|
||||||
|
if(!valueDataCustomerLabel["LabelSeries"].isNull())
|
||||||
|
dataObject.labelSeries = valueDataCustomerLabel["LabelSeries"].asString();
|
||||||
|
data_.push_back(dataObject);
|
||||||
|
}
|
||||||
|
if(!value["Code"].isNull())
|
||||||
|
code_ = value["Code"].asString();
|
||||||
|
if(!value["Message"].isNull())
|
||||||
|
message_ = value["Message"].asString();
|
||||||
|
if(!value["Success"].isNull())
|
||||||
|
success_ = value["Success"].asString() == "true";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string QueryCustomerLabelByConfigGroupResult::getMessage()const
|
||||||
|
{
|
||||||
|
return message_;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<QueryCustomerLabelByConfigGroupResult::CustomerLabel> QueryCustomerLabelByConfigGroupResult::getData()const
|
||||||
|
{
|
||||||
|
return data_;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string QueryCustomerLabelByConfigGroupResult::getCode()const
|
||||||
|
{
|
||||||
|
return code_;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool QueryCustomerLabelByConfigGroupResult::getSuccess()const
|
||||||
|
{
|
||||||
|
return success_;
|
||||||
|
}
|
||||||
|
|
||||||
63
accountlabel/src/model/QueryCustomerLabelRequest.cc
Normal file
63
accountlabel/src/model/QueryCustomerLabelRequest.cc
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
/*
|
||||||
|
* 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/accountlabel/model/QueryCustomerLabelRequest.h>
|
||||||
|
|
||||||
|
using AlibabaCloud::AccountLabel::Model::QueryCustomerLabelRequest;
|
||||||
|
|
||||||
|
QueryCustomerLabelRequest::QueryCustomerLabelRequest()
|
||||||
|
: RpcServiceRequest("accountlabel", "2020-03-15", "QueryCustomerLabel") {
|
||||||
|
setMethod(HttpRequest::Method::Post);
|
||||||
|
}
|
||||||
|
|
||||||
|
QueryCustomerLabelRequest::~QueryCustomerLabelRequest() {}
|
||||||
|
|
||||||
|
std::string QueryCustomerLabelRequest::getLabelSeries() const {
|
||||||
|
return labelSeries_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void QueryCustomerLabelRequest::setLabelSeries(const std::string &labelSeries) {
|
||||||
|
labelSeries_ = labelSeries;
|
||||||
|
setParameter(std::string("LabelSeries"), labelSeries);
|
||||||
|
}
|
||||||
|
|
||||||
|
long QueryCustomerLabelRequest::getPK() const {
|
||||||
|
return pK_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void QueryCustomerLabelRequest::setPK(long pK) {
|
||||||
|
pK_ = pK;
|
||||||
|
setParameter(std::string("PK"), std::to_string(pK));
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string QueryCustomerLabelRequest::getToken() const {
|
||||||
|
return token_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void QueryCustomerLabelRequest::setToken(const std::string &token) {
|
||||||
|
token_ = token;
|
||||||
|
setParameter(std::string("Token"), token);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool QueryCustomerLabelRequest::getInstant() const {
|
||||||
|
return instant_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void QueryCustomerLabelRequest::setInstant(bool instant) {
|
||||||
|
instant_ = instant;
|
||||||
|
setParameter(std::string("Instant"), instant ? "true" : "false");
|
||||||
|
}
|
||||||
|
|
||||||
80
accountlabel/src/model/QueryCustomerLabelResult.cc
Normal file
80
accountlabel/src/model/QueryCustomerLabelResult.cc
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
/*
|
||||||
|
* 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/accountlabel/model/QueryCustomerLabelResult.h>
|
||||||
|
#include <json/json.h>
|
||||||
|
|
||||||
|
using namespace AlibabaCloud::AccountLabel;
|
||||||
|
using namespace AlibabaCloud::AccountLabel::Model;
|
||||||
|
|
||||||
|
QueryCustomerLabelResult::QueryCustomerLabelResult() :
|
||||||
|
ServiceResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
QueryCustomerLabelResult::QueryCustomerLabelResult(const std::string &payload) :
|
||||||
|
ServiceResult()
|
||||||
|
{
|
||||||
|
parse(payload);
|
||||||
|
}
|
||||||
|
|
||||||
|
QueryCustomerLabelResult::~QueryCustomerLabelResult()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void QueryCustomerLabelResult::parse(const std::string &payload)
|
||||||
|
{
|
||||||
|
Json::Reader reader;
|
||||||
|
Json::Value value;
|
||||||
|
reader.parse(payload, value);
|
||||||
|
setRequestId(value["RequestId"].asString());
|
||||||
|
auto allDataNode = value["Data"]["CustomerLabel"];
|
||||||
|
for (auto valueDataCustomerLabel : allDataNode)
|
||||||
|
{
|
||||||
|
CustomerLabel dataObject;
|
||||||
|
if(!valueDataCustomerLabel["Label"].isNull())
|
||||||
|
dataObject.label = valueDataCustomerLabel["Label"].asString();
|
||||||
|
if(!valueDataCustomerLabel["LabelSeries"].isNull())
|
||||||
|
dataObject.labelSeries = valueDataCustomerLabel["LabelSeries"].asString();
|
||||||
|
data_.push_back(dataObject);
|
||||||
|
}
|
||||||
|
if(!value["Code"].isNull())
|
||||||
|
code_ = value["Code"].asString();
|
||||||
|
if(!value["Message"].isNull())
|
||||||
|
message_ = value["Message"].asString();
|
||||||
|
if(!value["Success"].isNull())
|
||||||
|
success_ = value["Success"].asString() == "true";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string QueryCustomerLabelResult::getMessage()const
|
||||||
|
{
|
||||||
|
return message_;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<QueryCustomerLabelResult::CustomerLabel> QueryCustomerLabelResult::getData()const
|
||||||
|
{
|
||||||
|
return data_;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string QueryCustomerLabelResult::getCode()const
|
||||||
|
{
|
||||||
|
return code_;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool QueryCustomerLabelResult::getSuccess()const
|
||||||
|
{
|
||||||
|
return success_;
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user