Generated 2024-02-22 for OssSddp.

This commit is contained in:
sdk-team
2024-09-24 03:29:18 +00:00
parent ce74411ad3
commit e2d298dba8
13 changed files with 682 additions and 1 deletions

View File

@@ -1 +1 @@
1.36.1988
1.36.1989

90
osssddp/CMakeLists.txt Normal file
View File

@@ -0,0 +1,90 @@
#
# 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(osssddp_public_header
include/alibabacloud/osssddp/OssSddpClient.h
include/alibabacloud/osssddp/OssSddpExport.h )
set(osssddp_public_header_model
include/alibabacloud/osssddp/model/GetSddpVersionRequest.h
include/alibabacloud/osssddp/model/GetSddpVersionResult.h
include/alibabacloud/osssddp/model/UpgradeSddpVersionRequest.h
include/alibabacloud/osssddp/model/UpgradeSddpVersionResult.h )
set(osssddp_src
src/OssSddpClient.cc
src/model/GetSddpVersionRequest.cc
src/model/GetSddpVersionResult.cc
src/model/UpgradeSddpVersionRequest.cc
src/model/UpgradeSddpVersionResult.cc )
add_library(osssddp ${LIB_TYPE}
${osssddp_public_header}
${osssddp_public_header_model}
${osssddp_src})
set_target_properties(osssddp
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}osssddp
)
if(${LIB_TYPE} STREQUAL "SHARED")
set_target_properties(osssddp
PROPERTIES
DEFINE_SYMBOL ALIBABACLOUD_OSSSDDP_LIBRARY)
endif()
target_include_directories(osssddp
PRIVATE include
${CMAKE_SOURCE_DIR}/core/include
)
target_link_libraries(osssddp
core)
if(CMAKE_HOST_WIN32)
ExternalProject_Get_Property(jsoncpp INSTALL_DIR)
set(jsoncpp_install_dir ${INSTALL_DIR})
add_dependencies(osssddp
jsoncpp)
target_include_directories(osssddp
PRIVATE ${jsoncpp_install_dir}/include)
target_link_libraries(osssddp
${jsoncpp_install_dir}/lib/jsoncpp.lib)
set_target_properties(osssddp
PROPERTIES
COMPILE_OPTIONS "/bigobj")
else()
target_include_directories(osssddp
PRIVATE /usr/include/jsoncpp)
target_link_libraries(osssddp
jsoncpp)
endif()
install(FILES ${osssddp_public_header}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/osssddp)
install(FILES ${osssddp_public_header_model}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/osssddp/model)
install(TARGETS osssddp
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)

View File

@@ -0,0 +1,62 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_OSSSDDP_OSSSDDPCLIENT_H_
#define ALIBABACLOUD_OSSSDDP_OSSSDDPCLIENT_H_
#include <future>
#include <alibabacloud/core/AsyncCallerContext.h>
#include <alibabacloud/core/EndpointProvider.h>
#include <alibabacloud/core/RpcServiceClient.h>
#include "OssSddpExport.h"
#include "model/GetSddpVersionRequest.h"
#include "model/GetSddpVersionResult.h"
#include "model/UpgradeSddpVersionRequest.h"
#include "model/UpgradeSddpVersionResult.h"
namespace AlibabaCloud
{
namespace OssSddp
{
class ALIBABACLOUD_OSSSDDP_EXPORT OssSddpClient : public RpcServiceClient
{
public:
typedef Outcome<Error, Model::GetSddpVersionResult> GetSddpVersionOutcome;
typedef std::future<GetSddpVersionOutcome> GetSddpVersionOutcomeCallable;
typedef std::function<void(const OssSddpClient*, const Model::GetSddpVersionRequest&, const GetSddpVersionOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetSddpVersionAsyncHandler;
typedef Outcome<Error, Model::UpgradeSddpVersionResult> UpgradeSddpVersionOutcome;
typedef std::future<UpgradeSddpVersionOutcome> UpgradeSddpVersionOutcomeCallable;
typedef std::function<void(const OssSddpClient*, const Model::UpgradeSddpVersionRequest&, const UpgradeSddpVersionOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UpgradeSddpVersionAsyncHandler;
OssSddpClient(const Credentials &credentials, const ClientConfiguration &configuration);
OssSddpClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
OssSddpClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
~OssSddpClient();
GetSddpVersionOutcome getSddpVersion(const Model::GetSddpVersionRequest &request)const;
void getSddpVersionAsync(const Model::GetSddpVersionRequest& request, const GetSddpVersionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetSddpVersionOutcomeCallable getSddpVersionCallable(const Model::GetSddpVersionRequest& request) const;
UpgradeSddpVersionOutcome upgradeSddpVersion(const Model::UpgradeSddpVersionRequest &request)const;
void upgradeSddpVersionAsync(const Model::UpgradeSddpVersionRequest& request, const UpgradeSddpVersionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
UpgradeSddpVersionOutcomeCallable upgradeSddpVersionCallable(const Model::UpgradeSddpVersionRequest& request) const;
private:
std::shared_ptr<EndpointProvider> endpointProvider_;
};
}
}
#endif // !ALIBABACLOUD_OSSSDDP_OSSSDDPCLIENT_H_

View File

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

View File

@@ -0,0 +1,42 @@
/*
* 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_OSSSDDP_MODEL_GETSDDPVERSIONREQUEST_H_
#define ALIBABACLOUD_OSSSDDP_MODEL_GETSDDPVERSIONREQUEST_H_
#include <alibabacloud/osssddp/OssSddpExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace OssSddp {
namespace Model {
class ALIBABACLOUD_OSSSDDP_EXPORT GetSddpVersionRequest : public RpcServiceRequest {
public:
GetSddpVersionRequest();
~GetSddpVersionRequest();
std::string getClientToken() const;
void setClientToken(const std::string &clientToken);
private:
std::string clientToken_;
};
} // namespace Model
} // namespace OssSddp
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_OSSSDDP_MODEL_GETSDDPVERSIONREQUEST_H_

View File

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

View File

@@ -0,0 +1,45 @@
/*
* 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_OSSSDDP_MODEL_UPGRADESDDPVERSIONREQUEST_H_
#define ALIBABACLOUD_OSSSDDP_MODEL_UPGRADESDDPVERSIONREQUEST_H_
#include <alibabacloud/osssddp/OssSddpExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace OssSddp {
namespace Model {
class ALIBABACLOUD_OSSSDDP_EXPORT UpgradeSddpVersionRequest : public RpcServiceRequest {
public:
UpgradeSddpVersionRequest();
~UpgradeSddpVersionRequest();
std::string getClientToken() const;
void setClientToken(const std::string &clientToken);
int getOssVersion() const;
void setOssVersion(int ossVersion);
private:
std::string clientToken_;
int ossVersion_;
};
} // namespace Model
} // namespace OssSddp
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_OSSSDDP_MODEL_UPGRADESDDPVERSIONREQUEST_H_

View File

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

View File

@@ -0,0 +1,125 @@
/*
* 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/osssddp/OssSddpClient.h>
#include <alibabacloud/core/SimpleCredentialsProvider.h>
using namespace AlibabaCloud;
using namespace AlibabaCloud::Location;
using namespace AlibabaCloud::OssSddp;
using namespace AlibabaCloud::OssSddp::Model;
namespace
{
const std::string SERVICE_NAME = "OssSddp";
}
OssSddpClient::OssSddpClient(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, "");
}
OssSddpClient::OssSddpClient(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, "");
}
OssSddpClient::OssSddpClient(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, "");
}
OssSddpClient::~OssSddpClient()
{}
OssSddpClient::GetSddpVersionOutcome OssSddpClient::getSddpVersion(const GetSddpVersionRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetSddpVersionOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetSddpVersionOutcome(GetSddpVersionResult(outcome.result()));
else
return GetSddpVersionOutcome(outcome.error());
}
void OssSddpClient::getSddpVersionAsync(const GetSddpVersionRequest& request, const GetSddpVersionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getSddpVersion(request), context);
};
asyncExecute(new Runnable(fn));
}
OssSddpClient::GetSddpVersionOutcomeCallable OssSddpClient::getSddpVersionCallable(const GetSddpVersionRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetSddpVersionOutcome()>>(
[this, request]()
{
return this->getSddpVersion(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
OssSddpClient::UpgradeSddpVersionOutcome OssSddpClient::upgradeSddpVersion(const UpgradeSddpVersionRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return UpgradeSddpVersionOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return UpgradeSddpVersionOutcome(UpgradeSddpVersionResult(outcome.result()));
else
return UpgradeSddpVersionOutcome(outcome.error());
}
void OssSddpClient::upgradeSddpVersionAsync(const UpgradeSddpVersionRequest& request, const UpgradeSddpVersionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, upgradeSddpVersion(request), context);
};
asyncExecute(new Runnable(fn));
}
OssSddpClient::UpgradeSddpVersionOutcomeCallable OssSddpClient::upgradeSddpVersionCallable(const UpgradeSddpVersionRequest &request) const
{
auto task = std::make_shared<std::packaged_task<UpgradeSddpVersionOutcome()>>(
[this, request]()
{
return this->upgradeSddpVersion(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}

View File

@@ -0,0 +1,36 @@
/*
* 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/osssddp/model/GetSddpVersionRequest.h>
using AlibabaCloud::OssSddp::Model::GetSddpVersionRequest;
GetSddpVersionRequest::GetSddpVersionRequest()
: RpcServiceRequest("osssddp", "2024-02-22", "GetSddpVersion") {
setMethod(HttpRequest::Method::Post);
}
GetSddpVersionRequest::~GetSddpVersionRequest() {}
std::string GetSddpVersionRequest::getClientToken() const {
return clientToken_;
}
void GetSddpVersionRequest::setClientToken(const std::string &clientToken) {
clientToken_ = clientToken;
setParameter(std::string("ClientToken"), clientToken);
}

View File

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

View File

@@ -0,0 +1,45 @@
/*
* 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/osssddp/model/UpgradeSddpVersionRequest.h>
using AlibabaCloud::OssSddp::Model::UpgradeSddpVersionRequest;
UpgradeSddpVersionRequest::UpgradeSddpVersionRequest()
: RpcServiceRequest("osssddp", "2024-02-22", "UpgradeSddpVersion") {
setMethod(HttpRequest::Method::Post);
}
UpgradeSddpVersionRequest::~UpgradeSddpVersionRequest() {}
std::string UpgradeSddpVersionRequest::getClientToken() const {
return clientToken_;
}
void UpgradeSddpVersionRequest::setClientToken(const std::string &clientToken) {
clientToken_ = clientToken;
setParameter(std::string("ClientToken"), clientToken);
}
int UpgradeSddpVersionRequest::getOssVersion() const {
return ossVersion_;
}
void UpgradeSddpVersionRequest::setOssVersion(int ossVersion) {
ossVersion_ = ossVersion;
setParameter(std::string("OssVersion"), std::to_string(ossVersion));
}

View File

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