Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7453673df9 | ||
|
|
d3da09eb38 | ||
|
|
3b52186538 |
@@ -1,3 +1,12 @@
|
||||
2020-02-13 Version 1.36.259
|
||||
- Init MQTT SDK .
|
||||
|
||||
2020-02-12 Version 1.36.258
|
||||
- Support to create, describe and expire demo access token.
|
||||
|
||||
2020-02-12 Version 1.36.257
|
||||
- Update Full showStorageTyp.
|
||||
|
||||
2020-02-12 Version 1.36.256
|
||||
- Add Full showStorageTyp.
|
||||
|
||||
|
||||
94
democenter/CMakeLists.txt
Normal file
94
democenter/CMakeLists.txt
Normal file
@@ -0,0 +1,94 @@
|
||||
#
|
||||
# Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
set(public_header_dir ${CMAKE_CURRENT_SOURCE_DIR}/../include)
|
||||
|
||||
set(democenter_public_header
|
||||
include/alibabacloud/democenter/DemoCenterClient.h
|
||||
include/alibabacloud/democenter/DemoCenterExport.h )
|
||||
|
||||
set(democenter_public_header_model
|
||||
include/alibabacloud/democenter/model/CreateDemoAccessTokenRequest.h
|
||||
include/alibabacloud/democenter/model/CreateDemoAccessTokenResult.h
|
||||
include/alibabacloud/democenter/model/DescribeDemoAccessTokenRequest.h
|
||||
include/alibabacloud/democenter/model/DescribeDemoAccessTokenResult.h
|
||||
include/alibabacloud/democenter/model/ExpireDemoAccessTokenRequest.h
|
||||
include/alibabacloud/democenter/model/ExpireDemoAccessTokenResult.h )
|
||||
|
||||
set(democenter_src
|
||||
src/DemoCenterClient.cc
|
||||
src/model/CreateDemoAccessTokenRequest.cc
|
||||
src/model/CreateDemoAccessTokenResult.cc
|
||||
src/model/DescribeDemoAccessTokenRequest.cc
|
||||
src/model/DescribeDemoAccessTokenResult.cc
|
||||
src/model/ExpireDemoAccessTokenRequest.cc
|
||||
src/model/ExpireDemoAccessTokenResult.cc )
|
||||
|
||||
add_library(democenter ${LIB_TYPE}
|
||||
${democenter_public_header}
|
||||
${democenter_public_header_model}
|
||||
${democenter_src})
|
||||
|
||||
set_target_properties(democenter
|
||||
PROPERTIES
|
||||
LINKER_LANGUAGE CXX
|
||||
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
|
||||
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
||||
OUTPUT_NAME ${TARGET_OUTPUT_NAME_PREFIX}democenter
|
||||
)
|
||||
|
||||
if(${LIB_TYPE} STREQUAL "SHARED")
|
||||
set_target_properties(democenter
|
||||
PROPERTIES
|
||||
DEFINE_SYMBOL ALIBABACLOUD_DEMOCENTER_LIBRARY)
|
||||
endif()
|
||||
|
||||
target_include_directories(democenter
|
||||
PRIVATE include
|
||||
${CMAKE_SOURCE_DIR}/core/include
|
||||
)
|
||||
target_link_libraries(democenter
|
||||
core)
|
||||
|
||||
if(CMAKE_HOST_WIN32)
|
||||
ExternalProject_Get_Property(jsoncpp INSTALL_DIR)
|
||||
set(jsoncpp_install_dir ${INSTALL_DIR})
|
||||
add_dependencies(democenter
|
||||
jsoncpp)
|
||||
target_include_directories(democenter
|
||||
PRIVATE ${jsoncpp_install_dir}/include)
|
||||
target_link_libraries(democenter
|
||||
${jsoncpp_install_dir}/lib/jsoncpp.lib)
|
||||
set_target_properties(democenter
|
||||
PROPERTIES
|
||||
COMPILE_OPTIONS "/bigobj")
|
||||
else()
|
||||
target_include_directories(democenter
|
||||
PRIVATE /usr/include/jsoncpp)
|
||||
target_link_libraries(democenter
|
||||
jsoncpp)
|
||||
endif()
|
||||
|
||||
install(FILES ${democenter_public_header}
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/democenter)
|
||||
install(FILES ${democenter_public_header_model}
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/democenter/model)
|
||||
install(TARGETS democenter
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
)
|
||||
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_DEMOCENTER_DEMOCENTERCLIENT_H_
|
||||
#define ALIBABACLOUD_DEMOCENTER_DEMOCENTERCLIENT_H_
|
||||
|
||||
#include <future>
|
||||
#include <alibabacloud/core/AsyncCallerContext.h>
|
||||
#include <alibabacloud/core/EndpointProvider.h>
|
||||
#include <alibabacloud/core/RpcServiceClient.h>
|
||||
#include "DemoCenterExport.h"
|
||||
#include "model/CreateDemoAccessTokenRequest.h"
|
||||
#include "model/CreateDemoAccessTokenResult.h"
|
||||
#include "model/DescribeDemoAccessTokenRequest.h"
|
||||
#include "model/DescribeDemoAccessTokenResult.h"
|
||||
#include "model/ExpireDemoAccessTokenRequest.h"
|
||||
#include "model/ExpireDemoAccessTokenResult.h"
|
||||
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace DemoCenter
|
||||
{
|
||||
class ALIBABACLOUD_DEMOCENTER_EXPORT DemoCenterClient : public RpcServiceClient
|
||||
{
|
||||
public:
|
||||
typedef Outcome<Error, Model::CreateDemoAccessTokenResult> CreateDemoAccessTokenOutcome;
|
||||
typedef std::future<CreateDemoAccessTokenOutcome> CreateDemoAccessTokenOutcomeCallable;
|
||||
typedef std::function<void(const DemoCenterClient*, const Model::CreateDemoAccessTokenRequest&, const CreateDemoAccessTokenOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateDemoAccessTokenAsyncHandler;
|
||||
typedef Outcome<Error, Model::DescribeDemoAccessTokenResult> DescribeDemoAccessTokenOutcome;
|
||||
typedef std::future<DescribeDemoAccessTokenOutcome> DescribeDemoAccessTokenOutcomeCallable;
|
||||
typedef std::function<void(const DemoCenterClient*, const Model::DescribeDemoAccessTokenRequest&, const DescribeDemoAccessTokenOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeDemoAccessTokenAsyncHandler;
|
||||
typedef Outcome<Error, Model::ExpireDemoAccessTokenResult> ExpireDemoAccessTokenOutcome;
|
||||
typedef std::future<ExpireDemoAccessTokenOutcome> ExpireDemoAccessTokenOutcomeCallable;
|
||||
typedef std::function<void(const DemoCenterClient*, const Model::ExpireDemoAccessTokenRequest&, const ExpireDemoAccessTokenOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ExpireDemoAccessTokenAsyncHandler;
|
||||
|
||||
DemoCenterClient(const Credentials &credentials, const ClientConfiguration &configuration);
|
||||
DemoCenterClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
|
||||
DemoCenterClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
|
||||
~DemoCenterClient();
|
||||
CreateDemoAccessTokenOutcome createDemoAccessToken(const Model::CreateDemoAccessTokenRequest &request)const;
|
||||
void createDemoAccessTokenAsync(const Model::CreateDemoAccessTokenRequest& request, const CreateDemoAccessTokenAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CreateDemoAccessTokenOutcomeCallable createDemoAccessTokenCallable(const Model::CreateDemoAccessTokenRequest& request) const;
|
||||
DescribeDemoAccessTokenOutcome describeDemoAccessToken(const Model::DescribeDemoAccessTokenRequest &request)const;
|
||||
void describeDemoAccessTokenAsync(const Model::DescribeDemoAccessTokenRequest& request, const DescribeDemoAccessTokenAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribeDemoAccessTokenOutcomeCallable describeDemoAccessTokenCallable(const Model::DescribeDemoAccessTokenRequest& request) const;
|
||||
ExpireDemoAccessTokenOutcome expireDemoAccessToken(const Model::ExpireDemoAccessTokenRequest &request)const;
|
||||
void expireDemoAccessTokenAsync(const Model::ExpireDemoAccessTokenRequest& request, const ExpireDemoAccessTokenAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ExpireDemoAccessTokenOutcomeCallable expireDemoAccessTokenCallable(const Model::ExpireDemoAccessTokenRequest& request) const;
|
||||
|
||||
private:
|
||||
std::shared_ptr<EndpointProvider> endpointProvider_;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // !ALIBABACLOUD_DEMOCENTER_DEMOCENTERCLIENT_H_
|
||||
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_DEMOCENTER_DEMOCENTEREXPORT_H_
|
||||
#define ALIBABACLOUD_DEMOCENTER_DEMOCENTEREXPORT_H_
|
||||
|
||||
#include <alibabacloud/core/Global.h>
|
||||
|
||||
#if defined(ALIBABACLOUD_SHARED)
|
||||
# if defined(ALIBABACLOUD_DEMOCENTER_LIBRARY)
|
||||
# define ALIBABACLOUD_DEMOCENTER_EXPORT ALIBABACLOUD_DECL_EXPORT
|
||||
# else
|
||||
# define ALIBABACLOUD_DEMOCENTER_EXPORT ALIBABACLOUD_DECL_IMPORT
|
||||
# endif
|
||||
#else
|
||||
# define ALIBABACLOUD_DEMOCENTER_EXPORT
|
||||
#endif
|
||||
|
||||
#endif // !ALIBABACLOUD_DEMOCENTER_DEMOCENTEREXPORT_H_
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_DEMOCENTER_MODEL_CREATEDEMOACCESSTOKENREQUEST_H_
|
||||
#define ALIBABACLOUD_DEMOCENTER_MODEL_CREATEDEMOACCESSTOKENREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/democenter/DemoCenterExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace DemoCenter
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_DEMOCENTER_EXPORT CreateDemoAccessTokenRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
CreateDemoAccessTokenRequest();
|
||||
~CreateDemoAccessTokenRequest();
|
||||
|
||||
long getDemoId()const;
|
||||
void setDemoId(long demoId);
|
||||
|
||||
private:
|
||||
long demoId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_DEMOCENTER_MODEL_CREATEDEMOACCESSTOKENREQUEST_H_
|
||||
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_DEMOCENTER_MODEL_CREATEDEMOACCESSTOKENRESULT_H_
|
||||
#define ALIBABACLOUD_DEMOCENTER_MODEL_CREATEDEMOACCESSTOKENRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/democenter/DemoCenterExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace DemoCenter
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_DEMOCENTER_EXPORT CreateDemoAccessTokenResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
CreateDemoAccessTokenResult();
|
||||
explicit CreateDemoAccessTokenResult(const std::string &payload);
|
||||
~CreateDemoAccessTokenResult();
|
||||
std::string getDemoTrialPage()const;
|
||||
std::string getDemoDetailPage()const;
|
||||
std::string getExpiredDate()const;
|
||||
std::string getDemoAccessToken()const;
|
||||
std::string getOpenUserId()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string demoTrialPage_;
|
||||
std::string demoDetailPage_;
|
||||
std::string expiredDate_;
|
||||
std::string demoAccessToken_;
|
||||
std::string openUserId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_DEMOCENTER_MODEL_CREATEDEMOACCESSTOKENRESULT_H_
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_DEMOCENTER_MODEL_DESCRIBEDEMOACCESSTOKENREQUEST_H_
|
||||
#define ALIBABACLOUD_DEMOCENTER_MODEL_DESCRIBEDEMOACCESSTOKENREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/democenter/DemoCenterExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace DemoCenter
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_DEMOCENTER_EXPORT DescribeDemoAccessTokenRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
DescribeDemoAccessTokenRequest();
|
||||
~DescribeDemoAccessTokenRequest();
|
||||
|
||||
std::string getDemoAccessToken()const;
|
||||
void setDemoAccessToken(const std::string& demoAccessToken);
|
||||
|
||||
private:
|
||||
std::string demoAccessToken_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_DEMOCENTER_MODEL_DESCRIBEDEMOACCESSTOKENREQUEST_H_
|
||||
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_DEMOCENTER_MODEL_DESCRIBEDEMOACCESSTOKENRESULT_H_
|
||||
#define ALIBABACLOUD_DEMOCENTER_MODEL_DESCRIBEDEMOACCESSTOKENRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/democenter/DemoCenterExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace DemoCenter
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_DEMOCENTER_EXPORT DescribeDemoAccessTokenResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
DescribeDemoAccessTokenResult();
|
||||
explicit DescribeDemoAccessTokenResult(const std::string &payload);
|
||||
~DescribeDemoAccessTokenResult();
|
||||
std::string getDemoTrialPage()const;
|
||||
std::string getDemoDetailPage()const;
|
||||
std::string getExpiredDate()const;
|
||||
std::string getDemoAccessToken()const;
|
||||
std::string getOpenUserId()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string demoTrialPage_;
|
||||
std::string demoDetailPage_;
|
||||
std::string expiredDate_;
|
||||
std::string demoAccessToken_;
|
||||
std::string openUserId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_DEMOCENTER_MODEL_DESCRIBEDEMOACCESSTOKENRESULT_H_
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_DEMOCENTER_MODEL_EXPIREDEMOACCESSTOKENREQUEST_H_
|
||||
#define ALIBABACLOUD_DEMOCENTER_MODEL_EXPIREDEMOACCESSTOKENREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/democenter/DemoCenterExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace DemoCenter
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_DEMOCENTER_EXPORT ExpireDemoAccessTokenRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
ExpireDemoAccessTokenRequest();
|
||||
~ExpireDemoAccessTokenRequest();
|
||||
|
||||
std::string getDemoAccessToken()const;
|
||||
void setDemoAccessToken(const std::string& demoAccessToken);
|
||||
|
||||
private:
|
||||
std::string demoAccessToken_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_DEMOCENTER_MODEL_EXPIREDEMOACCESSTOKENREQUEST_H_
|
||||
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_DEMOCENTER_MODEL_EXPIREDEMOACCESSTOKENRESULT_H_
|
||||
#define ALIBABACLOUD_DEMOCENTER_MODEL_EXPIREDEMOACCESSTOKENRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/democenter/DemoCenterExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace DemoCenter
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_DEMOCENTER_EXPORT ExpireDemoAccessTokenResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
ExpireDemoAccessTokenResult();
|
||||
explicit ExpireDemoAccessTokenResult(const std::string &payload);
|
||||
~ExpireDemoAccessTokenResult();
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_DEMOCENTER_MODEL_EXPIREDEMOACCESSTOKENRESULT_H_
|
||||
161
democenter/src/DemoCenterClient.cc
Normal file
161
democenter/src/DemoCenterClient.cc
Normal file
@@ -0,0 +1,161 @@
|
||||
/*
|
||||
* 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/democenter/DemoCenterClient.h>
|
||||
#include <alibabacloud/core/SimpleCredentialsProvider.h>
|
||||
|
||||
using namespace AlibabaCloud;
|
||||
using namespace AlibabaCloud::Location;
|
||||
using namespace AlibabaCloud::DemoCenter;
|
||||
using namespace AlibabaCloud::DemoCenter::Model;
|
||||
|
||||
namespace
|
||||
{
|
||||
const std::string SERVICE_NAME = "DemoCenter";
|
||||
}
|
||||
|
||||
DemoCenterClient::DemoCenterClient(const Credentials &credentials, const ClientConfiguration &configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "DemoCenter");
|
||||
}
|
||||
|
||||
DemoCenterClient::DemoCenterClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "DemoCenter");
|
||||
}
|
||||
|
||||
DemoCenterClient::DemoCenterClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "DemoCenter");
|
||||
}
|
||||
|
||||
DemoCenterClient::~DemoCenterClient()
|
||||
{}
|
||||
|
||||
DemoCenterClient::CreateDemoAccessTokenOutcome DemoCenterClient::createDemoAccessToken(const CreateDemoAccessTokenRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CreateDemoAccessTokenOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CreateDemoAccessTokenOutcome(CreateDemoAccessTokenResult(outcome.result()));
|
||||
else
|
||||
return CreateDemoAccessTokenOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void DemoCenterClient::createDemoAccessTokenAsync(const CreateDemoAccessTokenRequest& request, const CreateDemoAccessTokenAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, createDemoAccessToken(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
DemoCenterClient::CreateDemoAccessTokenOutcomeCallable DemoCenterClient::createDemoAccessTokenCallable(const CreateDemoAccessTokenRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CreateDemoAccessTokenOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->createDemoAccessToken(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DemoCenterClient::DescribeDemoAccessTokenOutcome DemoCenterClient::describeDemoAccessToken(const DescribeDemoAccessTokenRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeDemoAccessTokenOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeDemoAccessTokenOutcome(DescribeDemoAccessTokenResult(outcome.result()));
|
||||
else
|
||||
return DescribeDemoAccessTokenOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void DemoCenterClient::describeDemoAccessTokenAsync(const DescribeDemoAccessTokenRequest& request, const DescribeDemoAccessTokenAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeDemoAccessToken(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
DemoCenterClient::DescribeDemoAccessTokenOutcomeCallable DemoCenterClient::describeDemoAccessTokenCallable(const DescribeDemoAccessTokenRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeDemoAccessTokenOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeDemoAccessToken(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
DemoCenterClient::ExpireDemoAccessTokenOutcome DemoCenterClient::expireDemoAccessToken(const ExpireDemoAccessTokenRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ExpireDemoAccessTokenOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ExpireDemoAccessTokenOutcome(ExpireDemoAccessTokenResult(outcome.result()));
|
||||
else
|
||||
return ExpireDemoAccessTokenOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void DemoCenterClient::expireDemoAccessTokenAsync(const ExpireDemoAccessTokenRequest& request, const ExpireDemoAccessTokenAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, expireDemoAccessToken(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
DemoCenterClient::ExpireDemoAccessTokenOutcomeCallable DemoCenterClient::expireDemoAccessTokenCallable(const ExpireDemoAccessTokenRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ExpireDemoAccessTokenOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->expireDemoAccessToken(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
40
democenter/src/model/CreateDemoAccessTokenRequest.cc
Normal file
40
democenter/src/model/CreateDemoAccessTokenRequest.cc
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* 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/democenter/model/CreateDemoAccessTokenRequest.h>
|
||||
|
||||
using AlibabaCloud::DemoCenter::Model::CreateDemoAccessTokenRequest;
|
||||
|
||||
CreateDemoAccessTokenRequest::CreateDemoAccessTokenRequest() :
|
||||
RpcServiceRequest("democenter", "2020-01-21", "CreateDemoAccessToken")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CreateDemoAccessTokenRequest::~CreateDemoAccessTokenRequest()
|
||||
{}
|
||||
|
||||
long CreateDemoAccessTokenRequest::getDemoId()const
|
||||
{
|
||||
return demoId_;
|
||||
}
|
||||
|
||||
void CreateDemoAccessTokenRequest::setDemoId(long demoId)
|
||||
{
|
||||
demoId_ = demoId;
|
||||
setBodyParameter("DemoId", std::to_string(demoId));
|
||||
}
|
||||
|
||||
79
democenter/src/model/CreateDemoAccessTokenResult.cc
Normal file
79
democenter/src/model/CreateDemoAccessTokenResult.cc
Normal file
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/democenter/model/CreateDemoAccessTokenResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::DemoCenter;
|
||||
using namespace AlibabaCloud::DemoCenter::Model;
|
||||
|
||||
CreateDemoAccessTokenResult::CreateDemoAccessTokenResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateDemoAccessTokenResult::CreateDemoAccessTokenResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateDemoAccessTokenResult::~CreateDemoAccessTokenResult()
|
||||
{}
|
||||
|
||||
void CreateDemoAccessTokenResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["DemoAccessToken"].isNull())
|
||||
demoAccessToken_ = value["DemoAccessToken"].asString();
|
||||
if(!value["ExpiredDate"].isNull())
|
||||
expiredDate_ = value["ExpiredDate"].asString();
|
||||
if(!value["OpenUserId"].isNull())
|
||||
openUserId_ = value["OpenUserId"].asString();
|
||||
if(!value["DemoTrialPage"].isNull())
|
||||
demoTrialPage_ = value["DemoTrialPage"].asString();
|
||||
if(!value["DemoDetailPage"].isNull())
|
||||
demoDetailPage_ = value["DemoDetailPage"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string CreateDemoAccessTokenResult::getDemoTrialPage()const
|
||||
{
|
||||
return demoTrialPage_;
|
||||
}
|
||||
|
||||
std::string CreateDemoAccessTokenResult::getDemoDetailPage()const
|
||||
{
|
||||
return demoDetailPage_;
|
||||
}
|
||||
|
||||
std::string CreateDemoAccessTokenResult::getExpiredDate()const
|
||||
{
|
||||
return expiredDate_;
|
||||
}
|
||||
|
||||
std::string CreateDemoAccessTokenResult::getDemoAccessToken()const
|
||||
{
|
||||
return demoAccessToken_;
|
||||
}
|
||||
|
||||
std::string CreateDemoAccessTokenResult::getOpenUserId()const
|
||||
{
|
||||
return openUserId_;
|
||||
}
|
||||
|
||||
40
democenter/src/model/DescribeDemoAccessTokenRequest.cc
Normal file
40
democenter/src/model/DescribeDemoAccessTokenRequest.cc
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* 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/democenter/model/DescribeDemoAccessTokenRequest.h>
|
||||
|
||||
using AlibabaCloud::DemoCenter::Model::DescribeDemoAccessTokenRequest;
|
||||
|
||||
DescribeDemoAccessTokenRequest::DescribeDemoAccessTokenRequest() :
|
||||
RpcServiceRequest("democenter", "2020-01-21", "DescribeDemoAccessToken")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
DescribeDemoAccessTokenRequest::~DescribeDemoAccessTokenRequest()
|
||||
{}
|
||||
|
||||
std::string DescribeDemoAccessTokenRequest::getDemoAccessToken()const
|
||||
{
|
||||
return demoAccessToken_;
|
||||
}
|
||||
|
||||
void DescribeDemoAccessTokenRequest::setDemoAccessToken(const std::string& demoAccessToken)
|
||||
{
|
||||
demoAccessToken_ = demoAccessToken;
|
||||
setBodyParameter("DemoAccessToken", demoAccessToken);
|
||||
}
|
||||
|
||||
79
democenter/src/model/DescribeDemoAccessTokenResult.cc
Normal file
79
democenter/src/model/DescribeDemoAccessTokenResult.cc
Normal file
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/democenter/model/DescribeDemoAccessTokenResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::DemoCenter;
|
||||
using namespace AlibabaCloud::DemoCenter::Model;
|
||||
|
||||
DescribeDemoAccessTokenResult::DescribeDemoAccessTokenResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeDemoAccessTokenResult::DescribeDemoAccessTokenResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeDemoAccessTokenResult::~DescribeDemoAccessTokenResult()
|
||||
{}
|
||||
|
||||
void DescribeDemoAccessTokenResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["DemoAccessToken"].isNull())
|
||||
demoAccessToken_ = value["DemoAccessToken"].asString();
|
||||
if(!value["ExpiredDate"].isNull())
|
||||
expiredDate_ = value["ExpiredDate"].asString();
|
||||
if(!value["OpenUserId"].isNull())
|
||||
openUserId_ = value["OpenUserId"].asString();
|
||||
if(!value["DemoTrialPage"].isNull())
|
||||
demoTrialPage_ = value["DemoTrialPage"].asString();
|
||||
if(!value["DemoDetailPage"].isNull())
|
||||
demoDetailPage_ = value["DemoDetailPage"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string DescribeDemoAccessTokenResult::getDemoTrialPage()const
|
||||
{
|
||||
return demoTrialPage_;
|
||||
}
|
||||
|
||||
std::string DescribeDemoAccessTokenResult::getDemoDetailPage()const
|
||||
{
|
||||
return demoDetailPage_;
|
||||
}
|
||||
|
||||
std::string DescribeDemoAccessTokenResult::getExpiredDate()const
|
||||
{
|
||||
return expiredDate_;
|
||||
}
|
||||
|
||||
std::string DescribeDemoAccessTokenResult::getDemoAccessToken()const
|
||||
{
|
||||
return demoAccessToken_;
|
||||
}
|
||||
|
||||
std::string DescribeDemoAccessTokenResult::getOpenUserId()const
|
||||
{
|
||||
return openUserId_;
|
||||
}
|
||||
|
||||
40
democenter/src/model/ExpireDemoAccessTokenRequest.cc
Normal file
40
democenter/src/model/ExpireDemoAccessTokenRequest.cc
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* 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/democenter/model/ExpireDemoAccessTokenRequest.h>
|
||||
|
||||
using AlibabaCloud::DemoCenter::Model::ExpireDemoAccessTokenRequest;
|
||||
|
||||
ExpireDemoAccessTokenRequest::ExpireDemoAccessTokenRequest() :
|
||||
RpcServiceRequest("democenter", "2020-01-21", "ExpireDemoAccessToken")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ExpireDemoAccessTokenRequest::~ExpireDemoAccessTokenRequest()
|
||||
{}
|
||||
|
||||
std::string ExpireDemoAccessTokenRequest::getDemoAccessToken()const
|
||||
{
|
||||
return demoAccessToken_;
|
||||
}
|
||||
|
||||
void ExpireDemoAccessTokenRequest::setDemoAccessToken(const std::string& demoAccessToken)
|
||||
{
|
||||
demoAccessToken_ = demoAccessToken;
|
||||
setBodyParameter("DemoAccessToken", demoAccessToken);
|
||||
}
|
||||
|
||||
44
democenter/src/model/ExpireDemoAccessTokenResult.cc
Normal file
44
democenter/src/model/ExpireDemoAccessTokenResult.cc
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/democenter/model/ExpireDemoAccessTokenResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::DemoCenter;
|
||||
using namespace AlibabaCloud::DemoCenter::Model;
|
||||
|
||||
ExpireDemoAccessTokenResult::ExpireDemoAccessTokenResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ExpireDemoAccessTokenResult::ExpireDemoAccessTokenResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ExpireDemoAccessTokenResult::~ExpireDemoAccessTokenResult()
|
||||
{}
|
||||
|
||||
void ExpireDemoAccessTokenResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user