Support continuous pushing.
This commit is contained in:
60
push/src/model/CompleteContinuouslyPushRequest.cc
Normal file
60
push/src/model/CompleteContinuouslyPushRequest.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/push/model/CompleteContinuouslyPushRequest.h>
|
||||
|
||||
using AlibabaCloud::Push::Model::CompleteContinuouslyPushRequest;
|
||||
|
||||
CompleteContinuouslyPushRequest::CompleteContinuouslyPushRequest() :
|
||||
RpcServiceRequest("push", "2016-08-01", "CompleteContinuouslyPush")
|
||||
{}
|
||||
|
||||
CompleteContinuouslyPushRequest::~CompleteContinuouslyPushRequest()
|
||||
{}
|
||||
|
||||
std::string CompleteContinuouslyPushRequest::getMessageId()const
|
||||
{
|
||||
return messageId_;
|
||||
}
|
||||
|
||||
void CompleteContinuouslyPushRequest::setMessageId(const std::string& messageId)
|
||||
{
|
||||
messageId_ = messageId;
|
||||
setCoreParameter("MessageId", messageId);
|
||||
}
|
||||
|
||||
std::string CompleteContinuouslyPushRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void CompleteContinuouslyPushRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
long CompleteContinuouslyPushRequest::getAppKey()const
|
||||
{
|
||||
return appKey_;
|
||||
}
|
||||
|
||||
void CompleteContinuouslyPushRequest::setAppKey(long appKey)
|
||||
{
|
||||
appKey_ = appKey;
|
||||
setCoreParameter("AppKey", std::to_string(appKey));
|
||||
}
|
||||
|
||||
51
push/src/model/CompleteContinuouslyPushResult.cc
Normal file
51
push/src/model/CompleteContinuouslyPushResult.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/push/model/CompleteContinuouslyPushResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Push;
|
||||
using namespace AlibabaCloud::Push::Model;
|
||||
|
||||
CompleteContinuouslyPushResult::CompleteContinuouslyPushResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CompleteContinuouslyPushResult::CompleteContinuouslyPushResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CompleteContinuouslyPushResult::~CompleteContinuouslyPushResult()
|
||||
{}
|
||||
|
||||
void CompleteContinuouslyPushResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["MessageId"].isNull())
|
||||
messageId_ = value["MessageId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string CompleteContinuouslyPushResult::getMessageId()const
|
||||
{
|
||||
return messageId_;
|
||||
}
|
||||
|
||||
82
push/src/model/ContinuouslyPushRequest.cc
Normal file
82
push/src/model/ContinuouslyPushRequest.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/push/model/ContinuouslyPushRequest.h>
|
||||
|
||||
using AlibabaCloud::Push::Model::ContinuouslyPushRequest;
|
||||
|
||||
ContinuouslyPushRequest::ContinuouslyPushRequest() :
|
||||
RpcServiceRequest("push", "2016-08-01", "ContinuouslyPush")
|
||||
{}
|
||||
|
||||
ContinuouslyPushRequest::~ContinuouslyPushRequest()
|
||||
{}
|
||||
|
||||
std::string ContinuouslyPushRequest::getMessageId()const
|
||||
{
|
||||
return messageId_;
|
||||
}
|
||||
|
||||
void ContinuouslyPushRequest::setMessageId(const std::string& messageId)
|
||||
{
|
||||
messageId_ = messageId;
|
||||
setCoreParameter("MessageId", messageId);
|
||||
}
|
||||
|
||||
std::string ContinuouslyPushRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void ContinuouslyPushRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
std::string ContinuouslyPushRequest::getTarget()const
|
||||
{
|
||||
return target_;
|
||||
}
|
||||
|
||||
void ContinuouslyPushRequest::setTarget(const std::string& target)
|
||||
{
|
||||
target_ = target;
|
||||
setCoreParameter("Target", target);
|
||||
}
|
||||
|
||||
long ContinuouslyPushRequest::getAppKey()const
|
||||
{
|
||||
return appKey_;
|
||||
}
|
||||
|
||||
void ContinuouslyPushRequest::setAppKey(long appKey)
|
||||
{
|
||||
appKey_ = appKey;
|
||||
setCoreParameter("AppKey", std::to_string(appKey));
|
||||
}
|
||||
|
||||
std::string ContinuouslyPushRequest::getTargetValue()const
|
||||
{
|
||||
return targetValue_;
|
||||
}
|
||||
|
||||
void ContinuouslyPushRequest::setTargetValue(const std::string& targetValue)
|
||||
{
|
||||
targetValue_ = targetValue;
|
||||
setCoreParameter("TargetValue", targetValue);
|
||||
}
|
||||
|
||||
51
push/src/model/ContinuouslyPushResult.cc
Normal file
51
push/src/model/ContinuouslyPushResult.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/push/model/ContinuouslyPushResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Push;
|
||||
using namespace AlibabaCloud::Push::Model;
|
||||
|
||||
ContinuouslyPushResult::ContinuouslyPushResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ContinuouslyPushResult::ContinuouslyPushResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ContinuouslyPushResult::~ContinuouslyPushResult()
|
||||
{}
|
||||
|
||||
void ContinuouslyPushResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["MessageId"].isNull())
|
||||
messageId_ = value["MessageId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string ContinuouslyPushResult::getMessageId()const
|
||||
{
|
||||
return messageId_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user