由择仁发起的CCC SDK自动发布, BUILD_ID=445, 版本号:1.2.2
Signed-off-by: haowei.yao <haowei.yao@alibaba-inc.com>
This commit is contained in:
781
ccc/src/CCCClient.cc
Normal file
781
ccc/src/CCCClient.cc
Normal file
@@ -0,0 +1,781 @@
|
||||
/*
|
||||
* 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/ccc/CCCClient.h>
|
||||
#include <alibabacloud/core/SimpleCredentialsProvider.h>
|
||||
|
||||
using namespace AlibabaCloud;
|
||||
using namespace AlibabaCloud::Location;
|
||||
using namespace AlibabaCloud::CCC;
|
||||
using namespace AlibabaCloud::CCC::Model;
|
||||
|
||||
CCCClient::CCCClient(const Credentials &credentials, const ClientConfiguration &configuration) :
|
||||
RpcServiceClient(std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), "CCC");
|
||||
}
|
||||
|
||||
CCCClient::CCCClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
|
||||
RpcServiceClient(credentialsProvider, configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), "CCC");
|
||||
}
|
||||
|
||||
CCCClient::CCCClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
|
||||
RpcServiceClient(std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), "CCC");
|
||||
}
|
||||
|
||||
CCCClient::~CCCClient()
|
||||
{}
|
||||
|
||||
CoreClient::EndpointOutcome CCCClient::endpoint()const
|
||||
{
|
||||
if(!configuration().endpoint().empty())
|
||||
return CoreClient::EndpointOutcome(configuration().endpoint());
|
||||
|
||||
auto endpoint = endpointProvider_->getEndpoint();
|
||||
|
||||
if (endpoint.empty())
|
||||
return CoreClient::EndpointOutcome(Error("InvalidEndpoint",""));
|
||||
else
|
||||
return CoreClient::EndpointOutcome(endpoint);
|
||||
}
|
||||
|
||||
CCCClient::ListRecordingsByContactIdOutcome CCCClient::listRecordingsByContactId(const ListRecordingsByContactIdRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListRecordingsByContactIdOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListRecordingsByContactIdOutcome(ListRecordingsByContactIdResult(outcome.result()));
|
||||
else
|
||||
return ListRecordingsByContactIdOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CCCClient::listRecordingsByContactIdAsync(const ListRecordingsByContactIdRequest& request, const ListRecordingsByContactIdAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listRecordingsByContactId(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CCCClient::ListRecordingsByContactIdOutcomeCallable CCCClient::listRecordingsByContactIdCallable(const ListRecordingsByContactIdRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListRecordingsByContactIdOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listRecordingsByContactId(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CCCClient::ListUsersOfSkillGroupOutcome CCCClient::listUsersOfSkillGroup(const ListUsersOfSkillGroupRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListUsersOfSkillGroupOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListUsersOfSkillGroupOutcome(ListUsersOfSkillGroupResult(outcome.result()));
|
||||
else
|
||||
return ListUsersOfSkillGroupOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CCCClient::listUsersOfSkillGroupAsync(const ListUsersOfSkillGroupRequest& request, const ListUsersOfSkillGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listUsersOfSkillGroup(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CCCClient::ListUsersOfSkillGroupOutcomeCallable CCCClient::listUsersOfSkillGroupCallable(const ListUsersOfSkillGroupRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListUsersOfSkillGroupOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listUsersOfSkillGroup(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CCCClient::DeleteSkillGroupOutcome CCCClient::deleteSkillGroup(const DeleteSkillGroupRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DeleteSkillGroupOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DeleteSkillGroupOutcome(DeleteSkillGroupResult(outcome.result()));
|
||||
else
|
||||
return DeleteSkillGroupOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CCCClient::deleteSkillGroupAsync(const DeleteSkillGroupRequest& request, const DeleteSkillGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, deleteSkillGroup(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CCCClient::DeleteSkillGroupOutcomeCallable CCCClient::deleteSkillGroupCallable(const DeleteSkillGroupRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DeleteSkillGroupOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->deleteSkillGroup(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CCCClient::ModifyPhoneNumberOutcome CCCClient::modifyPhoneNumber(const ModifyPhoneNumberRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ModifyPhoneNumberOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ModifyPhoneNumberOutcome(ModifyPhoneNumberResult(outcome.result()));
|
||||
else
|
||||
return ModifyPhoneNumberOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CCCClient::modifyPhoneNumberAsync(const ModifyPhoneNumberRequest& request, const ModifyPhoneNumberAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, modifyPhoneNumber(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CCCClient::ModifyPhoneNumberOutcomeCallable CCCClient::modifyPhoneNumberCallable(const ModifyPhoneNumberRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ModifyPhoneNumberOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->modifyPhoneNumber(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CCCClient::ListUsersOutcome CCCClient::listUsers(const ListUsersRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListUsersOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListUsersOutcome(ListUsersResult(outcome.result()));
|
||||
else
|
||||
return ListUsersOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CCCClient::listUsersAsync(const ListUsersRequest& request, const ListUsersAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listUsers(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CCCClient::ListUsersOutcomeCallable CCCClient::listUsersCallable(const ListUsersRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListUsersOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listUsers(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CCCClient::ListSkillGroupsOutcome CCCClient::listSkillGroups(const ListSkillGroupsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListSkillGroupsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListSkillGroupsOutcome(ListSkillGroupsResult(outcome.result()));
|
||||
else
|
||||
return ListSkillGroupsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CCCClient::listSkillGroupsAsync(const ListSkillGroupsRequest& request, const ListSkillGroupsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listSkillGroups(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CCCClient::ListSkillGroupsOutcomeCallable CCCClient::listSkillGroupsCallable(const ListSkillGroupsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListSkillGroupsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listSkillGroups(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CCCClient::ListSkillGroupsOfUserOutcome CCCClient::listSkillGroupsOfUser(const ListSkillGroupsOfUserRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListSkillGroupsOfUserOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListSkillGroupsOfUserOutcome(ListSkillGroupsOfUserResult(outcome.result()));
|
||||
else
|
||||
return ListSkillGroupsOfUserOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CCCClient::listSkillGroupsOfUserAsync(const ListSkillGroupsOfUserRequest& request, const ListSkillGroupsOfUserAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listSkillGroupsOfUser(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CCCClient::ListSkillGroupsOfUserOutcomeCallable CCCClient::listSkillGroupsOfUserCallable(const ListSkillGroupsOfUserRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListSkillGroupsOfUserOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listSkillGroupsOfUser(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CCCClient::RemovePhoneNumberOutcome CCCClient::removePhoneNumber(const RemovePhoneNumberRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return RemovePhoneNumberOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return RemovePhoneNumberOutcome(RemovePhoneNumberResult(outcome.result()));
|
||||
else
|
||||
return RemovePhoneNumberOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CCCClient::removePhoneNumberAsync(const RemovePhoneNumberRequest& request, const RemovePhoneNumberAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, removePhoneNumber(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CCCClient::RemovePhoneNumberOutcomeCallable CCCClient::removePhoneNumberCallable(const RemovePhoneNumberRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<RemovePhoneNumberOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->removePhoneNumber(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CCCClient::ListCallDetailRecordsOutcome CCCClient::listCallDetailRecords(const ListCallDetailRecordsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListCallDetailRecordsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListCallDetailRecordsOutcome(ListCallDetailRecordsResult(outcome.result()));
|
||||
else
|
||||
return ListCallDetailRecordsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CCCClient::listCallDetailRecordsAsync(const ListCallDetailRecordsRequest& request, const ListCallDetailRecordsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listCallDetailRecords(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CCCClient::ListCallDetailRecordsOutcomeCallable CCCClient::listCallDetailRecordsCallable(const ListCallDetailRecordsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListCallDetailRecordsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listCallDetailRecords(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CCCClient::AddPhoneNumberOutcome CCCClient::addPhoneNumber(const AddPhoneNumberRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return AddPhoneNumberOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return AddPhoneNumberOutcome(AddPhoneNumberResult(outcome.result()));
|
||||
else
|
||||
return AddPhoneNumberOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CCCClient::addPhoneNumberAsync(const AddPhoneNumberRequest& request, const AddPhoneNumberAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, addPhoneNumber(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CCCClient::AddPhoneNumberOutcomeCallable CCCClient::addPhoneNumberCallable(const AddPhoneNumberRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<AddPhoneNumberOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->addPhoneNumber(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CCCClient::ListRecordingsOutcome CCCClient::listRecordings(const ListRecordingsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListRecordingsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListRecordingsOutcome(ListRecordingsResult(outcome.result()));
|
||||
else
|
||||
return ListRecordingsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CCCClient::listRecordingsAsync(const ListRecordingsRequest& request, const ListRecordingsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listRecordings(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CCCClient::ListRecordingsOutcomeCallable CCCClient::listRecordingsCallable(const ListRecordingsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListRecordingsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listRecordings(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CCCClient::GetConfigOutcome CCCClient::getConfig(const GetConfigRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetConfigOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetConfigOutcome(GetConfigResult(outcome.result()));
|
||||
else
|
||||
return GetConfigOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CCCClient::getConfigAsync(const GetConfigRequest& request, const GetConfigAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getConfig(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CCCClient::GetConfigOutcomeCallable CCCClient::getConfigCallable(const GetConfigRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetConfigOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getConfig(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CCCClient::DownloadRecordingOutcome CCCClient::downloadRecording(const DownloadRecordingRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DownloadRecordingOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DownloadRecordingOutcome(DownloadRecordingResult(outcome.result()));
|
||||
else
|
||||
return DownloadRecordingOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CCCClient::downloadRecordingAsync(const DownloadRecordingRequest& request, const DownloadRecordingAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, downloadRecording(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CCCClient::DownloadRecordingOutcomeCallable CCCClient::downloadRecordingCallable(const DownloadRecordingRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DownloadRecordingOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->downloadRecording(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CCCClient::ListPhoneNumbersOutcome CCCClient::listPhoneNumbers(const ListPhoneNumbersRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListPhoneNumbersOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListPhoneNumbersOutcome(ListPhoneNumbersResult(outcome.result()));
|
||||
else
|
||||
return ListPhoneNumbersOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CCCClient::listPhoneNumbersAsync(const ListPhoneNumbersRequest& request, const ListPhoneNumbersAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listPhoneNumbers(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CCCClient::ListPhoneNumbersOutcomeCallable CCCClient::listPhoneNumbersCallable(const ListPhoneNumbersRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListPhoneNumbersOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listPhoneNumbers(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CCCClient::RefreshTokenOutcome CCCClient::refreshToken(const RefreshTokenRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return RefreshTokenOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return RefreshTokenOutcome(RefreshTokenResult(outcome.result()));
|
||||
else
|
||||
return RefreshTokenOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CCCClient::refreshTokenAsync(const RefreshTokenRequest& request, const RefreshTokenAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, refreshToken(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CCCClient::RefreshTokenOutcomeCallable CCCClient::refreshTokenCallable(const RefreshTokenRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<RefreshTokenOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->refreshToken(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CCCClient::RequestLoginInfoOutcome CCCClient::requestLoginInfo(const RequestLoginInfoRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return RequestLoginInfoOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return RequestLoginInfoOutcome(RequestLoginInfoResult(outcome.result()));
|
||||
else
|
||||
return RequestLoginInfoOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CCCClient::requestLoginInfoAsync(const RequestLoginInfoRequest& request, const RequestLoginInfoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, requestLoginInfo(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CCCClient::RequestLoginInfoOutcomeCallable CCCClient::requestLoginInfoCallable(const RequestLoginInfoRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<RequestLoginInfoOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->requestLoginInfo(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CCCClient::GetServiceExtensionsOutcome CCCClient::getServiceExtensions(const GetServiceExtensionsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetServiceExtensionsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetServiceExtensionsOutcome(GetServiceExtensionsResult(outcome.result()));
|
||||
else
|
||||
return GetServiceExtensionsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CCCClient::getServiceExtensionsAsync(const GetServiceExtensionsRequest& request, const GetServiceExtensionsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getServiceExtensions(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CCCClient::GetServiceExtensionsOutcomeCallable CCCClient::getServiceExtensionsCallable(const GetServiceExtensionsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetServiceExtensionsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getServiceExtensions(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CCCClient::ListContactFlowsOutcome CCCClient::listContactFlows(const ListContactFlowsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListContactFlowsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListContactFlowsOutcome(ListContactFlowsResult(outcome.result()));
|
||||
else
|
||||
return ListContactFlowsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CCCClient::listContactFlowsAsync(const ListContactFlowsRequest& request, const ListContactFlowsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listContactFlows(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CCCClient::ListContactFlowsOutcomeCallable CCCClient::listContactFlowsCallable(const ListContactFlowsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListContactFlowsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listContactFlows(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CCCClient::ListRolesOutcome CCCClient::listRoles(const ListRolesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListRolesOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListRolesOutcome(ListRolesResult(outcome.result()));
|
||||
else
|
||||
return ListRolesOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CCCClient::listRolesAsync(const ListRolesRequest& request, const ListRolesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listRoles(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CCCClient::ListRolesOutcomeCallable CCCClient::listRolesCallable(const ListRolesRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListRolesOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listRoles(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CCCClient::GetUserOutcome CCCClient::getUser(const GetUserRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetUserOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetUserOutcome(GetUserResult(outcome.result()));
|
||||
else
|
||||
return GetUserOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CCCClient::getUserAsync(const GetUserRequest& request, const GetUserAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getUser(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CCCClient::GetUserOutcomeCallable CCCClient::getUserCallable(const GetUserRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetUserOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getUser(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
82
ccc/src/model/AddPhoneNumberRequest.cc
Normal file
82
ccc/src/model/AddPhoneNumberRequest.cc
Normal 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/ccc/model/AddPhoneNumberRequest.h>
|
||||
|
||||
using AlibabaCloud::CCC::Model::AddPhoneNumberRequest;
|
||||
|
||||
AddPhoneNumberRequest::AddPhoneNumberRequest() :
|
||||
RpcServiceRequest("ccc", "2017-07-05", "AddPhoneNumber")
|
||||
{}
|
||||
|
||||
AddPhoneNumberRequest::~AddPhoneNumberRequest()
|
||||
{}
|
||||
|
||||
std::string AddPhoneNumberRequest::getContactFlowId()const
|
||||
{
|
||||
return contactFlowId_;
|
||||
}
|
||||
|
||||
void AddPhoneNumberRequest::setContactFlowId(const std::string& contactFlowId)
|
||||
{
|
||||
contactFlowId_ = contactFlowId;
|
||||
setParameter("ContactFlowId", contactFlowId);
|
||||
}
|
||||
|
||||
std::string AddPhoneNumberRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void AddPhoneNumberRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string AddPhoneNumberRequest::getUsage()const
|
||||
{
|
||||
return usage_;
|
||||
}
|
||||
|
||||
void AddPhoneNumberRequest::setUsage(const std::string& usage)
|
||||
{
|
||||
usage_ = usage;
|
||||
setParameter("Usage", usage);
|
||||
}
|
||||
|
||||
std::string AddPhoneNumberRequest::getPhoneNumber()const
|
||||
{
|
||||
return phoneNumber_;
|
||||
}
|
||||
|
||||
void AddPhoneNumberRequest::setPhoneNumber(const std::string& phoneNumber)
|
||||
{
|
||||
phoneNumber_ = phoneNumber;
|
||||
setParameter("PhoneNumber", phoneNumber);
|
||||
}
|
||||
|
||||
std::string AddPhoneNumberRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void AddPhoneNumberRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
118
ccc/src/model/AddPhoneNumberResult.cc
Normal file
118
ccc/src/model/AddPhoneNumberResult.cc
Normal file
@@ -0,0 +1,118 @@
|
||||
/*
|
||||
* 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/ccc/model/AddPhoneNumberResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::CCC;
|
||||
using namespace AlibabaCloud::CCC::Model;
|
||||
|
||||
AddPhoneNumberResult::AddPhoneNumberResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
AddPhoneNumberResult::AddPhoneNumberResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
AddPhoneNumberResult::~AddPhoneNumberResult()
|
||||
{}
|
||||
|
||||
void AddPhoneNumberResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allPhoneNumber = value["PhoneNumber"];
|
||||
for (auto value : allPhoneNumber)
|
||||
{
|
||||
PhoneNumber phoneNumberObject;
|
||||
if(!value["PhoneNumberId"].isNull())
|
||||
phoneNumberObject.phoneNumberId = value["PhoneNumberId"].asString();
|
||||
if(!value["InstanceId"].isNull())
|
||||
phoneNumberObject.instanceId = value["InstanceId"].asString();
|
||||
if(!value["Number"].isNull())
|
||||
phoneNumberObject.number = value["Number"].asString();
|
||||
if(!value["PhoneNumberDescription"].isNull())
|
||||
phoneNumberObject.phoneNumberDescription = value["PhoneNumberDescription"].asString();
|
||||
if(!value["TestOnly"].isNull())
|
||||
phoneNumberObject.testOnly = value["TestOnly"].asString() == "true";
|
||||
if(!value["RemainingTime"].isNull())
|
||||
phoneNumberObject.remainingTime = std::stoi(value["RemainingTime"].asString());
|
||||
if(!value["AllowOutbound"].isNull())
|
||||
phoneNumberObject.allowOutbound = value["AllowOutbound"].asString() == "true";
|
||||
if(!value["Usage"].isNull())
|
||||
phoneNumberObject.usage = value["Usage"].asString();
|
||||
if(!value["Trunks"].isNull())
|
||||
phoneNumberObject.trunks = std::stoi(value["Trunks"].asString());
|
||||
auto allContactFlow = value["ContactFlow"];
|
||||
for (auto value : allContactFlow)
|
||||
{
|
||||
PhoneNumber::ContactFlow contactFlowObject;
|
||||
if(!value["ContactFlowId"].isNull())
|
||||
contactFlowObject.contactFlowId = value["ContactFlowId"].asString();
|
||||
if(!value["InstanceId"].isNull())
|
||||
contactFlowObject.instanceId = value["InstanceId"].asString();
|
||||
if(!value["ContactFlowName"].isNull())
|
||||
contactFlowObject.contactFlowName = value["ContactFlowName"].asString();
|
||||
if(!value["ContactFlowDescription"].isNull())
|
||||
contactFlowObject.contactFlowDescription = value["ContactFlowDescription"].asString();
|
||||
if(!value["Type"].isNull())
|
||||
contactFlowObject.type = value["Type"].asString();
|
||||
phoneNumberObject.contactFlow.push_back(contactFlowObject);
|
||||
}
|
||||
phoneNumber_.push_back(phoneNumberObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::string AddPhoneNumberResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int AddPhoneNumberResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
std::vector<AddPhoneNumberResult::PhoneNumber> AddPhoneNumberResult::getPhoneNumber()const
|
||||
{
|
||||
return phoneNumber_;
|
||||
}
|
||||
|
||||
std::string AddPhoneNumberResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool AddPhoneNumberResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
60
ccc/src/model/DeleteSkillGroupRequest.cc
Normal file
60
ccc/src/model/DeleteSkillGroupRequest.cc
Normal 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/ccc/model/DeleteSkillGroupRequest.h>
|
||||
|
||||
using AlibabaCloud::CCC::Model::DeleteSkillGroupRequest;
|
||||
|
||||
DeleteSkillGroupRequest::DeleteSkillGroupRequest() :
|
||||
RpcServiceRequest("ccc", "2017-07-05", "DeleteSkillGroup")
|
||||
{}
|
||||
|
||||
DeleteSkillGroupRequest::~DeleteSkillGroupRequest()
|
||||
{}
|
||||
|
||||
std::string DeleteSkillGroupRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void DeleteSkillGroupRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string DeleteSkillGroupRequest::getSkillGroupId()const
|
||||
{
|
||||
return skillGroupId_;
|
||||
}
|
||||
|
||||
void DeleteSkillGroupRequest::setSkillGroupId(const std::string& skillGroupId)
|
||||
{
|
||||
skillGroupId_ = skillGroupId;
|
||||
setParameter("SkillGroupId", skillGroupId);
|
||||
}
|
||||
|
||||
std::string DeleteSkillGroupRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void DeleteSkillGroupRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
73
ccc/src/model/DeleteSkillGroupResult.cc
Normal file
73
ccc/src/model/DeleteSkillGroupResult.cc
Normal file
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* 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/ccc/model/DeleteSkillGroupResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::CCC;
|
||||
using namespace AlibabaCloud::CCC::Model;
|
||||
|
||||
DeleteSkillGroupResult::DeleteSkillGroupResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeleteSkillGroupResult::DeleteSkillGroupResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeleteSkillGroupResult::~DeleteSkillGroupResult()
|
||||
{}
|
||||
|
||||
void DeleteSkillGroupResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::string DeleteSkillGroupResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int DeleteSkillGroupResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
std::string DeleteSkillGroupResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool DeleteSkillGroupResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
71
ccc/src/model/DownloadRecordingRequest.cc
Normal file
71
ccc/src/model/DownloadRecordingRequest.cc
Normal 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/ccc/model/DownloadRecordingRequest.h>
|
||||
|
||||
using AlibabaCloud::CCC::Model::DownloadRecordingRequest;
|
||||
|
||||
DownloadRecordingRequest::DownloadRecordingRequest() :
|
||||
RpcServiceRequest("ccc", "2017-07-05", "DownloadRecording")
|
||||
{}
|
||||
|
||||
DownloadRecordingRequest::~DownloadRecordingRequest()
|
||||
{}
|
||||
|
||||
std::string DownloadRecordingRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void DownloadRecordingRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string DownloadRecordingRequest::getFileName()const
|
||||
{
|
||||
return fileName_;
|
||||
}
|
||||
|
||||
void DownloadRecordingRequest::setFileName(const std::string& fileName)
|
||||
{
|
||||
fileName_ = fileName;
|
||||
setParameter("FileName", fileName);
|
||||
}
|
||||
|
||||
std::string DownloadRecordingRequest::getChannel()const
|
||||
{
|
||||
return channel_;
|
||||
}
|
||||
|
||||
void DownloadRecordingRequest::setChannel(const std::string& channel)
|
||||
{
|
||||
channel_ = channel;
|
||||
setParameter("Channel", channel);
|
||||
}
|
||||
|
||||
std::string DownloadRecordingRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void DownloadRecordingRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
88
ccc/src/model/DownloadRecordingResult.cc
Normal file
88
ccc/src/model/DownloadRecordingResult.cc
Normal file
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/ccc/model/DownloadRecordingResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::CCC;
|
||||
using namespace AlibabaCloud::CCC::Model;
|
||||
|
||||
DownloadRecordingResult::DownloadRecordingResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DownloadRecordingResult::DownloadRecordingResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DownloadRecordingResult::~DownloadRecordingResult()
|
||||
{}
|
||||
|
||||
void DownloadRecordingResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allMediaDownloadParam = value["MediaDownloadParam"];
|
||||
for (auto value : allMediaDownloadParam)
|
||||
{
|
||||
MediaDownloadParam mediaDownloadParamObject;
|
||||
if(!value["SignatureUrl"].isNull())
|
||||
mediaDownloadParamObject.signatureUrl = value["SignatureUrl"].asString();
|
||||
if(!value["FileName"].isNull())
|
||||
mediaDownloadParamObject.fileName = value["FileName"].asString();
|
||||
mediaDownloadParam_.push_back(mediaDownloadParamObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::vector<DownloadRecordingResult::MediaDownloadParam> DownloadRecordingResult::getMediaDownloadParam()const
|
||||
{
|
||||
return mediaDownloadParam_;
|
||||
}
|
||||
|
||||
std::string DownloadRecordingResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int DownloadRecordingResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
std::string DownloadRecordingResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool DownloadRecordingResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
82
ccc/src/model/GetConfigRequest.cc
Normal file
82
ccc/src/model/GetConfigRequest.cc
Normal 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/ccc/model/GetConfigRequest.h>
|
||||
|
||||
using AlibabaCloud::CCC::Model::GetConfigRequest;
|
||||
|
||||
GetConfigRequest::GetConfigRequest() :
|
||||
RpcServiceRequest("ccc", "2017-07-05", "GetConfig")
|
||||
{}
|
||||
|
||||
GetConfigRequest::~GetConfigRequest()
|
||||
{}
|
||||
|
||||
std::string GetConfigRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void GetConfigRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string GetConfigRequest::getName()const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
||||
void GetConfigRequest::setName(const std::string& name)
|
||||
{
|
||||
name_ = name;
|
||||
setParameter("Name", name);
|
||||
}
|
||||
|
||||
std::string GetConfigRequest::getObjectType()const
|
||||
{
|
||||
return objectType_;
|
||||
}
|
||||
|
||||
void GetConfigRequest::setObjectType(const std::string& objectType)
|
||||
{
|
||||
objectType_ = objectType;
|
||||
setParameter("ObjectType", objectType);
|
||||
}
|
||||
|
||||
std::string GetConfigRequest::getObjectId()const
|
||||
{
|
||||
return objectId_;
|
||||
}
|
||||
|
||||
void GetConfigRequest::setObjectId(const std::string& objectId)
|
||||
{
|
||||
objectId_ = objectId;
|
||||
setParameter("ObjectId", objectId);
|
||||
}
|
||||
|
||||
std::string GetConfigRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void GetConfigRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
88
ccc/src/model/GetConfigResult.cc
Normal file
88
ccc/src/model/GetConfigResult.cc
Normal file
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/ccc/model/GetConfigResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::CCC;
|
||||
using namespace AlibabaCloud::CCC::Model;
|
||||
|
||||
GetConfigResult::GetConfigResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetConfigResult::GetConfigResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetConfigResult::~GetConfigResult()
|
||||
{}
|
||||
|
||||
void GetConfigResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allConfigItem = value["ConfigItem"];
|
||||
for (auto value : allConfigItem)
|
||||
{
|
||||
ConfigItem configItemObject;
|
||||
if(!value["Name"].isNull())
|
||||
configItemObject.name = value["Name"].asString();
|
||||
if(!value["Value"].isNull())
|
||||
configItemObject.value = value["Value"].asString();
|
||||
configItem_.push_back(configItemObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::string GetConfigResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int GetConfigResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
std::vector<GetConfigResult::ConfigItem> GetConfigResult::getConfigItem()const
|
||||
{
|
||||
return configItem_;
|
||||
}
|
||||
|
||||
std::string GetConfigResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool GetConfigResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
60
ccc/src/model/GetServiceExtensionsRequest.cc
Normal file
60
ccc/src/model/GetServiceExtensionsRequest.cc
Normal 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/ccc/model/GetServiceExtensionsRequest.h>
|
||||
|
||||
using AlibabaCloud::CCC::Model::GetServiceExtensionsRequest;
|
||||
|
||||
GetServiceExtensionsRequest::GetServiceExtensionsRequest() :
|
||||
RpcServiceRequest("ccc", "2017-07-05", "GetServiceExtensions")
|
||||
{}
|
||||
|
||||
GetServiceExtensionsRequest::~GetServiceExtensionsRequest()
|
||||
{}
|
||||
|
||||
std::string GetServiceExtensionsRequest::getServiceType()const
|
||||
{
|
||||
return serviceType_;
|
||||
}
|
||||
|
||||
void GetServiceExtensionsRequest::setServiceType(const std::string& serviceType)
|
||||
{
|
||||
serviceType_ = serviceType;
|
||||
setParameter("ServiceType", serviceType);
|
||||
}
|
||||
|
||||
std::string GetServiceExtensionsRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void GetServiceExtensionsRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string GetServiceExtensionsRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void GetServiceExtensionsRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
88
ccc/src/model/GetServiceExtensionsResult.cc
Normal file
88
ccc/src/model/GetServiceExtensionsResult.cc
Normal file
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/ccc/model/GetServiceExtensionsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::CCC;
|
||||
using namespace AlibabaCloud::CCC::Model;
|
||||
|
||||
GetServiceExtensionsResult::GetServiceExtensionsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetServiceExtensionsResult::GetServiceExtensionsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetServiceExtensionsResult::~GetServiceExtensionsResult()
|
||||
{}
|
||||
|
||||
void GetServiceExtensionsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allServiceExtensions = value["ServiceExtensions"]["ServiceExtension"];
|
||||
for (auto value : allServiceExtensions)
|
||||
{
|
||||
ServiceExtension serviceExtensionsObject;
|
||||
if(!value["Name"].isNull())
|
||||
serviceExtensionsObject.name = value["Name"].asString();
|
||||
if(!value["Number"].isNull())
|
||||
serviceExtensionsObject.number = value["Number"].asString();
|
||||
serviceExtensions_.push_back(serviceExtensionsObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::string GetServiceExtensionsResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int GetServiceExtensionsResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
std::vector<GetServiceExtensionsResult::ServiceExtension> GetServiceExtensionsResult::getServiceExtensions()const
|
||||
{
|
||||
return serviceExtensions_;
|
||||
}
|
||||
|
||||
std::string GetServiceExtensionsResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool GetServiceExtensionsResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
60
ccc/src/model/GetUserRequest.cc
Normal file
60
ccc/src/model/GetUserRequest.cc
Normal 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/ccc/model/GetUserRequest.h>
|
||||
|
||||
using AlibabaCloud::CCC::Model::GetUserRequest;
|
||||
|
||||
GetUserRequest::GetUserRequest() :
|
||||
RpcServiceRequest("ccc", "2017-07-05", "GetUser")
|
||||
{}
|
||||
|
||||
GetUserRequest::~GetUserRequest()
|
||||
{}
|
||||
|
||||
std::string GetUserRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void GetUserRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string GetUserRequest::getUserId()const
|
||||
{
|
||||
return userId_;
|
||||
}
|
||||
|
||||
void GetUserRequest::setUserId(const std::string& userId)
|
||||
{
|
||||
userId_ = userId;
|
||||
setParameter("UserId", userId);
|
||||
}
|
||||
|
||||
std::string GetUserRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void GetUserRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
144
ccc/src/model/GetUserResult.cc
Normal file
144
ccc/src/model/GetUserResult.cc
Normal file
@@ -0,0 +1,144 @@
|
||||
/*
|
||||
* 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/ccc/model/GetUserResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::CCC;
|
||||
using namespace AlibabaCloud::CCC::Model;
|
||||
|
||||
GetUserResult::GetUserResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetUserResult::GetUserResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetUserResult::~GetUserResult()
|
||||
{}
|
||||
|
||||
void GetUserResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allUser = value["User"];
|
||||
for (auto value : allUser)
|
||||
{
|
||||
User userObject;
|
||||
if(!value["UserId"].isNull())
|
||||
userObject.userId = value["UserId"].asString();
|
||||
if(!value["RamId"].isNull())
|
||||
userObject.ramId = value["RamId"].asString();
|
||||
if(!value["InstanceId"].isNull())
|
||||
userObject.instanceId = value["InstanceId"].asString();
|
||||
auto allRoles = value["Roles"]["Role"];
|
||||
for (auto value : allRoles)
|
||||
{
|
||||
User::Role roleObject;
|
||||
if(!value["RoleId"].isNull())
|
||||
roleObject.roleId = value["RoleId"].asString();
|
||||
if(!value["InstanceId"].isNull())
|
||||
roleObject.instanceId = value["InstanceId"].asString();
|
||||
if(!value["RoleName"].isNull())
|
||||
roleObject.roleName = value["RoleName"].asString();
|
||||
if(!value["RoleDescription"].isNull())
|
||||
roleObject.roleDescription = value["RoleDescription"].asString();
|
||||
userObject.roles.push_back(roleObject);
|
||||
}
|
||||
auto allSkillLevels = value["SkillLevels"]["SkillLevel"];
|
||||
for (auto value : allSkillLevels)
|
||||
{
|
||||
User::SkillLevel skillLevelObject;
|
||||
if(!value["SkillLevelId"].isNull())
|
||||
skillLevelObject.skillLevelId = value["SkillLevelId"].asString();
|
||||
if(!value["Level"].isNull())
|
||||
skillLevelObject.level = std::stoi(value["Level"].asString());
|
||||
auto allSkill = value["Skill"];
|
||||
for (auto value : allSkill)
|
||||
{
|
||||
User::SkillLevel::Skill skillObject;
|
||||
if(!value["SkillGroupId"].isNull())
|
||||
skillObject.skillGroupId = value["SkillGroupId"].asString();
|
||||
if(!value["InstanceId"].isNull())
|
||||
skillObject.instanceId = value["InstanceId"].asString();
|
||||
if(!value["SkillGroupName"].isNull())
|
||||
skillObject.skillGroupName = value["SkillGroupName"].asString();
|
||||
if(!value["SkillGroupDescription"].isNull())
|
||||
skillObject.skillGroupDescription = value["SkillGroupDescription"].asString();
|
||||
skillLevelObject.skill.push_back(skillObject);
|
||||
}
|
||||
userObject.skillLevels.push_back(skillLevelObject);
|
||||
}
|
||||
auto allDetail = value["Detail"];
|
||||
for (auto value : allDetail)
|
||||
{
|
||||
User::Detail detailObject;
|
||||
if(!value["LoginName"].isNull())
|
||||
detailObject.loginName = value["LoginName"].asString();
|
||||
if(!value["DisplayName"].isNull())
|
||||
detailObject.displayName = value["DisplayName"].asString();
|
||||
if(!value["Phone"].isNull())
|
||||
detailObject.phone = value["Phone"].asString();
|
||||
if(!value["Email"].isNull())
|
||||
detailObject.email = value["Email"].asString();
|
||||
if(!value["Department"].isNull())
|
||||
detailObject.department = value["Department"].asString();
|
||||
userObject.detail.push_back(detailObject);
|
||||
}
|
||||
user_.push_back(userObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::vector<GetUserResult::User> GetUserResult::getUser()const
|
||||
{
|
||||
return user_;
|
||||
}
|
||||
|
||||
std::string GetUserResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int GetUserResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
std::string GetUserResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool GetUserResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
148
ccc/src/model/ListCallDetailRecordsRequest.cc
Normal file
148
ccc/src/model/ListCallDetailRecordsRequest.cc
Normal file
@@ -0,0 +1,148 @@
|
||||
/*
|
||||
* 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/ccc/model/ListCallDetailRecordsRequest.h>
|
||||
|
||||
using AlibabaCloud::CCC::Model::ListCallDetailRecordsRequest;
|
||||
|
||||
ListCallDetailRecordsRequest::ListCallDetailRecordsRequest() :
|
||||
RpcServiceRequest("ccc", "2017-07-05", "ListCallDetailRecords")
|
||||
{}
|
||||
|
||||
ListCallDetailRecordsRequest::~ListCallDetailRecordsRequest()
|
||||
{}
|
||||
|
||||
std::string ListCallDetailRecordsRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void ListCallDetailRecordsRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string ListCallDetailRecordsRequest::getContactDisposition()const
|
||||
{
|
||||
return contactDisposition_;
|
||||
}
|
||||
|
||||
void ListCallDetailRecordsRequest::setContactDisposition(const std::string& contactDisposition)
|
||||
{
|
||||
contactDisposition_ = contactDisposition;
|
||||
setParameter("ContactDisposition", contactDisposition);
|
||||
}
|
||||
|
||||
std::string ListCallDetailRecordsRequest::getContactType()const
|
||||
{
|
||||
return contactType_;
|
||||
}
|
||||
|
||||
void ListCallDetailRecordsRequest::setContactType(const std::string& contactType)
|
||||
{
|
||||
contactType_ = contactType;
|
||||
setParameter("ContactType", contactType);
|
||||
}
|
||||
|
||||
std::string ListCallDetailRecordsRequest::getCriteria()const
|
||||
{
|
||||
return criteria_;
|
||||
}
|
||||
|
||||
void ListCallDetailRecordsRequest::setCriteria(const std::string& criteria)
|
||||
{
|
||||
criteria_ = criteria;
|
||||
setParameter("Criteria", criteria);
|
||||
}
|
||||
|
||||
std::string ListCallDetailRecordsRequest::getPhoneNumber()const
|
||||
{
|
||||
return phoneNumber_;
|
||||
}
|
||||
|
||||
void ListCallDetailRecordsRequest::setPhoneNumber(const std::string& phoneNumber)
|
||||
{
|
||||
phoneNumber_ = phoneNumber;
|
||||
setParameter("PhoneNumber", phoneNumber);
|
||||
}
|
||||
|
||||
int ListCallDetailRecordsRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void ListCallDetailRecordsRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
long ListCallDetailRecordsRequest::getStartTime()const
|
||||
{
|
||||
return startTime_;
|
||||
}
|
||||
|
||||
void ListCallDetailRecordsRequest::setStartTime(long startTime)
|
||||
{
|
||||
startTime_ = startTime;
|
||||
setParameter("StartTime", std::to_string(startTime));
|
||||
}
|
||||
|
||||
long ListCallDetailRecordsRequest::getStopTime()const
|
||||
{
|
||||
return stopTime_;
|
||||
}
|
||||
|
||||
void ListCallDetailRecordsRequest::setStopTime(long stopTime)
|
||||
{
|
||||
stopTime_ = stopTime;
|
||||
setParameter("StopTime", std::to_string(stopTime));
|
||||
}
|
||||
|
||||
int ListCallDetailRecordsRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void ListCallDetailRecordsRequest::setPageNumber(int pageNumber)
|
||||
{
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
std::string ListCallDetailRecordsRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void ListCallDetailRecordsRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
bool ListCallDetailRecordsRequest::getWithRecording()const
|
||||
{
|
||||
return withRecording_;
|
||||
}
|
||||
|
||||
void ListCallDetailRecordsRequest::setWithRecording(bool withRecording)
|
||||
{
|
||||
withRecording_ = withRecording;
|
||||
setParameter("WithRecording", std::to_string(withRecording));
|
||||
}
|
||||
|
||||
178
ccc/src/model/ListCallDetailRecordsResult.cc
Normal file
178
ccc/src/model/ListCallDetailRecordsResult.cc
Normal file
@@ -0,0 +1,178 @@
|
||||
/*
|
||||
* 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/ccc/model/ListCallDetailRecordsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::CCC;
|
||||
using namespace AlibabaCloud::CCC::Model;
|
||||
|
||||
ListCallDetailRecordsResult::ListCallDetailRecordsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListCallDetailRecordsResult::ListCallDetailRecordsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListCallDetailRecordsResult::~ListCallDetailRecordsResult()
|
||||
{}
|
||||
|
||||
void ListCallDetailRecordsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allCallDetailRecords = value["CallDetailRecords"];
|
||||
for (auto value : allCallDetailRecords)
|
||||
{
|
||||
CallDetailRecords callDetailRecordsObject;
|
||||
if(!value["TotalCount"].isNull())
|
||||
callDetailRecordsObject.totalCount = std::stoi(value["TotalCount"].asString());
|
||||
if(!value["PageNumber"].isNull())
|
||||
callDetailRecordsObject.pageNumber = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
callDetailRecordsObject.pageSize = std::stoi(value["PageSize"].asString());
|
||||
auto allList = value["List"]["CallDetailRecord"];
|
||||
for (auto value : allList)
|
||||
{
|
||||
CallDetailRecords::CallDetailRecord callDetailRecordObject;
|
||||
if(!value["ContactId"].isNull())
|
||||
callDetailRecordObject.contactId = value["ContactId"].asString();
|
||||
if(!value["StartTime"].isNull())
|
||||
callDetailRecordObject.startTime = std::stol(value["StartTime"].asString());
|
||||
if(!value["Duration"].isNull())
|
||||
callDetailRecordObject.duration = std::stoi(value["Duration"].asString());
|
||||
if(!value["Satisfaction"].isNull())
|
||||
callDetailRecordObject.satisfaction = std::stoi(value["Satisfaction"].asString());
|
||||
if(!value["ContactType"].isNull())
|
||||
callDetailRecordObject.contactType = value["ContactType"].asString();
|
||||
if(!value["ContactDisposition"].isNull())
|
||||
callDetailRecordObject.contactDisposition = value["ContactDisposition"].asString();
|
||||
if(!value["CallingNumber"].isNull())
|
||||
callDetailRecordObject.callingNumber = value["CallingNumber"].asString();
|
||||
if(!value["CalledNumber"].isNull())
|
||||
callDetailRecordObject.calledNumber = value["CalledNumber"].asString();
|
||||
if(!value["AgentNames"].isNull())
|
||||
callDetailRecordObject.agentNames = value["AgentNames"].asString();
|
||||
if(!value["SkillGroupNames"].isNull())
|
||||
callDetailRecordObject.skillGroupNames = value["SkillGroupNames"].asString();
|
||||
if(!value["InstanceId"].isNull())
|
||||
callDetailRecordObject.instanceId = value["InstanceId"].asString();
|
||||
if(!value["ExtraAttr"].isNull())
|
||||
callDetailRecordObject.extraAttr = value["ExtraAttr"].asString();
|
||||
auto allAgents = value["Agents"]["CallDetailAgent"];
|
||||
for (auto value : allAgents)
|
||||
{
|
||||
CallDetailRecords::CallDetailRecord::CallDetailAgent agentsObject;
|
||||
if(!value["ContactId"].isNull())
|
||||
agentsObject.contactId = value["ContactId"].asString();
|
||||
if(!value["AgentId"].isNull())
|
||||
agentsObject.agentId = value["AgentId"].asString();
|
||||
if(!value["AgentName"].isNull())
|
||||
agentsObject.agentName = value["AgentName"].asString();
|
||||
if(!value["SkillGroupName"].isNull())
|
||||
agentsObject.skillGroupName = value["SkillGroupName"].asString();
|
||||
if(!value["QueueTime"].isNull())
|
||||
agentsObject.queueTime = std::stoi(value["QueueTime"].asString());
|
||||
if(!value["RingTime"].isNull())
|
||||
agentsObject.ringTime = std::stoi(value["RingTime"].asString());
|
||||
if(!value["StartTime"].isNull())
|
||||
agentsObject.startTime = std::stol(value["StartTime"].asString());
|
||||
if(!value["TalkTime"].isNull())
|
||||
agentsObject.talkTime = std::stoi(value["TalkTime"].asString());
|
||||
if(!value["HoldTime"].isNull())
|
||||
agentsObject.holdTime = std::stoi(value["HoldTime"].asString());
|
||||
if(!value["WorkTime"].isNull())
|
||||
agentsObject.workTime = std::stoi(value["WorkTime"].asString());
|
||||
callDetailRecordObject.agents.push_back(agentsObject);
|
||||
}
|
||||
auto allRecordings = value["Recordings"]["Recording"];
|
||||
for (auto value : allRecordings)
|
||||
{
|
||||
CallDetailRecords::CallDetailRecord::Recording recordingsObject;
|
||||
if(!value["ContactId"].isNull())
|
||||
recordingsObject.contactId = value["ContactId"].asString();
|
||||
if(!value["ContactType"].isNull())
|
||||
recordingsObject.contactType = value["ContactType"].asString();
|
||||
if(!value["AgentId"].isNull())
|
||||
recordingsObject.agentId = value["AgentId"].asString();
|
||||
if(!value["AgentName"].isNull())
|
||||
recordingsObject.agentName = value["AgentName"].asString();
|
||||
if(!value["CallingNumber"].isNull())
|
||||
recordingsObject.callingNumber = value["CallingNumber"].asString();
|
||||
if(!value["CalledNumber"].isNull())
|
||||
recordingsObject.calledNumber = value["CalledNumber"].asString();
|
||||
if(!value["StartTime"].isNull())
|
||||
recordingsObject.startTime = std::stol(value["StartTime"].asString());
|
||||
if(!value["Duration"].isNull())
|
||||
recordingsObject.duration = std::stoi(value["Duration"].asString());
|
||||
if(!value["FileName"].isNull())
|
||||
recordingsObject.fileName = value["FileName"].asString();
|
||||
if(!value["FilePath"].isNull())
|
||||
recordingsObject.filePath = value["FilePath"].asString();
|
||||
if(!value["FileDescription"].isNull())
|
||||
recordingsObject.fileDescription = value["FileDescription"].asString();
|
||||
if(!value["Channel"].isNull())
|
||||
recordingsObject.channel = value["Channel"].asString();
|
||||
if(!value["InstanceId"].isNull())
|
||||
recordingsObject.instanceId = value["InstanceId"].asString();
|
||||
callDetailRecordObject.recordings.push_back(recordingsObject);
|
||||
}
|
||||
callDetailRecordsObject.list.push_back(callDetailRecordObject);
|
||||
}
|
||||
callDetailRecords_.push_back(callDetailRecordsObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::string ListCallDetailRecordsResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::vector<ListCallDetailRecordsResult::CallDetailRecords> ListCallDetailRecordsResult::getCallDetailRecords()const
|
||||
{
|
||||
return callDetailRecords_;
|
||||
}
|
||||
|
||||
int ListCallDetailRecordsResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
std::string ListCallDetailRecordsResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool ListCallDetailRecordsResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
49
ccc/src/model/ListContactFlowsRequest.cc
Normal file
49
ccc/src/model/ListContactFlowsRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/ccc/model/ListContactFlowsRequest.h>
|
||||
|
||||
using AlibabaCloud::CCC::Model::ListContactFlowsRequest;
|
||||
|
||||
ListContactFlowsRequest::ListContactFlowsRequest() :
|
||||
RpcServiceRequest("ccc", "2017-07-05", "ListContactFlows")
|
||||
{}
|
||||
|
||||
ListContactFlowsRequest::~ListContactFlowsRequest()
|
||||
{}
|
||||
|
||||
std::string ListContactFlowsRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void ListContactFlowsRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string ListContactFlowsRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void ListContactFlowsRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
140
ccc/src/model/ListContactFlowsResult.cc
Normal file
140
ccc/src/model/ListContactFlowsResult.cc
Normal file
@@ -0,0 +1,140 @@
|
||||
/*
|
||||
* 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/ccc/model/ListContactFlowsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::CCC;
|
||||
using namespace AlibabaCloud::CCC::Model;
|
||||
|
||||
ListContactFlowsResult::ListContactFlowsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListContactFlowsResult::ListContactFlowsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListContactFlowsResult::~ListContactFlowsResult()
|
||||
{}
|
||||
|
||||
void ListContactFlowsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allContactFlows = value["ContactFlows"]["ContactFlow"];
|
||||
for (auto value : allContactFlows)
|
||||
{
|
||||
ContactFlow contactFlowsObject;
|
||||
if(!value["ContactFlowId"].isNull())
|
||||
contactFlowsObject.contactFlowId = value["ContactFlowId"].asString();
|
||||
if(!value["InstanceId"].isNull())
|
||||
contactFlowsObject.instanceId = value["InstanceId"].asString();
|
||||
if(!value["ContactFlowName"].isNull())
|
||||
contactFlowsObject.contactFlowName = value["ContactFlowName"].asString();
|
||||
if(!value["ContactFlowDescription"].isNull())
|
||||
contactFlowsObject.contactFlowDescription = value["ContactFlowDescription"].asString();
|
||||
if(!value["Type"].isNull())
|
||||
contactFlowsObject.type = value["Type"].asString();
|
||||
if(!value["AppliedVersion"].isNull())
|
||||
contactFlowsObject.appliedVersion = value["AppliedVersion"].asString();
|
||||
auto allVersions = value["Versions"]["ContactFlowVersion"];
|
||||
for (auto value : allVersions)
|
||||
{
|
||||
ContactFlow::ContactFlowVersion versionsObject;
|
||||
if(!value["ContactFlowVersionId"].isNull())
|
||||
versionsObject.contactFlowVersionId = value["ContactFlowVersionId"].asString();
|
||||
if(!value["Version"].isNull())
|
||||
versionsObject.version = value["Version"].asString();
|
||||
if(!value["ContactFlowVersionDescription"].isNull())
|
||||
versionsObject.contactFlowVersionDescription = value["ContactFlowVersionDescription"].asString();
|
||||
if(!value["LastModified"].isNull())
|
||||
versionsObject.lastModified = value["LastModified"].asString();
|
||||
if(!value["LastModifiedBy"].isNull())
|
||||
versionsObject.lastModifiedBy = value["LastModifiedBy"].asString();
|
||||
if(!value["LockedBy"].isNull())
|
||||
versionsObject.lockedBy = value["LockedBy"].asString();
|
||||
if(!value["Status"].isNull())
|
||||
versionsObject.status = value["Status"].asString();
|
||||
contactFlowsObject.versions.push_back(versionsObject);
|
||||
}
|
||||
auto allPhoneNumbers = value["PhoneNumbers"]["PhoneNumber"];
|
||||
for (auto value : allPhoneNumbers)
|
||||
{
|
||||
ContactFlow::PhoneNumber phoneNumbersObject;
|
||||
if(!value["PhoneNumberId"].isNull())
|
||||
phoneNumbersObject.phoneNumberId = value["PhoneNumberId"].asString();
|
||||
if(!value["InstanceId"].isNull())
|
||||
phoneNumbersObject.instanceId = value["InstanceId"].asString();
|
||||
if(!value["Number"].isNull())
|
||||
phoneNumbersObject.number = value["Number"].asString();
|
||||
if(!value["PhoneNumberDescription"].isNull())
|
||||
phoneNumbersObject.phoneNumberDescription = value["PhoneNumberDescription"].asString();
|
||||
if(!value["TestOnly"].isNull())
|
||||
phoneNumbersObject.testOnly = value["TestOnly"].asString() == "true";
|
||||
if(!value["RemainingTime"].isNull())
|
||||
phoneNumbersObject.remainingTime = std::stoi(value["RemainingTime"].asString());
|
||||
if(!value["AllowOutbound"].isNull())
|
||||
phoneNumbersObject.allowOutbound = value["AllowOutbound"].asString() == "true";
|
||||
if(!value["Usage"].isNull())
|
||||
phoneNumbersObject.usage = value["Usage"].asString();
|
||||
if(!value["Trunks"].isNull())
|
||||
phoneNumbersObject.trunks = std::stoi(value["Trunks"].asString());
|
||||
contactFlowsObject.phoneNumbers.push_back(phoneNumbersObject);
|
||||
}
|
||||
contactFlows_.push_back(contactFlowsObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::string ListContactFlowsResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::vector<ListContactFlowsResult::ContactFlow> ListContactFlowsResult::getContactFlows()const
|
||||
{
|
||||
return contactFlows_;
|
||||
}
|
||||
|
||||
int ListContactFlowsResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
std::string ListContactFlowsResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool ListContactFlowsResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
60
ccc/src/model/ListPhoneNumbersRequest.cc
Normal file
60
ccc/src/model/ListPhoneNumbersRequest.cc
Normal 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/ccc/model/ListPhoneNumbersRequest.h>
|
||||
|
||||
using AlibabaCloud::CCC::Model::ListPhoneNumbersRequest;
|
||||
|
||||
ListPhoneNumbersRequest::ListPhoneNumbersRequest() :
|
||||
RpcServiceRequest("ccc", "2017-07-05", "ListPhoneNumbers")
|
||||
{}
|
||||
|
||||
ListPhoneNumbersRequest::~ListPhoneNumbersRequest()
|
||||
{}
|
||||
|
||||
bool ListPhoneNumbersRequest::getOutboundOnly()const
|
||||
{
|
||||
return outboundOnly_;
|
||||
}
|
||||
|
||||
void ListPhoneNumbersRequest::setOutboundOnly(bool outboundOnly)
|
||||
{
|
||||
outboundOnly_ = outboundOnly;
|
||||
setParameter("OutboundOnly", std::to_string(outboundOnly));
|
||||
}
|
||||
|
||||
std::string ListPhoneNumbersRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void ListPhoneNumbersRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string ListPhoneNumbersRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void ListPhoneNumbersRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
118
ccc/src/model/ListPhoneNumbersResult.cc
Normal file
118
ccc/src/model/ListPhoneNumbersResult.cc
Normal file
@@ -0,0 +1,118 @@
|
||||
/*
|
||||
* 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/ccc/model/ListPhoneNumbersResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::CCC;
|
||||
using namespace AlibabaCloud::CCC::Model;
|
||||
|
||||
ListPhoneNumbersResult::ListPhoneNumbersResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListPhoneNumbersResult::ListPhoneNumbersResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListPhoneNumbersResult::~ListPhoneNumbersResult()
|
||||
{}
|
||||
|
||||
void ListPhoneNumbersResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allPhoneNumbers = value["PhoneNumbers"]["PhoneNumber"];
|
||||
for (auto value : allPhoneNumbers)
|
||||
{
|
||||
PhoneNumber phoneNumbersObject;
|
||||
if(!value["PhoneNumberId"].isNull())
|
||||
phoneNumbersObject.phoneNumberId = value["PhoneNumberId"].asString();
|
||||
if(!value["InstanceId"].isNull())
|
||||
phoneNumbersObject.instanceId = value["InstanceId"].asString();
|
||||
if(!value["Number"].isNull())
|
||||
phoneNumbersObject.number = value["Number"].asString();
|
||||
if(!value["PhoneNumberDescription"].isNull())
|
||||
phoneNumbersObject.phoneNumberDescription = value["PhoneNumberDescription"].asString();
|
||||
if(!value["TestOnly"].isNull())
|
||||
phoneNumbersObject.testOnly = value["TestOnly"].asString() == "true";
|
||||
if(!value["RemainingTime"].isNull())
|
||||
phoneNumbersObject.remainingTime = std::stoi(value["RemainingTime"].asString());
|
||||
if(!value["AllowOutbound"].isNull())
|
||||
phoneNumbersObject.allowOutbound = value["AllowOutbound"].asString() == "true";
|
||||
if(!value["Usage"].isNull())
|
||||
phoneNumbersObject.usage = value["Usage"].asString();
|
||||
if(!value["Trunks"].isNull())
|
||||
phoneNumbersObject.trunks = std::stoi(value["Trunks"].asString());
|
||||
auto allContactFlow = value["ContactFlow"];
|
||||
for (auto value : allContactFlow)
|
||||
{
|
||||
PhoneNumber::ContactFlow contactFlowObject;
|
||||
if(!value["ContactFlowId"].isNull())
|
||||
contactFlowObject.contactFlowId = value["ContactFlowId"].asString();
|
||||
if(!value["InstanceId"].isNull())
|
||||
contactFlowObject.instanceId = value["InstanceId"].asString();
|
||||
if(!value["ContactFlowName"].isNull())
|
||||
contactFlowObject.contactFlowName = value["ContactFlowName"].asString();
|
||||
if(!value["ContactFlowDescription"].isNull())
|
||||
contactFlowObject.contactFlowDescription = value["ContactFlowDescription"].asString();
|
||||
if(!value["Type"].isNull())
|
||||
contactFlowObject.type = value["Type"].asString();
|
||||
phoneNumbersObject.contactFlow.push_back(contactFlowObject);
|
||||
}
|
||||
phoneNumbers_.push_back(phoneNumbersObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::vector<ListPhoneNumbersResult::PhoneNumber> ListPhoneNumbersResult::getPhoneNumbers()const
|
||||
{
|
||||
return phoneNumbers_;
|
||||
}
|
||||
|
||||
std::string ListPhoneNumbersResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int ListPhoneNumbersResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
std::string ListPhoneNumbersResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool ListPhoneNumbersResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
60
ccc/src/model/ListRecordingsByContactIdRequest.cc
Normal file
60
ccc/src/model/ListRecordingsByContactIdRequest.cc
Normal 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/ccc/model/ListRecordingsByContactIdRequest.h>
|
||||
|
||||
using AlibabaCloud::CCC::Model::ListRecordingsByContactIdRequest;
|
||||
|
||||
ListRecordingsByContactIdRequest::ListRecordingsByContactIdRequest() :
|
||||
RpcServiceRequest("ccc", "2017-07-05", "ListRecordingsByContactId")
|
||||
{}
|
||||
|
||||
ListRecordingsByContactIdRequest::~ListRecordingsByContactIdRequest()
|
||||
{}
|
||||
|
||||
std::string ListRecordingsByContactIdRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void ListRecordingsByContactIdRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string ListRecordingsByContactIdRequest::getContactId()const
|
||||
{
|
||||
return contactId_;
|
||||
}
|
||||
|
||||
void ListRecordingsByContactIdRequest::setContactId(const std::string& contactId)
|
||||
{
|
||||
contactId_ = contactId;
|
||||
setParameter("ContactId", contactId);
|
||||
}
|
||||
|
||||
std::string ListRecordingsByContactIdRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void ListRecordingsByContactIdRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
110
ccc/src/model/ListRecordingsByContactIdResult.cc
Normal file
110
ccc/src/model/ListRecordingsByContactIdResult.cc
Normal file
@@ -0,0 +1,110 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/ccc/model/ListRecordingsByContactIdResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::CCC;
|
||||
using namespace AlibabaCloud::CCC::Model;
|
||||
|
||||
ListRecordingsByContactIdResult::ListRecordingsByContactIdResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListRecordingsByContactIdResult::ListRecordingsByContactIdResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListRecordingsByContactIdResult::~ListRecordingsByContactIdResult()
|
||||
{}
|
||||
|
||||
void ListRecordingsByContactIdResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allRecordings = value["Recordings"]["Recording"];
|
||||
for (auto value : allRecordings)
|
||||
{
|
||||
Recording recordingsObject;
|
||||
if(!value["ContactId"].isNull())
|
||||
recordingsObject.contactId = value["ContactId"].asString();
|
||||
if(!value["ContactType"].isNull())
|
||||
recordingsObject.contactType = value["ContactType"].asString();
|
||||
if(!value["AgentId"].isNull())
|
||||
recordingsObject.agentId = value["AgentId"].asString();
|
||||
if(!value["AgentName"].isNull())
|
||||
recordingsObject.agentName = value["AgentName"].asString();
|
||||
if(!value["CallingNumber"].isNull())
|
||||
recordingsObject.callingNumber = value["CallingNumber"].asString();
|
||||
if(!value["CalledNumber"].isNull())
|
||||
recordingsObject.calledNumber = value["CalledNumber"].asString();
|
||||
if(!value["StartTime"].isNull())
|
||||
recordingsObject.startTime = std::stol(value["StartTime"].asString());
|
||||
if(!value["Duration"].isNull())
|
||||
recordingsObject.duration = std::stoi(value["Duration"].asString());
|
||||
if(!value["FileName"].isNull())
|
||||
recordingsObject.fileName = value["FileName"].asString();
|
||||
if(!value["FilePath"].isNull())
|
||||
recordingsObject.filePath = value["FilePath"].asString();
|
||||
if(!value["FileDescription"].isNull())
|
||||
recordingsObject.fileDescription = value["FileDescription"].asString();
|
||||
if(!value["Channel"].isNull())
|
||||
recordingsObject.channel = value["Channel"].asString();
|
||||
if(!value["InstanceId"].isNull())
|
||||
recordingsObject.instanceId = value["InstanceId"].asString();
|
||||
recordings_.push_back(recordingsObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::string ListRecordingsByContactIdResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int ListRecordingsByContactIdResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
std::vector<ListRecordingsByContactIdResult::Recording> ListRecordingsByContactIdResult::getRecordings()const
|
||||
{
|
||||
return recordings_;
|
||||
}
|
||||
|
||||
std::string ListRecordingsByContactIdResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool ListRecordingsByContactIdResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
126
ccc/src/model/ListRecordingsRequest.cc
Normal file
126
ccc/src/model/ListRecordingsRequest.cc
Normal file
@@ -0,0 +1,126 @@
|
||||
/*
|
||||
* 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/ccc/model/ListRecordingsRequest.h>
|
||||
|
||||
using AlibabaCloud::CCC::Model::ListRecordingsRequest;
|
||||
|
||||
ListRecordingsRequest::ListRecordingsRequest() :
|
||||
RpcServiceRequest("ccc", "2017-07-05", "ListRecordings")
|
||||
{}
|
||||
|
||||
ListRecordingsRequest::~ListRecordingsRequest()
|
||||
{}
|
||||
|
||||
std::string ListRecordingsRequest::getAgentId()const
|
||||
{
|
||||
return agentId_;
|
||||
}
|
||||
|
||||
void ListRecordingsRequest::setAgentId(const std::string& agentId)
|
||||
{
|
||||
agentId_ = agentId;
|
||||
setParameter("AgentId", agentId);
|
||||
}
|
||||
|
||||
std::string ListRecordingsRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void ListRecordingsRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string ListRecordingsRequest::getCriteria()const
|
||||
{
|
||||
return criteria_;
|
||||
}
|
||||
|
||||
void ListRecordingsRequest::setCriteria(const std::string& criteria)
|
||||
{
|
||||
criteria_ = criteria;
|
||||
setParameter("Criteria", criteria);
|
||||
}
|
||||
|
||||
std::string ListRecordingsRequest::getPhoneNumber()const
|
||||
{
|
||||
return phoneNumber_;
|
||||
}
|
||||
|
||||
void ListRecordingsRequest::setPhoneNumber(const std::string& phoneNumber)
|
||||
{
|
||||
phoneNumber_ = phoneNumber;
|
||||
setParameter("PhoneNumber", phoneNumber);
|
||||
}
|
||||
|
||||
int ListRecordingsRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void ListRecordingsRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
long ListRecordingsRequest::getStartTime()const
|
||||
{
|
||||
return startTime_;
|
||||
}
|
||||
|
||||
void ListRecordingsRequest::setStartTime(long startTime)
|
||||
{
|
||||
startTime_ = startTime;
|
||||
setParameter("StartTime", std::to_string(startTime));
|
||||
}
|
||||
|
||||
long ListRecordingsRequest::getStopTime()const
|
||||
{
|
||||
return stopTime_;
|
||||
}
|
||||
|
||||
void ListRecordingsRequest::setStopTime(long stopTime)
|
||||
{
|
||||
stopTime_ = stopTime;
|
||||
setParameter("StopTime", std::to_string(stopTime));
|
||||
}
|
||||
|
||||
int ListRecordingsRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void ListRecordingsRequest::setPageNumber(int pageNumber)
|
||||
{
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
std::string ListRecordingsRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void ListRecordingsRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
122
ccc/src/model/ListRecordingsResult.cc
Normal file
122
ccc/src/model/ListRecordingsResult.cc
Normal file
@@ -0,0 +1,122 @@
|
||||
/*
|
||||
* 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/ccc/model/ListRecordingsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::CCC;
|
||||
using namespace AlibabaCloud::CCC::Model;
|
||||
|
||||
ListRecordingsResult::ListRecordingsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListRecordingsResult::ListRecordingsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListRecordingsResult::~ListRecordingsResult()
|
||||
{}
|
||||
|
||||
void ListRecordingsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allRecordings = value["Recordings"];
|
||||
for (auto value : allRecordings)
|
||||
{
|
||||
Recordings recordingsObject;
|
||||
if(!value["TotalCount"].isNull())
|
||||
recordingsObject.totalCount = std::stoi(value["TotalCount"].asString());
|
||||
if(!value["PageNumber"].isNull())
|
||||
recordingsObject.pageNumber = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
recordingsObject.pageSize = std::stoi(value["PageSize"].asString());
|
||||
auto allList = value["List"]["Recording"];
|
||||
for (auto value : allList)
|
||||
{
|
||||
Recordings::Recording recordingObject;
|
||||
if(!value["ContactId"].isNull())
|
||||
recordingObject.contactId = value["ContactId"].asString();
|
||||
if(!value["ContactType"].isNull())
|
||||
recordingObject.contactType = value["ContactType"].asString();
|
||||
if(!value["AgentId"].isNull())
|
||||
recordingObject.agentId = value["AgentId"].asString();
|
||||
if(!value["AgentName"].isNull())
|
||||
recordingObject.agentName = value["AgentName"].asString();
|
||||
if(!value["CallingNumber"].isNull())
|
||||
recordingObject.callingNumber = value["CallingNumber"].asString();
|
||||
if(!value["CalledNumber"].isNull())
|
||||
recordingObject.calledNumber = value["CalledNumber"].asString();
|
||||
if(!value["StartTime"].isNull())
|
||||
recordingObject.startTime = std::stol(value["StartTime"].asString());
|
||||
if(!value["Duration"].isNull())
|
||||
recordingObject.duration = std::stoi(value["Duration"].asString());
|
||||
if(!value["FileName"].isNull())
|
||||
recordingObject.fileName = value["FileName"].asString();
|
||||
if(!value["FilePath"].isNull())
|
||||
recordingObject.filePath = value["FilePath"].asString();
|
||||
if(!value["FileDescription"].isNull())
|
||||
recordingObject.fileDescription = value["FileDescription"].asString();
|
||||
if(!value["Channel"].isNull())
|
||||
recordingObject.channel = value["Channel"].asString();
|
||||
if(!value["InstanceId"].isNull())
|
||||
recordingObject.instanceId = value["InstanceId"].asString();
|
||||
recordingsObject.list.push_back(recordingObject);
|
||||
}
|
||||
recordings_.push_back(recordingsObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::string ListRecordingsResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int ListRecordingsResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
std::vector<ListRecordingsResult::Recordings> ListRecordingsResult::getRecordings()const
|
||||
{
|
||||
return recordings_;
|
||||
}
|
||||
|
||||
std::string ListRecordingsResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool ListRecordingsResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
49
ccc/src/model/ListRolesRequest.cc
Normal file
49
ccc/src/model/ListRolesRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/ccc/model/ListRolesRequest.h>
|
||||
|
||||
using AlibabaCloud::CCC::Model::ListRolesRequest;
|
||||
|
||||
ListRolesRequest::ListRolesRequest() :
|
||||
RpcServiceRequest("ccc", "2017-07-05", "ListRoles")
|
||||
{}
|
||||
|
||||
ListRolesRequest::~ListRolesRequest()
|
||||
{}
|
||||
|
||||
std::string ListRolesRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void ListRolesRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string ListRolesRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void ListRolesRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
92
ccc/src/model/ListRolesResult.cc
Normal file
92
ccc/src/model/ListRolesResult.cc
Normal file
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* 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/ccc/model/ListRolesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::CCC;
|
||||
using namespace AlibabaCloud::CCC::Model;
|
||||
|
||||
ListRolesResult::ListRolesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListRolesResult::ListRolesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListRolesResult::~ListRolesResult()
|
||||
{}
|
||||
|
||||
void ListRolesResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allRoles = value["Roles"]["Role"];
|
||||
for (auto value : allRoles)
|
||||
{
|
||||
Role rolesObject;
|
||||
if(!value["RoleId"].isNull())
|
||||
rolesObject.roleId = value["RoleId"].asString();
|
||||
if(!value["InstanceId"].isNull())
|
||||
rolesObject.instanceId = value["InstanceId"].asString();
|
||||
if(!value["RoleName"].isNull())
|
||||
rolesObject.roleName = value["RoleName"].asString();
|
||||
if(!value["RoleDescription"].isNull())
|
||||
rolesObject.roleDescription = value["RoleDescription"].asString();
|
||||
roles_.push_back(rolesObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::string ListRolesResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int ListRolesResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
std::vector<ListRolesResult::Role> ListRolesResult::getRoles()const
|
||||
{
|
||||
return roles_;
|
||||
}
|
||||
|
||||
std::string ListRolesResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool ListRolesResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
60
ccc/src/model/ListSkillGroupsOfUserRequest.cc
Normal file
60
ccc/src/model/ListSkillGroupsOfUserRequest.cc
Normal 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/ccc/model/ListSkillGroupsOfUserRequest.h>
|
||||
|
||||
using AlibabaCloud::CCC::Model::ListSkillGroupsOfUserRequest;
|
||||
|
||||
ListSkillGroupsOfUserRequest::ListSkillGroupsOfUserRequest() :
|
||||
RpcServiceRequest("ccc", "2017-07-05", "ListSkillGroupsOfUser")
|
||||
{}
|
||||
|
||||
ListSkillGroupsOfUserRequest::~ListSkillGroupsOfUserRequest()
|
||||
{}
|
||||
|
||||
std::string ListSkillGroupsOfUserRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void ListSkillGroupsOfUserRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string ListSkillGroupsOfUserRequest::getUserId()const
|
||||
{
|
||||
return userId_;
|
||||
}
|
||||
|
||||
void ListSkillGroupsOfUserRequest::setUserId(const std::string& userId)
|
||||
{
|
||||
userId_ = userId;
|
||||
setParameter("UserId", userId);
|
||||
}
|
||||
|
||||
std::string ListSkillGroupsOfUserRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void ListSkillGroupsOfUserRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
126
ccc/src/model/ListSkillGroupsOfUserResult.cc
Normal file
126
ccc/src/model/ListSkillGroupsOfUserResult.cc
Normal file
@@ -0,0 +1,126 @@
|
||||
/*
|
||||
* 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/ccc/model/ListSkillGroupsOfUserResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::CCC;
|
||||
using namespace AlibabaCloud::CCC::Model;
|
||||
|
||||
ListSkillGroupsOfUserResult::ListSkillGroupsOfUserResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListSkillGroupsOfUserResult::ListSkillGroupsOfUserResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListSkillGroupsOfUserResult::~ListSkillGroupsOfUserResult()
|
||||
{}
|
||||
|
||||
void ListSkillGroupsOfUserResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allSkillLevels = value["SkillLevels"]["SkillLevel"];
|
||||
for (auto value : allSkillLevels)
|
||||
{
|
||||
SkillLevel skillLevelsObject;
|
||||
if(!value["SkillLevelId"].isNull())
|
||||
skillLevelsObject.skillLevelId = value["SkillLevelId"].asString();
|
||||
if(!value["Level"].isNull())
|
||||
skillLevelsObject.level = std::stoi(value["Level"].asString());
|
||||
auto allSkill = value["Skill"];
|
||||
for (auto value : allSkill)
|
||||
{
|
||||
SkillLevel::Skill skillObject;
|
||||
if(!value["SkillGroupId"].isNull())
|
||||
skillObject.skillGroupId = value["SkillGroupId"].asString();
|
||||
if(!value["InstanceId"].isNull())
|
||||
skillObject.instanceId = value["InstanceId"].asString();
|
||||
if(!value["SkillGroupName"].isNull())
|
||||
skillObject.skillGroupName = value["SkillGroupName"].asString();
|
||||
if(!value["SkillGroupDescription"].isNull())
|
||||
skillObject.skillGroupDescription = value["SkillGroupDescription"].asString();
|
||||
auto allOutboundPhoneNumbers = value["OutboundPhoneNumbers"]["PhoneNumber"];
|
||||
for (auto value : allOutboundPhoneNumbers)
|
||||
{
|
||||
SkillLevel::Skill::PhoneNumber phoneNumberObject;
|
||||
if(!value["PhoneNumberId"].isNull())
|
||||
phoneNumberObject.phoneNumberId = value["PhoneNumberId"].asString();
|
||||
if(!value["InstanceId"].isNull())
|
||||
phoneNumberObject.instanceId = value["InstanceId"].asString();
|
||||
if(!value["Number"].isNull())
|
||||
phoneNumberObject.number = value["Number"].asString();
|
||||
if(!value["PhoneNumberDescription"].isNull())
|
||||
phoneNumberObject.phoneNumberDescription = value["PhoneNumberDescription"].asString();
|
||||
if(!value["TestOnly"].isNull())
|
||||
phoneNumberObject.testOnly = value["TestOnly"].asString() == "true";
|
||||
if(!value["RemainingTime"].isNull())
|
||||
phoneNumberObject.remainingTime = std::stoi(value["RemainingTime"].asString());
|
||||
if(!value["AllowOutbound"].isNull())
|
||||
phoneNumberObject.allowOutbound = value["AllowOutbound"].asString() == "true";
|
||||
if(!value["Usage"].isNull())
|
||||
phoneNumberObject.usage = value["Usage"].asString();
|
||||
if(!value["Trunks"].isNull())
|
||||
phoneNumberObject.trunks = std::stoi(value["Trunks"].asString());
|
||||
skillObject.outboundPhoneNumbers.push_back(phoneNumberObject);
|
||||
}
|
||||
skillLevelsObject.skill.push_back(skillObject);
|
||||
}
|
||||
skillLevels_.push_back(skillLevelsObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::vector<ListSkillGroupsOfUserResult::SkillLevel> ListSkillGroupsOfUserResult::getSkillLevels()const
|
||||
{
|
||||
return skillLevels_;
|
||||
}
|
||||
|
||||
std::string ListSkillGroupsOfUserResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int ListSkillGroupsOfUserResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
std::string ListSkillGroupsOfUserResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool ListSkillGroupsOfUserResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
49
ccc/src/model/ListSkillGroupsRequest.cc
Normal file
49
ccc/src/model/ListSkillGroupsRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/ccc/model/ListSkillGroupsRequest.h>
|
||||
|
||||
using AlibabaCloud::CCC::Model::ListSkillGroupsRequest;
|
||||
|
||||
ListSkillGroupsRequest::ListSkillGroupsRequest() :
|
||||
RpcServiceRequest("ccc", "2017-07-05", "ListSkillGroups")
|
||||
{}
|
||||
|
||||
ListSkillGroupsRequest::~ListSkillGroupsRequest()
|
||||
{}
|
||||
|
||||
std::string ListSkillGroupsRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void ListSkillGroupsRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string ListSkillGroupsRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void ListSkillGroupsRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
122
ccc/src/model/ListSkillGroupsResult.cc
Normal file
122
ccc/src/model/ListSkillGroupsResult.cc
Normal file
@@ -0,0 +1,122 @@
|
||||
/*
|
||||
* 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/ccc/model/ListSkillGroupsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::CCC;
|
||||
using namespace AlibabaCloud::CCC::Model;
|
||||
|
||||
ListSkillGroupsResult::ListSkillGroupsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListSkillGroupsResult::ListSkillGroupsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListSkillGroupsResult::~ListSkillGroupsResult()
|
||||
{}
|
||||
|
||||
void ListSkillGroupsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allSkillGroups = value["SkillGroups"]["SkillGroup"];
|
||||
for (auto value : allSkillGroups)
|
||||
{
|
||||
SkillGroup skillGroupsObject;
|
||||
if(!value["SkillGroupId"].isNull())
|
||||
skillGroupsObject.skillGroupId = value["SkillGroupId"].asString();
|
||||
if(!value["InstanceId"].isNull())
|
||||
skillGroupsObject.instanceId = value["InstanceId"].asString();
|
||||
if(!value["SkillGroupName"].isNull())
|
||||
skillGroupsObject.skillGroupName = value["SkillGroupName"].asString();
|
||||
if(!value["AccSkillGroupName"].isNull())
|
||||
skillGroupsObject.accSkillGroupName = value["AccSkillGroupName"].asString();
|
||||
if(!value["AccQueueName"].isNull())
|
||||
skillGroupsObject.accQueueName = value["AccQueueName"].asString();
|
||||
if(!value["SkillGroupDescription"].isNull())
|
||||
skillGroupsObject.skillGroupDescription = value["SkillGroupDescription"].asString();
|
||||
if(!value["UserCount"].isNull())
|
||||
skillGroupsObject.userCount = std::stoi(value["UserCount"].asString());
|
||||
auto allOutboundPhoneNumbers = value["OutboundPhoneNumbers"]["PhoneNumber"];
|
||||
for (auto value : allOutboundPhoneNumbers)
|
||||
{
|
||||
SkillGroup::PhoneNumber outboundPhoneNumbersObject;
|
||||
if(!value["PhoneNumberId"].isNull())
|
||||
outboundPhoneNumbersObject.phoneNumberId = value["PhoneNumberId"].asString();
|
||||
if(!value["InstanceId"].isNull())
|
||||
outboundPhoneNumbersObject.instanceId = value["InstanceId"].asString();
|
||||
if(!value["Number"].isNull())
|
||||
outboundPhoneNumbersObject.number = value["Number"].asString();
|
||||
if(!value["PhoneNumberDescription"].isNull())
|
||||
outboundPhoneNumbersObject.phoneNumberDescription = value["PhoneNumberDescription"].asString();
|
||||
if(!value["TestOnly"].isNull())
|
||||
outboundPhoneNumbersObject.testOnly = value["TestOnly"].asString() == "true";
|
||||
if(!value["RemainingTime"].isNull())
|
||||
outboundPhoneNumbersObject.remainingTime = std::stoi(value["RemainingTime"].asString());
|
||||
if(!value["AllowOutbound"].isNull())
|
||||
outboundPhoneNumbersObject.allowOutbound = value["AllowOutbound"].asString() == "true";
|
||||
if(!value["Usage"].isNull())
|
||||
outboundPhoneNumbersObject.usage = value["Usage"].asString();
|
||||
if(!value["Trunks"].isNull())
|
||||
outboundPhoneNumbersObject.trunks = std::stoi(value["Trunks"].asString());
|
||||
skillGroupsObject.outboundPhoneNumbers.push_back(outboundPhoneNumbersObject);
|
||||
}
|
||||
skillGroups_.push_back(skillGroupsObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::string ListSkillGroupsResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int ListSkillGroupsResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
std::vector<ListSkillGroupsResult::SkillGroup> ListSkillGroupsResult::getSkillGroups()const
|
||||
{
|
||||
return skillGroups_;
|
||||
}
|
||||
|
||||
std::string ListSkillGroupsResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool ListSkillGroupsResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
82
ccc/src/model/ListUsersOfSkillGroupRequest.cc
Normal file
82
ccc/src/model/ListUsersOfSkillGroupRequest.cc
Normal 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/ccc/model/ListUsersOfSkillGroupRequest.h>
|
||||
|
||||
using AlibabaCloud::CCC::Model::ListUsersOfSkillGroupRequest;
|
||||
|
||||
ListUsersOfSkillGroupRequest::ListUsersOfSkillGroupRequest() :
|
||||
RpcServiceRequest("ccc", "2017-07-05", "ListUsersOfSkillGroup")
|
||||
{}
|
||||
|
||||
ListUsersOfSkillGroupRequest::~ListUsersOfSkillGroupRequest()
|
||||
{}
|
||||
|
||||
std::string ListUsersOfSkillGroupRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void ListUsersOfSkillGroupRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string ListUsersOfSkillGroupRequest::getSkillGroupId()const
|
||||
{
|
||||
return skillGroupId_;
|
||||
}
|
||||
|
||||
void ListUsersOfSkillGroupRequest::setSkillGroupId(const std::string& skillGroupId)
|
||||
{
|
||||
skillGroupId_ = skillGroupId;
|
||||
setParameter("SkillGroupId", skillGroupId);
|
||||
}
|
||||
|
||||
int ListUsersOfSkillGroupRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void ListUsersOfSkillGroupRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
int ListUsersOfSkillGroupRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void ListUsersOfSkillGroupRequest::setPageNumber(int pageNumber)
|
||||
{
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
std::string ListUsersOfSkillGroupRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void ListUsersOfSkillGroupRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
170
ccc/src/model/ListUsersOfSkillGroupResult.cc
Normal file
170
ccc/src/model/ListUsersOfSkillGroupResult.cc
Normal file
@@ -0,0 +1,170 @@
|
||||
/*
|
||||
* 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/ccc/model/ListUsersOfSkillGroupResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::CCC;
|
||||
using namespace AlibabaCloud::CCC::Model;
|
||||
|
||||
ListUsersOfSkillGroupResult::ListUsersOfSkillGroupResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListUsersOfSkillGroupResult::ListUsersOfSkillGroupResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListUsersOfSkillGroupResult::~ListUsersOfSkillGroupResult()
|
||||
{}
|
||||
|
||||
void ListUsersOfSkillGroupResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allUsers = value["Users"];
|
||||
for (auto value : allUsers)
|
||||
{
|
||||
Users usersObject;
|
||||
if(!value["TotalCount"].isNull())
|
||||
usersObject.totalCount = std::stoi(value["TotalCount"].asString());
|
||||
if(!value["PageNumber"].isNull())
|
||||
usersObject.pageNumber = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
usersObject.pageSize = std::stoi(value["PageSize"].asString());
|
||||
auto allList = value["List"]["User"];
|
||||
for (auto value : allList)
|
||||
{
|
||||
Users::User userObject;
|
||||
if(!value["UserId"].isNull())
|
||||
userObject.userId = value["UserId"].asString();
|
||||
if(!value["RamId"].isNull())
|
||||
userObject.ramId = value["RamId"].asString();
|
||||
if(!value["InstanceId"].isNull())
|
||||
userObject.instanceId = value["InstanceId"].asString();
|
||||
auto allRoles = value["Roles"]["Role"];
|
||||
for (auto value : allRoles)
|
||||
{
|
||||
Users::User::Role rolesObject;
|
||||
if(!value["RoleId"].isNull())
|
||||
rolesObject.roleId = value["RoleId"].asString();
|
||||
if(!value["InstanceId"].isNull())
|
||||
rolesObject.instanceId = value["InstanceId"].asString();
|
||||
if(!value["RoleName"].isNull())
|
||||
rolesObject.roleName = value["RoleName"].asString();
|
||||
if(!value["RoleDescription"].isNull())
|
||||
rolesObject.roleDescription = value["RoleDescription"].asString();
|
||||
if(!value["UserCount"].isNull())
|
||||
rolesObject.userCount = std::stoi(value["UserCount"].asString());
|
||||
auto allPrivileges = value["Privileges"]["Privilege"];
|
||||
for (auto value : allPrivileges)
|
||||
{
|
||||
Users::User::Role::Privilege privilegesObject;
|
||||
if(!value["PrivilegeId"].isNull())
|
||||
privilegesObject.privilegeId = value["PrivilegeId"].asString();
|
||||
if(!value["PrivilegeName"].isNull())
|
||||
privilegesObject.privilegeName = value["PrivilegeName"].asString();
|
||||
if(!value["PrivilegeDescription"].isNull())
|
||||
privilegesObject.privilegeDescription = value["PrivilegeDescription"].asString();
|
||||
rolesObject.privileges.push_back(privilegesObject);
|
||||
}
|
||||
userObject.roles.push_back(rolesObject);
|
||||
}
|
||||
auto allSkillLevels = value["SkillLevels"]["SkillLevel"];
|
||||
for (auto value : allSkillLevels)
|
||||
{
|
||||
Users::User::SkillLevel skillLevelsObject;
|
||||
if(!value["SkillLevelId"].isNull())
|
||||
skillLevelsObject.skillLevelId = value["SkillLevelId"].asString();
|
||||
if(!value["Level"].isNull())
|
||||
skillLevelsObject.level = std::stoi(value["Level"].asString());
|
||||
auto allSkill = value["Skill"];
|
||||
for (auto value : allSkill)
|
||||
{
|
||||
Users::User::SkillLevel::Skill skillObject;
|
||||
if(!value["SkillGroupId"].isNull())
|
||||
skillObject.skillGroupId = value["SkillGroupId"].asString();
|
||||
if(!value["InstanceId"].isNull())
|
||||
skillObject.instanceId = value["InstanceId"].asString();
|
||||
if(!value["SkillGroupName"].isNull())
|
||||
skillObject.skillGroupName = value["SkillGroupName"].asString();
|
||||
if(!value["SkillGroupDescription"].isNull())
|
||||
skillObject.skillGroupDescription = value["SkillGroupDescription"].asString();
|
||||
skillLevelsObject.skill.push_back(skillObject);
|
||||
}
|
||||
userObject.skillLevels.push_back(skillLevelsObject);
|
||||
}
|
||||
auto allDetail = value["Detail"];
|
||||
for (auto value : allDetail)
|
||||
{
|
||||
Users::User::Detail detailObject;
|
||||
if(!value["LoginName"].isNull())
|
||||
detailObject.loginName = value["LoginName"].asString();
|
||||
if(!value["DisplayName"].isNull())
|
||||
detailObject.displayName = value["DisplayName"].asString();
|
||||
if(!value["Phone"].isNull())
|
||||
detailObject.phone = value["Phone"].asString();
|
||||
if(!value["Email"].isNull())
|
||||
detailObject.email = value["Email"].asString();
|
||||
if(!value["Department"].isNull())
|
||||
detailObject.department = value["Department"].asString();
|
||||
userObject.detail.push_back(detailObject);
|
||||
}
|
||||
usersObject.list.push_back(userObject);
|
||||
}
|
||||
users_.push_back(usersObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::string ListUsersOfSkillGroupResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int ListUsersOfSkillGroupResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
std::vector<ListUsersOfSkillGroupResult::Users> ListUsersOfSkillGroupResult::getUsers()const
|
||||
{
|
||||
return users_;
|
||||
}
|
||||
|
||||
std::string ListUsersOfSkillGroupResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool ListUsersOfSkillGroupResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
71
ccc/src/model/ListUsersRequest.cc
Normal file
71
ccc/src/model/ListUsersRequest.cc
Normal 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/ccc/model/ListUsersRequest.h>
|
||||
|
||||
using AlibabaCloud::CCC::Model::ListUsersRequest;
|
||||
|
||||
ListUsersRequest::ListUsersRequest() :
|
||||
RpcServiceRequest("ccc", "2017-07-05", "ListUsers")
|
||||
{}
|
||||
|
||||
ListUsersRequest::~ListUsersRequest()
|
||||
{}
|
||||
|
||||
std::string ListUsersRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void ListUsersRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
int ListUsersRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void ListUsersRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
int ListUsersRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void ListUsersRequest::setPageNumber(int pageNumber)
|
||||
{
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
std::string ListUsersRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void ListUsersRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
158
ccc/src/model/ListUsersResult.cc
Normal file
158
ccc/src/model/ListUsersResult.cc
Normal file
@@ -0,0 +1,158 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/ccc/model/ListUsersResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::CCC;
|
||||
using namespace AlibabaCloud::CCC::Model;
|
||||
|
||||
ListUsersResult::ListUsersResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListUsersResult::ListUsersResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListUsersResult::~ListUsersResult()
|
||||
{}
|
||||
|
||||
void ListUsersResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allUsers = value["Users"];
|
||||
for (auto value : allUsers)
|
||||
{
|
||||
Users usersObject;
|
||||
if(!value["TotalCount"].isNull())
|
||||
usersObject.totalCount = std::stoi(value["TotalCount"].asString());
|
||||
if(!value["PageNumber"].isNull())
|
||||
usersObject.pageNumber = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
usersObject.pageSize = std::stoi(value["PageSize"].asString());
|
||||
auto allList = value["List"]["User"];
|
||||
for (auto value : allList)
|
||||
{
|
||||
Users::User userObject;
|
||||
if(!value["UserId"].isNull())
|
||||
userObject.userId = value["UserId"].asString();
|
||||
if(!value["RamId"].isNull())
|
||||
userObject.ramId = value["RamId"].asString();
|
||||
if(!value["InstanceId"].isNull())
|
||||
userObject.instanceId = value["InstanceId"].asString();
|
||||
if(!value["Primary"].isNull())
|
||||
userObject.primary = value["Primary"].asString() == "true";
|
||||
auto allRoles = value["Roles"]["Role"];
|
||||
for (auto value : allRoles)
|
||||
{
|
||||
Users::User::Role rolesObject;
|
||||
if(!value["RoleId"].isNull())
|
||||
rolesObject.roleId = value["RoleId"].asString();
|
||||
if(!value["InstanceId"].isNull())
|
||||
rolesObject.instanceId = value["InstanceId"].asString();
|
||||
if(!value["RoleName"].isNull())
|
||||
rolesObject.roleName = value["RoleName"].asString();
|
||||
if(!value["RoleDescription"].isNull())
|
||||
rolesObject.roleDescription = value["RoleDescription"].asString();
|
||||
userObject.roles.push_back(rolesObject);
|
||||
}
|
||||
auto allSkillLevels = value["SkillLevels"]["SkillLevel"];
|
||||
for (auto value : allSkillLevels)
|
||||
{
|
||||
Users::User::SkillLevel skillLevelsObject;
|
||||
if(!value["SkillLevelId"].isNull())
|
||||
skillLevelsObject.skillLevelId = value["SkillLevelId"].asString();
|
||||
if(!value["Level"].isNull())
|
||||
skillLevelsObject.level = std::stoi(value["Level"].asString());
|
||||
auto allSkill = value["Skill"];
|
||||
for (auto value : allSkill)
|
||||
{
|
||||
Users::User::SkillLevel::Skill skillObject;
|
||||
if(!value["SkillGroupId"].isNull())
|
||||
skillObject.skillGroupId = value["SkillGroupId"].asString();
|
||||
if(!value["InstanceId"].isNull())
|
||||
skillObject.instanceId = value["InstanceId"].asString();
|
||||
if(!value["SkillGroupName"].isNull())
|
||||
skillObject.skillGroupName = value["SkillGroupName"].asString();
|
||||
if(!value["SkillGroupDescription"].isNull())
|
||||
skillObject.skillGroupDescription = value["SkillGroupDescription"].asString();
|
||||
skillLevelsObject.skill.push_back(skillObject);
|
||||
}
|
||||
userObject.skillLevels.push_back(skillLevelsObject);
|
||||
}
|
||||
auto allDetail = value["Detail"];
|
||||
for (auto value : allDetail)
|
||||
{
|
||||
Users::User::Detail detailObject;
|
||||
if(!value["LoginName"].isNull())
|
||||
detailObject.loginName = value["LoginName"].asString();
|
||||
if(!value["DisplayName"].isNull())
|
||||
detailObject.displayName = value["DisplayName"].asString();
|
||||
if(!value["Phone"].isNull())
|
||||
detailObject.phone = value["Phone"].asString();
|
||||
if(!value["Email"].isNull())
|
||||
detailObject.email = value["Email"].asString();
|
||||
if(!value["Department"].isNull())
|
||||
detailObject.department = value["Department"].asString();
|
||||
userObject.detail.push_back(detailObject);
|
||||
}
|
||||
usersObject.list.push_back(userObject);
|
||||
}
|
||||
users_.push_back(usersObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::string ListUsersResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int ListUsersResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
std::vector<ListUsersResult::Users> ListUsersResult::getUsers()const
|
||||
{
|
||||
return users_;
|
||||
}
|
||||
|
||||
std::string ListUsersResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool ListUsersResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
82
ccc/src/model/ModifyPhoneNumberRequest.cc
Normal file
82
ccc/src/model/ModifyPhoneNumberRequest.cc
Normal 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/ccc/model/ModifyPhoneNumberRequest.h>
|
||||
|
||||
using AlibabaCloud::CCC::Model::ModifyPhoneNumberRequest;
|
||||
|
||||
ModifyPhoneNumberRequest::ModifyPhoneNumberRequest() :
|
||||
RpcServiceRequest("ccc", "2017-07-05", "ModifyPhoneNumber")
|
||||
{}
|
||||
|
||||
ModifyPhoneNumberRequest::~ModifyPhoneNumberRequest()
|
||||
{}
|
||||
|
||||
std::string ModifyPhoneNumberRequest::getContactFlowId()const
|
||||
{
|
||||
return contactFlowId_;
|
||||
}
|
||||
|
||||
void ModifyPhoneNumberRequest::setContactFlowId(const std::string& contactFlowId)
|
||||
{
|
||||
contactFlowId_ = contactFlowId;
|
||||
setParameter("ContactFlowId", contactFlowId);
|
||||
}
|
||||
|
||||
std::string ModifyPhoneNumberRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void ModifyPhoneNumberRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string ModifyPhoneNumberRequest::getPhoneNumberId()const
|
||||
{
|
||||
return phoneNumberId_;
|
||||
}
|
||||
|
||||
void ModifyPhoneNumberRequest::setPhoneNumberId(const std::string& phoneNumberId)
|
||||
{
|
||||
phoneNumberId_ = phoneNumberId;
|
||||
setParameter("PhoneNumberId", phoneNumberId);
|
||||
}
|
||||
|
||||
std::string ModifyPhoneNumberRequest::getUsage()const
|
||||
{
|
||||
return usage_;
|
||||
}
|
||||
|
||||
void ModifyPhoneNumberRequest::setUsage(const std::string& usage)
|
||||
{
|
||||
usage_ = usage;
|
||||
setParameter("Usage", usage);
|
||||
}
|
||||
|
||||
std::string ModifyPhoneNumberRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void ModifyPhoneNumberRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
118
ccc/src/model/ModifyPhoneNumberResult.cc
Normal file
118
ccc/src/model/ModifyPhoneNumberResult.cc
Normal file
@@ -0,0 +1,118 @@
|
||||
/*
|
||||
* 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/ccc/model/ModifyPhoneNumberResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::CCC;
|
||||
using namespace AlibabaCloud::CCC::Model;
|
||||
|
||||
ModifyPhoneNumberResult::ModifyPhoneNumberResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ModifyPhoneNumberResult::ModifyPhoneNumberResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ModifyPhoneNumberResult::~ModifyPhoneNumberResult()
|
||||
{}
|
||||
|
||||
void ModifyPhoneNumberResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allPhoneNumber = value["PhoneNumber"];
|
||||
for (auto value : allPhoneNumber)
|
||||
{
|
||||
PhoneNumber phoneNumberObject;
|
||||
if(!value["PhoneNumberId"].isNull())
|
||||
phoneNumberObject.phoneNumberId = value["PhoneNumberId"].asString();
|
||||
if(!value["InstanceId"].isNull())
|
||||
phoneNumberObject.instanceId = value["InstanceId"].asString();
|
||||
if(!value["Number"].isNull())
|
||||
phoneNumberObject.number = value["Number"].asString();
|
||||
if(!value["PhoneNumberDescription"].isNull())
|
||||
phoneNumberObject.phoneNumberDescription = value["PhoneNumberDescription"].asString();
|
||||
if(!value["TestOnly"].isNull())
|
||||
phoneNumberObject.testOnly = value["TestOnly"].asString() == "true";
|
||||
if(!value["RemainingTime"].isNull())
|
||||
phoneNumberObject.remainingTime = std::stoi(value["RemainingTime"].asString());
|
||||
if(!value["AllowOutbound"].isNull())
|
||||
phoneNumberObject.allowOutbound = value["AllowOutbound"].asString() == "true";
|
||||
if(!value["Usage"].isNull())
|
||||
phoneNumberObject.usage = value["Usage"].asString();
|
||||
if(!value["Trunks"].isNull())
|
||||
phoneNumberObject.trunks = std::stoi(value["Trunks"].asString());
|
||||
auto allContactFlow = value["ContactFlow"];
|
||||
for (auto value : allContactFlow)
|
||||
{
|
||||
PhoneNumber::ContactFlow contactFlowObject;
|
||||
if(!value["ContactFlowId"].isNull())
|
||||
contactFlowObject.contactFlowId = value["ContactFlowId"].asString();
|
||||
if(!value["InstanceId"].isNull())
|
||||
contactFlowObject.instanceId = value["InstanceId"].asString();
|
||||
if(!value["ContactFlowName"].isNull())
|
||||
contactFlowObject.contactFlowName = value["ContactFlowName"].asString();
|
||||
if(!value["ContactFlowDescription"].isNull())
|
||||
contactFlowObject.contactFlowDescription = value["ContactFlowDescription"].asString();
|
||||
if(!value["Type"].isNull())
|
||||
contactFlowObject.type = value["Type"].asString();
|
||||
phoneNumberObject.contactFlow.push_back(contactFlowObject);
|
||||
}
|
||||
phoneNumber_.push_back(phoneNumberObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::string ModifyPhoneNumberResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int ModifyPhoneNumberResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
std::vector<ModifyPhoneNumberResult::PhoneNumber> ModifyPhoneNumberResult::getPhoneNumber()const
|
||||
{
|
||||
return phoneNumber_;
|
||||
}
|
||||
|
||||
std::string ModifyPhoneNumberResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool ModifyPhoneNumberResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
49
ccc/src/model/RefreshTokenRequest.cc
Normal file
49
ccc/src/model/RefreshTokenRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/ccc/model/RefreshTokenRequest.h>
|
||||
|
||||
using AlibabaCloud::CCC::Model::RefreshTokenRequest;
|
||||
|
||||
RefreshTokenRequest::RefreshTokenRequest() :
|
||||
RpcServiceRequest("ccc", "2017-07-05", "RefreshToken")
|
||||
{}
|
||||
|
||||
RefreshTokenRequest::~RefreshTokenRequest()
|
||||
{}
|
||||
|
||||
std::string RefreshTokenRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void RefreshTokenRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string RefreshTokenRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void RefreshTokenRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
88
ccc/src/model/RefreshTokenResult.cc
Normal file
88
ccc/src/model/RefreshTokenResult.cc
Normal file
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/ccc/model/RefreshTokenResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::CCC;
|
||||
using namespace AlibabaCloud::CCC::Model;
|
||||
|
||||
RefreshTokenResult::RefreshTokenResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
RefreshTokenResult::RefreshTokenResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
RefreshTokenResult::~RefreshTokenResult()
|
||||
{}
|
||||
|
||||
void RefreshTokenResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allToken = value["Token"];
|
||||
for (auto value : allToken)
|
||||
{
|
||||
Token tokenObject;
|
||||
if(!value["Signature"].isNull())
|
||||
tokenObject.signature = value["Signature"].asString();
|
||||
if(!value["SignData"].isNull())
|
||||
tokenObject.signData = value["SignData"].asString();
|
||||
token_.push_back(tokenObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::string RefreshTokenResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int RefreshTokenResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
std::vector<RefreshTokenResult::Token> RefreshTokenResult::getToken()const
|
||||
{
|
||||
return token_;
|
||||
}
|
||||
|
||||
std::string RefreshTokenResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool RefreshTokenResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
60
ccc/src/model/RemovePhoneNumberRequest.cc
Normal file
60
ccc/src/model/RemovePhoneNumberRequest.cc
Normal 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/ccc/model/RemovePhoneNumberRequest.h>
|
||||
|
||||
using AlibabaCloud::CCC::Model::RemovePhoneNumberRequest;
|
||||
|
||||
RemovePhoneNumberRequest::RemovePhoneNumberRequest() :
|
||||
RpcServiceRequest("ccc", "2017-07-05", "RemovePhoneNumber")
|
||||
{}
|
||||
|
||||
RemovePhoneNumberRequest::~RemovePhoneNumberRequest()
|
||||
{}
|
||||
|
||||
std::string RemovePhoneNumberRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void RemovePhoneNumberRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string RemovePhoneNumberRequest::getPhoneNumberId()const
|
||||
{
|
||||
return phoneNumberId_;
|
||||
}
|
||||
|
||||
void RemovePhoneNumberRequest::setPhoneNumberId(const std::string& phoneNumberId)
|
||||
{
|
||||
phoneNumberId_ = phoneNumberId;
|
||||
setParameter("PhoneNumberId", phoneNumberId);
|
||||
}
|
||||
|
||||
std::string RemovePhoneNumberRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void RemovePhoneNumberRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
73
ccc/src/model/RemovePhoneNumberResult.cc
Normal file
73
ccc/src/model/RemovePhoneNumberResult.cc
Normal file
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* 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/ccc/model/RemovePhoneNumberResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::CCC;
|
||||
using namespace AlibabaCloud::CCC::Model;
|
||||
|
||||
RemovePhoneNumberResult::RemovePhoneNumberResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
RemovePhoneNumberResult::RemovePhoneNumberResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
RemovePhoneNumberResult::~RemovePhoneNumberResult()
|
||||
{}
|
||||
|
||||
void RemovePhoneNumberResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::string RemovePhoneNumberResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int RemovePhoneNumberResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
std::string RemovePhoneNumberResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool RemovePhoneNumberResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
49
ccc/src/model/RequestLoginInfoRequest.cc
Normal file
49
ccc/src/model/RequestLoginInfoRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/ccc/model/RequestLoginInfoRequest.h>
|
||||
|
||||
using AlibabaCloud::CCC::Model::RequestLoginInfoRequest;
|
||||
|
||||
RequestLoginInfoRequest::RequestLoginInfoRequest() :
|
||||
RpcServiceRequest("ccc", "2017-07-05", "RequestLoginInfo")
|
||||
{}
|
||||
|
||||
RequestLoginInfoRequest::~RequestLoginInfoRequest()
|
||||
{}
|
||||
|
||||
std::string RequestLoginInfoRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void RequestLoginInfoRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string RequestLoginInfoRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void RequestLoginInfoRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
104
ccc/src/model/RequestLoginInfoResult.cc
Normal file
104
ccc/src/model/RequestLoginInfoResult.cc
Normal file
@@ -0,0 +1,104 @@
|
||||
/*
|
||||
* 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/ccc/model/RequestLoginInfoResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::CCC;
|
||||
using namespace AlibabaCloud::CCC::Model;
|
||||
|
||||
RequestLoginInfoResult::RequestLoginInfoResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
RequestLoginInfoResult::RequestLoginInfoResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
RequestLoginInfoResult::~RequestLoginInfoResult()
|
||||
{}
|
||||
|
||||
void RequestLoginInfoResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allLoginInfo = value["LoginInfo"];
|
||||
for (auto value : allLoginInfo)
|
||||
{
|
||||
LoginInfo loginInfoObject;
|
||||
if(!value["UserName"].isNull())
|
||||
loginInfoObject.userName = value["UserName"].asString();
|
||||
if(!value["DisplayName"].isNull())
|
||||
loginInfoObject.displayName = value["DisplayName"].asString();
|
||||
if(!value["PhoneNumber"].isNull())
|
||||
loginInfoObject.phoneNumber = value["PhoneNumber"].asString();
|
||||
if(!value["Region"].isNull())
|
||||
loginInfoObject.region = value["Region"].asString();
|
||||
if(!value["WebRtcUrl"].isNull())
|
||||
loginInfoObject.webRtcUrl = value["WebRtcUrl"].asString();
|
||||
if(!value["AgentServerUrl"].isNull())
|
||||
loginInfoObject.agentServerUrl = value["AgentServerUrl"].asString();
|
||||
if(!value["Extension"].isNull())
|
||||
loginInfoObject.extension = value["Extension"].asString();
|
||||
if(!value["TenantId"].isNull())
|
||||
loginInfoObject.tenantId = value["TenantId"].asString();
|
||||
if(!value["Signature"].isNull())
|
||||
loginInfoObject.signature = value["Signature"].asString();
|
||||
if(!value["SignData"].isNull())
|
||||
loginInfoObject.signData = value["SignData"].asString();
|
||||
loginInfo_.push_back(loginInfoObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::vector<RequestLoginInfoResult::LoginInfo> RequestLoginInfoResult::getLoginInfo()const
|
||||
{
|
||||
return loginInfo_;
|
||||
}
|
||||
|
||||
std::string RequestLoginInfoResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
int RequestLoginInfoResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
std::string RequestLoginInfoResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool RequestLoginInfoResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user